Lines Matching full:mailbox
9 * wx_obtain_mbx_lock_pf - obtain mailbox lock
18 u32 mailbox; in wx_obtain_mbx_lock_pf() local
24 /* reserve mailbox for vf use */ in wx_obtain_mbx_lock_pf()
25 mailbox = rd32(wx, WX_PXMAILBOX(vf)); in wx_obtain_mbx_lock_pf()
26 if (mailbox & WX_PXMAILBOX_PFU) in wx_obtain_mbx_lock_pf()
31 wx_err(wx, "Failed to obtain mailbox lock for PF%d", vf); in wx_obtain_mbx_lock_pf()
82 * wx_write_mbx_pf - Places a message in the mailbox
97 wx_err(wx, "Invalid mailbox message size %d", size); in wx_write_mbx_pf()
101 /* lock the mailbox to prevent pf/vf race condition */ in wx_write_mbx_pf()
110 /* copy the caller specified message to the mailbox memory buffer */ in wx_write_mbx_pf()
115 /* set mirrored mailbox flags */ in wx_write_mbx_pf()
123 * wx_read_mbx_pf - Read a message from the mailbox
137 /* limit read to size of mailbox and mbx->size is up to 15 */ in wx_read_mbx_pf()
141 /* lock the mailbox to prevent pf/vf race condition */ in wx_read_mbx_pf()
150 /* set mirrored mailbox flags */ in wx_read_mbx_pf()
180 u32 mailbox = rd32(wx, WX_VXMAILBOX); in wx_read_v2p_mailbox() local
182 mailbox |= wx->mbx.mailbox; in wx_read_v2p_mailbox()
183 wx->mbx.mailbox |= mailbox & WX_VXMAILBOX_R2C_BITS; in wx_read_v2p_mailbox()
185 return mailbox; in wx_read_v2p_mailbox()
195 * wx_obtain_mbx_lock_vf - obtain mailbox lock
203 u32 mailbox; in wx_obtain_mbx_lock_vf() local
205 ret = readx_poll_timeout_atomic(wx_mailbox_get_lock_vf, wx, mailbox, in wx_obtain_mbx_lock_vf()
206 (mailbox & WX_VXMAILBOX_VFU), in wx_obtain_mbx_lock_vf()
209 wx_err(wx, "Failed to obtain mailbox lock for VF.\n"); in wx_obtain_mbx_lock_vf()
216 u32 mailbox = wx_read_v2p_mailbox(wx); in wx_check_for_bit_vf() local
218 wx->mbx.mailbox &= ~mask; in wx_check_for_bit_vf()
220 return (mailbox & mask ? 0 : -EBUSY); in wx_check_for_bit_vf()
313 * wx_write_posted_mbx - Write a message to the mailbox, wait for ack
335 * wx_write_mbx_vf - Write a message to the mailbox
349 wx_err(wx, "Invalid mailbox message size %d", size); in wx_write_mbx_vf()
353 /* lock the mailbox to prevent pf/vf race condition */ in wx_write_mbx_vf()
362 /* copy the caller specified message to the mailbox memory buffer */ in wx_write_mbx_vf()
385 /* limit read to size of mailbox and mbx->size is up to 15 */ in wx_read_mbx_vf()
389 /* lock the mailbox to prevent pf/vf race condition */ in wx_read_mbx_vf()
394 /* copy the message from the mailbox memory buffer */ in wx_read_mbx_vf()
398 /* Acknowledge receipt and release mailbox, then we're done */ in wx_read_mbx_vf()
411 /* Initialize mailbox parameters */ in wx_init_mbx_params_vf()
413 wx->mbx.mailbox = WX_VXMAILBOX; in wx_init_mbx_params_vf()