Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2700507pxj; Mon, 31 May 2021 08:34:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQvi8opn7hnxRqAso7znfFEyk2Y3sDsBVvpAPNNdYgEo6EceUalsLbzaRahggCvrpPy3qE X-Received: by 2002:aa7:c0d3:: with SMTP id j19mr2129464edp.196.1622475256732; Mon, 31 May 2021 08:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622475256; cv=none; d=google.com; s=arc-20160816; b=Z3lUdMUzqTJtEQBuqA3c9ppkfbHZa4NgVdiwmrprKlNDed2By5tZp/HJP2J7uHFnQ5 b0dx62R4y+KcgUw6LgM4GH5xFRedv1j00fDQBJs0Ql+c38UZkGozr09HtEReWelwSm1X +WAz5NxwxYoQFx/XCqAxiuCCfOMebxo+MIbsUgP2sTHOeTem3VIylYzzoXqrvxiauhIg RqBrP9m7/bj/0RAFbCi2LGNQ2NMH4DzyHhEbSHSkdBr4tF+hDrTX0zxXPnbnGhtrcg2R 8xUx9pBRu3pJgQ/0PFAs/iWQLVN+GjFjMpG4WcHCkxhacmtX0wm1xpvtIExDTDSYPkdP W0iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h1eGdHnyLS6USyymZ0mz3vS2zt5/52RueHciAouKzQI=; b=IgAE7ZSoZZnZB8rE44zC3b2GDUCP9ASg4mxYHxk+x8+4U0e+8TLcE24YS9OmPiXRR4 G3hQAMI29rA1bGzaAyWhfSBq1ne9jJvsMx7A56fIqK6ZX7ONmuMivTImF9e9oWLmXO9I h6SLjim8fxpgMxtx2PYWp3e11gy89JYrAMzKBqkApP4jhbszswtinu1b8f7uXTninXUy LA7589H8+87G5EZ2t6C7yY5vPIulKkCeRqmkGyH2X7MpgXPM7prKPpj8IV4tYpMuFzn7 gUiV+Na4KfNSMEcC8ePxQ1l/kcWaL20N0RnhdFJijuHaGH5vIefx+CE1d+H9+5kIz4vQ CC8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ew75sL0w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si12998208ede.61.2021.05.31.08.33.53; Mon, 31 May 2021 08:34:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ew75sL0w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232127AbhEaPck (ORCPT + 99 others); Mon, 31 May 2021 11:32:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233617AbhEaOVR (ORCPT ); Mon, 31 May 2021 10:21:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 89534619B9; Mon, 31 May 2021 13:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468674; bh=gG6HC9ah17z0IQSAObJ8OUJHcUi6DQ8G3ViJkwYZNzc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ew75sL0wO3DbyMY+9ySNo9yAkho3hQd4BQMKeHLf3/bAi/l/TIRvUi24kZGqM2999 /uqQ4qxrnkhPfj7FabC2kj9Yn6GOcbW0toc8xkNV9fLPW6N5Sx8u2dZhvHyjUE0PXT M407P7ROvqHpZBsgiL8b+9BnujYOtA1kQ7ksk4RA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , "David S. Miller" Subject: [PATCH 5.4 081/177] net: dsa: sja1105: error out on unsupported PHY mode Date: Mon, 31 May 2021 15:13:58 +0200 Message-Id: <20210531130650.706192588@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean commit 6729188d2646709941903052e4b78e1d82c239b9 upstream. The driver continues probing when a port is configured for an unsupported PHY interface type, instead it should stop. Fixes: 8aa9ebccae87 ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/sja1105/sja1105_main.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/dsa/sja1105/sja1105_main.c +++ b/drivers/net/dsa/sja1105/sja1105_main.c @@ -178,6 +178,7 @@ static int sja1105_init_mii_settings(str default: dev_err(dev, "Unsupported PHY mode %s!\n", phy_modes(ports[i].phy_mode)); + return -EINVAL; } mii->phy_mac[i] = ports[i].role;