]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bnxt_en: Reserve rings in bnxt_set_channels() if device is down.
authorMichael Chan <michael.chan@broadcom.com>
Thu, 26 Apr 2018 21:44:41 +0000 (17:44 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 18:47:31 +0000 (14:47 -0400)
The current code does not reserve rings during ethtool -L when the device
is down.  The rings will be reserved when the device is later opened.

Change it to reserve rings during ethtool -L when the device is down.
This provides a better guarantee that the device open will be successful
when the rings are reserved ahead of time.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

index a699ca5493ef3f3bc296925a630e3a2c961f8a8b..ad98b78f5aa133c5b1f2bd0d4e67b080325c68b1 100644 (file)
@@ -584,6 +584,8 @@ static int bnxt_set_channels(struct net_device *dev,
                         * to renable
                         */
                }
+       } else {
+               rc = bnxt_reserve_rings(bp);
        }
 
        return rc;