Lines Matching refs:sp
1154 srb_t *sp; in qla2x00_process_completed_request() local
1169 sp = req->outstanding_cmds[index]; in qla2x00_process_completed_request()
1170 if (sp) { in qla2x00_process_completed_request()
1175 sp->done(ha, sp, DID_OK << 16); in qla2x00_process_completed_request()
1192 srb_t *sp = NULL; in qla2x00_get_sp_from_handle() local
1205 sp = req->outstanding_cmds[index]; in qla2x00_get_sp_from_handle()
1206 if (!sp) { in qla2x00_get_sp_from_handle()
1209 return sp; in qla2x00_get_sp_from_handle()
1211 if (sp->handle != index) { in qla2x00_get_sp_from_handle()
1213 "SRB handle (%x) mismatch %x.\n", sp->handle, index); in qla2x00_get_sp_from_handle()
1220 return sp; in qla2x00_get_sp_from_handle()
1230 srb_t *sp; in qla2x00_mbx_iocb_entry() local
1235 sp = qla2x00_get_sp_from_handle(vha, func, req, mbx); in qla2x00_mbx_iocb_entry()
1236 if (!sp) in qla2x00_mbx_iocb_entry()
1239 lio = &sp->u.iocb_cmd; in qla2x00_mbx_iocb_entry()
1240 type = sp->name; in qla2x00_mbx_iocb_entry()
1241 fcport = sp->fcport; in qla2x00_mbx_iocb_entry()
1251 "status-flags=%x.\n", type, sp->handle, in qla2x00_mbx_iocb_entry()
1264 if (status == 0x30 && sp->type == SRB_LOGIN_CMD && in qla2x00_mbx_iocb_entry()
1270 type, sp->handle, fcport->d_id.b.domain, in qla2x00_mbx_iocb_entry()
1275 if (sp->type == SRB_LOGIN_CMD) { in qla2x00_mbx_iocb_entry()
1299 "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", type, sp->handle, in qla2x00_mbx_iocb_entry()
1306 sp->done(vha, sp, 0); in qla2x00_mbx_iocb_entry()
1315 srb_t *sp; in qla2x00_ct_entry() local
1320 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla2x00_ct_entry()
1321 if (!sp) in qla2x00_ct_entry()
1324 bsg_job = sp->u.bsg_job; in qla2x00_ct_entry()
1363 sp->done(vha, sp, res); in qla2x00_ct_entry()
1372 srb_t *sp; in qla24xx_els_ct_entry() local
1379 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla24xx_els_ct_entry()
1380 if (!sp) in qla24xx_els_ct_entry()
1382 bsg_job = sp->u.bsg_job; in qla24xx_els_ct_entry()
1385 switch (sp->type) { in qla24xx_els_ct_entry()
1395 "Unrecognized SRB: (%p) type=%d.\n", sp, sp->type); in qla24xx_els_ct_entry()
1418 type, sp->handle, comp_status, fw_status[1], fw_status[2], in qla24xx_els_ct_entry()
1428 type, sp->handle, comp_status, in qla24xx_els_ct_entry()
1447 sp->done(vha, sp, res); in qla24xx_els_ct_entry()
1457 srb_t *sp; in qla24xx_logio_entry() local
1462 sp = qla2x00_get_sp_from_handle(vha, func, req, logio); in qla24xx_logio_entry()
1463 if (!sp) in qla24xx_logio_entry()
1466 lio = &sp->u.iocb_cmd; in qla24xx_logio_entry()
1467 type = sp->name; in qla24xx_logio_entry()
1468 fcport = sp->fcport; in qla24xx_logio_entry()
1478 type, sp->handle, fcport->d_id.b.domain, in qla24xx_logio_entry()
1490 "iop0=%x.\n", type, sp->handle, fcport->d_id.b.domain, in qla24xx_logio_entry()
1495 if (sp->type != SRB_LOGIN_CMD) in qla24xx_logio_entry()
1534 "iop0=%x iop1=%x.\n", type, sp->handle, fcport->d_id.b.domain, in qla24xx_logio_entry()
1541 sp->done(vha, sp, 0); in qla24xx_logio_entry()
1550 srb_t *sp; in qla24xx_tm_iocb_entry() local
1554 sp = qla2x00_get_sp_from_handle(vha, func, req, tsk); in qla24xx_tm_iocb_entry()
1555 if (!sp) in qla24xx_tm_iocb_entry()
1558 iocb = &sp->u.iocb_cmd; in qla24xx_tm_iocb_entry()
1559 type = sp->name; in qla24xx_tm_iocb_entry()
1560 fcport = sp->fcport; in qla24xx_tm_iocb_entry()
1566 type, sp->handle, sts->entry_status); in qla24xx_tm_iocb_entry()
1571 type, sp->handle, sts->comp_status); in qla24xx_tm_iocb_entry()
1578 type, sp->handle, sts->rsp_data_len); in qla24xx_tm_iocb_entry()
1582 type, sp->handle, sts->data[3]); in qla24xx_tm_iocb_entry()
1591 sp->done(vha, sp, 0); in qla24xx_tm_iocb_entry()
1676 qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t par_sense_len, in qla2x00_handle_sense() argument
1679 struct scsi_qla_host *vha = sp->fcport->vha; in qla2x00_handle_sense()
1680 struct scsi_cmnd *cp = GET_CMD_SP(sp); in qla2x00_handle_sense()
1686 SET_CMD_SENSE_LEN(sp, sense_len); in qla2x00_handle_sense()
1687 SET_CMD_SENSE_PTR(sp, cp->sense_buffer); in qla2x00_handle_sense()
1695 SET_CMD_SENSE_PTR(sp, cp->sense_buffer + sense_len); in qla2x00_handle_sense()
1697 SET_CMD_SENSE_LEN(sp, track_sense_len); in qla2x00_handle_sense()
1700 rsp->status_srb = sp; in qla2x00_handle_sense()
1707 sp->fcport->vha->host_no, cp->device->id, cp->device->lun, in qla2x00_handle_sense()
1727 qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) in qla2x00_handle_dif_error() argument
1729 struct scsi_qla_host *vha = sp->fcport->vha; in qla2x00_handle_dif_error()
1730 struct scsi_cmnd *cmd = GET_CMD_SP(sp); in qla2x00_handle_dif_error()
1853 srb_t *sp; in qla25xx_process_bidir_status_iocb() local
1872 sp = req->outstanding_cmds[index]; in qla25xx_process_bidir_status_iocb()
1873 if (sp) { in qla25xx_process_bidir_status_iocb()
1876 bsg_job = sp->u.bsg_job; in qla25xx_process_bidir_status_iocb()
1990 sp->done(vha, sp, (DID_OK << 6)); in qla25xx_process_bidir_status_iocb()
2002 srb_t *sp; in qla2x00_status_entry() local
2049 sp = req->outstanding_cmds[handle]; in qla2x00_status_entry()
2051 sp = NULL; in qla2x00_status_entry()
2053 if (sp == NULL) { in qla2x00_status_entry()
2067 if (unlikely((state_flags & BIT_1) && (sp->type == SRB_BIDI_CMD))) { in qla2x00_status_entry()
2073 if (sp->type == SRB_TM_CMD) { in qla2x00_status_entry()
2086 cp = GET_CMD_SP(sp); in qla2x00_status_entry()
2090 sts->handle, sp); in qla2x00_status_entry()
2097 fcport = sp->fcport; in qla2x00_status_entry()
2201 qla2x00_handle_sense(sp, sense_data, par_sense_len, sense_len, in qla2x00_status_entry()
2273 qla2x00_handle_sense(sp, sense_data, par_sense_len, in qla2x00_status_entry()
2316 logit = qla2x00_handle_dif_error(sp, sts24); in qla2x00_status_entry()
2350 sp->done(ha, sp, res); in qla2x00_status_entry()
2366 srb_t *sp = rsp->status_srb; in qla2x00_status_cont_entry() local
2371 if (!sp || !GET_CMD_SENSE_LEN(sp)) in qla2x00_status_cont_entry()
2374 sense_len = GET_CMD_SENSE_LEN(sp); in qla2x00_status_cont_entry()
2375 sense_ptr = GET_CMD_SENSE_PTR(sp); in qla2x00_status_cont_entry()
2377 cp = GET_CMD_SP(sp); in qla2x00_status_cont_entry()
2380 "cmd is NULL: already returned to OS (sp=%p).\n", sp); in qla2x00_status_cont_entry()
2401 SET_CMD_SENSE_PTR(sp, sense_ptr); in qla2x00_status_cont_entry()
2402 SET_CMD_SENSE_LEN(sp, sense_len); in qla2x00_status_cont_entry()
2407 sp->done(ha, sp, cp->result); in qla2x00_status_cont_entry()
2419 srb_t *sp; in qla2x00_error_entry() local
2437 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla2x00_error_entry()
2438 if (sp) { in qla2x00_error_entry()
2439 sp->done(ha, sp, res); in qla2x00_error_entry()
2494 srb_t *sp; in qla24xx_abort_iocb_entry() local
2497 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qla24xx_abort_iocb_entry()
2498 if (!sp) in qla24xx_abort_iocb_entry()
2501 abt = &sp->u.iocb_cmd; in qla24xx_abort_iocb_entry()
2503 sp->done(vha, sp, 0); in qla24xx_abort_iocb_entry()