ice: introduce .irq_close VF operation
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>
This commit is contained in:
committed by
Tony Nguyen
parent
fa4a15c85c
commit
537dfe06ac
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user