aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 9cce4cb91401..fc6bc1233f10 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -172,7 +172,8 @@ struct ice_vsi {
172 u32 rx_buf_failed; 172 u32 rx_buf_failed;
173 u32 rx_page_failed; 173 u32 rx_page_failed;
174 int num_q_vectors; 174 int num_q_vectors;
175 int base_vector; 175 int sw_base_vector; /* Irq base for OS reserved vectors */
176 int hw_base_vector; /* HW (absolute) index of a vector */
176 enum ice_vsi_type type; 177 enum ice_vsi_type type;
177 u16 vsi_num; /* HW (absolute) index of this VSI */ 178 u16 vsi_num; /* HW (absolute) index of this VSI */
178 u16 idx; /* software index in pf->vsi[] */ 179 u16 idx; /* software index in pf->vsi[] */
@@ -240,8 +241,14 @@ enum ice_pf_flags {
240 241
241struct ice_pf { 242struct ice_pf {
242 struct pci_dev *pdev; 243 struct pci_dev *pdev;
244
245 /* OS reserved IRQ details */
243 struct msix_entry *msix_entries; 246 struct msix_entry *msix_entries;
244 struct ice_res_tracker *irq_tracker; 247 struct ice_res_tracker *sw_irq_tracker;
248
249 /* HW reserved Interrupts for this PF */
250 struct ice_res_tracker *hw_irq_tracker;
251
245 struct ice_vsi **vsi; /* VSIs created by the driver */ 252 struct ice_vsi **vsi; /* VSIs created by the driver */
246 struct ice_sw *first_sw; /* first switch created by firmware */ 253 struct ice_sw *first_sw; /* first switch created by firmware */
247 DECLARE_BITMAP(state, __ICE_STATE_NBITS); 254 DECLARE_BITMAP(state, __ICE_STATE_NBITS);
@@ -256,9 +263,11 @@ struct ice_pf {
256 struct mutex sw_mutex; /* lock for protecting VSI alloc flow */ 263 struct mutex sw_mutex; /* lock for protecting VSI alloc flow */
257 u32 msg_enable; 264 u32 msg_enable;
258 u32 hw_csum_rx_error; 265 u32 hw_csum_rx_error;
259 u32 oicr_idx; /* Other interrupt cause vector index */ 266 u32 sw_oicr_idx; /* Other interrupt cause SW vector index */
267 u32 num_avail_sw_msix; /* remaining MSIX SW vectors left unclaimed */
268 u32 hw_oicr_idx; /* Other interrupt cause vector HW index */
269 u32 num_avail_hw_msix; /* remaining HW MSIX vectors left unclaimed */
260 u32 num_lan_msix; /* Total MSIX vectors for base driver */ 270 u32 num_lan_msix; /* Total MSIX vectors for base driver */
261 u32 num_avail_msix; /* remaining MSIX vectors left unclaimed */
262 u16 num_lan_tx; /* num lan tx queues setup */ 271 u16 num_lan_tx; /* num lan tx queues setup */
263 u16 num_lan_rx; /* num lan rx queues setup */ 272 u16 num_lan_rx; /* num lan rx queues setup */
264 u16 q_left_tx; /* remaining num tx queues left unclaimed */ 273 u16 q_left_tx; /* remaining num tx queues left unclaimed */
@@ -293,8 +302,8 @@ struct ice_netdev_priv {
293static inline void ice_irq_dynamic_ena(struct ice_hw *hw, struct ice_vsi *vsi, 302static inline void ice_irq_dynamic_ena(struct ice_hw *hw, struct ice_vsi *vsi,
294 struct ice_q_vector *q_vector) 303 struct ice_q_vector *q_vector)
295{ 304{
296 u32 vector = (vsi && q_vector) ? vsi->base_vector + q_vector->v_idx : 305 u32 vector = (vsi && q_vector) ? vsi->hw_base_vector + q_vector->v_idx :
297 ((struct ice_pf *)hw->back)->oicr_idx; 306 ((struct ice_pf *)hw->back)->hw_oicr_idx;
298 int itr = ICE_ITR_NONE; 307 int itr = ICE_ITR_NONE;
299 u32 val; 308 u32 val;
300 309