diff options
| author | Jiri Kosina <[email protected]> | 2022-12-13 14:28:47 +0100 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2022-12-13 14:28:47 +0100 |
| commit | ab970ae1d63822228bdc84b9c1514efbd2f66da7 (patch) | |
| tree | fefc08d8dd28e4eb5465ca85de5cce2fb6f1b7ef /drivers/net/ethernet/intel/ice/ice_lib.c | |
| parent | cfd1f6c16f7deadfe5269a76c1516405c4466481 (diff) | |
| parent | 163a7fbff7a78c7c055e6c0ad26124ae551fe313 (diff) | |
Merge branch 'for-6.2/default-remove-cleanup' into for-linus
- removal of superfluous hid_hw_stop() calls for drivers with default
.remove callback (Marcus Folkesson)
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 938ba8c215cb..7276badfa19e 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -2240,6 +2240,31 @@ int ice_vsi_stop_xdp_tx_rings(struct ice_vsi *vsi) } /** + * ice_vsi_is_rx_queue_active + * @vsi: the VSI being configured + * + * Return true if at least one queue is active. + */ +bool ice_vsi_is_rx_queue_active(struct ice_vsi *vsi) +{ + struct ice_pf *pf = vsi->back; + struct ice_hw *hw = &pf->hw; + int i; + + ice_for_each_rxq(vsi, i) { + u32 rx_reg; + int pf_q; + + pf_q = vsi->rxq_map[i]; + rx_reg = rd32(hw, QRX_CTRL(pf_q)); + if (rx_reg & QRX_CTRL_QENA_STAT_M) + return true; + } + + return false; +} + +/** * ice_vsi_is_vlan_pruning_ena - check if VLAN pruning is enabled or not * @vsi: VSI to check whether or not VLAN pruning is enabled. * |