aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/i2o/i2o_block.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index 6b61d289d6c9..e153f5d5237d 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -426,15 +426,9 @@ static void i2o_block_end_request(struct request *req, int error,
426 struct request_queue *q = req->q; 426 struct request_queue *q = req->q;
427 unsigned long flags; 427 unsigned long flags;
428 428
429 if (blk_end_request(req, error, nr_bytes)) { 429 if (blk_end_request(req, error, nr_bytes))
430 int leftover = (blk_rq_sectors(req) << KERNEL_SECTOR_SHIFT);
431
432 if (blk_pc_request(req))
433 leftover = blk_rq_bytes(req);
434
435 if (error) 430 if (error)
436 blk_end_request(req, -EIO, leftover); 431 blk_end_request_all(req, -EIO);
437 }
438 432
439 spin_lock_irqsave(q->queue_lock, flags); 433 spin_lock_irqsave(q->queue_lock, flags);
440 434
@@ -832,15 +826,13 @@ static int i2o_block_transfer(struct request *req)
832 826
833 memcpy(mptr, cmd, 10); 827 memcpy(mptr, cmd, 10);
834 mptr += 4; 828 mptr += 4;
835 *mptr++ = 829 *mptr++ = cpu_to_le32(blk_rq_bytes(req));
836 cpu_to_le32(blk_rq_sectors(req) << KERNEL_SECTOR_SHIFT);
837 } else 830 } else
838#endif 831#endif
839 { 832 {
840 msg->u.head[1] = cpu_to_le32(cmd | HOST_TID << 12 | tid); 833 msg->u.head[1] = cpu_to_le32(cmd | HOST_TID << 12 | tid);
841 *mptr++ = cpu_to_le32(ctl_flags); 834 *mptr++ = cpu_to_le32(ctl_flags);
842 *mptr++ = 835 *mptr++ = cpu_to_le32(blk_rq_bytes(req));
843 cpu_to_le32(blk_rq_sectors(req) << KERNEL_SECTOR_SHIFT);
844 *mptr++ = 836 *mptr++ =
845 cpu_to_le32((u32) (blk_rq_pos(req) << KERNEL_SECTOR_SHIFT)); 837 cpu_to_le32((u32) (blk_rq_pos(req) << KERNEL_SECTOR_SHIFT));
846 *mptr++ = 838 *mptr++ =