hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/ethernet/intel/ice/ice_controlq.h
....@@ -8,6 +8,7 @@
88
99 /* Maximum buffer lengths for all control queue types */
1010 #define ICE_AQ_MAX_BUF_LEN 4096
11
+#define ICE_MBXQ_MAX_BUF_LEN 4096
1112
1213 #define ICE_CTL_Q_DESC(R, i) \
1314 (&(((struct ice_aq_desc *)((R).desc_buf.va))[i]))
....@@ -18,24 +19,26 @@
1819
1920 /* Defines that help manage the driver vs FW API checks.
2021 * Take a look at ice_aq_ver_check in ice_controlq.c for actual usage.
21
- *
2222 */
2323 #define EXP_FW_API_VER_BRANCH 0x00
24
-#define EXP_FW_API_VER_MAJOR 0x00
25
-#define EXP_FW_API_VER_MINOR 0x01
24
+#define EXP_FW_API_VER_MAJOR 0x01
25
+#define EXP_FW_API_VER_MINOR 0x05
2626
2727 /* Different control queue types: These are mainly for SW consumption. */
2828 enum ice_ctl_q {
2929 ICE_CTL_Q_UNKNOWN = 0,
3030 ICE_CTL_Q_ADMIN,
31
+ ICE_CTL_Q_MAILBOX,
3132 };
3233
3334 /* Control Queue timeout settings - max delay 1s */
3435 #define ICE_CTL_Q_SQ_CMD_TIMEOUT 10000 /* Count 10000 times */
3536 #define ICE_CTL_Q_SQ_CMD_USEC 100 /* Check every 100usec */
37
+#define ICE_CTL_Q_ADMIN_INIT_TIMEOUT 10 /* Count 10 times */
38
+#define ICE_CTL_Q_ADMIN_INIT_MSEC 100 /* Check every 100msec */
3639
3740 struct ice_ctl_q_ring {
38
- void *dma_head; /* Virtual address to dma head */
41
+ void *dma_head; /* Virtual address to DMA head */
3942 struct ice_dma_mem desc_buf; /* descriptor ring memory */
4043 void *cmd_buf; /* command buffer memory */
4144
....@@ -58,6 +61,7 @@
5861 u32 bal;
5962 u32 len_mask;
6063 u32 len_ena_mask;
64
+ u32 len_crit_mask;
6165 u32 head_mask;
6266 };
6367
....@@ -79,6 +83,7 @@
7983 /* Control Queue information */
8084 struct ice_ctl_q_info {
8185 enum ice_ctl_q qtype;
86
+ enum ice_aq_err rq_last_status; /* last status on receive queue */
8287 struct ice_ctl_q_ring rq; /* receive queue */
8388 struct ice_ctl_q_ring sq; /* send queue */
8489 u32 sq_cmd_timeout; /* send queue cmd write back timeout */
....@@ -86,10 +91,9 @@
8691 u16 num_sq_entries; /* send queue depth */
8792 u16 rq_buf_size; /* receive queue buffer size */
8893 u16 sq_buf_size; /* send queue buffer size */
94
+ enum ice_aq_err sq_last_status; /* last status on send queue */
8995 struct mutex sq_lock; /* Send queue lock */
9096 struct mutex rq_lock; /* Receive queue lock */
91
- enum ice_aq_err sq_last_status; /* last status on send queue */
92
- enum ice_aq_err rq_last_status; /* last status on receive queue */
9397 };
9498
9599 #endif /* _ICE_CONTROLQ_H_ */