summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_int.h
diff options
context:
space:
mode:
authorMintz, Yuval2017-06-01 14:29:09 +0200
committerDavid S. Miller2017-06-01 18:17:19 +0200
commit50a207147fceb64ad24c1e08e4a2a75535922e81 (patch)
treec06a33a03a9864786d541849f2cb99e143632036 /drivers/net/ethernet/qlogic/qed/qed_int.h
parentqed: Provide auxiliary for getting free VF SB (diff)
downloadkernel-qcow2-linux-50a207147fceb64ad24c1e08e4a2a75535922e81.tar.gz
kernel-qcow2-linux-50a207147fceb64ad24c1e08e4a2a75535922e81.tar.xz
kernel-qcow2-linux-50a207147fceb64ad24c1e08e4a2a75535922e81.zip
qed: Hold a single array for SBs
A PF today holds 2 different arrays - one holding information about the HW configuration and one holding information about the SBs that are used by the protocol drivers. These arrays aren't really connected - e.g., protocol driver initializing a given SB would not mark the same SB as occupied in the HW shadow array. Move into a single array [at least for PFs] - hold the mapping of the driver-protocol SBs on the HW entry which they configure. Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_int.h')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_int.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_int.h b/drivers/net/ethernet/qlogic/qed/qed_int.h
index 273e73a1f850..bc61c5013b6e 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_int.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_int.h
@@ -202,18 +202,20 @@ void qed_int_disable_post_isr_release(struct qed_dev *cdev);
#define QED_SB_INVALID_IDX 0xffff
struct qed_igu_block {
- u8 status;
+ u8 status;
#define QED_IGU_STATUS_FREE 0x01
#define QED_IGU_STATUS_VALID 0x02
#define QED_IGU_STATUS_PF 0x04
#define QED_IGU_STATUS_DSB 0x08
- u8 vector_number;
- u8 function_id;
- u8 is_pf;
+ u8 vector_number;
+ u8 function_id;
+ u8 is_pf;
/* Index inside IGU [meant for back reference] */
- u16 igu_sb_id;
+ u16 igu_sb_id;
+
+ struct qed_sb_info *sb_info;
};
struct qed_igu_info {
@@ -224,7 +226,16 @@ struct qed_igu_info {
};
-/* TODO Names of function may change... */
+/**
+ * @brief Translate the weakly-defined client sb-id into an IGU sb-id
+ *
+ * @param p_hwfn
+ * @param sb_id - user provided sb_id
+ *
+ * @return an index inside IGU CAM where the SB resides
+ */
+u16 qed_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id);
+
/**
* @brief return a pointer to an unused valid SB
*