diff options
| author | Michal Swiatkowski <michal.swiatkowski@linux.intel.com> | 2025-08-12 06:23:27 +0200 |
|---|---|---|
| committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2025-09-11 12:09:37 -0700 |
| commit | bf59b53218bb0d3e7c9b69a3a8e3c17a3e2bcbc2 (patch) | |
| tree | ccce4980ac4d100edf7f6dc696d51bd7891c5759 /drivers/net/ethernet/intel/ice/ice_fwlog.h | |
| parent | 4773761949dec7d47633b624e3c9e4cf0a1af9e8 (diff) | |
ice: allow calling custom send function in fwlog
Fwlog code needs to communicate with FW. In ice it is done through admin
queue command. Allow indirect calling the send function to move the
specific admin queue send function from fwlog core code.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@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)
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_fwlog.h')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_fwlog.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_fwlog.h b/drivers/net/ethernet/intel/ice/ice_fwlog.h index 9c56ca6cbef0..fe4b2ce6813f 100644 --- a/drivers/net/ethernet/intel/ice/ice_fwlog.h +++ b/drivers/net/ethernet/intel/ice/ice_fwlog.h @@ -68,17 +68,21 @@ struct ice_fwlog { struct ice_fwlog_cfg cfg; bool supported; /* does hardware support FW logging? */ struct ice_fwlog_ring ring; - struct pci_dev *pdev; + struct_group_tagged(ice_fwlog_api, api, + struct pci_dev *pdev; + int (*send_cmd)(void *, struct libie_aq_desc *, void *, u16); + void *priv; + ); }; bool ice_fwlog_ring_empty(struct ice_fwlog_ring *rings); void ice_fwlog_ring_increment(u16 *item, u16 size); int ice_fwlog_init(struct ice_hw *hw, struct ice_fwlog *fwlog, - struct pci_dev *pdev); + struct ice_fwlog_api *api); void ice_fwlog_deinit(struct ice_hw *hw, struct ice_fwlog *fwlog); -int ice_fwlog_set(struct ice_hw *hw, struct ice_fwlog_cfg *cfg); -int ice_fwlog_register(struct ice_hw *hw, struct ice_fwlog *fwlog); -int ice_fwlog_unregister(struct ice_hw *hw, struct ice_fwlog *fwlog); +int ice_fwlog_set(struct ice_fwlog *fwlog, struct ice_fwlog_cfg *cfg); +int ice_fwlog_register(struct ice_fwlog *fwlog); +int ice_fwlog_unregister(struct ice_fwlog *fwlog); void ice_fwlog_realloc_rings(struct ice_fwlog *fwlog, int index); void ice_get_fwlog_data(struct ice_fwlog *fwlog, u8 *buf, u16 len); #endif /* _ICE_FWLOG_H_ */ |