]>
Commit | Line | Data |
---|---|---|
1b91d6c3 GKH |
1 | From 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 Mon Sep 17 00:00:00 2001 |
2 | From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | |
3 | Date: Fri, 17 Sep 2010 00:46:42 +0900 | |
4 | Subject: [SCSI] bsg: fix incorrect device_status value | |
5 | ||
6 | From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | |
7 | ||
8 | commit 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 upstream. | |
9 | ||
10 | bsg incorrectly returns sg's masked_status value for device_status. | |
11 | ||
12 | [jejb: fix up expression logic] | |
13 | Reported-by: Douglas Gilbert <dgilbert@interlog.com> | |
14 | Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | |
15 | Signed-off-by: James Bottomley <James.Bottomley@suse.de> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
17 | ||
18 | --- | |
19 | block/bsg.c | 2 +- | |
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
21 | ||
22 | --- a/block/bsg.c | |
23 | +++ b/block/bsg.c | |
24 | @@ -426,7 +426,7 @@ static int blk_complete_sgv4_hdr_rq(stru | |
25 | /* | |
26 | * fill in all the output members | |
27 | */ | |
28 | - hdr->device_status = status_byte(rq->errors); | |
29 | + hdr->device_status = rq->errors & 0xff; | |
30 | hdr->transport_status = host_byte(rq->errors); | |
31 | hdr->driver_status = driver_byte(rq->errors); | |
32 | hdr->info = 0; |