diff options
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r-- | drivers/mmc/card/block.c | 12 |
1 files changed, 6 insertions, 6 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 | /* |