Lines Matching refs:sc
65 static int beiscsi_eh_abort(struct scsi_cmnd *sc)
68 struct iscsi_task *aborted_task = (struct iscsi_task *)sc->SCp.ptr;
78 cls_session = starget_to_session(scsi_target(sc->device));
82 if (!aborted_task || !aborted_task->sc) {
134 return iscsi_eh_abort(sc);
137 static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
152 cls_session = starget_to_session(scsi_target(sc->device));
168 if (!abrt_task->sc || abrt_task->state == ISCSI_TASK_FREE)
171 if (abrt_task->sc->device->lun != abrt_task->sc->device->lun)
209 return iscsi_eh_device_reset(sc);
1162 task->sc->result = (DID_OK << 16) | status;
1164 task->sc->result = DID_ERROR << 16;
1174 task->sc->result = DID_ERROR << 16;
1177 scsi_set_resid(task->sc, resid);
1178 if (!status && (scsi_bufflen(task->sc) - resid <
1179 task->sc->underflow))
1180 task->sc->result = DID_ERROR << 16;
1188 memcpy(task->sc->sense_buffer, sense,
3800 if (task->sc) {
3909 if (task->sc) {
4071 struct scsi_cmnd *sc = task->sc;
4076 if (!sc)
4079 io_task->scsi_cmnd = sc;
4080 num_sg = scsi_dma_map(sc);
4085 xferlen = scsi_bufflen(sc);
4086 sg = scsi_sglist(sc);
4087 if (sc->sc_data_direction == DMA_TO_DEVICE) {