* [PATCH] bsg: return SAM device status code
@ 2007-02-23 15:12 Pete Wyckoff
2007-02-23 16:43 ` Douglas Gilbert
0 siblings, 1 reply; 2+ messages in thread
From: Pete Wyckoff @ 2007-02-23 15:12 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-scsi
Use the status codes from the standard, not the shifted-by-one codes
that are marked deprecated in scsi.h. This makes bsg v4 status
report the same value as sg v3 status too.
Signed-off-by: Pete Wyckoff <pw@osc.edu>
---
block/bsg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/bsg.c b/block/bsg.c
index c85d961..e39a321 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -438,7 +438,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
/*
* fill in all the output members
*/
- hdr->device_status = status_byte(rq->errors);
+ hdr->device_status = rq->errors & 0xff;
hdr->transport_status = host_byte(rq->errors);
hdr->driver_status = driver_byte(rq->errors);
hdr->info = 0;
--
1.4.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bsg: return SAM device status code
2007-02-23 15:12 [PATCH] bsg: return SAM device status code Pete Wyckoff
@ 2007-02-23 16:43 ` Douglas Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2007-02-23 16:43 UTC (permalink / raw)
To: Pete Wyckoff; +Cc: Jens Axboe, linux-scsi
Pete Wyckoff wrote:
> Use the status codes from the standard, not the shifted-by-one codes
> that are marked deprecated in scsi.h. This makes bsg v4 status
> report the same value as sg v3 status too.
Pete,
Good pick up. We certainly don't want to re-introduce
the SCSI status byte shift from the old days.
Doug Gilbert
> Signed-off-by: Pete Wyckoff <pw@osc.edu>
> ---
> block/bsg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/block/bsg.c b/block/bsg.c
> index c85d961..e39a321 100644
> --- a/block/bsg.c
> +++ b/block/bsg.c
> @@ -438,7 +438,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
> /*
> * fill in all the output members
> */
> - hdr->device_status = status_byte(rq->errors);
> + hdr->device_status = rq->errors & 0xff;
> hdr->transport_status = host_byte(rq->errors);
> hdr->driver_status = driver_byte(rq->errors);
> hdr->info = 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-23 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-23 15:12 [PATCH] bsg: return SAM device status code Pete Wyckoff
2007-02-23 16:43 ` Douglas Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox