aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-03-27 05:43:52 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-07 02:12:38 -0400
commitac44e5b2ed62bf4acf9df84575d3f18c7a6fdf22 (patch)
tree55e44b1d54299f85332e6e1087cad28e9a439c33 /drivers/block
parent26308eab69aa193f7b3fb50764a64ae14544a39b (diff)
cciss: fix residual count for block pc requests
We must complete the full request, so store the request count and then set the ->data_len to the residual count from the hardware. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 5d0e135824f9..f15b17708537 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1287,6 +1287,7 @@ static void cciss_softirq_done(struct request *rq)
1287{ 1287{
1288 CommandList_struct *cmd = rq->completion_data; 1288 CommandList_struct *cmd = rq->completion_data;
1289 ctlr_info_t *h = hba[cmd->ctlr]; 1289 ctlr_info_t *h = hba[cmd->ctlr];
1290 unsigned int nr_bytes;
1290 unsigned long flags; 1291 unsigned long flags;
1291 u64bit temp64; 1292 u64bit temp64;
1292 int i, ddir; 1293 int i, ddir;
@@ -1308,7 +1309,14 @@ static void cciss_softirq_done(struct request *rq)
1308 printk("Done with %p\n", rq); 1309 printk("Done with %p\n", rq);
1309#endif /* CCISS_DEBUG */ 1310#endif /* CCISS_DEBUG */
1310 1311
1311 if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, blk_rq_bytes(rq))) 1312 /*
1313 * Store the full size and set the residual count for pc requests
1314 */
1315 nr_bytes = blk_rq_bytes(rq);
1316 if (blk_pc_request(rq))
1317 rq->data_len = cmd->err_info->ResidualCnt;
1318
1319 if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, nr_bytes))
1312 BUG(); 1320 BUG();
1313 1321
1314 spin_lock_irqsave(&h->lock, flags); 1322 spin_lock_irqsave(&h->lock, flags);