From 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 17 Sep 2010 00:46:42 +0900 Subject: [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 Signed-off-by: FUJITA Tomonori Cc: Stable Tree Signed-off-by: James Bottomley --- block/bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/bsg.c') diff --git a/block/bsg.c b/block/bsg.c index 82d58829ba591..0c00870553a3f 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; -- cgit v1.2.3