diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/cciss.c | 10 |
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); |