diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 16 | ||||
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 16 |
2 files changed, 10 insertions, 22 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 45a77df668f1..1945ddfec18d 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -116,8 +116,8 @@ static void mbox_tx_work(struct work_struct *work) | |||
116 | } | 116 | } |
117 | 117 | ||
118 | spin_lock(q->queue_lock); | 118 | spin_lock(q->queue_lock); |
119 | blkdev_dequeue_request(rq); | 119 | if (__blk_end_request(rq, 0, 0)) |
120 | end_that_request_last(rq, 0); | 120 | BUG(); |
121 | spin_unlock(q->queue_lock); | 121 | spin_unlock(q->queue_lock); |
122 | } | 122 | } |
123 | } | 123 | } |
@@ -149,10 +149,8 @@ static void mbox_rx_work(struct work_struct *work) | |||
149 | 149 | ||
150 | msg = (mbox_msg_t) rq->data; | 150 | msg = (mbox_msg_t) rq->data; |
151 | 151 | ||
152 | spin_lock_irqsave(q->queue_lock, flags); | 152 | if (blk_end_request(rq, 0, 0)) |
153 | blkdev_dequeue_request(rq); | 153 | BUG(); |
154 | end_that_request_last(rq, 0); | ||
155 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
156 | 154 | ||
157 | mbox->rxq->callback((void *)msg); | 155 | mbox->rxq->callback((void *)msg); |
158 | } | 156 | } |
@@ -263,10 +261,8 @@ omap_mbox_read(struct device *dev, struct device_attribute *attr, char *buf) | |||
263 | 261 | ||
264 | *p = (mbox_msg_t) rq->data; | 262 | *p = (mbox_msg_t) rq->data; |
265 | 263 | ||
266 | spin_lock_irqsave(q->queue_lock, flags); | 264 | if (blk_end_request(rq, 0, 0)) |
267 | blkdev_dequeue_request(rq); | 265 | BUG(); |
268 | end_that_request_last(rq, 0); | ||
269 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
270 | 266 | ||
271 | if (unlikely(mbox_seq_test(mbox, *p))) { | 267 | if (unlikely(mbox_seq_test(mbox, *p))) { |
272 | pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p); | 268 | pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p); |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index b1a77b11f089..99f9f9605e9c 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -475,17 +475,9 @@ static void do_ubd_request(struct request_queue * q); | |||
475 | /* Only changed by ubd_init, which is an initcall. */ | 475 | /* Only changed by ubd_init, which is an initcall. */ |
476 | int thread_fd = -1; | 476 | int thread_fd = -1; |
477 | 477 | ||
478 | static void ubd_end_request(struct request *req, int bytes, int uptodate) | 478 | static void ubd_end_request(struct request *req, int bytes, int error) |
479 | { | 479 | { |
480 | if (!end_that_request_first(req, uptodate, bytes >> 9)) { | 480 | blk_end_request(req, error, bytes); |
481 | struct ubd *dev = req->rq_disk->private_data; | ||
482 | unsigned long flags; | ||
483 | |||
484 | add_disk_randomness(req->rq_disk); | ||
485 | spin_lock_irqsave(&dev->lock, flags); | ||
486 | end_that_request_last(req, uptodate); | ||
487 | spin_unlock_irqrestore(&dev->lock, flags); | ||
488 | } | ||
489 | } | 481 | } |
490 | 482 | ||
491 | /* Callable only from interrupt context - otherwise you need to do | 483 | /* Callable only from interrupt context - otherwise you need to do |
@@ -493,10 +485,10 @@ static void ubd_end_request(struct request *req, int bytes, int uptodate) | |||
493 | static inline void ubd_finish(struct request *req, int bytes) | 485 | static inline void ubd_finish(struct request *req, int bytes) |
494 | { | 486 | { |
495 | if(bytes < 0){ | 487 | if(bytes < 0){ |
496 | ubd_end_request(req, 0, 0); | 488 | ubd_end_request(req, 0, -EIO); |
497 | return; | 489 | return; |
498 | } | 490 | } |
499 | ubd_end_request(req, bytes, 1); | 491 | ubd_end_request(req, bytes, 0); |
500 | } | 492 | } |
501 | 493 | ||
502 | static LIST_HEAD(restart); | 494 | static LIST_HEAD(restart); |