Lines Matching refs:mmio_read
74 struct efa_com_mmio_read *mmio_read = &edev->mmio_read; in efa_com_reg_read32() local
80 read_resp = mmio_read->read_resp; in efa_com_reg_read32()
82 spin_lock(&mmio_read->lock); in efa_com_reg_read32()
83 mmio_read->seq_num++; in efa_com_reg_read32()
86 read_resp->req_id = mmio_read->seq_num + 0x9aL; in efa_com_reg_read32()
89 mmio_read->seq_num); in efa_com_reg_read32()
93 exp_time = jiffies + usecs_to_jiffies(mmio_read->mmio_read_timeout); in efa_com_reg_read32()
95 if (READ_ONCE(read_resp->req_id) == mmio_read->seq_num) in efa_com_reg_read32()
100 if (read_resp->req_id != mmio_read->seq_num) { in efa_com_reg_read32()
104 mmio_read->seq_num, offset, read_resp->req_id, in efa_com_reg_read32()
120 spin_unlock(&mmio_read->lock); in efa_com_reg_read32()
886 struct efa_com_mmio_read *mmio_read = &edev->mmio_read; in efa_com_mmio_reg_read_resp_addr_init() local
891 addr_high = (mmio_read->read_resp_dma_addr >> 32) & GENMASK(31, 0); in efa_com_mmio_reg_read_resp_addr_init()
892 addr_low = mmio_read->read_resp_dma_addr & GENMASK(31, 0); in efa_com_mmio_reg_read_resp_addr_init()
900 struct efa_com_mmio_read *mmio_read = &edev->mmio_read; in efa_com_mmio_reg_read_init() local
902 spin_lock_init(&mmio_read->lock); in efa_com_mmio_reg_read_init()
903 mmio_read->read_resp = in efa_com_mmio_reg_read_init()
904 dma_alloc_coherent(edev->dmadev, sizeof(*mmio_read->read_resp), in efa_com_mmio_reg_read_init()
905 &mmio_read->read_resp_dma_addr, GFP_KERNEL); in efa_com_mmio_reg_read_init()
906 if (!mmio_read->read_resp) in efa_com_mmio_reg_read_init()
911 mmio_read->read_resp->req_id = 0; in efa_com_mmio_reg_read_init()
912 mmio_read->seq_num = 0; in efa_com_mmio_reg_read_init()
913 mmio_read->mmio_read_timeout = EFA_REG_READ_TIMEOUT_US; in efa_com_mmio_reg_read_init()
920 struct efa_com_mmio_read *mmio_read = &edev->mmio_read; in efa_com_mmio_reg_read_destroy() local
922 dma_free_coherent(edev->dmadev, sizeof(*mmio_read->read_resp), in efa_com_mmio_reg_read_destroy()
923 mmio_read->read_resp, mmio_read->read_resp_dma_addr); in efa_com_mmio_reg_read_destroy()