Lines Matching full:mbx

78 	struct e1000_mbx_info *mbx = &hw->mbx;  in e1000_read_mbx()  local
84 if (size > mbx->size) in e1000_read_mbx()
85 size = mbx->size; in e1000_read_mbx()
87 if (mbx->ops.read) in e1000_read_mbx()
88 ret_val = mbx->ops.read(hw, msg, size, mbx_id); in e1000_read_mbx()
104 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_write_mbx() local
109 if (size > mbx->size) in e1000_write_mbx()
112 else if (mbx->ops.write) in e1000_write_mbx()
113 ret_val = mbx->ops.write(hw, msg, size, mbx_id); in e1000_write_mbx()
127 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_check_for_msg() local
132 if (mbx->ops.check_for_msg) in e1000_check_for_msg()
133 ret_val = mbx->ops.check_for_msg(hw, mbx_id); in e1000_check_for_msg()
147 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_check_for_ack() local
152 if (mbx->ops.check_for_ack) in e1000_check_for_ack()
153 ret_val = mbx->ops.check_for_ack(hw, mbx_id); in e1000_check_for_ack()
167 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_check_for_rst() local
172 if (mbx->ops.check_for_rst) in e1000_check_for_rst()
173 ret_val = mbx->ops.check_for_rst(hw, mbx_id); in e1000_check_for_rst()
187 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_poll_for_msg() local
188 int countdown = mbx->timeout; in e1000_poll_for_msg()
192 if (!countdown || !mbx->ops.check_for_msg) in e1000_poll_for_msg()
195 while (countdown && mbx->ops.check_for_msg(hw, mbx_id)) { in e1000_poll_for_msg()
199 usec_delay(mbx->usec_delay); in e1000_poll_for_msg()
204 mbx->timeout = 0; in e1000_poll_for_msg()
218 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_poll_for_ack() local
219 int countdown = mbx->timeout; in e1000_poll_for_ack()
223 if (!countdown || !mbx->ops.check_for_ack) in e1000_poll_for_ack()
226 while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) { in e1000_poll_for_ack()
230 usec_delay(mbx->usec_delay); in e1000_poll_for_ack()
235 mbx->timeout = 0; in e1000_poll_for_ack()
252 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_read_posted_mbx() local
257 if (!mbx->ops.read) in e1000_read_posted_mbx()
264 ret_val = mbx->ops.read(hw, msg, size, mbx_id); in e1000_read_posted_mbx()
281 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_write_posted_mbx() local
287 if (!mbx->ops.write || !mbx->timeout) in e1000_write_posted_mbx()
291 ret_val = mbx->ops.write(hw, msg, size, mbx_id); in e1000_write_posted_mbx()
301 * e1000_init_mbx_ops_generic - Initialize mbx function pointers
308 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_init_mbx_ops_generic() local
309 mbx->ops.init_params = e1000_null_ops_generic; in e1000_init_mbx_ops_generic()
310 mbx->ops.read = e1000_null_mbx_transact; in e1000_init_mbx_ops_generic()
311 mbx->ops.write = e1000_null_mbx_transact; in e1000_init_mbx_ops_generic()
312 mbx->ops.check_for_msg = e1000_null_mbx_check_for_flag; in e1000_init_mbx_ops_generic()
313 mbx->ops.check_for_ack = e1000_null_mbx_check_for_flag; in e1000_init_mbx_ops_generic()
314 mbx->ops.check_for_rst = e1000_null_mbx_check_for_flag; in e1000_init_mbx_ops_generic()
315 mbx->ops.read_posted = e1000_read_posted_mbx; in e1000_init_mbx_ops_generic()
316 mbx->ops.write_posted = e1000_write_posted_mbx; in e1000_init_mbx_ops_generic()
373 hw->mbx.stats.reqs++; in e1000_check_for_msg_vf()
395 hw->mbx.stats.acks++; in e1000_check_for_ack_vf()
418 hw->mbx.stats.rsts++; in e1000_check_for_rst_vf()
484 hw->mbx.stats.msgs_tx++; in e1000_write_mbx_vf()
523 hw->mbx.stats.msgs_rx++; in e1000_read_mbx_vf()
533 * Initializes the hw->mbx struct to correct values for vf mailbox
537 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_init_mbx_params_vf() local
541 mbx->timeout = 0; in e1000_init_mbx_params_vf()
542 mbx->usec_delay = E1000_VF_MBX_INIT_DELAY; in e1000_init_mbx_params_vf()
544 mbx->size = E1000_VFMAILBOX_SIZE; in e1000_init_mbx_params_vf()
546 mbx->ops.read = e1000_read_mbx_vf; in e1000_init_mbx_params_vf()
547 mbx->ops.write = e1000_write_mbx_vf; in e1000_init_mbx_params_vf()
548 mbx->ops.read_posted = e1000_read_posted_mbx; in e1000_init_mbx_params_vf()
549 mbx->ops.write_posted = e1000_write_posted_mbx; in e1000_init_mbx_params_vf()
550 mbx->ops.check_for_msg = e1000_check_for_msg_vf; in e1000_init_mbx_params_vf()
551 mbx->ops.check_for_ack = e1000_check_for_ack_vf; in e1000_init_mbx_params_vf()
552 mbx->ops.check_for_rst = e1000_check_for_rst_vf; in e1000_init_mbx_params_vf()
554 mbx->stats.msgs_tx = 0; in e1000_init_mbx_params_vf()
555 mbx->stats.msgs_rx = 0; in e1000_init_mbx_params_vf()
556 mbx->stats.reqs = 0; in e1000_init_mbx_params_vf()
557 mbx->stats.acks = 0; in e1000_init_mbx_params_vf()
558 mbx->stats.rsts = 0; in e1000_init_mbx_params_vf()
591 hw->mbx.stats.reqs++; in e1000_check_for_msg_pf()
612 hw->mbx.stats.acks++; in e1000_check_for_ack_pf()
635 hw->mbx.stats.rsts++; in e1000_check_for_rst_pf()
708 hw->mbx.stats.msgs_tx++; in e1000_write_mbx_pf()
747 hw->mbx.stats.msgs_rx++; in e1000_read_mbx_pf()
757 * Initializes the hw->mbx struct to correct values for pf mailbox
761 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_init_mbx_params_pf() local
767 mbx->timeout = 0; in e1000_init_mbx_params_pf()
768 mbx->usec_delay = 0; in e1000_init_mbx_params_pf()
770 mbx->size = E1000_VFMAILBOX_SIZE; in e1000_init_mbx_params_pf()
772 mbx->ops.read = e1000_read_mbx_pf; in e1000_init_mbx_params_pf()
773 mbx->ops.write = e1000_write_mbx_pf; in e1000_init_mbx_params_pf()
774 mbx->ops.read_posted = e1000_read_posted_mbx; in e1000_init_mbx_params_pf()
775 mbx->ops.write_posted = e1000_write_posted_mbx; in e1000_init_mbx_params_pf()
776 mbx->ops.check_for_msg = e1000_check_for_msg_pf; in e1000_init_mbx_params_pf()
777 mbx->ops.check_for_ack = e1000_check_for_ack_pf; in e1000_init_mbx_params_pf()
778 mbx->ops.check_for_rst = e1000_check_for_rst_pf; in e1000_init_mbx_params_pf()
780 mbx->stats.msgs_tx = 0; in e1000_init_mbx_params_pf()
781 mbx->stats.msgs_rx = 0; in e1000_init_mbx_params_pf()
782 mbx->stats.reqs = 0; in e1000_init_mbx_params_pf()
783 mbx->stats.acks = 0; in e1000_init_mbx_params_pf()
784 mbx->stats.rsts = 0; in e1000_init_mbx_params_pf()