diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2013-04-19 07:01:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-19 16:02:38 -0400 |
commit | 97d8105cf3fb1eb84351ff4b69287ef7d25a4422 (patch) | |
tree | 8afb96c29213064151a887d1d1a31cd2bc8b7651 /drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | |
parent | f80bc8fe6d44f1f0ebd90d4e698189c5b9ad25e7 (diff) | |
download | op-kernel-dev-97d8105cf3fb1eb84351ff4b69287ef7d25a4422.zip op-kernel-dev-97d8105cf3fb1eb84351ff4b69287ef7d25a4422.tar.gz |
qlcnic: VF FLR implementation.
o FLR from Hypervisor - When hypervisor issues a VF FLR request,
adapter notifies the parent PF driver of the FLR request for PF
driver to perform any cleanup on behalf of that VF.
o FLR from VF Driver - VF driver may initiate a VF FLR request,
if VF state needs to be cleaned up before a re-initialization.
VF re-initialization during kdump is an example.
o PF driver cleans up all resources allocated on behalf of a VF,
on VF FLR notifications from the adapter or from the VF driver.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h index b476eba..7fda5d4 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h @@ -91,6 +91,8 @@ enum qlcnic_vf_state { QLC_BC_VF_RECV, QLC_BC_VF_CHANNEL, QLC_BC_VF_STATE, + QLC_BC_VF_FLR, + QLC_BC_VF_SOFT_FLR, }; struct qlcnic_resources { @@ -124,9 +126,11 @@ struct qlcnic_vf_info { unsigned long state; struct completion ch_free_cmpl; struct work_struct trans_work; + struct work_struct flr_work; /* It synchronizes commands sent from VF */ struct mutex send_cmd_lock; struct qlcnic_bc_trans *send_cmd; + struct qlcnic_bc_trans *flr_trans; struct qlcnic_trans_list rcv_act; struct qlcnic_trans_list rcv_pend; struct qlcnic_adapter *adapter; @@ -143,6 +147,7 @@ struct qlcnic_back_channel { u16 trans_counter; struct workqueue_struct *bc_trans_wq; struct workqueue_struct *bc_async_wq; + struct workqueue_struct *bc_flr_wq; struct list_head async_list; }; @@ -165,6 +170,9 @@ int qlcnic_sriov_channel_cfg_cmd(struct qlcnic_adapter *, u8); void qlcnic_sriov_handle_bc_event(struct qlcnic_adapter *, u32); int qlcnic_sriov_cfg_bc_intr(struct qlcnic_adapter *, u8); void qlcnic_sriov_cleanup_async_list(struct qlcnic_back_channel *); +void qlcnic_sriov_cleanup_list(struct qlcnic_trans_list *); +int __qlcnic_sriov_add_act_list(struct qlcnic_sriov *, struct qlcnic_vf_info *, + struct qlcnic_bc_trans *); static inline bool qlcnic_sriov_enable_check(struct qlcnic_adapter *adapter) { @@ -185,6 +193,10 @@ void qlcnic_pf_set_interface_id_del_tx_ctx(struct qlcnic_adapter *, u32 *); void qlcnic_pf_set_interface_id_promisc(struct qlcnic_adapter *, u32 *); void qlcnic_pf_set_interface_id_ipaddr(struct qlcnic_adapter *, u32 *); void qlcnic_pf_set_interface_id_macaddr(struct qlcnic_adapter *, u32 *); +void qlcnic_sriov_pf_handle_flr(struct qlcnic_sriov *, struct qlcnic_vf_info *); +bool qlcnic_sriov_soft_flr_check(struct qlcnic_adapter *, + struct qlcnic_bc_trans *, + struct qlcnic_vf_info *); #else static inline void qlcnic_sriov_pf_disable(struct qlcnic_adapter *adapter) {} static inline void qlcnic_sriov_pf_cleanup(struct qlcnic_adapter *adapter) {} @@ -209,6 +221,12 @@ qlcnic_pf_set_interface_id_macaddr(struct qlcnic_adapter *adapter, u32 *int_id) static inline void qlcnic_pf_set_interface_id_promisc(struct qlcnic_adapter *adapter, u32 *int_id) {} +static inline void qlcnic_sriov_pf_handle_flr(struct qlcnic_sriov *sriov, + struct qlcnic_vf_info *vf) {} +static inline bool qlcnic_sriov_soft_flr_check(struct qlcnic_adapter *adapter, + struct qlcnic_bc_trans *trans, + struct qlcnic_vf_info *vf) +{ return false; } #endif #endif |