summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>2025-06-16 23:29:56 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2025-07-24 19:22:26 +0300
commitfdb7f139864aa332ea8f161beb636dc0599c64f2 (patch)
tree5923e3c24a7e07632857599afb604661430b2c57 /drivers/net/ethernet/intel/ice/ice_main.c
parent94619ea2d933a2efeea5af63ec909bf2f1519a0e (diff)
downloadlinux-fdb7f139864aa332ea8f161beb636dc0599c64f2.tar.xz
ice, libie: move generic adminq descriptors to lib
The descriptor structure is the same in ice, ixgbe and i40e. Move it to common libie header to use it across different driver. Leave device specific adminq commands in separate folders. This lead to a change that need to be done in filling/getting descriptor: - previous: struct specific_desc *cmd; cmd = &desc.params.specific_desc; - now: struct specific_desc *cmd; cmd = libie_aq_raw(&desc); Do this changes across the driver to allow clean build. The casting only have to be done in case of specific descriptors, for generic one union can still be used. Changes beside code moving: - change ICE_ prefix to LIBIE_ prefix (ice_ and libie_ too) - remove shift variables not otherwise needed (in libie_aq_flags) - fill/get descriptor data based on desc.params.raw whenever the descriptor isn't defined in libie - move defines from the libie_aq_sth structure outside - add libie_aq_raw helper and use it instead of explicit casting Reviewed by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 204e906af591..3024f5dde384 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -379,7 +379,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
* should go into promiscuous mode. There should be some
* space reserved for promiscuous filters.
*/
- if (hw->adminq.sq_last_status == ICE_AQ_RC_ENOSPC &&
+ if (hw->adminq.sq_last_status == LIBIE_AQ_RC_ENOSPC &&
!test_and_set_bit(ICE_FLTR_OVERFLOW_PROMISC,
vsi->state)) {
promisc_forced_on = true;
@@ -7914,42 +7914,42 @@ int ice_change_mtu(struct net_device *netdev, int new_mtu)
* ice_aq_str - convert AQ err code to a string
* @aq_err: the AQ error code to convert
*/
-const char *ice_aq_str(enum ice_aq_err aq_err)
+const char *ice_aq_str(enum libie_aq_err aq_err)
{
switch (aq_err) {
- case ICE_AQ_RC_OK:
+ case LIBIE_AQ_RC_OK:
return "OK";
- case ICE_AQ_RC_EPERM:
+ case LIBIE_AQ_RC_EPERM:
return "ICE_AQ_RC_EPERM";
- case ICE_AQ_RC_ENOENT:
+ case LIBIE_AQ_RC_ENOENT:
return "ICE_AQ_RC_ENOENT";
- case ICE_AQ_RC_ESRCH:
+ case LIBIE_AQ_RC_ESRCH:
return "ICE_AQ_RC_ESRCH";
- case ICE_AQ_RC_EAGAIN:
+ case LIBIE_AQ_RC_EAGAIN:
return "ICE_AQ_RC_EAGAIN";
- case ICE_AQ_RC_ENOMEM:
+ case LIBIE_AQ_RC_ENOMEM:
return "ICE_AQ_RC_ENOMEM";
- case ICE_AQ_RC_EBUSY:
+ case LIBIE_AQ_RC_EBUSY:
return "ICE_AQ_RC_EBUSY";
- case ICE_AQ_RC_EEXIST:
+ case LIBIE_AQ_RC_EEXIST:
return "ICE_AQ_RC_EEXIST";
- case ICE_AQ_RC_EINVAL:
+ case LIBIE_AQ_RC_EINVAL:
return "ICE_AQ_RC_EINVAL";
- case ICE_AQ_RC_ENOSPC:
+ case LIBIE_AQ_RC_ENOSPC:
return "ICE_AQ_RC_ENOSPC";
- case ICE_AQ_RC_ENOSYS:
+ case LIBIE_AQ_RC_ENOSYS:
return "ICE_AQ_RC_ENOSYS";
- case ICE_AQ_RC_EMODE:
+ case LIBIE_AQ_RC_EMODE:
return "ICE_AQ_RC_EMODE";
- case ICE_AQ_RC_ENOSEC:
+ case LIBIE_AQ_RC_ENOSEC:
return "ICE_AQ_RC_ENOSEC";
- case ICE_AQ_RC_EBADSIG:
+ case LIBIE_AQ_RC_EBADSIG:
return "ICE_AQ_RC_EBADSIG";
- case ICE_AQ_RC_ESVN:
+ case LIBIE_AQ_RC_ESVN:
return "ICE_AQ_RC_ESVN";
- case ICE_AQ_RC_EBADMAN:
+ case LIBIE_AQ_RC_EBADMAN:
return "ICE_AQ_RC_EBADMAN";
- case ICE_AQ_RC_EBADBUF:
+ case LIBIE_AQ_RC_EBADBUF:
return "ICE_AQ_RC_EBADBUF";
}