summaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-03-27 10:43:52 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-04-07 08:12:38 +0200
commitac44e5b2ed62bf4acf9df84575d3f18c7a6fdf22 (patch)
tree55e44b1d54299f85332e6e1087cad28e9a439c33 /drivers/block/cciss.c
parent26308eab69aa193f7b3fb50764a64ae14544a39b (diff)
downloadblackbird-op-linux-ac44e5b2ed62bf4acf9df84575d3f18c7a6fdf22.tar.gz
blackbird-op-linux-ac44e5b2ed62bf4acf9df84575d3f18c7a6fdf22.zip
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/cciss.c')
-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)
{
CommandList_struct *cmd = rq->completion_data;
ctlr_info_t *h = hba[cmd->ctlr];
+ unsigned int nr_bytes;
unsigned long flags;
u64bit temp64;
int i, ddir;
@@ -1308,7 +1309,14 @@ static void cciss_softirq_done(struct request *rq)
printk("Done with %p\n", rq);
#endif /* CCISS_DEBUG */
- if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, blk_rq_bytes(rq)))
+ /*
+ * Store the full size and set the residual count for pc requests
+ */
+ nr_bytes = blk_rq_bytes(rq);
+ if (blk_pc_request(rq))
+ rq->data_len = cmd->err_info->ResidualCnt;
+
+ if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, nr_bytes))
BUG();
spin_lock_irqsave(&h->lock, flags);
OpenPOWER on IntegriCloud