aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-21 03:03:38 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-21 03:03:38 -0500
commit4604096768d3be37ee1a05aee424aceed3e1b56f (patch)
tree56010e180bb32be7e57971e4bb617c28d0d09099 /drivers
parent8df8bb4adf7e4abb48d29dc16c29eda40a64afed (diff)
parent126ec9a676f601818dc3a85af0552b146410d888 (diff)
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] block: document io scheduler allow_merge_fn hook [PATCH] cfq-iosched: don't allow sync merges across queues [PATCH] Fixup blk_rq_unmap_user() API [PATCH] __blk_rq_unmap_user() fails to return error [PATCH] __blk_rq_map_user() doesn't need to grab the queue_lock [PATCH] Remove queue merging hooks [PATCH] ->nr_sectors and ->hard_nr_sectors are not used for BLOCK_PC requests [PATCH] cciss: fix XFER_READ/XFER_WRITE in do_cciss_request [PATCH] cciss: set default raid level when reading geometry fails
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/cciss.c3
-rw-r--r--drivers/cdrom/cdrom.c3
-rw-r--r--drivers/scsi/scsi_lib.c4
3 files changed, 4 insertions, 6 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index d719a5d8f435..9d2ddb209343 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1907,6 +1907,7 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
1907 "does not support reading geometry\n"); 1907 "does not support reading geometry\n");
1908 drv->heads = 255; 1908 drv->heads = 255;
1909 drv->sectors = 32; // Sectors per track 1909 drv->sectors = 32; // Sectors per track
1910 drv->raid_level = RAID_UNKNOWN;
1910 } else { 1911 } else {
1911 drv->heads = inq_buff->data_byte[6]; 1912 drv->heads = inq_buff->data_byte[6];
1912 drv->sectors = inq_buff->data_byte[7]; 1913 drv->sectors = inq_buff->data_byte[7];
@@ -2491,7 +2492,7 @@ static void do_cciss_request(request_queue_t *q)
2491 c->Request.Type.Type = TYPE_CMD; // It is a command. 2492 c->Request.Type.Type = TYPE_CMD; // It is a command.
2492 c->Request.Type.Attribute = ATTR_SIMPLE; 2493 c->Request.Type.Attribute = ATTR_SIMPLE;
2493 c->Request.Type.Direction = 2494 c->Request.Type.Direction =
2494 (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write; 2495 (rq_data_dir(creq) == READ) ? XFER_READ : XFER_WRITE;
2495 c->Request.Timeout = 0; // Don't time out 2496 c->Request.Timeout = 0; // Don't time out
2496 c->Request.CDB[0] = 2497 c->Request.CDB[0] =
2497 (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write; 2498 (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write;
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index e4a2f8f3a1d7..66d028d30439 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -2139,8 +2139,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
2139 cdi->last_sense = s->sense_key; 2139 cdi->last_sense = s->sense_key;
2140 } 2140 }
2141 2141
2142 rq->bio = bio; 2142 if (blk_rq_unmap_user(bio))
2143 if (blk_rq_unmap_user(rq))
2144 ret = -EFAULT; 2143 ret = -EFAULT;
2145 2144
2146 if (ret) 2145 if (ret)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 1748e27501cd..f02f48a882a9 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -265,13 +265,11 @@ static int scsi_merge_bio(struct request *rq, struct bio *bio)
265 265
266 if (!rq->bio) 266 if (!rq->bio)
267 blk_rq_bio_prep(q, rq, bio); 267 blk_rq_bio_prep(q, rq, bio);
268 else if (!q->back_merge_fn(q, rq, bio)) 268 else if (!ll_back_merge_fn(q, rq, bio))
269 return -EINVAL; 269 return -EINVAL;
270 else { 270 else {
271 rq->biotail->bi_next = bio; 271 rq->biotail->bi_next = bio;
272 rq->biotail = bio; 272 rq->biotail = bio;
273 rq->hard_nr_sectors += bio_sectors(bio);
274 rq->nr_sectors = rq->hard_nr_sectors;
275 } 273 }
276 274
277 return 0; 275 return 0;