From: Michael Chan Date: Thu, 26 Apr 2018 21:44:41 +0000 (-0400) Subject: bnxt_en: Reserve rings in bnxt_set_channels() if device is down. X-Git-Tag: v4.18-rc1~114^2~360^2~3 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=d8c09f19accb89fc08b246339abb005455e4c846;p=linux.git bnxt_en: Reserve rings in bnxt_set_channels() if device is down. 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index a699ca5493ef..ad98b78f5aa1 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -584,6 +584,8 @@ static int bnxt_set_channels(struct net_device *dev, * to renable */ } + } else { + rc = bnxt_reserve_rings(bp); } return rc;