Lines Matching refs:mbx
38 struct e1000_mbx_info *mbx = &hw->mbx; in igb_read_mbx() local
42 if (size > mbx->size) in igb_read_mbx()
43 size = mbx->size; in igb_read_mbx()
45 if (mbx->ops.read) in igb_read_mbx()
46 ret_val = mbx->ops.read(hw, msg, size, mbx_id, unlock); in igb_read_mbx()
62 struct e1000_mbx_info *mbx = &hw->mbx; in igb_write_mbx() local
65 if (size > mbx->size) in igb_write_mbx()
68 else if (mbx->ops.write) in igb_write_mbx()
69 ret_val = mbx->ops.write(hw, msg, size, mbx_id); in igb_write_mbx()
83 struct e1000_mbx_info *mbx = &hw->mbx; in igb_check_for_msg() local
86 if (mbx->ops.check_for_msg) in igb_check_for_msg()
87 ret_val = mbx->ops.check_for_msg(hw, mbx_id); in igb_check_for_msg()
101 struct e1000_mbx_info *mbx = &hw->mbx; in igb_check_for_ack() local
104 if (mbx->ops.check_for_ack) in igb_check_for_ack()
105 ret_val = mbx->ops.check_for_ack(hw, mbx_id); in igb_check_for_ack()
119 struct e1000_mbx_info *mbx = &hw->mbx; in igb_check_for_rst() local
122 if (mbx->ops.check_for_rst) in igb_check_for_rst()
123 ret_val = mbx->ops.check_for_rst(hw, mbx_id); in igb_check_for_rst()
137 struct e1000_mbx_info *mbx = &hw->mbx; in igb_unlock_mbx() local
140 if (mbx->ops.unlock) in igb_unlock_mbx()
141 ret_val = mbx->ops.unlock(hw, mbx_id); in igb_unlock_mbx()
155 struct e1000_mbx_info *mbx = &hw->mbx; in igb_poll_for_msg() local
156 int countdown = mbx->timeout; in igb_poll_for_msg()
158 if (!countdown || !mbx->ops.check_for_msg) in igb_poll_for_msg()
161 while (countdown && mbx->ops.check_for_msg(hw, mbx_id)) { in igb_poll_for_msg()
165 udelay(mbx->usec_delay); in igb_poll_for_msg()
170 mbx->timeout = 0; in igb_poll_for_msg()
184 struct e1000_mbx_info *mbx = &hw->mbx; in igb_poll_for_ack() local
185 int countdown = mbx->timeout; in igb_poll_for_ack()
187 if (!countdown || !mbx->ops.check_for_ack) in igb_poll_for_ack()
190 while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) { in igb_poll_for_ack()
194 udelay(mbx->usec_delay); in igb_poll_for_ack()
199 mbx->timeout = 0; in igb_poll_for_ack()
217 struct e1000_mbx_info *mbx = &hw->mbx; in igb_read_posted_mbx() local
220 if (!mbx->ops.read) in igb_read_posted_mbx()
226 ret_val = mbx->ops.read(hw, msg, size, mbx_id, true); in igb_read_posted_mbx()
244 struct e1000_mbx_info *mbx = &hw->mbx; in igb_write_posted_mbx() local
248 if (!mbx->ops.write || !mbx->timeout) in igb_write_posted_mbx()
252 ret_val = mbx->ops.write(hw, msg, size, mbx_id); in igb_write_posted_mbx()
287 hw->mbx.stats.reqs++; in igb_check_for_msg_pf()
306 hw->mbx.stats.acks++; in igb_check_for_ack_pf()
327 hw->mbx.stats.rsts++; in igb_check_for_rst_pf()
414 hw->mbx.stats.msgs_tx++; in igb_write_mbx_pf()
456 hw->mbx.stats.msgs_rx++; in igb_read_mbx_pf()
470 struct e1000_mbx_info *mbx = &hw->mbx; in igb_init_mbx_params_pf() local
472 mbx->timeout = 0; in igb_init_mbx_params_pf()
473 mbx->usec_delay = 0; in igb_init_mbx_params_pf()
475 mbx->size = E1000_VFMAILBOX_SIZE; in igb_init_mbx_params_pf()
477 mbx->ops.read = igb_read_mbx_pf; in igb_init_mbx_params_pf()
478 mbx->ops.write = igb_write_mbx_pf; in igb_init_mbx_params_pf()
479 mbx->ops.read_posted = igb_read_posted_mbx; in igb_init_mbx_params_pf()
480 mbx->ops.write_posted = igb_write_posted_mbx; in igb_init_mbx_params_pf()
481 mbx->ops.check_for_msg = igb_check_for_msg_pf; in igb_init_mbx_params_pf()
482 mbx->ops.check_for_ack = igb_check_for_ack_pf; in igb_init_mbx_params_pf()
483 mbx->ops.check_for_rst = igb_check_for_rst_pf; in igb_init_mbx_params_pf()
484 mbx->ops.unlock = igb_release_mbx_lock_pf; in igb_init_mbx_params_pf()
486 mbx->stats.msgs_tx = 0; in igb_init_mbx_params_pf()
487 mbx->stats.msgs_rx = 0; in igb_init_mbx_params_pf()
488 mbx->stats.reqs = 0; in igb_init_mbx_params_pf()
489 mbx->stats.acks = 0; in igb_init_mbx_params_pf()
490 mbx->stats.rsts = 0; in igb_init_mbx_params_pf()