Skip to content

Commit 4789716

Browse files
fujitaJames Bottomley
authored andcommitted
[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>
1 parent 16d3ea2 commit 4789716

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/bsg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
426426
/*
427427
* fill in all the output members
428428
*/
429-
hdr->device_status = status_byte(rq->errors);
429+
hdr->device_status = rq->errors & 0xff;
430430
hdr->transport_status = host_byte(rq->errors);
431431
hdr->driver_status = driver_byte(rq->errors);
432432
hdr->info = 0;

0 commit comments

Comments
 (0)