diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-09-16 11:46:42 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-15 10:18:48 -0400 |
commit | 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 (patch) | |
tree | 8a426c30523aa558249bc8e4844b757af6ac1b96 | |
parent | 16d3ea26f82271fef9b1c4523b5e1ea31fa39eec (diff) |
[SCSI] bsg: fix incorrect device_status value
bsg incorrectly returns sg's masked_status value for device_status.
[jejb: fix up expression logic]
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | block/bsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c index 82d58829ba59..0c00870553a3 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -426,7 +426,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr, | |||
426 | /* | 426 | /* |
427 | * fill in all the output members | 427 | * fill in all the output members |
428 | */ | 428 | */ |
429 | hdr->device_status = status_byte(rq->errors); | 429 | hdr->device_status = rq->errors & 0xff; |
430 | hdr->transport_status = host_byte(rq->errors); | 430 | hdr->transport_status = host_byte(rq->errors); |
431 | hdr->driver_status = driver_byte(rq->errors); | 431 | hdr->driver_status = driver_byte(rq->errors); |
432 | hdr->info = 0; | 432 | hdr->info = 0; |