summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-09-17 00:46:42 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 21:51:38 -0700
commit3899bc97ac29d0e81af688574b2f39197d3d655a (patch)
treeda434769c7b0a96cc3706a4e658ffcbf974c9d41 /block
parent8706a900f0c047b49e34918cdf2b23dc82c234d5 (diff)
downloadkernel-common-3899bc97ac29d0e81af688574b2f39197d3d655a.tar.gz
kernel-common-3899bc97ac29d0e81af688574b2f39197d3d655a.tar.bz2
kernel-common-3899bc97ac29d0e81af688574b2f39197d3d655a.zip
bsg: fix incorrect device_status value
commit 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 upstream. 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> Signed-off-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'block')
-rw-r--r--block/bsg.c2
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,
/*
* 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;