diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2012-09-14 16:34:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-02 09:47:27 -0700 |
commit | 9d1abc4c1f74a2c6d48217bd6874e3f12a025547 (patch) | |
tree | dd07384f31be83a981bdb264f7160274a1c691f5 /drivers/scsi | |
parent | 880d7a7bbe89120cd9d17590bec160ad11b03ca0 (diff) | |
download | kernel_samsung_crespo-9d1abc4c1f74a2c6d48217bd6874e3f12a025547.zip kernel_samsung_crespo-9d1abc4c1f74a2c6d48217bd6874e3f12a025547.tar.gz kernel_samsung_crespo-9d1abc4c1f74a2c6d48217bd6874e3f12a025547.tar.bz2 |
SCSI: hpsa: fix handling of protocol error
commit 256d0eaac87da1e993190846064f339f4c7a63f5 upstream.
If a command status of CMD_PROTOCOL_ERR is received, this
information should be conveyed to the SCSI mid layer, not
dropped on the floor. CMD_PROTOCOL_ERR may be received
from the Smart Array for any commands destined for an external
RAID controller such as a P2000, or commands destined for tape
drives or CD/DVD-ROM drives, if for instance a cable is
disconnected. This mostly affects multipath configurations, as
disconnecting a cable on a non-multipath configuration is not
going to do anything good regardless of whether CMD_PROTOCOL_ERR
is handled correctly or not. Not handling CMD_PROTOCOL_ERR
correctly in a multipath configaration involving external RAID
controllers may cause data corruption, so this is quite a serious
bug. This bug should not normally cause a problem for direct
attached disk storage.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/hpsa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 58f99f4..a3f856e 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -1209,8 +1209,9 @@ static void complete_scsi_command(struct CommandList *cp) } break; case CMD_PROTOCOL_ERR: + cmd->result = DID_ERROR << 16; dev_warn(&h->pdev->dev, "cp %p has " - "protocol error \n", cp); + "protocol error\n", cp); break; case CMD_HARDWARE_ERR: cmd->result = DID_ERROR << 16; |