Lines Matching refs:mbmem_len
140 return len & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_index_len()
153 u16 tail = (mbx->tail + offset + 1) & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_tail_add()
169 u16 tail = (mbx->tail - offset - 1) & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_tail_sub()
185 u16 head = (mbx->head + offset + 1) & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_head_add()
201 u16 head = (mbx->head - offset - 1) & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_head_sub()
342 mask = mbx->mbmem_len - 1; in fm10k_mbx_write_copy()
385 u16 mbmem_len, len, ack = fm10k_mbx_index_len(mbx, head, mbx->tail); in fm10k_mbx_pull_head() local
392 mbmem_len = mbx->mbmem_len - 1; in fm10k_mbx_pull_head()
394 if (len > mbmem_len) in fm10k_mbx_pull_head()
395 len = mbmem_len; in fm10k_mbx_pull_head()
427 u32 mbmem = mbx->mbmem_reg ^ mbx->mbmem_len; in fm10k_mbx_read_copy()
434 if (head >= mbx->mbmem_len) in fm10k_mbx_read_copy()
445 head &= mbx->mbmem_len - 1; in fm10k_mbx_read_copy()
802 mbx->mbx_hdr = fm10k_read_reg(hw, mbx->mbmem_reg ^ mbx->mbmem_len); in fm10k_mbx_read()
981 if (fm10k_mbx_index_len(mbx, mbx->head, tail) < mbx->mbmem_len) in fm10k_mbx_validate_msg_hdr()
1455 fm10k_write_reg(hw, mbx->mbmem_reg ^ mbx->mbmem_len, mbx->mbx_hdr); in fm10k_mbx_connect()
1604 mbx->mbmem_len = FM10K_VFMBMEM_VF_XOR; in fm10k_pfvf_mbx_init()
1789 head += mbx->mbmem_len - 1; in fm10k_sm_mbx_validate_fifo_hdr()
1791 tail += mbx->mbmem_len - 1; in fm10k_sm_mbx_validate_fifo_hdr()
1794 if (fm10k_mbx_index_len(mbx, mbx->head, tail) < mbx->mbmem_len) in fm10k_sm_mbx_validate_fifo_hdr()
1882 u16 mbmem_len = mbx->mbmem_len - 1; in fm10k_sm_mbx_receive() local
1887 tail += mbmem_len; in fm10k_sm_mbx_receive()
1902 if (mbx->head > mbmem_len) in fm10k_sm_mbx_receive()
1903 mbx->head -= mbmem_len; in fm10k_sm_mbx_receive()
1922 u16 mbmem_len = mbx->mbmem_len - 1; in fm10k_sm_mbx_transmit() local
1927 head += mbmem_len; in fm10k_sm_mbx_transmit()
1938 } while ((len <= mbx->tail_len) && (len < mbmem_len)); in fm10k_sm_mbx_transmit()
1947 if (mbx->tail > mbmem_len) in fm10k_sm_mbx_transmit()
1948 mbx->tail -= mbmem_len; in fm10k_sm_mbx_transmit()
2162 mbx->mbmem_len = FM10K_MBMEM_PF_XOR; in fm10k_sm_mbx_init()