The patch titled driver-net-skgec-restart-the-interface-when-its-options-or-pauseparam-is-set update has been added to the -mm tree. Its filename is driver-net-skgec-restart-the-interface-when-its-options-or-pauseparam-is-set-update.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: driver-net-skgec-restart-the-interface-when-its-options-or-pauseparam-is-set update From: "Xiaoming.Zhang" <Xiaoming.Zhang@xxxxxxxxxxxxxx> Since skge_up can fail because of out of memory, this code needs to check the return value. And then if it fails the "limbo state" needs to be handled in skge_down. Signed-off-by: Zhang Xiaoming <xiaoming.zhang@xxxxxxxxxxxxxx> Cc: Stephen Hemminger <shemminger@xxxxxxxxxx> Cc: Jeff Garzik <jeff@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/net/skge.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff -puN drivers/net/skge.c~driver-net-skgec-restart-the-interface-when-its-options-or-pauseparam-is-set-update drivers/net/skge.c --- a/drivers/net/skge.c~driver-net-skgec-restart-the-interface-when-its-options-or-pauseparam-is-set-update +++ a/drivers/net/skge.c @@ -305,6 +305,7 @@ static int skge_set_settings(struct net_ struct skge_port *skge = netdev_priv(dev); const struct skge_hw *hw = skge->hw; u32 supported = skge_supported_modes(hw); + int err = 0; if (ecmd->autoneg == AUTONEG_ENABLE) { ecmd->advertising = supported; @@ -355,7 +356,11 @@ static int skge_set_settings(struct net_ if (netif_running(dev)) { skge_down(dev); - skge_up(dev); + err = skge_up(dev); + if (err) { + dev_close(dev); + return err; + } } return (0); @@ -581,6 +586,7 @@ static int skge_set_pauseparam(struct ne { struct skge_port *skge = netdev_priv(dev); struct ethtool_pauseparam old; + int err = 0; skge_get_pauseparam(dev, &old); @@ -599,7 +605,11 @@ static int skge_set_pauseparam(struct ne if (netif_running(dev)) { skge_down(dev); - skge_up(dev); + err = skge_up(dev); + if (err) { + dev_close(dev); + return err; + } } return 0; _ Patches currently in -mm which might be from Xiaoming.Zhang@xxxxxxxxxxxxxx are driver-net-skgec-restart-the-interface-when-its-options-or-pauseparam-is-set.patch driver-net-skgec-restart-the-interface-when-its-options-or-pauseparam-is-set-update.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html