Skip to content

Commit

Permalink
bnxt_en: Reserve rings in bnxt_set_channels() if device is down.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Chan authored and David S. Miller committed Apr 27, 2018
1 parent cabfb09 commit d8c09f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,8 @@ static int bnxt_set_channels(struct net_device *dev,
* to renable
*/
}
} else {
rc = bnxt_reserve_rings(bp);
}

return rc;
Expand Down

0 comments on commit d8c09f1

Please sign in to comment.