aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/ps3disk.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index e354bfc070e..7483f947f0e 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -229,7 +229,7 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data)
229 struct ps3_storage_device *dev = data; 229 struct ps3_storage_device *dev = data;
230 struct ps3disk_private *priv; 230 struct ps3disk_private *priv;
231 struct request *req; 231 struct request *req;
232 int res, read, uptodate; 232 int res, read, error;
233 u64 tag, status; 233 u64 tag, status;
234 unsigned long num_sectors; 234 unsigned long num_sectors;
235 const char *op; 235 const char *op;
@@ -270,21 +270,17 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data)
270 if (status) { 270 if (status) {
271 dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%lx\n", __func__, 271 dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%lx\n", __func__,
272 __LINE__, op, status); 272 __LINE__, op, status);
273 uptodate = 0; 273 error = -EIO;
274 } else { 274 } else {
275 dev_dbg(&dev->sbd.core, "%s:%u: %s completed\n", __func__, 275 dev_dbg(&dev->sbd.core, "%s:%u: %s completed\n", __func__,
276 __LINE__, op); 276 __LINE__, op);
277 uptodate = 1; 277 error = 0;
278 if (read) 278 if (read)
279 ps3disk_scatter_gather(dev, req, 0); 279 ps3disk_scatter_gather(dev, req, 0);
280 } 280 }
281 281
282 spin_lock(&priv->lock); 282 spin_lock(&priv->lock);
283 if (!end_that_request_first(req, uptodate, num_sectors)) { 283 __blk_end_request(req, error, num_sectors << 9);
284 add_disk_randomness(req->rq_disk);
285 blkdev_dequeue_request(req);
286 end_that_request_last(req, uptodate);
287 }
288 priv->req = NULL; 284 priv->req = NULL;
289 ps3disk_do_request(dev, priv->queue); 285 ps3disk_do_request(dev, priv->queue);
290 spin_unlock(&priv->lock); 286 spin_unlock(&priv->lock);