Lines Matching defs:mbx
59 struct ixgbe_mbx_info *mbx = &hw->mbx;
64 if (size > mbx->size) {
67 size, mbx->size);
68 size = mbx->size;
71 if (mbx->ops[mbx_id].read)
72 return mbx->ops[mbx_id].read(hw, msg, size, mbx_id);
88 struct ixgbe_mbx_info *mbx = &hw->mbx;
93 if (!mbx->ops[mbx_id].read || !mbx->ops[mbx_id].check_for_msg ||
94 !mbx->timeout)
98 if (size > mbx->size) {
101 size, mbx->size);
102 size = mbx->size;
108 return mbx->ops[mbx_id].read(hw, msg, size, mbx_id);
125 struct ixgbe_mbx_info *mbx = &hw->mbx;
134 if (!mbx->ops[mbx_id].write || !mbx->ops[mbx_id].check_for_ack ||
135 !mbx->ops[mbx_id].release || !mbx->timeout)
138 if (size > mbx->size) {
143 ret_val = mbx->ops[mbx_id].write(hw, msg, size, mbx_id);
158 struct ixgbe_mbx_info *mbx = &hw->mbx;
163 if (mbx->ops[mbx_id].check_for_msg)
164 ret_val = mbx->ops[mbx_id].check_for_msg(hw, mbx_id);
178 struct ixgbe_mbx_info *mbx = &hw->mbx;
183 if (mbx->ops[mbx_id].check_for_ack)
184 ret_val = mbx->ops[mbx_id].check_for_ack(hw, mbx_id);
198 struct ixgbe_mbx_info *mbx = &hw->mbx;
203 if (mbx->ops[mbx_id].check_for_rst)
204 ret_val = mbx->ops[mbx_id].check_for_rst(hw, mbx_id);
218 struct ixgbe_mbx_info *mbx = &hw->mbx;
223 if (mbx->ops[mbx_id].clear)
224 ret_val = mbx->ops[mbx_id].clear(hw, mbx_id);
238 struct ixgbe_mbx_info *mbx = &hw->mbx;
239 int countdown = mbx->timeout;
243 if (!countdown || !mbx->ops[mbx_id].check_for_msg)
246 while (countdown && mbx->ops[mbx_id].check_for_msg(hw, mbx_id)) {
250 usec_delay(mbx->usec_delay);
271 struct ixgbe_mbx_info *mbx = &hw->mbx;
272 int countdown = mbx->timeout;
276 if (!countdown || !mbx->ops[mbx_id].check_for_ack)
279 while (countdown && mbx->ops[mbx_id].check_for_ack(hw, mbx_id)) {
283 usec_delay(mbx->usec_delay);
307 vf_mailbox |= hw->mbx.vf_mailbox;
308 hw->mbx.vf_mailbox |= vf_mailbox & IXGBE_VFMAILBOX_R2C_BITS;
318 IXGBE_EVC_ADD(&hw->mbx.stats.reqs, 1);
319 hw->mbx.vf_mailbox &= ~IXGBE_VFMAILBOX_PFSTS;
328 IXGBE_EVC_ADD(&hw->mbx.stats.acks, 1);
329 hw->mbx.vf_mailbox &= ~IXGBE_VFMAILBOX_PFACK;
338 IXGBE_EVC_ADD(&hw->mbx.stats.rsts, 1);
339 hw->mbx.vf_mailbox &= ~(IXGBE_VFMAILBOX_RSTI |
375 IXGBE_EVC_ADD(&hw->mbx.stats.reqs, 1);
397 IXGBE_EVC_ADD(&hw->mbx.stats.acks, 1);
420 IXGBE_EVC_ADD(&hw->mbx.stats.rsts, 1);
435 struct ixgbe_mbx_info *mbx = &hw->mbx;
436 int countdown = mbx->timeout;
442 if (!mbx->timeout)
458 usec_delay(mbx->usec_delay);
535 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_tx, 1);
577 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_tx, 1);
588 hw->mbx.ops[mbx_id].release(hw, mbx_id);
624 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_rx, 1);
665 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_rx, 1);
674 * Initializes single set the hw->mbx struct to correct values for vf mailbox
679 struct ixgbe_mbx_info *mbx = &hw->mbx;
681 mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT;
682 mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY;
684 mbx->size = IXGBE_VFMAILBOX_SIZE;
687 mbx->ops[0].release = ixgbe_release_mbx_lock_dummy;
688 mbx->ops[0].read = ixgbe_read_mbx_vf_legacy;
689 mbx->ops[0].write = ixgbe_write_mbx_vf_legacy;
690 mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf;
691 mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf;
692 mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf;
693 mbx->ops[0].clear = NULL;
695 IXGBE_EVC_STORE(&mbx->stats.msgs_tx, 0);
696 IXGBE_EVC_STORE(&mbx->stats.msgs_rx, 0);
697 IXGBE_EVC_STORE(&mbx->stats.reqs, 0);
698 IXGBE_EVC_STORE(&mbx->stats.acks, 0);
699 IXGBE_EVC_STORE(&mbx->stats.rsts, 0);
706 * Initializes the hw->mbx struct to correct values for vf mailbox
710 struct ixgbe_mbx_info *mbx = &hw->mbx;
712 mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT;
713 mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY;
715 mbx->size = IXGBE_VFMAILBOX_SIZE;
718 mbx->ops[0].release = ixgbe_release_mbx_lock_vf;
719 mbx->ops[0].read = ixgbe_read_mbx_vf;
720 mbx->ops[0].write = ixgbe_write_mbx_vf;
721 mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf;
722 mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf;
723 mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf;
724 mbx->ops[0].clear = NULL;
736 IXGBE_EVC_ADD(&hw->mbx.stats.reqs, 1);
751 IXGBE_EVC_ADD(&hw->mbx.stats.acks, 1);
846 IXGBE_EVC_ADD(&hw->mbx.stats.rsts, 1);
861 struct ixgbe_mbx_info *mbx = &hw->mbx;
862 int countdown = mbx->timeout;
868 if (!mbx->timeout)
885 usec_delay(mbx->usec_delay);
950 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_tx, 1);
995 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_tx, 1);
998 hw->mbx.ops[vf_id].release(hw, vf_id);
1036 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_rx, 1);
1078 IXGBE_EVC_ADD(&hw->mbx.stats.msgs_rx, 1);
1092 u16 mbx_size = hw->mbx.size;
1109 * Initializes single set of the hw->mbx struct to correct values for pf mailbox
1114 struct ixgbe_mbx_info *mbx = &hw->mbx;
1116 mbx->ops[vf_id].release = ixgbe_release_mbx_lock_dummy;
1117 mbx->ops[vf_id].read = ixgbe_read_mbx_pf_legacy;
1118 mbx->ops[vf_id].write = ixgbe_write_mbx_pf_legacy;
1119 mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf;
1120 mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf;
1121 mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf;
1122 mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf;
1129 * Initializes all sets of the hw->mbx struct to correct values for pf
1136 struct ixgbe_mbx_info *mbx = &hw->mbx;
1147 mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT;
1148 mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY;
1149 mbx->size = IXGBE_VFMAILBOX_SIZE;
1152 IXGBE_EVC_STORE(&mbx->stats.msgs_tx, 0);
1153 IXGBE_EVC_STORE(&mbx->stats.msgs_rx, 0);
1154 IXGBE_EVC_STORE(&mbx->stats.reqs, 0);
1155 IXGBE_EVC_STORE(&mbx->stats.acks, 0);
1156 IXGBE_EVC_STORE(&mbx->stats.rsts, 0);
1161 * 2. rewrite the code to dynamically allocate mbx->ops[vf_id] for
1173 * Initializes the hw->mbx struct to new function set for improved
1178 struct ixgbe_mbx_info *mbx = &hw->mbx;
1188 mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT;
1189 mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY;
1190 mbx->size = IXGBE_VFMAILBOX_SIZE;
1192 mbx->ops[vf_id].release = ixgbe_release_mbx_lock_pf;
1193 mbx->ops[vf_id].read = ixgbe_read_mbx_pf;
1194 mbx->ops[vf_id].write = ixgbe_write_mbx_pf;
1195 mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf;
1196 mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf;
1197 mbx
1198 mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf;