linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ibmvscsi: Non SCSI error status fixup
@ 2008-05-19 15:27 Brian King
  0 siblings, 0 replies; 3+ messages in thread
From: Brian King @ 2008-05-19 15:27 UTC (permalink / raw)
  To: James.Bottomley
  Cc: santil, rcjenn, linux-scsi, linuxppc-dev, sfr, anton, brking


Some versions of the Virtual I/O Server on Power
return 0x99 in the non-SCSI error status field as success,
rather than 0. This fixes the ibmvscsi driver to treat this
response as success.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c |    2 +-
 linux-2.6-bjking1/drivers/scsi/ibmvscsi/viosrp.h   |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/scsi/ibmvscsi/viosrp.h~ibmvscsi_non_scsi_status_workaround drivers/scsi/ibmvscsi/viosrp.h
--- linux-2.6/drivers/scsi/ibmvscsi/viosrp.h~ibmvscsi_non_scsi_status_workaround	2008-05-19 10:01:00.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/viosrp.h	2008-05-19 10:01:33.000000000 -0500
@@ -65,7 +65,8 @@ enum viosrp_crq_status {
 	VIOSRP_VIOLATES_MAX_XFER = 0x2,
 	VIOSRP_PARTNER_PANIC = 0x3,
 	VIOSRP_DEVICE_BUSY = 0x8,
-	VIOSRP_ADAPTER_FAIL = 0x10
+	VIOSRP_ADAPTER_FAIL = 0x10,
+	VIOSRP_OK2 = 0x99,
 };
 
 struct viosrp_crq {
diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_non_scsi_status_workaround drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_non_scsi_status_workaround	2008-05-19 10:01:44.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2008-05-19 10:02:24.000000000 -0500
@@ -1348,7 +1348,7 @@ void ibmvscsi_handle_crq(struct viosrp_c
 
 	del_timer(&evt_struct->timer);
 
-	if (crq->status != VIOSRP_OK && evt_struct->cmnd)
+	if ((crq->status != VIOSRP_OK && crq->status != VIOSRP_OK2) && evt_struct->cmnd)
 		evt_struct->cmnd->result = DID_ERROR << 16;
 	if (evt_struct->done)
 		evt_struct->done(evt_struct);
_

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

* [PATCH 1/1] ibmvscsi: Non SCSI error status fixup
@ 2008-05-19 15:27 Brian King
  0 siblings, 0 replies; 3+ messages in thread
From: Brian King @ 2008-05-19 15:27 UTC (permalink / raw)
  To: James.Bottomley
  Cc: sfr, linux-scsi, linuxppc-dev, anton, brking, rcjenn, santil


Some versions of the Virtual I/O Server on Power
return 0x99 in the non-SCSI error status field as success,
rather than 0. This fixes the ibmvscsi driver to treat this
response as success.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c |    2 +-
 linux-2.6-bjking1/drivers/scsi/ibmvscsi/viosrp.h   |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/scsi/ibmvscsi/viosrp.h~ibmvscsi_non_scsi_status_workaround drivers/scsi/ibmvscsi/viosrp.h
--- linux-2.6/drivers/scsi/ibmvscsi/viosrp.h~ibmvscsi_non_scsi_status_workaround	2008-05-19 10:01:00.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/viosrp.h	2008-05-19 10:01:33.000000000 -0500
@@ -65,7 +65,8 @@ enum viosrp_crq_status {
 	VIOSRP_VIOLATES_MAX_XFER = 0x2,
 	VIOSRP_PARTNER_PANIC = 0x3,
 	VIOSRP_DEVICE_BUSY = 0x8,
-	VIOSRP_ADAPTER_FAIL = 0x10
+	VIOSRP_ADAPTER_FAIL = 0x10,
+	VIOSRP_OK2 = 0x99,
 };
 
 struct viosrp_crq {
diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_non_scsi_status_workaround drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_non_scsi_status_workaround	2008-05-19 10:01:44.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2008-05-19 10:02:24.000000000 -0500
@@ -1348,7 +1348,7 @@ void ibmvscsi_handle_crq(struct viosrp_c
 
 	del_timer(&evt_struct->timer);
 
-	if (crq->status != VIOSRP_OK && evt_struct->cmnd)
+	if ((crq->status != VIOSRP_OK && crq->status != VIOSRP_OK2) && evt_struct->cmnd)
 		evt_struct->cmnd->result = DID_ERROR << 16;
 	if (evt_struct->done)
 		evt_struct->done(evt_struct);
_

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

* Re: [PATCH 1/1] ibmvscsi: Non SCSI error status fixup
       [not found]   ` <1211245688.12970.0.camel@localhost>
@ 2008-05-20 13:52     ` Brian King
  0 siblings, 0 replies; 3+ messages in thread
From: Brian King @ 2008-05-20 13:52 UTC (permalink / raw)
  To: michael; +Cc: Dave Boutcher, linuxppc-dev, SCSI Mailing List

Michael Ellerman wrote:
> On Mon, 2008-05-19 at 10:56 -0500, Dave Boutcher wrote:
>> On Mon, 19 May 2008 10:27:56 -0500, Brian King <brking@linux.vnet.ibm.com> said:
>>> Some versions of the Virtual I/O Server on Power
>>> return 0x99 in the non-SCSI error status field as success,
>>> rather than 0. This fixes the ibmvscsi driver to treat this
>>> response as success.
>> Yeah....0x99...that's an intuitive value for success.
> 
> Hopefully there are no versions that return 0x99 for an error? :)

There shouldn't be. 0x99 is actually not defined as a valid value for
that field, but it is what the ibmvscsis VIOS that is included in
SLES 9 and SLES 10 return on success, due to a bug in that driver.
We plan to fix the ibmvscsis driver as well, but it will take a while
for that fix to propagate. Until very recently, the status field was not
checked, which is why we are only recently running into this problem.

-Brian

-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center

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

end of thread, other threads:[~2008-05-20 13:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <12112108763801-patch-mail.ibm.com>
     [not found] ` <18481.41759.969242.972595@gargle.gargle.HOWL>
     [not found]   ` <1211245688.12970.0.camel@localhost>
2008-05-20 13:52     ` [PATCH 1/1] ibmvscsi: Non SCSI error status fixup Brian King
2008-05-19 15:27 Brian King
  -- strict thread matches above, loose matches on Subject: below --
2008-05-19 15:27 Brian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).