Lines Matching defs:io_task

276 	struct beiscsi_io_task *io_task;
325 io_task = task->dd_data;
329 io_task->pwrb_handle->pwrb, 1);
332 io_task->pwrb_handle->pwrb, 1);
336 inv_tbl->tbl[nents].icd = io_task->psgl_handle->sgl_index;
1104 struct beiscsi_io_task *io_task = task->dd_data;
1106 (struct be_status_bhs *)io_task->cmd_bhs;
1121 if (io_task->scsi_cmnd) {
1122 scsi_dma_unmap(io_task->scsi_cmnd);
1123 io_task->scsi_cmnd = NULL;
1157 if (io_task->cmd_bhs->iscsi_hdr.flags & ISCSI_FLAG_CMD_READ)
1160 if (io_task->scsi_cmnd) {
1161 scsi_dma_unmap(io_task->scsi_cmnd);
1162 io_task->scsi_cmnd = NULL;
1173 struct beiscsi_io_task *io_task = task->dd_data;
1190 hdr->itt = io_task->libiscsi_itt;
1201 struct beiscsi_io_task *io_task = task->dd_data;
1211 hdr->itt = io_task->libiscsi_itt;
1257 struct beiscsi_io_task *io_task = task->dd_data;
1266 hdr->itt = io_task->libiscsi_itt;
1412 struct beiscsi_io_task *io_task;
1435 io_task = task->dd_data;
1437 login_hdr->itt = io_task->libiscsi_itt;
2075 unsigned int num_sg, struct beiscsi_io_task *io_task)
2085 io_task->bhs_pa.u.a32.address_lo);
2087 io_task->bhs_pa.u.a32.address_hi);
2121 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag;
2124 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len - 2);
2127 io_task->bhs_pa.u.a32.address_hi);
2129 io_task->bhs_pa.u.a32.address_lo);
2170 unsigned int num_sg, struct beiscsi_io_task *io_task)
2180 io_task->bhs_pa.u.a32.address_lo);
2182 io_task->bhs_pa.u.a32.address_hi);
2210 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag;
2213 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len - 2);
2216 io_task->bhs_pa.u.a32.address_hi);
2218 io_task->bhs_pa.u.a32.address_lo);
2264 struct beiscsi_io_task *io_task = task->dd_data;
2265 struct beiscsi_conn *beiscsi_conn = io_task->conn;
2269 io_task->bhs_len = sizeof(struct be_nonio_bhs) - 2;
2271 io_task->bhs_pa.u.a32.address_lo);
2273 io_task->bhs_pa.u.a32.address_hi);
2289 io_task->mtask_addr = dma_map_single(&phba->pcidev->dev,
2294 io_task->mtask_addr))
2296 io_task->mtask_data_count = task->data_count;
2298 io_task->mtask_addr = 0;
2301 lower_32_bits(io_task->mtask_addr));
2303 upper_32_bits(io_task->mtask_addr));
2310 io_task->mtask_addr = 0;
2313 psgl = (struct iscsi_sge *)io_task->psgl_handle->pfrag;
2315 AMAP_SET_BITS(struct amap_iscsi_sge, len, psgl, io_task->bhs_len);
2318 io_task->bhs_pa.u.a32.address_hi);
2320 io_task->bhs_pa.u.a32.address_lo);
2333 lower_32_bits(io_task->mtask_addr));
2335 upper_32_bits(io_task->mtask_addr));
4218 struct beiscsi_io_task *io_task;
4228 io_task = task->dd_data;
4230 if (io_task->pwrb_handle) {
4231 free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle);
4232 io_task->pwrb_handle = NULL;
4235 if (io_task->psgl_handle) {
4236 free_mgmt_sgl_handle(phba, io_task->psgl_handle);
4237 io_task->psgl_handle = NULL;
4240 if (io_task->mtask_addr) {
4242 io_task->mtask_addr,
4243 io_task->mtask_data_count,
4245 io_task->mtask_addr = 0;
4256 struct beiscsi_io_task *io_task = task->dd_data;
4269 if (io_task->cmd_bhs) {
4270 dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
4271 io_task->bhs_pa.u.a64.address);
4272 io_task->cmd_bhs = NULL;
4277 if (io_task->pwrb_handle) {
4279 io_task->pwrb_handle);
4280 io_task->pwrb_handle = NULL;
4283 if (io_task->psgl_handle) {
4284 free_io_sgl_handle(phba, io_task->psgl_handle);
4285 io_task->psgl_handle = NULL;
4288 if (io_task->scsi_cmnd) {
4289 if (io_task->num_sg)
4290 scsi_dma_unmap(io_task->scsi_cmnd);
4291 io_task->scsi_cmnd = NULL;
4376 struct beiscsi_io_task *io_task = task->dd_data;
4387 io_task->cmd_bhs = dma_pool_alloc(beiscsi_sess->bhs_pool,
4389 if (!io_task->cmd_bhs)
4391 io_task->bhs_pa.u.a64.address = paddr;
4392 io_task->libiscsi_itt = (itt_t)task->itt;
4393 io_task->conn = beiscsi_conn;
4395 task->hdr = (struct iscsi_hdr *)&io_task->cmd_bhs->iscsi_hdr;
4397 io_task->psgl_handle = NULL;
4398 io_task->pwrb_handle = NULL;
4401 io_task->psgl_handle = alloc_io_sgl_handle(phba);
4402 if (!io_task->psgl_handle) {
4410 io_task->pwrb_handle = alloc_wrb_handle(phba,
4412 &io_task->pwrb_context);
4413 if (!io_task->pwrb_handle) {
4422 io_task->scsi_cmnd = NULL;
4426 io_task->psgl_handle = (struct sgl_handle *)
4428 if (!io_task->psgl_handle) {
4441 io_task->psgl_handle;
4442 io_task->pwrb_handle =
4445 &io_task->pwrb_context);
4446 if (!io_task->pwrb_handle) {
4457 io_task->pwrb_handle;
4460 io_task->psgl_handle =
4462 io_task->pwrb_handle =
4466 io_task->psgl_handle = alloc_mgmt_sgl_handle(phba);
4467 if (!io_task->psgl_handle) {
4477 io_task->pwrb_handle =
4480 &io_task->pwrb_context);
4481 if (!io_task->pwrb_handle) {
4492 itt = (itt_t) cpu_to_be32(((unsigned int)io_task->pwrb_handle->
4494 (io_task->psgl_handle->sgl_index));
4495 io_task->pwrb_handle->pio_handle = task;
4497 io_task->cmd_bhs->iscsi_hdr.itt = itt;
4501 free_io_sgl_handle(phba, io_task->psgl_handle);
4504 free_mgmt_sgl_handle(phba, io_task->psgl_handle);
4505 io_task->psgl_handle = NULL;
4511 if (io_task->pwrb_handle)
4512 free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle);
4513 io_task->pwrb_handle = NULL;
4514 dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
4515 io_task->bhs_pa.u.a64.address);
4516 io_task->cmd_bhs = NULL;
4524 struct beiscsi_io_task *io_task = task->dd_data;
4531 pwrb = io_task->pwrb_handle->pwrb;
4533 io_task->bhs_len = sizeof(struct be_cmd_bhs);
4545 io_task->wrb_type = AMAP_GET_BITS(struct amap_iscsi_wrb_v2,
4550 &io_task->cmd_bhs->iscsi_hdr.lun));
4553 io_task->pwrb_handle->wrb_index);
4557 io_task->psgl_handle->sgl_index);
4559 hwi_write_sgl_v2(pwrb, sg, num_sg, io_task);
4561 io_task->pwrb_handle->wrb_index);
4562 if (io_task->pwrb_context->plast_wrb)
4564 io_task->pwrb_context->plast_wrb,
4565 io_task->pwrb_handle->wrb_index);
4566 io_task->pwrb_context->plast_wrb = pwrb;
4571 doorbell |= (io_task->pwrb_handle->wrb_index &
4585 struct beiscsi_io_task *io_task = task->dd_data;
4592 pwrb = io_task->pwrb_handle->pwrb;
4593 io_task->bhs_len = sizeof(struct be_cmd_bhs);
4605 io_task->wrb_type = AMAP_GET_BITS(struct amap_iscsi_wrb,
4610 &io_task->cmd_bhs->iscsi_hdr.lun));
4613 io_task->pwrb_handle->wrb_index);
4617 io_task->psgl_handle->sgl_index);
4619 hwi_write_sgl(pwrb, sg, num_sg, io_task);
4622 io_task->pwrb_handle->wrb_index);
4623 if (io_task->pwrb_context->plast_wrb)
4625 io_task->pwrb_context->plast_wrb,
4626 io_task->pwrb_handle->wrb_index);
4627 io_task->pwrb_context->plast_wrb = pwrb;
4632 doorbell |= (io_task->pwrb_handle->wrb_index &
4643 struct beiscsi_io_task *io_task = task->dd_data;
4654 pwrb = io_task->pwrb_handle->pwrb;
4660 io_task->pwrb_handle->wrb_index);
4662 io_task->psgl_handle->sgl_index);
4666 io_task->pwrb_handle->wrb_index);
4667 if (io_task->pwrb_context->plast_wrb)
4669 io_task->pwrb_context->plast_wrb,
4670 io_task->pwrb_handle->wrb_index);
4671 io_task->pwrb_context->plast_wrb = pwrb;
4678 io_task->pwrb_handle->wrb_index);
4680 io_task->psgl_handle->sgl_index);
4684 io_task->pwrb_handle->wrb_index);
4685 if (io_task->pwrb_context->plast_wrb)
4687 io_task->pwrb_context->plast_wrb,
4688 io_task->pwrb_handle->wrb_index);
4689 io_task->pwrb_context->plast_wrb = pwrb;
4746 io_task->wrb_type = (is_chip_be2_be3r(phba)) ?
4751 doorbell |= (io_task->pwrb_handle->wrb_index &
4761 struct beiscsi_io_task *io_task = task->dd_data;
4768 phba = io_task->conn->phba;
4777 if (!io_task->conn->login_in_progress)
4783 io_task->scsi_cmnd = sc;
4784 io_task->num_sg = 0;
4791 be32_to_cpu(io_task->cmd_bhs->iscsi_hdr.itt),
4792 io_task->libiscsi_itt, scsi_bufflen(sc));
4800 io_task->num_sg = num_sg;