
From: Jens Axboe <axboe@suse.de>

Please try this patch, it should fix the issue for you.  The reason is that
the RW bit is set from get_request() now, and scsi_ioctl always uses WRITE
as arguement to the function.  So every request would be turned into a
write, oops :)



 drivers/block/scsi_ioctl.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN drivers/block/scsi_ioctl.c~scsi_ioctl-fix drivers/block/scsi_ioctl.c
--- 25/drivers/block/scsi_ioctl.c~scsi_ioctl-fix	2003-05-14 00:50:43.000000000 -0700
+++ 25-akpm/drivers/block/scsi_ioctl.c	2003-05-14 00:50:43.000000000 -0700
@@ -229,6 +229,8 @@ static int sg_io(request_queue_t *q, str
 	rq->flags |= REQ_BLOCK_PC;
 	if (writing)
 		rq->flags |= REQ_RW;
+	else
+		rq->flags &= ~REQ_RW;
 
 	rq->hard_nr_sectors = rq->nr_sectors = nr_sectors;
 	rq->hard_cur_sectors = rq->current_nr_sectors = nr_sectors;
@@ -375,6 +377,8 @@ static int sg_scsi_ioctl(request_queue_t
 	rq->flags |= REQ_BLOCK_PC;
 	if (in_len)
 		rq->flags |= REQ_RW;
+	else
+		rq->flags &= ~REQ_RW;
 
 	blk_do_rq(q, bdev, rq);
 	err = rq->errors & 0xff;	/* only 8 bit SCSI status */

_
