diff options
-rw-r--r-- | drivers/scsi/scsi_error.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 6ae3b5dbd379..f66e90db3bee 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -366,6 +366,14 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) return TARGET_ERROR; case ILLEGAL_REQUEST: + if (sshdr.asc == 0x20 || /* Invalid command operation code */ + sshdr.asc == 0x21 || /* Logical block address out of range */ + sshdr.asc == 0x24 || /* Invalid field in cdb */ + sshdr.asc == 0x26) { /* Parameter value invalid */ + return TARGET_ERROR; + } + return SUCCESS; + default: return SUCCESS; } |