diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2012-09-14 17:34:25 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-18 07:29:30 -0400 |
commit | 256d0eaac87da1e993190846064f339f4c7a63f5 (patch) | |
tree | 8db6f584da625086b36c90e1de23f9664a8b8587 /drivers | |
parent | 10cce6d8b5af0b32bc4254ae4a28423a74c0921c (diff) |
[SCSI] hpsa: fix handling of protocol error
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>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-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 796482badf13..2b4261cb7742 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -1315,8 +1315,9 @@ static void complete_scsi_command(struct CommandList *cp) | |||
1315 | } | 1315 | } |
1316 | break; | 1316 | break; |
1317 | case CMD_PROTOCOL_ERR: | 1317 | case CMD_PROTOCOL_ERR: |
1318 | cmd->result = DID_ERROR << 16; | ||
1318 | dev_warn(&h->pdev->dev, "cp %p has " | 1319 | dev_warn(&h->pdev->dev, "cp %p has " |
1319 | "protocol error \n", cp); | 1320 | "protocol error\n", cp); |
1320 | break; | 1321 | break; |
1321 | case CMD_HARDWARE_ERR: | 1322 | case CMD_HARDWARE_ERR: |
1322 | cmd->result = DID_ERROR << 16; | 1323 | cmd->result = DID_ERROR << 16; |