diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-06 12:14:13 +0300 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-06 12:14:13 +0300 |
commit | 451ec6ab310602515b361418debe93d00f67e273 (patch) | |
tree | 933cbbe7232ae6cb19986012e3162e65a184b77a /drivers/scsi/libata-scsi.c | |
parent | fe54ceda4dd71b6155f4a58cd2aad3a780cb347d (diff) | |
parent | 436b0f76f2cee6617f27a649637766628909dd5d (diff) | |
download | linux-451ec6ab310602515b361418debe93d00f67e273.tar.xz |
Merge branch 'master'
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 957a9caee305..7445d8b524d5 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -2233,7 +2233,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd) struct scsi_cmnd *cmd = qc->scsicmd; if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN) - return 1; + goto invalid_fld; /* * 12 and 16 byte CDBs use different offsets to @@ -2295,7 +2295,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd) */ if ((tf->command == ATA_CMD_SET_FEATURES) && (tf->feature == SETFEATURES_XFER)) - return 1; + goto invalid_fld; /* * Set flags so that all registers will be written, @@ -2316,6 +2316,11 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd) qc->nsect = cmd->bufflen / ATA_SECT_SIZE; return 0; + + invalid_fld: + ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x24, 0x00); + /* "Invalid field in cdb" */ + return 1; } /** |