public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Pete Wyckoff <pw@osc.edu>
Cc: Jens Axboe <jens.axboe@oracle.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] bsg: return SAM device status code
Date: Fri, 23 Feb 2007 11:43:22 -0500	[thread overview]
Message-ID: <45DF19AA.1000500@torque.net> (raw)
In-Reply-To: <20070223151231.GA15228@osc.edu>

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;


      reply	other threads:[~2007-02-23 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 15:12 [PATCH] bsg: return SAM device status code Pete Wyckoff
2007-02-23 16:43 ` Douglas Gilbert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45DF19AA.1000500@torque.net \
    --to=dougg@torque.net \
    --cc=jens.axboe@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=pw@osc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox