Messages in this thread Patch in this message | | | Date | Fri, 22 Oct 2010 11:35:15 -0700 | From | Greg KH <> | Subject | [48/66] [SCSI] bsg: fix incorrect device_status value |
| |
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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>
--- block/bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/block/bsg.c +++ b/block/bsg.c @@ -424,7 +424,7 @@ static int blk_complete_sgv4_hdr_rq(stru /* * 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;
| |