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