OSDN Git Service

ice: introduce .irq_close VF operation
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 19 Jan 2023 01:16:52 +0000 (17:16 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 6 Feb 2023 17:47:02 +0000 (09:47 -0800)
The Scalable IOV implementation will require notifying the VDCM driver when
an IRQ must be closed. This allows the VDCM to handle releasing stale IRQ
context values and properly reconfigure.

To handle this, introduce a new optional .irq_close callback to the VF
operations structure. This will be implemented by Scalable IOV to handle
the shutdown of the IRQ context.

Since the SR-IOV implementation does not need this, we must check that its
non-NULL before calling it.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_sriov.c
drivers/net/ethernet/intel/ice/ice_vf_lib.c
drivers/net/ethernet/intel/ice/ice_vf_lib.h

index 4d8930b..356ac76 100644 (file)
@@ -807,6 +807,7 @@ static const struct ice_vf_ops ice_sriov_vf_ops = {
        .trigger_reset_register = ice_sriov_trigger_reset_register,
        .poll_reset_status = ice_sriov_poll_reset_status,
        .clear_reset_trigger = ice_sriov_clear_reset_trigger,
+       .irq_close = NULL,
        .create_vsi = ice_sriov_create_vsi,
        .post_vsi_rebuild = ice_sriov_post_vsi_rebuild,
 };
index 2ea801e..d16c2ea 100644 (file)
@@ -237,6 +237,10 @@ static void ice_vf_clear_counters(struct ice_vf *vf)
  */
 static void ice_vf_pre_vsi_rebuild(struct ice_vf *vf)
 {
+       /* Close any IRQ mapping now */
+       if (vf->vf_ops->irq_close)
+               vf->vf_ops->irq_close(vf);
+
        ice_vf_clear_counters(vf);
        vf->vf_ops->clear_reset_trigger(vf);
 }
index 5bb75ed..b4e6480 100644 (file)
@@ -61,6 +61,7 @@ struct ice_vf_ops {
        void (*trigger_reset_register)(struct ice_vf *vf, bool is_vflr);
        bool (*poll_reset_status)(struct ice_vf *vf);
        void (*clear_reset_trigger)(struct ice_vf *vf);
+       void (*irq_close)(struct ice_vf *vf);
        int (*create_vsi)(struct ice_vf *vf);
        void (*post_vsi_rebuild)(struct ice_vf *vf);
 };