diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 13:52:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 14:10:35 -0400 |
commit | c9059598ea8981d02356eead3188bf7fa4d717b8 (patch) | |
tree | 03e73b20a30e988da7c6a3e0ad93b2dc5843274d /drivers/mmc | |
parent | 0a33f80a8373eca7f4bea3961d1346c3815fa5ed (diff) | |
parent | b0fd271d5fba0b2d00888363f3869e3f9b26caa9 (diff) |
Merge branch 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block: (153 commits)
block: add request clone interface (v2)
floppy: fix hibernation
ramdisk: remove long-deprecated "ramdisk=" boot-time parameter
fs/bio.c: add missing __user annotation
block: prevent possible io_context->refcount overflow
Add serial number support for virtio_blk, V4a
block: Add missing bounce_pfn stacking and fix comments
Revert "block: Fix bounce limit setting in DM"
cciss: decode unit attention in SCSI error handling code
cciss: Remove no longer needed sendcmd reject processing code
cciss: change SCSI error handling routines to work with interrupts enabled.
cciss: separate error processing and command retrying code in sendcmd_withirq_core()
cciss: factor out fix target status processing code from sendcmd functions
cciss: simplify interface of sendcmd() and sendcmd_withirq()
cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code
cciss: Use schedule_timeout_uninterruptible in SCSI error handling code
block: needs to set the residual length of a bidi request
Revert "block: implement blkdev_readpages"
block: Fix bounce limit setting in DM
Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt
...
Manually fix conflicts with tracing updates in:
block/blk-sysfs.c
drivers/ide/ide-atapi.c
drivers/ide/ide-cd.c
drivers/ide/ide-floppy.c
drivers/ide/ide-tape.c
include/trace/events/block.h
kernel/trace/blktrace.c
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/block.c | 12 | ||||
-rw-r--r-- | drivers/mmc/card/queue.c | 11 |
2 files changed, 9 insertions, 14 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index b25e9b6516ae..98ffc41eaf2c 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -243,7 +243,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
243 | brq.mrq.cmd = &brq.cmd; | 243 | brq.mrq.cmd = &brq.cmd; |
244 | brq.mrq.data = &brq.data; | 244 | brq.mrq.data = &brq.data; |
245 | 245 | ||
246 | brq.cmd.arg = req->sector; | 246 | brq.cmd.arg = blk_rq_pos(req); |
247 | if (!mmc_card_blockaddr(card)) | 247 | if (!mmc_card_blockaddr(card)) |
248 | brq.cmd.arg <<= 9; | 248 | brq.cmd.arg <<= 9; |
249 | brq.cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; | 249 | brq.cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; |
@@ -251,7 +251,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
251 | brq.stop.opcode = MMC_STOP_TRANSMISSION; | 251 | brq.stop.opcode = MMC_STOP_TRANSMISSION; |
252 | brq.stop.arg = 0; | 252 | brq.stop.arg = 0; |
253 | brq.stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC; | 253 | brq.stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC; |
254 | brq.data.blocks = req->nr_sectors; | 254 | brq.data.blocks = blk_rq_sectors(req); |
255 | 255 | ||
256 | /* | 256 | /* |
257 | * The block layer doesn't support all sector count | 257 | * The block layer doesn't support all sector count |
@@ -301,7 +301,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
301 | * Adjust the sg list so it is the same size as the | 301 | * Adjust the sg list so it is the same size as the |
302 | * request. | 302 | * request. |
303 | */ | 303 | */ |
304 | if (brq.data.blocks != req->nr_sectors) { | 304 | if (brq.data.blocks != blk_rq_sectors(req)) { |
305 | int i, data_size = brq.data.blocks << 9; | 305 | int i, data_size = brq.data.blocks << 9; |
306 | struct scatterlist *sg; | 306 | struct scatterlist *sg; |
307 | 307 | ||
@@ -352,8 +352,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
352 | printk(KERN_ERR "%s: error %d transferring data," | 352 | printk(KERN_ERR "%s: error %d transferring data," |
353 | " sector %u, nr %u, card status %#x\n", | 353 | " sector %u, nr %u, card status %#x\n", |
354 | req->rq_disk->disk_name, brq.data.error, | 354 | req->rq_disk->disk_name, brq.data.error, |
355 | (unsigned)req->sector, | 355 | (unsigned)blk_rq_pos(req), |
356 | (unsigned)req->nr_sectors, status); | 356 | (unsigned)blk_rq_sectors(req), status); |
357 | } | 357 | } |
358 | 358 | ||
359 | if (brq.stop.error) { | 359 | if (brq.stop.error) { |
@@ -521,7 +521,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) | |||
521 | 521 | ||
522 | sprintf(md->disk->disk_name, "mmcblk%d", devidx); | 522 | sprintf(md->disk->disk_name, "mmcblk%d", devidx); |
523 | 523 | ||
524 | blk_queue_hardsect_size(md->queue.queue, 512); | 524 | blk_queue_logical_block_size(md->queue.queue, 512); |
525 | 525 | ||
526 | if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) { | 526 | if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) { |
527 | /* | 527 | /* |
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 7a72e75d5c67..49e582356c65 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -55,7 +55,7 @@ static int mmc_queue_thread(void *d) | |||
55 | spin_lock_irq(q->queue_lock); | 55 | spin_lock_irq(q->queue_lock); |
56 | set_current_state(TASK_INTERRUPTIBLE); | 56 | set_current_state(TASK_INTERRUPTIBLE); |
57 | if (!blk_queue_plugged(q)) | 57 | if (!blk_queue_plugged(q)) |
58 | req = elv_next_request(q); | 58 | req = blk_fetch_request(q); |
59 | mq->req = req; | 59 | mq->req = req; |
60 | spin_unlock_irq(q->queue_lock); | 60 | spin_unlock_irq(q->queue_lock); |
61 | 61 | ||
@@ -88,16 +88,11 @@ static void mmc_request(struct request_queue *q) | |||
88 | { | 88 | { |
89 | struct mmc_queue *mq = q->queuedata; | 89 | struct mmc_queue *mq = q->queuedata; |
90 | struct request *req; | 90 | struct request *req; |
91 | int ret; | ||
92 | 91 | ||
93 | if (!mq) { | 92 | if (!mq) { |
94 | printk(KERN_ERR "MMC: killing requests for dead queue\n"); | 93 | printk(KERN_ERR "MMC: killing requests for dead queue\n"); |
95 | while ((req = elv_next_request(q)) != NULL) { | 94 | while ((req = blk_fetch_request(q)) != NULL) |
96 | do { | 95 | __blk_end_request_all(req, -EIO); |
97 | ret = __blk_end_request(req, -EIO, | ||
98 | blk_rq_cur_bytes(req)); | ||
99 | } while (ret); | ||
100 | } | ||
101 | return; | 96 | return; |
102 | } | 97 | } |
103 | 98 | ||