Lines Matching refs:mbx
19 struct e1000_mbx_info *mbx = &hw->mbx; in igb_read_mbx() local
23 if (size > mbx->size) in igb_read_mbx()
24 size = mbx->size; in igb_read_mbx()
26 if (mbx->ops.read) in igb_read_mbx()
27 ret_val = mbx->ops.read(hw, msg, size, mbx_id, unlock); in igb_read_mbx()
43 struct e1000_mbx_info *mbx = &hw->mbx; in igb_write_mbx() local
46 if (size > mbx->size) in igb_write_mbx()
49 else if (mbx->ops.write) in igb_write_mbx()
50 ret_val = mbx->ops.write(hw, msg, size, mbx_id); in igb_write_mbx()
64 struct e1000_mbx_info *mbx = &hw->mbx; in igb_check_for_msg() local
67 if (mbx->ops.check_for_msg) in igb_check_for_msg()
68 ret_val = mbx->ops.check_for_msg(hw, mbx_id); in igb_check_for_msg()
82 struct e1000_mbx_info *mbx = &hw->mbx; in igb_check_for_ack() local
85 if (mbx->ops.check_for_ack) in igb_check_for_ack()
86 ret_val = mbx->ops.check_for_ack(hw, mbx_id); in igb_check_for_ack()
100 struct e1000_mbx_info *mbx = &hw->mbx; in igb_check_for_rst() local
103 if (mbx->ops.check_for_rst) in igb_check_for_rst()
104 ret_val = mbx->ops.check_for_rst(hw, mbx_id); in igb_check_for_rst()
118 struct e1000_mbx_info *mbx = &hw->mbx; in igb_unlock_mbx() local
121 if (mbx->ops.unlock) in igb_unlock_mbx()
122 ret_val = mbx->ops.unlock(hw, mbx_id); in igb_unlock_mbx()
136 struct e1000_mbx_info *mbx = &hw->mbx; in igb_poll_for_msg() local
137 int countdown = mbx->timeout; in igb_poll_for_msg()
139 if (!countdown || !mbx->ops.check_for_msg) in igb_poll_for_msg()
142 while (countdown && mbx->ops.check_for_msg(hw, mbx_id)) { in igb_poll_for_msg()
146 udelay(mbx->usec_delay); in igb_poll_for_msg()
151 mbx->timeout = 0; in igb_poll_for_msg()
165 struct e1000_mbx_info *mbx = &hw->mbx; in igb_poll_for_ack() local
166 int countdown = mbx->timeout; in igb_poll_for_ack()
168 if (!countdown || !mbx->ops.check_for_ack) in igb_poll_for_ack()
171 while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) { in igb_poll_for_ack()
175 udelay(mbx->usec_delay); in igb_poll_for_ack()
180 mbx->timeout = 0; in igb_poll_for_ack()
198 struct e1000_mbx_info *mbx = &hw->mbx; in igb_read_posted_mbx() local
201 if (!mbx->ops.read) in igb_read_posted_mbx()
207 ret_val = mbx->ops.read(hw, msg, size, mbx_id, true); in igb_read_posted_mbx()
225 struct e1000_mbx_info *mbx = &hw->mbx; in igb_write_posted_mbx() local
229 if (!mbx->ops.write || !mbx->timeout) in igb_write_posted_mbx()
233 ret_val = mbx->ops.write(hw, msg, size, mbx_id); in igb_write_posted_mbx()
268 hw->mbx.stats.reqs++; in igb_check_for_msg_pf()
287 hw->mbx.stats.acks++; in igb_check_for_ack_pf()
308 hw->mbx.stats.rsts++; in igb_check_for_rst_pf()
395 hw->mbx.stats.msgs_tx++; in igb_write_mbx_pf()
437 hw->mbx.stats.msgs_rx++; in igb_read_mbx_pf()
451 struct e1000_mbx_info *mbx = &hw->mbx; in igb_init_mbx_params_pf() local
453 mbx->timeout = 0; in igb_init_mbx_params_pf()
454 mbx->usec_delay = 0; in igb_init_mbx_params_pf()
456 mbx->size = E1000_VFMAILBOX_SIZE; in igb_init_mbx_params_pf()
458 mbx->ops.read = igb_read_mbx_pf; in igb_init_mbx_params_pf()
459 mbx->ops.write = igb_write_mbx_pf; in igb_init_mbx_params_pf()
460 mbx->ops.read_posted = igb_read_posted_mbx; in igb_init_mbx_params_pf()
461 mbx->ops.write_posted = igb_write_posted_mbx; in igb_init_mbx_params_pf()
462 mbx->ops.check_for_msg = igb_check_for_msg_pf; in igb_init_mbx_params_pf()
463 mbx->ops.check_for_ack = igb_check_for_ack_pf; in igb_init_mbx_params_pf()
464 mbx->ops.check_for_rst = igb_check_for_rst_pf; in igb_init_mbx_params_pf()
465 mbx->ops.unlock = igb_release_mbx_lock_pf; in igb_init_mbx_params_pf()
467 mbx->stats.msgs_tx = 0; in igb_init_mbx_params_pf()
468 mbx->stats.msgs_rx = 0; in igb_init_mbx_params_pf()
469 mbx->stats.reqs = 0; in igb_init_mbx_params_pf()
470 mbx->stats.acks = 0; in igb_init_mbx_params_pf()
471 mbx->stats.rsts = 0; in igb_init_mbx_params_pf()