diff options
Diffstat (limited to 'drivers/message/i2o/i2o_block.c')
-rw-r--r-- | drivers/message/i2o/i2o_block.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 56e60f0d5312..510eb4726374 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
@@ -761,7 +761,7 @@ static int i2o_block_transfer(struct request *req) | |||
761 | break; | 761 | break; |
762 | 762 | ||
763 | case CACHE_SMARTFETCH: | 763 | case CACHE_SMARTFETCH: |
764 | if (req->nr_sectors > 16) | 764 | if (blk_rq_sectors(req) > 16) |
765 | ctl_flags = 0x201F0008; | 765 | ctl_flags = 0x201F0008; |
766 | else | 766 | else |
767 | ctl_flags = 0x001F0000; | 767 | ctl_flags = 0x001F0000; |
@@ -781,13 +781,13 @@ static int i2o_block_transfer(struct request *req) | |||
781 | ctl_flags = 0x001F0010; | 781 | ctl_flags = 0x001F0010; |
782 | break; | 782 | break; |
783 | case CACHE_SMARTBACK: | 783 | case CACHE_SMARTBACK: |
784 | if (req->nr_sectors > 16) | 784 | if (blk_rq_sectors(req) > 16) |
785 | ctl_flags = 0x001F0004; | 785 | ctl_flags = 0x001F0004; |
786 | else | 786 | else |
787 | ctl_flags = 0x001F0010; | 787 | ctl_flags = 0x001F0010; |
788 | break; | 788 | break; |
789 | case CACHE_SMARTTHROUGH: | 789 | case CACHE_SMARTTHROUGH: |
790 | if (req->nr_sectors > 16) | 790 | if (blk_rq_sectors(req) > 16) |
791 | ctl_flags = 0x001F0004; | 791 | ctl_flags = 0x001F0004; |
792 | else | 792 | else |
793 | ctl_flags = 0x001F0010; | 793 | ctl_flags = 0x001F0010; |
@@ -827,22 +827,24 @@ static int i2o_block_transfer(struct request *req) | |||
827 | 827 | ||
828 | *mptr++ = cpu_to_le32(scsi_flags); | 828 | *mptr++ = cpu_to_le32(scsi_flags); |
829 | 829 | ||
830 | *((u32 *) & cmd[2]) = cpu_to_be32(req->sector * hwsec); | 830 | *((u32 *) & cmd[2]) = cpu_to_be32(blk_rq_pos(req) * hwsec); |
831 | *((u16 *) & cmd[7]) = cpu_to_be16(req->nr_sectors * hwsec); | 831 | *((u16 *) & cmd[7]) = cpu_to_be16(blk_rq_sectors(req) * hwsec); |
832 | 832 | ||
833 | memcpy(mptr, cmd, 10); | 833 | memcpy(mptr, cmd, 10); |
834 | mptr += 4; | 834 | mptr += 4; |
835 | *mptr++ = cpu_to_le32(req->nr_sectors << KERNEL_SECTOR_SHIFT); | 835 | *mptr++ = |
836 | cpu_to_le32(blk_rq_sectors(req) << KERNEL_SECTOR_SHIFT); | ||
836 | } else | 837 | } else |
837 | #endif | 838 | #endif |
838 | { | 839 | { |
839 | msg->u.head[1] = cpu_to_le32(cmd | HOST_TID << 12 | tid); | 840 | msg->u.head[1] = cpu_to_le32(cmd | HOST_TID << 12 | tid); |
840 | *mptr++ = cpu_to_le32(ctl_flags); | 841 | *mptr++ = cpu_to_le32(ctl_flags); |
841 | *mptr++ = cpu_to_le32(req->nr_sectors << KERNEL_SECTOR_SHIFT); | ||
842 | *mptr++ = | 842 | *mptr++ = |
843 | cpu_to_le32((u32) (req->sector << KERNEL_SECTOR_SHIFT)); | 843 | cpu_to_le32(blk_rq_sectors(req) << KERNEL_SECTOR_SHIFT); |
844 | *mptr++ = | ||
845 | cpu_to_le32((u32) (blk_rq_pos(req) << KERNEL_SECTOR_SHIFT)); | ||
844 | *mptr++ = | 846 | *mptr++ = |
845 | cpu_to_le32(req->sector >> (32 - KERNEL_SECTOR_SHIFT)); | 847 | cpu_to_le32(blk_rq_pos(req) >> (32 - KERNEL_SECTOR_SHIFT)); |
846 | } | 848 | } |
847 | 849 | ||
848 | if (!i2o_block_sglist_alloc(c, ireq, &mptr)) { | 850 | if (!i2o_block_sglist_alloc(c, ireq, &mptr)) { |