Lines Matching defs:io_task

285 	struct beiscsi_io_task *io_task;
342 io_task = task->dd_data;
346 io_task->pwrb_handle->pwrb, 1);
349 io_task->pwrb_handle->pwrb, 1);
353 inv_tbl->tbl[nents].icd = io_task->psgl_handle->sgl_index;
1121 struct beiscsi_io_task *io_task = task->dd_data;
1123 (struct be_status_bhs *)io_task->cmd_bhs;
1138 if (io_task->scsi_cmnd) {
1139 scsi_dma_unmap(io_task->scsi_cmnd);
1140 io_task->scsi_cmnd = NULL;
1174 if (io_task->cmd_bhs->iscsi_hdr.flags & ISCSI_FLAG_CMD_READ)
1177 if (io_task->scsi_cmnd) {
1178 scsi_dma_unmap(io_task->scsi_cmnd);
1179 io_task->scsi_cmnd = NULL;
1190 struct beiscsi_io_task *io_task = task->dd_data;
1207 hdr->itt = io_task->libiscsi_itt;
1218 struct beiscsi_io_task *io_task = task->dd_data;
1228 hdr->itt = io_task->libiscsi_itt;
1274 struct beiscsi_io_task *io_task = task->dd_data;
1283 hdr->itt = io_task->libiscsi_itt;
1429 struct beiscsi_io_task *io_task;
1452 io_task = task->dd_data;
1454 login_hdr->itt = io_task->libiscsi_itt;
2091 unsigned int num_sg, struct beiscsi_io_task *io_task)
2101 io_task->bhs_pa.u.a32.address_lo);
2103 io_task->bhs_pa.u.a32.address_hi);
2137 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag;
2140 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len - 2);
2143 io_task->bhs_pa.u.a32.address_hi);
2145 io_task->bhs_pa.u.a32.address_lo);
2186 unsigned int num_sg, struct beiscsi_io_task *io_task)
2196 io_task->bhs_pa.u.a32.address_lo);
2198 io_task->bhs_pa.u.a32.address_hi);
2226 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag;
2229 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len - 2);
2232 io_task->bhs_pa.u.a32.address_hi);
2234 io_task->bhs_pa.u.a32.address_lo);
2280 struct beiscsi_io_task *io_task = task->dd_data;
2281 struct beiscsi_conn *beiscsi_conn = io_task->conn;
2285 io_task->bhs_len = sizeof(struct be_nonio_bhs) - 2;
2287 io_task->bhs_pa.u.a32.address_lo);
2289 io_task->bhs_pa.u.a32.address_hi);
2305 io_task->mtask_addr = dma_map_single(&phba->pcidev->dev,
2310 io_task->mtask_addr))
2312 io_task->mtask_data_count = task->data_count;
2314 io_task->mtask_addr = 0;
2317 lower_32_bits(io_task->mtask_addr));
2319 upper_32_bits(io_task->mtask_addr));
2326 io_task->mtask_addr = 0;
2329 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag;
2331 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len);
2334 io_task->bhs_pa.u.a32.address_hi);
2336 io_task->bhs_pa.u.a32.address_lo);
2349 lower_32_bits(io_task->mtask_addr));
2351 upper_32_bits(io_task->mtask_addr));
4212 struct beiscsi_io_task *io_task;
4222 io_task = task->dd_data;
4224 if (io_task->pwrb_handle) {
4225 free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle);
4226 io_task->pwrb_handle = NULL;
4229 if (io_task->psgl_handle) {
4230 free_mgmt_sgl_handle(phba, io_task->psgl_handle);
4231 io_task->psgl_handle = NULL;
4234 if (io_task->mtask_addr) {
4236 io_task->mtask_addr,
4237 io_task->mtask_data_count,
4239 io_task->mtask_addr = 0;
4250 struct beiscsi_io_task *io_task = task->dd_data;
4263 if (io_task->cmd_bhs) {
4264 dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
4265 io_task->bhs_pa.u.a64.address);
4266 io_task->cmd_bhs = NULL;
4271 if (io_task->pwrb_handle) {
4273 io_task->pwrb_handle);
4274 io_task->pwrb_handle = NULL;
4277 if (io_task->psgl_handle) {
4278 free_io_sgl_handle(phba, io_task->psgl_handle);
4279 io_task->psgl_handle = NULL;
4282 if (io_task->scsi_cmnd) {
4283 if (io_task->num_sg)
4284 scsi_dma_unmap(io_task->scsi_cmnd);
4285 io_task->scsi_cmnd = NULL;
4370 struct beiscsi_io_task *io_task = task->dd_data;
4381 io_task->cmd_bhs = dma_pool_alloc(beiscsi_sess->bhs_pool,
4383 if (!io_task->cmd_bhs)
4385 io_task->bhs_pa.u.a64.address = paddr;
4386 io_task->libiscsi_itt = (itt_t)task->itt;
4387 io_task->conn = beiscsi_conn;
4389 task->hdr = (struct iscsi_hdr *)&io_task->cmd_bhs->iscsi_hdr;
4391 io_task->psgl_handle = NULL;
4392 io_task->pwrb_handle = NULL;
4395 io_task->psgl_handle = alloc_io_sgl_handle(phba);
4396 if (!io_task->psgl_handle) {
4404 io_task->pwrb_handle = alloc_wrb_handle(phba,
4406 &io_task->pwrb_context);
4407 if (!io_task->pwrb_handle) {
4416 io_task->scsi_cmnd = NULL;
4420 io_task->psgl_handle = (struct sgl_handle *)
4422 if (!io_task->psgl_handle) {
4434 io_task->psgl_handle;
4435 io_task->pwrb_handle =
4438 &io_task->pwrb_context);
4439 if (!io_task->pwrb_handle) {
4449 io_task->pwrb_handle;
4452 io_task->psgl_handle =
4454 io_task->pwrb_handle =
4458 io_task->psgl_handle = alloc_mgmt_sgl_handle(phba);
4459 if (!io_task->psgl_handle) {
4468 io_task->pwrb_handle =
4471 &io_task->pwrb_context);
4472 if (!io_task->pwrb_handle) {
4483 itt = (itt_t) cpu_to_be32(((unsigned int)io_task->pwrb_handle->
4485 (io_task->psgl_handle->sgl_index));
4486 io_task->pwrb_handle->pio_handle = task;
4488 io_task->cmd_bhs->iscsi_hdr.itt = itt;
4492 free_io_sgl_handle(phba, io_task->psgl_handle);
4495 free_mgmt_sgl_handle(phba, io_task->psgl_handle);
4496 io_task->psgl_handle = NULL;
4502 if (io_task->pwrb_handle)
4503 free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle);
4504 io_task->pwrb_handle = NULL;
4505 dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
4506 io_task->bhs_pa.u.a64.address);
4507 io_task->cmd_bhs = NULL;
4515 struct beiscsi_io_task *io_task = task->dd_data;
4522 pwrb = io_task->pwrb_handle->pwrb;
4524 io_task->bhs_len = sizeof(struct be_cmd_bhs);
4536 io_task->wrb_type = AMAP_GET_BITS(struct amap_iscsi_wrb_v2,
4541 &io_task->cmd_bhs->iscsi_hdr.lun));
4544 io_task->pwrb_handle->wrb_index);
4548 io_task->psgl_handle->sgl_index);
4550 hwi_write_sgl_v2(pwrb, sg, num_sg, io_task);
4552 io_task->pwrb_handle->wrb_index);
4553 if (io_task->pwrb_context->plast_wrb)
4555 io_task->pwrb_context->plast_wrb,
4556 io_task->pwrb_handle->wrb_index);
4557 io_task->pwrb_context->plast_wrb = pwrb;
4562 doorbell |= (io_task->pwrb_handle->wrb_index &
4576 struct beiscsi_io_task *io_task = task->dd_data;
4583 pwrb = io_task->pwrb_handle->pwrb;
4584 io_task->bhs_len = sizeof(struct be_cmd_bhs);
4596 io_task->wrb_type = AMAP_GET_BITS(struct amap_iscsi_wrb,
4601 &io_task->cmd_bhs->iscsi_hdr.lun));
4604 io_task->pwrb_handle->wrb_index);
4608 io_task->psgl_handle->sgl_index);
4610 hwi_write_sgl(pwrb, sg, num_sg, io_task);
4613 io_task->pwrb_handle->wrb_index);
4614 if (io_task->pwrb_context->plast_wrb)
4616 io_task->pwrb_context->plast_wrb,
4617 io_task->pwrb_handle->wrb_index);
4618 io_task->pwrb_context->plast_wrb = pwrb;
4623 doorbell |= (io_task->pwrb_handle->wrb_index &
4634 struct beiscsi_io_task *io_task = task->dd_data;
4645 pwrb = io_task->pwrb_handle->pwrb;
4651 io_task->pwrb_handle->wrb_index);
4653 io_task->psgl_handle->sgl_index);
4657 io_task->pwrb_handle->wrb_index);
4658 if (io_task->pwrb_context->plast_wrb)
4660 io_task->pwrb_context->plast_wrb,
4661 io_task->pwrb_handle->wrb_index);
4662 io_task->pwrb_context->plast_wrb = pwrb;
4669 io_task->pwrb_handle->wrb_index);
4671 io_task->psgl_handle->sgl_index);
4675 io_task->pwrb_handle->wrb_index);
4676 if (io_task->pwrb_context->plast_wrb)
4678 io_task->pwrb_context->plast_wrb,
4679 io_task->pwrb_handle->wrb_index);
4680 io_task->pwrb_context->plast_wrb = pwrb;
4737 io_task->wrb_type = (is_chip_be2_be3r(phba)) ?
4742 doorbell |= (io_task->pwrb_handle->wrb_index &
4752 struct beiscsi_io_task *io_task = task->dd_data;
4759 phba = io_task->conn->phba;
4768 if (!io_task->conn->login_in_progress)
4774 io_task->scsi_cmnd = sc;
4775 io_task->num_sg = 0;
4782 be32_to_cpu(io_task->cmd_bhs->iscsi_hdr.itt),
4783 io_task->libiscsi_itt, scsi_bufflen(sc));
4791 io_task->num_sg = num_sg;