diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
commit | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (patch) | |
tree | 8d104ec2a459346b99413b0b77421ca7b9936c1a /drivers/memstick | |
parent | ca44d6e60f9de26281fda203f58b570e1748c015 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Diffstat (limited to 'drivers/memstick')
-rw-r--r-- | drivers/memstick/core/mspro_block.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index de143deb06f..7847bbc1440 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c | |||
@@ -672,15 +672,14 @@ try_again: | |||
672 | msb->req_sg); | 672 | msb->req_sg); |
673 | 673 | ||
674 | if (!msb->seg_count) { | 674 | if (!msb->seg_count) { |
675 | chunk = __blk_end_request(msb->block_req, -ENOMEM, | 675 | chunk = __blk_end_request_cur(msb->block_req, -ENOMEM); |
676 | blk_rq_cur_bytes(msb->block_req)); | ||
677 | continue; | 676 | continue; |
678 | } | 677 | } |
679 | 678 | ||
680 | t_sec = msb->block_req->sector << 9; | 679 | t_sec = blk_rq_pos(msb->block_req) << 9; |
681 | sector_div(t_sec, msb->page_size); | 680 | sector_div(t_sec, msb->page_size); |
682 | 681 | ||
683 | count = msb->block_req->nr_sectors << 9; | 682 | count = blk_rq_bytes(msb->block_req); |
684 | count /= msb->page_size; | 683 | count /= msb->page_size; |
685 | 684 | ||
686 | param.system = msb->system; | 685 | param.system = msb->system; |
@@ -705,8 +704,8 @@ try_again: | |||
705 | return 0; | 704 | return 0; |
706 | } | 705 | } |
707 | 706 | ||
708 | dev_dbg(&card->dev, "elv_next\n"); | 707 | dev_dbg(&card->dev, "blk_fetch\n"); |
709 | msb->block_req = elv_next_request(msb->queue); | 708 | msb->block_req = blk_fetch_request(msb->queue); |
710 | if (!msb->block_req) { | 709 | if (!msb->block_req) { |
711 | dev_dbg(&card->dev, "issue end\n"); | 710 | dev_dbg(&card->dev, "issue end\n"); |
712 | return -EAGAIN; | 711 | return -EAGAIN; |
@@ -745,7 +744,7 @@ static int mspro_block_complete_req(struct memstick_dev *card, int error) | |||
745 | t_len *= msb->page_size; | 744 | t_len *= msb->page_size; |
746 | } | 745 | } |
747 | } else | 746 | } else |
748 | t_len = msb->block_req->nr_sectors << 9; | 747 | t_len = blk_rq_bytes(msb->block_req); |
749 | 748 | ||
750 | dev_dbg(&card->dev, "transferred %x (%d)\n", t_len, error); | 749 | dev_dbg(&card->dev, "transferred %x (%d)\n", t_len, error); |
751 | 750 | ||
@@ -825,8 +824,8 @@ static void mspro_block_submit_req(struct request_queue *q) | |||
825 | return; | 824 | return; |
826 | 825 | ||
827 | if (msb->eject) { | 826 | if (msb->eject) { |
828 | while ((req = elv_next_request(q)) != NULL) | 827 | while ((req = blk_fetch_request(q)) != NULL) |
829 | __blk_end_request(req, -ENODEV, blk_rq_bytes(req)); | 828 | __blk_end_request_all(req, -ENODEV); |
830 | 829 | ||
831 | return; | 830 | return; |
832 | } | 831 | } |
@@ -1243,7 +1242,7 @@ static int mspro_block_init_disk(struct memstick_dev *card) | |||
1243 | 1242 | ||
1244 | sprintf(msb->disk->disk_name, "mspblk%d", disk_id); | 1243 | sprintf(msb->disk->disk_name, "mspblk%d", disk_id); |
1245 | 1244 | ||
1246 | blk_queue_hardsect_size(msb->queue, msb->page_size); | 1245 | blk_queue_logical_block_size(msb->queue, msb->page_size); |
1247 | 1246 | ||
1248 | capacity = be16_to_cpu(sys_info->user_block_count); | 1247 | capacity = be16_to_cpu(sys_info->user_block_count); |
1249 | capacity *= be16_to_cpu(sys_info->block_size); | 1248 | capacity *= be16_to_cpu(sys_info->block_size); |