Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2736529pxj; Mon, 31 May 2021 09:27:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQgXGjVKr0o7seBP7t7G6OBGF4DUGc/0ZXJP0dY7XnQCe5GNPjm/fW7OTat68/x/LHXFDD X-Received: by 2002:a05:6402:2713:: with SMTP id y19mr25795482edd.59.1622478423513; Mon, 31 May 2021 09:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622478423; cv=none; d=google.com; s=arc-20160816; b=aWdUqHNw+UT/NqT+/mbifPLpvznCKz86pPjnM96sQPw1eBajsteQzfhRqiV76Fde7V Fe6xeSTBL1FbUi335za4L086YSEQGxkx9hVscaFNcX+jMJQxS3Hu6WQuH2A9xeY0Rf0x YesZfEPwEHBbr4V9BjSB2lZgFgncnbfORuQNLR1sC7LOyQMkkL49lw4tMy+H86DQWn5L +bHAntAHH+MHnskExKaUXRT4GVkEINJ3JARA4Mhv3dV1+SolPhHpSRlCdpW8DPa17zKZ uY5wDhcFv/Uslu3c1PxWX6RB6qD/OU1ecM0myjdFIOLoGXpyfxpRjkvty50YdrtY4fvW VaTQ== 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=e2bUpk1+Nc5T0IImxmAybyEl4oUWOqAie6+dPlFVaPw=; b=g/m1KszaQH85okBdY/n3mO2Ip7FBXr7/TTHPGganBYXkV3ElPm/3zRX3wtaFISz6Vv s2MiJet9qt3wBIT2QtuFg80dxMBgYQ4Cu35pywoleXC6D9+hKzP39/g9siimNqR9796B MqL4cV/kSTr0xl2QBhUeJU6Zu4zbJ2ng3x/jEDN4n+TLuFE98KhgylrVSSVbSo/uFNRv h6tG5keOJRRDyy9euELjbtbRrCFbiy5g4r75jycWmTwI78qavucCLfsPYPnik118Vcvs 4O2ZbwsdPe4SdDzf+gfHG5U7uXP9gFCv+NByS0u69QIW6Gv9ULiFxs87WVl0U9HYDYub ZPuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y+RBhY+l; 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 t21si12325428edd.145.2021.05.31.09.26.40; Mon, 31 May 2021 09:27:03 -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=Y+RBhY+l; 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 S232258AbhEaQ1T (ORCPT + 99 others); Mon, 31 May 2021 12:27:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:40308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234226AbhEaOpJ (ORCPT ); Mon, 31 May 2021 10:45:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 12B0B61C80; Mon, 31 May 2021 13:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469297; bh=C3Kq6hxcf24debxLvrHsGOT//D+zzRi1v/d5Dutpdjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y+RBhY+lTUHXEHsSF5Aj+G4jo6ta8q/6i57GIMTtv0VvZPgTpsK2m0i1RpN+whV2U DZVSlxpIGpZqUaIhmmDPkCXORK1GwpeikL30URdAp7qOdljRwNUkibpmy5gFs7nS7i KeBhFViAK87qD+K+4PJuh8UHnUTCoxnfl5EbZa/Q= 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.12 145/296] net: dsa: sja1105: error out on unsupported PHY mode Date: Mon, 31 May 2021 15:13:20 +0200 Message-Id: <20210531130708.742981131@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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 @@ -208,6 +208,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; } /* Even though the SerDes port is able to drive SGMII autoneg