Lines Matching refs:io

25 	struct efct_io *io;
38 io = kzalloc(sizeof(*io), GFP_KERNEL);
39 if (!io)
43 io_pool->ios[i] = io;
44 io->tag = i;
45 io->instance_index = i;
48 io->rspbuf.size = SCSI_RSP_BUF_LENGTH;
49 io->rspbuf.virt = dma_alloc_coherent(&efct->pci->dev,
50 io->rspbuf.size,
51 &io->rspbuf.phys, GFP_KERNEL);
52 if (!io->rspbuf.virt) {
59 io->sgl = kzalloc(sizeof(*io->sgl) * num_sgl, GFP_KERNEL);
60 if (!io->sgl) {
65 io->sgl_allocated = num_sgl;
66 io->sgl_count = 0;
68 INIT_LIST_HEAD(&io->list_entry);
69 list_add_tail(&io->list_entry, &io_pool->freelist);
80 struct efct_io *io;
86 io = io_pool->ios[i];
87 if (!io)
90 kfree(io->sgl);
92 io->rspbuf.size, io->rspbuf.virt,
93 io->rspbuf.phys);
94 memset(&io->rspbuf, 0, sizeof(struct efc_dma));
107 struct efct_io *io = NULL;
116 io = list_first_entry(&io_pool->freelist, struct efct_io,
118 list_del_init(&io->list_entry);
123 if (!io)
126 io->io_type = EFCT_IO_TYPE_MAX;
127 io->hio_type = EFCT_HW_IO_MAX;
128 io->hio = NULL;
129 io->transferred = 0;
130 io->efct = efct;
131 io->timeout = 0;
132 io->sgl_count = 0;
133 io->tgt_task_tag = 0;
134 io->init_task_tag = 0;
135 io->hw_tag = 0;
136 io->display_name = "pending";
137 io->seq_init = 0;
138 io->io_free = 0;
139 io->release = NULL;
142 return io;
147 efct_io_pool_io_free(struct efct_io_pool *io_pool, struct efct_io *io)
156 hio = io->hio;
157 io->hio = NULL;
158 io->io_free = 1;
159 INIT_LIST_HEAD(&io->list_entry);
160 list_add(&io->list_entry, &io_pool->freelist);
175 struct efct_io *io = NULL;
180 list_for_each_entry(io, &node->active_ios, list_entry) {
181 if ((io->cmd_tgt && io->init_task_tag == ox_id) &&
182 (rx_id == 0xffff || io->tgt_task_tag == rx_id)) {
183 if (kref_get_unless_zero(&io->ref))
189 return found ? io : NULL;