public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cciss: fix handling of protocol error
@ 2012-09-14 21:35 Stephen M. Cameron
  2012-09-18  9:57 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen M. Cameron @ 2012-09-14 21:35 UTC (permalink / raw)
  To: axboe; +Cc: stephenmcameron, akpm, mikem, linux-kernel, thenzl

From: Stephen M. Cameron <scameron@beardog.cce.hp.com>

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>
Cc: stable@vger.kernel.org
---
 drivers/block/cciss_scsi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
index 38aa6dd..da33111 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;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cciss: fix handling of protocol error
  2012-09-14 21:35 [PATCH] cciss: fix handling of protocol error Stephen M. Cameron
@ 2012-09-18  9:57 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2012-09-18  9:57 UTC (permalink / raw)
  To: Stephen M. Cameron; +Cc: stephenmcameron, akpm, mikem, linux-kernel, thenzl

On 09/14/2012 11:35 PM, Stephen M. Cameron wrote:
> From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> 
> 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.)

Thanks Stephen, applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-18  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 21:35 [PATCH] cciss: fix handling of protocol error Stephen M. Cameron
2012-09-18  9:57 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox