Lines Matching refs:scmd

775 	struct scsi_cmnd *scmd = qc->scsicmd;  in ata_qc_set_pc_nbytes()  local
777 qc->extrabytes = scmd->request->extra_len; in ata_qc_set_pc_nbytes()
778 qc->nbytes = scsi_bufflen(scmd) + qc->extrabytes; in ata_qc_set_pc_nbytes()
1343 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_start_stop_xlat() local
1345 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat()
1347 if (scmd->cmd_len < 5) in ata_scsi_start_stop_xlat()
1404 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); in ata_scsi_start_stop_xlat()
1408 scmd->result = SAM_STAT_GOOD; in ata_scsi_start_stop_xlat()
1549 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_verify_xlat() local
1553 const u8 *cdb = scmd->cmnd; in ata_scsi_verify_xlat()
1561 if (scmd->cmd_len < 10) in ata_scsi_verify_xlat()
1565 if (scmd->cmd_len < 16) in ata_scsi_verify_xlat()
1643 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); in ata_scsi_verify_xlat()
1648 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0); in ata_scsi_verify_xlat()
1653 scmd->result = SAM_STAT_GOOD; in ata_scsi_verify_xlat()
1677 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_rw_xlat() local
1678 const u8 *cdb = scmd->cmnd; in ata_scsi_rw_xlat()
1691 if (unlikely(scmd->cmd_len < 10)) in ata_scsi_rw_xlat()
1699 if (unlikely(scmd->cmd_len < 6)) in ata_scsi_rw_xlat()
1711 if (unlikely(scmd->cmd_len < 16)) in ata_scsi_rw_xlat()
1734 qc->nbytes = n_block * scmd->device->sector_size; in ata_scsi_rw_xlat()
1745 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); in ata_scsi_rw_xlat()
1750 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0); in ata_scsi_rw_xlat()
1755 scmd->result = SAM_STAT_GOOD; in ata_scsi_rw_xlat()
2750 struct scsi_cmnd *scmd = qc->scsicmd; in atapi_xlat() local
2752 int nodata = (scmd->sc_data_direction == DMA_NONE); in atapi_xlat()
2757 memcpy(qc->cdb, scmd->cmnd, scmd->cmd_len); in atapi_xlat()
2762 if (scmd->sc_data_direction == DMA_TO_DEVICE) { in atapi_xlat()
2821 (scmd->sc_data_direction != DMA_TO_DEVICE)) in atapi_xlat()
2942 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_pass_thru() local
2944 const u8 *cdb = scmd->cmnd; in ata_scsi_pass_thru()
3013 qc->sect_size = scsi_bufflen(scmd); in ata_scsi_pass_thru()
3047 qc->sect_size = scmd->device->sector_size; in ata_scsi_pass_thru()
3061 if (scmd->sc_data_direction == DMA_TO_DEVICE) in ata_scsi_pass_thru()
3125 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x00); in ata_scsi_pass_thru()
3133 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_write_same_xlat() local
3135 const u8 *cdb = scmd->cmnd; in ata_scsi_write_same_xlat()
3145 if (unlikely(scmd->cmd_len < 16)) in ata_scsi_write_same_xlat()
3157 if (!scsi_sg_count(scmd)) in ata_scsi_write_same_xlat()
3160 buf = page_address(sg_page(scsi_sglist(scmd))); in ata_scsi_write_same_xlat()
3190 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x00); in ata_scsi_write_same_xlat()
3254 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_mode_select_xlat() local
3255 const u8 *cdb = scmd->cmnd; in ata_scsi_mode_select_xlat()
3265 if (scmd->cmd_len < 5) in ata_scsi_mode_select_xlat()
3271 if (scmd->cmd_len < 9) in ata_scsi_mode_select_xlat()
3283 if (!scsi_sg_count(scmd) || scsi_sglist(scmd)->length < len) in ata_scsi_mode_select_xlat()
3286 p = page_address(sg_page(scsi_sglist(scmd))); in ata_scsi_mode_select_xlat()
3359 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); in ata_scsi_mode_select_xlat()
3364 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x26, 0x0); in ata_scsi_mode_select_xlat()
3369 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x1a, 0x0); in ata_scsi_mode_select_xlat()
3373 scmd->result = SAM_STAT_GOOD; in ata_scsi_mode_select_xlat()
3453 static inline int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, in __ata_scsi_queuecmd() argument
3456 u8 scsi_op = scmd->cmnd[0]; in __ata_scsi_queuecmd()
3461 if (unlikely(!scmd->cmd_len || scmd->cmd_len > dev->cdb_len)) in __ata_scsi_queuecmd()
3466 if (unlikely(!scmd->cmd_len)) in __ata_scsi_queuecmd()
3473 if (unlikely(len > scmd->cmd_len || len > dev->cdb_len)) in __ata_scsi_queuecmd()
3479 if (unlikely(scmd->cmd_len > 16)) in __ata_scsi_queuecmd()
3487 rc = ata_scsi_translate(dev, scmd, xlat_func); in __ata_scsi_queuecmd()
3489 ata_scsi_simulate(dev, scmd); in __ata_scsi_queuecmd()
3495 scmd->cmd_len, scsi_op, dev->cdb_len); in __ata_scsi_queuecmd()
3496 scmd->result = DID_ERROR << 16; in __ata_scsi_queuecmd()
3497 scmd->scsi_done(scmd); in __ata_scsi_queuecmd()