diff mbox series

[S46,3/9] ice: Fix inability to set channels when down

Message ID 20200516005506.5113-3-anthony.l.nguyen@intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show
Series [S46,1/9] ice: Reset VF for all port VLAN changes from host | expand

Commit Message

Tony Nguyen May 16, 2020, 12:55 a.m. UTC
From: Jesse Brandeburg <jesse.brandeburg@intel.com>

Currently the driver prevents a user from doing
modprobe ice
ethtool -L eth0 combined 5
ip link set eth0 up

The ethtool command fails, because the driver is checking to see if the
interface is down before allowing the get_channels to proceed (even for
a set_channels).

Remove this check and allow the user to configure the interface
before bringing it up, which is a much better usability case.

Fixes: 87324e747fde ("ice: Implement ethtool ops for channels")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Bowers, AndrewX May 28, 2020, 11:18 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, May 15, 2020 5:55 PM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels
> when down
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Currently the driver prevents a user from doing modprobe ice ethtool -L eth0
> combined 5 ip link set eth0 up
> 
> The ethtool command fails, because the driver is checking to see if the
> interface is down before allowing the get_channels to proceed (even for a
> set_channels).
> 
> Remove this check and allow the user to configure the interface before
> bringing it up, which is a much better usability case.
> 
> Fixes: 87324e747fde ("ice: Implement ethtool ops for channels")
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ----
>  1 file changed, 4 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index fd1849155d85..68c38004a088 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3189,10 +3189,6 @@  ice_get_channels(struct net_device *dev, struct ethtool_channels *ch)
 	struct ice_vsi *vsi = np->vsi;
 	struct ice_pf *pf = vsi->back;
 
-	/* check to see if VSI is active */
-	if (test_bit(__ICE_DOWN, vsi->state))
-		return;
-
 	/* report maximum channels */
 	ch->max_rx = ice_get_max_rxq(pf);
 	ch->max_tx = ice_get_max_txq(pf);