Lines Matching refs:sp
1182 srb_t *sp; in qla2x00_process_completed_request() local
1197 sp = req->outstanding_cmds[index]; in qla2x00_process_completed_request()
1198 if (sp) { in qla2x00_process_completed_request()
1203 sp->done(ha, sp, DID_OK << 16); in qla2x00_process_completed_request()
1220 srb_t *sp = NULL; in qla2x00_get_sp_from_handle() local
1233 sp = req->outstanding_cmds[index]; in qla2x00_get_sp_from_handle()
1234 if (!sp) { in qla2x00_get_sp_from_handle()
1237 return sp; in qla2x00_get_sp_from_handle()
1239 if (sp->handle != index) { in qla2x00_get_sp_from_handle()
1241 "SRB handle (%x) mismatch %x.\n", sp->handle, index); in qla2x00_get_sp_from_handle()
1248 return sp; in qla2x00_get_sp_from_handle()
1258 srb_t *sp; in qla2x00_mbx_iocb_entry() local
1263 sp = qla2x00_get_sp_from_handle(vha, func, req, mbx); in qla2x00_mbx_iocb_entry()
1264 if (!sp) in qla2x00_mbx_iocb_entry()
1267 lio = &sp->u.iocb_cmd; in qla2x00_mbx_iocb_entry()
1268 type = sp->name; in qla2x00_mbx_iocb_entry()
1269 fcport = sp->fcport; in qla2x00_mbx_iocb_entry()
1279 "status-flags=%x.\n", type, sp->handle, in qla2x00_mbx_iocb_entry()
1292 if (status == 0x30 && sp->type == SRB_LOGIN_CMD && in qla2x00_mbx_iocb_entry()
1298 type, sp->handle, fcport->d_id.b.domain, in qla2x00_mbx_iocb_entry()
1303 if (sp->type == SRB_LOGIN_CMD) { in qla2x00_mbx_iocb_entry()
1327 "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", type, sp->handle, in qla2x00_mbx_iocb_entry()
1334 sp->done(vha, sp, 0); in qla2x00_mbx_iocb_entry()
1343 srb_t *sp; in qla2x00_ct_entry() local
1348 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla2x00_ct_entry()
1349 if (!sp) in qla2x00_ct_entry()
1352 bsg_job = sp->u.bsg_job; in qla2x00_ct_entry()
1391 sp->done(vha, sp, res); in qla2x00_ct_entry()
1400 srb_t *sp; in qla24xx_els_ct_entry() local
1407 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla24xx_els_ct_entry()
1408 if (!sp) in qla24xx_els_ct_entry()
1410 bsg_job = sp->u.bsg_job; in qla24xx_els_ct_entry()
1413 switch (sp->type) { in qla24xx_els_ct_entry()
1423 "Unrecognized SRB: (%p) type=%d.\n", sp, sp->type); in qla24xx_els_ct_entry()
1446 type, sp->handle, comp_status, fw_status[1], fw_status[2], in qla24xx_els_ct_entry()
1456 type, sp->handle, comp_status, in qla24xx_els_ct_entry()
1475 sp->done(vha, sp, res); in qla24xx_els_ct_entry()
1485 srb_t *sp; in qla24xx_logio_entry() local
1490 sp = qla2x00_get_sp_from_handle(vha, func, req, logio); in qla24xx_logio_entry()
1491 if (!sp) in qla24xx_logio_entry()
1494 lio = &sp->u.iocb_cmd; in qla24xx_logio_entry()
1495 type = sp->name; in qla24xx_logio_entry()
1496 fcport = sp->fcport; in qla24xx_logio_entry()
1506 type, sp->handle, fcport->d_id.b.domain, in qla24xx_logio_entry()
1518 "iop0=%x.\n", type, sp->handle, fcport->d_id.b.domain, in qla24xx_logio_entry()
1523 if (sp->type != SRB_LOGIN_CMD) in qla24xx_logio_entry()
1562 "iop0=%x iop1=%x.\n", type, sp->handle, fcport->d_id.b.domain, in qla24xx_logio_entry()
1569 sp->done(vha, sp, 0); in qla24xx_logio_entry()
1578 srb_t *sp; in qla24xx_tm_iocb_entry() local
1582 sp = qla2x00_get_sp_from_handle(vha, func, req, tsk); in qla24xx_tm_iocb_entry()
1583 if (!sp) in qla24xx_tm_iocb_entry()
1586 iocb = &sp->u.iocb_cmd; in qla24xx_tm_iocb_entry()
1587 type = sp->name; in qla24xx_tm_iocb_entry()
1588 fcport = sp->fcport; in qla24xx_tm_iocb_entry()
1594 type, sp->handle, sts->entry_status); in qla24xx_tm_iocb_entry()
1599 type, sp->handle, sts->comp_status); in qla24xx_tm_iocb_entry()
1606 type, sp->handle, sts->rsp_data_len); in qla24xx_tm_iocb_entry()
1610 type, sp->handle, sts->data[3]); in qla24xx_tm_iocb_entry()
1619 sp->done(vha, sp, 0); in qla24xx_tm_iocb_entry()
1704 qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t par_sense_len, in qla2x00_handle_sense() argument
1707 struct scsi_qla_host *vha = sp->fcport->vha; in qla2x00_handle_sense()
1708 struct scsi_cmnd *cp = GET_CMD_SP(sp); in qla2x00_handle_sense()
1714 SET_CMD_SENSE_LEN(sp, sense_len); in qla2x00_handle_sense()
1715 SET_CMD_SENSE_PTR(sp, cp->sense_buffer); in qla2x00_handle_sense()
1723 SET_CMD_SENSE_PTR(sp, cp->sense_buffer + sense_len); in qla2x00_handle_sense()
1725 SET_CMD_SENSE_LEN(sp, track_sense_len); in qla2x00_handle_sense()
1728 rsp->status_srb = sp; in qla2x00_handle_sense()
1735 sp->fcport->vha->host_no, cp->device->id, cp->device->lun, in qla2x00_handle_sense()
1755 qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) in qla2x00_handle_dif_error() argument
1757 struct scsi_qla_host *vha = sp->fcport->vha; in qla2x00_handle_dif_error()
1758 struct scsi_cmnd *cmd = GET_CMD_SP(sp); in qla2x00_handle_dif_error()
1881 srb_t *sp; in qla25xx_process_bidir_status_iocb() local
1900 sp = req->outstanding_cmds[index]; in qla25xx_process_bidir_status_iocb()
1901 if (sp) { in qla25xx_process_bidir_status_iocb()
1904 bsg_job = sp->u.bsg_job; in qla25xx_process_bidir_status_iocb()
2018 sp->done(vha, sp, (DID_OK << 6)); in qla25xx_process_bidir_status_iocb()
2030 srb_t *sp; in qla2x00_status_entry() local
2077 sp = req->outstanding_cmds[handle]; in qla2x00_status_entry()
2078 if (!sp) { in qla2x00_status_entry()
2099 if (unlikely((state_flags & BIT_1) && (sp->type == SRB_BIDI_CMD))) { in qla2x00_status_entry()
2105 if (sp->type == SRB_TM_CMD) { in qla2x00_status_entry()
2118 cp = GET_CMD_SP(sp); in qla2x00_status_entry()
2122 sts->handle, sp); in qla2x00_status_entry()
2129 fcport = sp->fcport; in qla2x00_status_entry()
2233 qla2x00_handle_sense(sp, sense_data, par_sense_len, sense_len, in qla2x00_status_entry()
2305 qla2x00_handle_sense(sp, sense_data, par_sense_len, in qla2x00_status_entry()
2348 logit = qla2x00_handle_dif_error(sp, sts24); in qla2x00_status_entry()
2379 resid_len, fw_resid_len, sp, cp); in qla2x00_status_entry()
2382 sp->done(ha, sp, res); in qla2x00_status_entry()
2398 srb_t *sp = rsp->status_srb; in qla2x00_status_cont_entry() local
2403 if (!sp || !GET_CMD_SENSE_LEN(sp)) in qla2x00_status_cont_entry()
2406 sense_len = GET_CMD_SENSE_LEN(sp); in qla2x00_status_cont_entry()
2407 sense_ptr = GET_CMD_SENSE_PTR(sp); in qla2x00_status_cont_entry()
2409 cp = GET_CMD_SP(sp); in qla2x00_status_cont_entry()
2412 "cmd is NULL: already returned to OS (sp=%p).\n", sp); in qla2x00_status_cont_entry()
2433 SET_CMD_SENSE_PTR(sp, sense_ptr); in qla2x00_status_cont_entry()
2434 SET_CMD_SENSE_LEN(sp, sense_len); in qla2x00_status_cont_entry()
2439 sp->done(ha, sp, cp->result); in qla2x00_status_cont_entry()
2451 srb_t *sp; in qla2x00_error_entry() local
2469 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla2x00_error_entry()
2470 if (sp) { in qla2x00_error_entry()
2471 sp->done(ha, sp, res); in qla2x00_error_entry()
2520 srb_t *sp; in qla24xx_abort_iocb_entry() local
2523 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla24xx_abort_iocb_entry()
2524 if (!sp) in qla24xx_abort_iocb_entry()
2527 abt = &sp->u.iocb_cmd; in qla24xx_abort_iocb_entry()
2529 sp->done(vha, sp, 0); in qla24xx_abort_iocb_entry()