aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2012-09-14 16:35:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 09:47:23 -0700
commitcf8d67a69224bc2fbc6bc395cf639a9b0652c8e3 (patch)
treea742c563a2c16156a7c3fe0d684e786889344c37 /drivers/block
parent4b1785ad00ad1b809a4a224499ed605f2eb516fa (diff)
downloadkernel_samsung_aries-cf8d67a69224bc2fbc6bc395cf639a9b0652c8e3.zip
kernel_samsung_aries-cf8d67a69224bc2fbc6bc395cf639a9b0652c8e3.tar.gz
kernel_samsung_aries-cf8d67a69224bc2fbc6bc395cf639a9b0652c8e3.tar.bz2
cciss: fix handling of protocol error
commit 2453f5f992717251cfadab6184fbb3ec2f2e8b40 upstream. If a command completes with a status of CMD_PROTOCOL_ERR, this information should be conveyed to the SCSI mid layer, not dropped on the floor. Unlike a similar bug in the hpsa driver, this bug only affects tape drives and CD and DVD ROM drives in the cciss driver, and to induce it, you have to disconnect (or damage) a cable, so it is not a very likely scenario (which would explain why the bug has gone undetected for the last 10 years.) Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss_scsi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
index 3796fcc..f01b350 100644
--- a/drivers/block/cciss_scsi.c
+++ b/drivers/block/cciss_scsi.c
@@ -795,6 +795,7 @@ static void complete_scsi_command(CommandList_struct *c, int timeout,
}
break;
case CMD_PROTOCOL_ERR:
+ cmd->result = DID_ERROR << 16;
dev_warn(&h->pdev->dev,
"%p has protocol error\n", c);
break;