aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>2007-12-11 17:44:39 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-01-28 04:36:38 -0500
commitf01ab252cbfc039e4f16db9aed272d11d13525d1 (patch)
tree387f74e9711dd74668f7410f7549d9fc79f0c12e /drivers
parent097c94a4e8bde978c8d12683d9a34048e9139e4b (diff)
blk_end_request: changing ps3disk (take 4)
This patch converts ps3disk to use blk_end_request interfaces. Related 'uptodate' arguments are converted to 'error'. Cc: Geoff Levand <geoffrey.levand@am.sony.com> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-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 e354bfc070e1..7483f947f0e9 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);