Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2664027pxj; Mon, 31 May 2021 07:44:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTKq5dBuJSePY9pu3nd5oPRJk8awSCvvnhkyDQlbJj9msI6Q11//0xcw1n95ljWuVnVu+t X-Received: by 2002:a02:9621:: with SMTP id c30mr20960389jai.113.1622472270049; Mon, 31 May 2021 07:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622472270; cv=none; d=google.com; s=arc-20160816; b=ptNU7/Yl7CRZiQgqyaEWidjxbKkmhoHWqtX2U2QmJqCSOMNSjr4B4rXf0YMzeX08QS 9pvyPRtl4H9MU82+pfm8WVKO1WjdseASkIVycRgxcSwOWg5SkGAAFZR6/vBnML5qpp8Y vEpzb+y97AOXGy7vRXrptHP5WASW7bqDWonnmP6Gofmp8gVtWzIB9UVBQrOuhUpfcI7r E8SyTwzZGJoeigVlj+BFZ4uvMhEfyxFHStOtnGDfIekFErrRjDCRkZFKUHmlfFAQZV4B vwF8tdQyhP4pl93LkXZhe7MKKGnAIYC6We4MqIMx8SwPp4MCojuQiNo0QtY1CVuSOiL6 oV2w== 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=CDsDCE9G0tXdS01PNcgjK2npfn+1qs99Y0ut1TUFHD8=; b=X6QqTnts+qXzPDI6Wfdsefbt1/odPB2HVnM/3EeLt4srVRVAP2kz7ydzBXUzsHfJAk i9l3Rr2RONP453D2ZBvdPCnh7lGQC7bL3RBgV6+0GdnVRTyrLLByh3NWOUQOHvwuet4P As5Xi7xHDeczAdCzDIRj//G9WrTV0OWWbn94uCW8vxUo104sXJiq0SPmW8FRo+toUFdm a35HqaQr2qfr2aK3Q1umhvszUR7z9tw8wgjWmyNKXYuVi0eZky5fulcCRM5HeO9iZzES cys21pIj4IFckqH9bcD68yW0Yxdg3QB4r/dnePiXCgqDoIeYO7DsRncbOZcFb0ajUJx5 m6Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IcbCLnYJ; 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 w31si13907423jal.77.2021.05.31.07.44.16; Mon, 31 May 2021 07:44:30 -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=IcbCLnYJ; 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 S232214AbhEaOoG (ORCPT + 99 others); Mon, 31 May 2021 10:44:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:32910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232132AbhEaN6w (ORCPT ); Mon, 31 May 2021 09:58:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5FD2C61937; Mon, 31 May 2021 13:35:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468145; bh=7RVk4R0DPRmf/59YmsgIeJc2hvXN05uFw8oqti3BVSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IcbCLnYJOSC0ya1Xjd1qVKnqcRJuQZcYLL8811t+47sd0YTPvm8f4gTZtSOA/zACD HMtB5k0tQ2R1bvUWhxrm1DWT2ykmQ3y+kRvchXeRF9sI/8JwORCGhBd+hD9ZgiPhA0 MKxgA9kF3lBbyA3dEGFoWKaoW1x6WQi4S9XqHfwA= 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.10 116/252] net: dsa: sja1105: error out on unsupported PHY mode Date: Mon, 31 May 2021 15:13:01 +0200 Message-Id: <20210531130701.933642091@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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 @@ -206,6 +206,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