summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-12-06 04:14:13 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-06 04:14:13 -0500
commit451ec6ab310602515b361418debe93d00f67e273 (patch)
tree933cbbe7232ae6cb19986012e3162e65a184b77a /drivers/scsi/libata-scsi.c
parentfe54ceda4dd71b6155f4a58cd2aad3a780cb347d (diff)
parent436b0f76f2cee6617f27a649637766628909dd5d (diff)
downloadblackbird-op-linux-451ec6ab310602515b361418debe93d00f67e273.tar.gz
blackbird-op-linux-451ec6ab310602515b361418debe93d00f67e273.zip
Merge branch 'master'
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c9
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;
}
/**
OpenPOWER on IntegriCloud