From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42856 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752256AbbI3Dcr (ORCPT ); Tue, 29 Sep 2015 23:32:47 -0400 Subject: Patch "net: dsa: bcm_sf2: Do not override speed settings" has been added to the 4.2-stable tree To: f.fainelli@gmail.com, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Wed, 30 Sep 2015 05:32:02 +0200 Message-ID: <144358392215135@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled net: dsa: bcm_sf2: Do not override speed settings to the 4.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-dsa-bcm_sf2-do-not-override-speed-settings.patch and it can be found in the queue-4.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Wed Sep 30 05:25:07 CEST 2015 From: Florian Fainelli Date: Mon, 20 Jul 2015 17:49:55 -0700 Subject: net: dsa: bcm_sf2: Do not override speed settings From: Florian Fainelli [ Upstream d2eac98f7d1b950b762a7eca05a9ce0ea1d878d2 in net-next tree, will be pushed to Linus very soon. ] The SF2 driver currently overrides speed settings for its port configured using a fixed PHY, this is both unnecessary and incorrect, because we keep feedback to the hardware parameters that we read from the PHY device, which in the case of a fixed PHY cannot possibly change speed. This is a required change to allow the fixed PHY code to allow registering a PHY with a link configured as DOWN by default and avoid some sort of circular dependency where we require the link_update callback to run to program the hardware, and we then utilize the fixed PHY parameters to program the hardware with the same settings. Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/bcm_sf2.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -905,15 +905,11 @@ static void bcm_sf2_sw_fixed_link_update struct fixed_phy_status *status) { struct bcm_sf2_priv *priv = ds_to_priv(ds); - u32 duplex, pause, speed; + u32 duplex, pause; u32 reg; duplex = core_readl(priv, CORE_DUPSTS); pause = core_readl(priv, CORE_PAUSESTS); - speed = core_readl(priv, CORE_SPDSTS); - - speed >>= (port * SPDSTS_SHIFT); - speed &= SPDSTS_MASK; status->link = 0; @@ -948,18 +944,6 @@ static void bcm_sf2_sw_fixed_link_update reg &= ~LINK_STS; core_writel(priv, reg, CORE_STS_OVERRIDE_GMIIP_PORT(port)); - switch (speed) { - case SPDSTS_10: - status->speed = SPEED_10; - break; - case SPDSTS_100: - status->speed = SPEED_100; - break; - case SPDSTS_1000: - status->speed = SPEED_1000; - break; - } - if ((pause & (1 << port)) && (pause & (1 << (port + PAUSESTS_TX_PAUSE_SHIFT)))) { status->asym_pause = 1; Patches currently in stable-queue which might be from f.fainelli@gmail.com are queue-4.2/net-dsa-bcm_sf2-do-not-override-speed-settings.patch queue-4.2/net-phy-fixed_phy-handle-link-down-case.patch queue-4.2/net-dsa-bcm_sf2-fix-ageing-conditions-and-operation.patch queue-4.2/of_mdio-add-new-dt-property-managed-to-specify-the-phy-management-type.patch queue-4.2/phylib-fix-device-deletion-order-in-mdiobus_unregister.patch queue-4.2/net-dsa-bcm_sf2-fix-64-bits-register-writes.patch