diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/DAC960.c | 2 | ||||
-rw-r--r-- | drivers/block/Kconfig | 2 | ||||
-rw-r--r-- | drivers/block/cciss.c | 2 | ||||
-rw-r--r-- | drivers/block/cpqarray.c | 2 | ||||
-rw-r--r-- | drivers/block/floppy.c | 2 | ||||
-rw-r--r-- | drivers/block/loop.c | 23 | ||||
-rw-r--r-- | drivers/block/nbd.c | 124 | ||||
-rw-r--r-- | drivers/block/paride/Kconfig | 5 | ||||
-rw-r--r-- | drivers/block/rd.c | 4 | ||||
-rw-r--r-- | drivers/block/sx8.c | 2 | ||||
-rw-r--r-- | drivers/block/ub.c | 2 | ||||
-rw-r--r-- | drivers/block/viodasd.c | 2 |
12 files changed, 92 insertions, 80 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 70eaa5c7ac08..21097a39a057 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -3471,7 +3471,7 @@ static inline boolean DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, | |||
3471 | 3471 | ||
3472 | if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) { | 3472 | if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) { |
3473 | 3473 | ||
3474 | end_that_request_last(Request); | 3474 | end_that_request_last(Request, UpToDate); |
3475 | 3475 | ||
3476 | if (Command->Completion) { | 3476 | if (Command->Completion) { |
3477 | complete(Command->Completion); | 3477 | complete(Command->Completion); |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index c4b9d2adfc08..139cbba76180 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
@@ -117,7 +117,7 @@ config BLK_DEV_XD | |||
117 | 117 | ||
118 | config PARIDE | 118 | config PARIDE |
119 | tristate "Parallel port IDE device support" | 119 | tristate "Parallel port IDE device support" |
120 | depends on PARPORT | 120 | depends on PARPORT_PC |
121 | ---help--- | 121 | ---help--- |
122 | There are many external CD-ROM and disk devices that connect through | 122 | There are many external CD-ROM and disk devices that connect through |
123 | your computer's parallel port. Most of them are actually IDE devices | 123 | your computer's parallel port. Most of them are actually IDE devices |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index c3441b3f086e..d2815b7a9150 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -2310,7 +2310,7 @@ static inline void complete_command( ctlr_info_t *h, CommandList_struct *cmd, | |||
2310 | printk("Done with %p\n", cmd->rq); | 2310 | printk("Done with %p\n", cmd->rq); |
2311 | #endif /* CCISS_DEBUG */ | 2311 | #endif /* CCISS_DEBUG */ |
2312 | 2312 | ||
2313 | end_that_request_last(cmd->rq); | 2313 | end_that_request_last(cmd->rq, status ? 1 : -EIO); |
2314 | cmd_free(h,cmd,1); | 2314 | cmd_free(h,cmd,1); |
2315 | } | 2315 | } |
2316 | 2316 | ||
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index cf1822a6361c..9bddb6874873 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c | |||
@@ -1036,7 +1036,7 @@ static inline void complete_command(cmdlist_t *cmd, int timeout) | |||
1036 | complete_buffers(cmd->rq->bio, ok); | 1036 | complete_buffers(cmd->rq->bio, ok); |
1037 | 1037 | ||
1038 | DBGPX(printk("Done with %p\n", cmd->rq);); | 1038 | DBGPX(printk("Done with %p\n", cmd->rq);); |
1039 | end_that_request_last(cmd->rq); | 1039 | end_that_request_last(cmd->rq, ok ? 1 : -EIO); |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | /* | 1042 | /* |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index f7e765a1d313..a5b857c5c4b8 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -2301,7 +2301,7 @@ static void floppy_end_request(struct request *req, int uptodate) | |||
2301 | add_disk_randomness(req->rq_disk); | 2301 | add_disk_randomness(req->rq_disk); |
2302 | floppy_off((long)req->rq_disk->private_data); | 2302 | floppy_off((long)req->rq_disk->private_data); |
2303 | blkdev_dequeue_request(req); | 2303 | blkdev_dequeue_request(req); |
2304 | end_that_request_last(req); | 2304 | end_that_request_last(req, uptodate); |
2305 | 2305 | ||
2306 | /* We're done with the request */ | 2306 | /* We're done with the request */ |
2307 | current_req = NULL; | 2307 | current_req = NULL; |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 96c664af8d06..a452b13620a2 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -213,7 +213,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, | |||
213 | struct address_space_operations *aops = mapping->a_ops; | 213 | struct address_space_operations *aops = mapping->a_ops; |
214 | pgoff_t index; | 214 | pgoff_t index; |
215 | unsigned offset, bv_offs; | 215 | unsigned offset, bv_offs; |
216 | int len, ret = 0; | 216 | int len, ret; |
217 | 217 | ||
218 | down(&mapping->host->i_sem); | 218 | down(&mapping->host->i_sem); |
219 | index = pos >> PAGE_CACHE_SHIFT; | 219 | index = pos >> PAGE_CACHE_SHIFT; |
@@ -232,9 +232,15 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, | |||
232 | page = grab_cache_page(mapping, index); | 232 | page = grab_cache_page(mapping, index); |
233 | if (unlikely(!page)) | 233 | if (unlikely(!page)) |
234 | goto fail; | 234 | goto fail; |
235 | if (unlikely(aops->prepare_write(file, page, offset, | 235 | ret = aops->prepare_write(file, page, offset, |
236 | offset + size))) | 236 | offset + size); |
237 | if (unlikely(ret)) { | ||
238 | if (ret == AOP_TRUNCATED_PAGE) { | ||
239 | page_cache_release(page); | ||
240 | continue; | ||
241 | } | ||
237 | goto unlock; | 242 | goto unlock; |
243 | } | ||
238 | transfer_result = lo_do_transfer(lo, WRITE, page, offset, | 244 | transfer_result = lo_do_transfer(lo, WRITE, page, offset, |
239 | bvec->bv_page, bv_offs, size, IV); | 245 | bvec->bv_page, bv_offs, size, IV); |
240 | if (unlikely(transfer_result)) { | 246 | if (unlikely(transfer_result)) { |
@@ -251,9 +257,15 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, | |||
251 | kunmap_atomic(kaddr, KM_USER0); | 257 | kunmap_atomic(kaddr, KM_USER0); |
252 | } | 258 | } |
253 | flush_dcache_page(page); | 259 | flush_dcache_page(page); |
254 | if (unlikely(aops->commit_write(file, page, offset, | 260 | ret = aops->commit_write(file, page, offset, |
255 | offset + size))) | 261 | offset + size); |
262 | if (unlikely(ret)) { | ||
263 | if (ret == AOP_TRUNCATED_PAGE) { | ||
264 | page_cache_release(page); | ||
265 | continue; | ||
266 | } | ||
256 | goto unlock; | 267 | goto unlock; |
268 | } | ||
257 | if (unlikely(transfer_result)) | 269 | if (unlikely(transfer_result)) |
258 | goto unlock; | 270 | goto unlock; |
259 | bv_offs += size; | 271 | bv_offs += size; |
@@ -264,6 +276,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, | |||
264 | unlock_page(page); | 276 | unlock_page(page); |
265 | page_cache_release(page); | 277 | page_cache_release(page); |
266 | } | 278 | } |
279 | ret = 0; | ||
267 | out: | 280 | out: |
268 | up(&mapping->host->i_sem); | 281 | up(&mapping->host->i_sem); |
269 | return ret; | 282 | return ret; |
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 9e268ddedfbd..33d6f237b2ed 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -54,11 +54,15 @@ | |||
54 | #include <linux/errno.h> | 54 | #include <linux/errno.h> |
55 | #include <linux/file.h> | 55 | #include <linux/file.h> |
56 | #include <linux/ioctl.h> | 56 | #include <linux/ioctl.h> |
57 | #include <linux/compiler.h> | ||
58 | #include <linux/err.h> | ||
59 | #include <linux/kernel.h> | ||
57 | #include <net/sock.h> | 60 | #include <net/sock.h> |
58 | 61 | ||
59 | #include <linux/devfs_fs_kernel.h> | 62 | #include <linux/devfs_fs_kernel.h> |
60 | 63 | ||
61 | #include <asm/uaccess.h> | 64 | #include <asm/uaccess.h> |
65 | #include <asm/system.h> | ||
62 | #include <asm/types.h> | 66 | #include <asm/types.h> |
63 | 67 | ||
64 | #include <linux/nbd.h> | 68 | #include <linux/nbd.h> |
@@ -136,7 +140,7 @@ static void nbd_end_request(struct request *req) | |||
136 | 140 | ||
137 | spin_lock_irqsave(q->queue_lock, flags); | 141 | spin_lock_irqsave(q->queue_lock, flags); |
138 | if (!end_that_request_first(req, uptodate, req->nr_sectors)) { | 142 | if (!end_that_request_first(req, uptodate, req->nr_sectors)) { |
139 | end_that_request_last(req); | 143 | end_that_request_last(req, uptodate); |
140 | } | 144 | } |
141 | spin_unlock_irqrestore(q->queue_lock, flags); | 145 | spin_unlock_irqrestore(q->queue_lock, flags); |
142 | } | 146 | } |
@@ -230,14 +234,6 @@ static int nbd_send_req(struct nbd_device *lo, struct request *req) | |||
230 | request.len = htonl(size); | 234 | request.len = htonl(size); |
231 | memcpy(request.handle, &req, sizeof(req)); | 235 | memcpy(request.handle, &req, sizeof(req)); |
232 | 236 | ||
233 | down(&lo->tx_lock); | ||
234 | |||
235 | if (!sock || !lo->sock) { | ||
236 | printk(KERN_ERR "%s: Attempted send on closed socket\n", | ||
237 | lo->disk->disk_name); | ||
238 | goto error_out; | ||
239 | } | ||
240 | |||
241 | dprintk(DBG_TX, "%s: request %p: sending control (%s@%llu,%luB)\n", | 237 | dprintk(DBG_TX, "%s: request %p: sending control (%s@%llu,%luB)\n", |
242 | lo->disk->disk_name, req, | 238 | lo->disk->disk_name, req, |
243 | nbdcmd_to_ascii(nbd_cmd(req)), | 239 | nbdcmd_to_ascii(nbd_cmd(req)), |
@@ -276,11 +272,9 @@ static int nbd_send_req(struct nbd_device *lo, struct request *req) | |||
276 | } | 272 | } |
277 | } | 273 | } |
278 | } | 274 | } |
279 | up(&lo->tx_lock); | ||
280 | return 0; | 275 | return 0; |
281 | 276 | ||
282 | error_out: | 277 | error_out: |
283 | up(&lo->tx_lock); | ||
284 | return 1; | 278 | return 1; |
285 | } | 279 | } |
286 | 280 | ||
@@ -289,9 +283,14 @@ static struct request *nbd_find_request(struct nbd_device *lo, char *handle) | |||
289 | struct request *req; | 283 | struct request *req; |
290 | struct list_head *tmp; | 284 | struct list_head *tmp; |
291 | struct request *xreq; | 285 | struct request *xreq; |
286 | int err; | ||
292 | 287 | ||
293 | memcpy(&xreq, handle, sizeof(xreq)); | 288 | memcpy(&xreq, handle, sizeof(xreq)); |
294 | 289 | ||
290 | err = wait_event_interruptible(lo->active_wq, lo->active_req != xreq); | ||
291 | if (unlikely(err)) | ||
292 | goto out; | ||
293 | |||
295 | spin_lock(&lo->queue_lock); | 294 | spin_lock(&lo->queue_lock); |
296 | list_for_each(tmp, &lo->queue_head) { | 295 | list_for_each(tmp, &lo->queue_head) { |
297 | req = list_entry(tmp, struct request, queuelist); | 296 | req = list_entry(tmp, struct request, queuelist); |
@@ -302,7 +301,11 @@ static struct request *nbd_find_request(struct nbd_device *lo, char *handle) | |||
302 | return req; | 301 | return req; |
303 | } | 302 | } |
304 | spin_unlock(&lo->queue_lock); | 303 | spin_unlock(&lo->queue_lock); |
305 | return NULL; | 304 | |
305 | err = -ENOENT; | ||
306 | |||
307 | out: | ||
308 | return ERR_PTR(err); | ||
306 | } | 309 | } |
307 | 310 | ||
308 | static inline int sock_recv_bvec(struct socket *sock, struct bio_vec *bvec) | 311 | static inline int sock_recv_bvec(struct socket *sock, struct bio_vec *bvec) |
@@ -331,7 +334,11 @@ static struct request *nbd_read_stat(struct nbd_device *lo) | |||
331 | goto harderror; | 334 | goto harderror; |
332 | } | 335 | } |
333 | req = nbd_find_request(lo, reply.handle); | 336 | req = nbd_find_request(lo, reply.handle); |
334 | if (req == NULL) { | 337 | if (unlikely(IS_ERR(req))) { |
338 | result = PTR_ERR(req); | ||
339 | if (result != -ENOENT) | ||
340 | goto harderror; | ||
341 | |||
335 | printk(KERN_ERR "%s: Unexpected reply (%p)\n", | 342 | printk(KERN_ERR "%s: Unexpected reply (%p)\n", |
336 | lo->disk->disk_name, reply.handle); | 343 | lo->disk->disk_name, reply.handle); |
337 | result = -EBADR; | 344 | result = -EBADR; |
@@ -395,19 +402,24 @@ static void nbd_clear_que(struct nbd_device *lo) | |||
395 | 402 | ||
396 | BUG_ON(lo->magic != LO_MAGIC); | 403 | BUG_ON(lo->magic != LO_MAGIC); |
397 | 404 | ||
398 | do { | 405 | /* |
399 | req = NULL; | 406 | * Because we have set lo->sock to NULL under the tx_lock, all |
400 | spin_lock(&lo->queue_lock); | 407 | * modifications to the list must have completed by now. For |
401 | if (!list_empty(&lo->queue_head)) { | 408 | * the same reason, the active_req must be NULL. |
402 | req = list_entry(lo->queue_head.next, struct request, queuelist); | 409 | * |
403 | list_del_init(&req->queuelist); | 410 | * As a consequence, we don't need to take the spin lock while |
404 | } | 411 | * purging the list here. |
405 | spin_unlock(&lo->queue_lock); | 412 | */ |
406 | if (req) { | 413 | BUG_ON(lo->sock); |
407 | req->errors++; | 414 | BUG_ON(lo->active_req); |
408 | nbd_end_request(req); | 415 | |
409 | } | 416 | while (!list_empty(&lo->queue_head)) { |
410 | } while (req); | 417 | req = list_entry(lo->queue_head.next, struct request, |
418 | queuelist); | ||
419 | list_del_init(&req->queuelist); | ||
420 | req->errors++; | ||
421 | nbd_end_request(req); | ||
422 | } | ||
411 | } | 423 | } |
412 | 424 | ||
413 | /* | 425 | /* |
@@ -435,11 +447,6 @@ static void do_nbd_request(request_queue_t * q) | |||
435 | 447 | ||
436 | BUG_ON(lo->magic != LO_MAGIC); | 448 | BUG_ON(lo->magic != LO_MAGIC); |
437 | 449 | ||
438 | if (!lo->file) { | ||
439 | printk(KERN_ERR "%s: Request when not-ready\n", | ||
440 | lo->disk->disk_name); | ||
441 | goto error_out; | ||
442 | } | ||
443 | nbd_cmd(req) = NBD_CMD_READ; | 450 | nbd_cmd(req) = NBD_CMD_READ; |
444 | if (rq_data_dir(req) == WRITE) { | 451 | if (rq_data_dir(req) == WRITE) { |
445 | nbd_cmd(req) = NBD_CMD_WRITE; | 452 | nbd_cmd(req) = NBD_CMD_WRITE; |
@@ -453,32 +460,34 @@ static void do_nbd_request(request_queue_t * q) | |||
453 | req->errors = 0; | 460 | req->errors = 0; |
454 | spin_unlock_irq(q->queue_lock); | 461 | spin_unlock_irq(q->queue_lock); |
455 | 462 | ||
456 | spin_lock(&lo->queue_lock); | 463 | down(&lo->tx_lock); |
457 | 464 | if (unlikely(!lo->sock)) { | |
458 | if (!lo->file) { | 465 | up(&lo->tx_lock); |
459 | spin_unlock(&lo->queue_lock); | 466 | printk(KERN_ERR "%s: Attempted send on closed socket\n", |
460 | printk(KERN_ERR "%s: failed between accept and semaphore, file lost\n", | 467 | lo->disk->disk_name); |
461 | lo->disk->disk_name); | ||
462 | req->errors++; | 468 | req->errors++; |
463 | nbd_end_request(req); | 469 | nbd_end_request(req); |
464 | spin_lock_irq(q->queue_lock); | 470 | spin_lock_irq(q->queue_lock); |
465 | continue; | 471 | continue; |
466 | } | 472 | } |
467 | 473 | ||
468 | list_add(&req->queuelist, &lo->queue_head); | 474 | lo->active_req = req; |
469 | spin_unlock(&lo->queue_lock); | ||
470 | 475 | ||
471 | if (nbd_send_req(lo, req) != 0) { | 476 | if (nbd_send_req(lo, req) != 0) { |
472 | printk(KERN_ERR "%s: Request send failed\n", | 477 | printk(KERN_ERR "%s: Request send failed\n", |
473 | lo->disk->disk_name); | 478 | lo->disk->disk_name); |
474 | if (nbd_find_request(lo, (char *)&req) != NULL) { | 479 | req->errors++; |
475 | /* we still own req */ | 480 | nbd_end_request(req); |
476 | req->errors++; | 481 | } else { |
477 | nbd_end_request(req); | 482 | spin_lock(&lo->queue_lock); |
478 | } else /* we're racing with nbd_clear_que */ | 483 | list_add(&req->queuelist, &lo->queue_head); |
479 | printk(KERN_DEBUG "nbd: can't find req\n"); | 484 | spin_unlock(&lo->queue_lock); |
480 | } | 485 | } |
481 | 486 | ||
487 | lo->active_req = NULL; | ||
488 | up(&lo->tx_lock); | ||
489 | wake_up_all(&lo->active_wq); | ||
490 | |||
482 | spin_lock_irq(q->queue_lock); | 491 | spin_lock_irq(q->queue_lock); |
483 | continue; | 492 | continue; |
484 | 493 | ||
@@ -529,17 +538,10 @@ static int nbd_ioctl(struct inode *inode, struct file *file, | |||
529 | down(&lo->tx_lock); | 538 | down(&lo->tx_lock); |
530 | lo->sock = NULL; | 539 | lo->sock = NULL; |
531 | up(&lo->tx_lock); | 540 | up(&lo->tx_lock); |
532 | spin_lock(&lo->queue_lock); | ||
533 | file = lo->file; | 541 | file = lo->file; |
534 | lo->file = NULL; | 542 | lo->file = NULL; |
535 | spin_unlock(&lo->queue_lock); | ||
536 | nbd_clear_que(lo); | 543 | nbd_clear_que(lo); |
537 | spin_lock(&lo->queue_lock); | 544 | BUG_ON(!list_empty(&lo->queue_head)); |
538 | if (!list_empty(&lo->queue_head)) { | ||
539 | printk(KERN_ERR "nbd: disconnect: some requests are in progress -> please try again.\n"); | ||
540 | error = -EBUSY; | ||
541 | } | ||
542 | spin_unlock(&lo->queue_lock); | ||
543 | if (file) | 545 | if (file) |
544 | fput(file); | 546 | fput(file); |
545 | return error; | 547 | return error; |
@@ -598,24 +600,19 @@ static int nbd_ioctl(struct inode *inode, struct file *file, | |||
598 | lo->sock = NULL; | 600 | lo->sock = NULL; |
599 | } | 601 | } |
600 | up(&lo->tx_lock); | 602 | up(&lo->tx_lock); |
601 | spin_lock(&lo->queue_lock); | ||
602 | file = lo->file; | 603 | file = lo->file; |
603 | lo->file = NULL; | 604 | lo->file = NULL; |
604 | spin_unlock(&lo->queue_lock); | ||
605 | nbd_clear_que(lo); | 605 | nbd_clear_que(lo); |
606 | printk(KERN_WARNING "%s: queue cleared\n", lo->disk->disk_name); | 606 | printk(KERN_WARNING "%s: queue cleared\n", lo->disk->disk_name); |
607 | if (file) | 607 | if (file) |
608 | fput(file); | 608 | fput(file); |
609 | return lo->harderror; | 609 | return lo->harderror; |
610 | case NBD_CLEAR_QUE: | 610 | case NBD_CLEAR_QUE: |
611 | down(&lo->tx_lock); | 611 | /* |
612 | if (lo->sock) { | 612 | * This is for compatibility only. The queue is always cleared |
613 | up(&lo->tx_lock); | 613 | * by NBD_DO_IT or NBD_CLEAR_SOCK. |
614 | return 0; /* probably should be error, but that would | 614 | */ |
615 | * break "nbd-client -d", so just return 0 */ | 615 | BUG_ON(!lo->sock && !list_empty(&lo->queue_head)); |
616 | } | ||
617 | up(&lo->tx_lock); | ||
618 | nbd_clear_que(lo); | ||
619 | return 0; | 616 | return 0; |
620 | case NBD_PRINT_DEBUG: | 617 | case NBD_PRINT_DEBUG: |
621 | printk(KERN_INFO "%s: next = %p, prev = %p, head = %p\n", | 618 | printk(KERN_INFO "%s: next = %p, prev = %p, head = %p\n", |
@@ -688,6 +685,7 @@ static int __init nbd_init(void) | |||
688 | spin_lock_init(&nbd_dev[i].queue_lock); | 685 | spin_lock_init(&nbd_dev[i].queue_lock); |
689 | INIT_LIST_HEAD(&nbd_dev[i].queue_head); | 686 | INIT_LIST_HEAD(&nbd_dev[i].queue_head); |
690 | init_MUTEX(&nbd_dev[i].tx_lock); | 687 | init_MUTEX(&nbd_dev[i].tx_lock); |
688 | init_waitqueue_head(&nbd_dev[i].active_wq); | ||
691 | nbd_dev[i].blksize = 1024; | 689 | nbd_dev[i].blksize = 1024; |
692 | nbd_dev[i].bytesize = 0x7ffffc00ULL << 10; /* 2TB */ | 690 | nbd_dev[i].bytesize = 0x7ffffc00ULL << 10; /* 2TB */ |
693 | disk->major = NBD_MAJOR; | 691 | disk->major = NBD_MAJOR; |
diff --git a/drivers/block/paride/Kconfig b/drivers/block/paride/Kconfig index 17ff40561257..c0d2854dd097 100644 --- a/drivers/block/paride/Kconfig +++ b/drivers/block/paride/Kconfig | |||
@@ -4,11 +4,12 @@ | |||
4 | # PARIDE doesn't need PARPORT, but if PARPORT is configured as a module, | 4 | # PARIDE doesn't need PARPORT, but if PARPORT is configured as a module, |
5 | # PARIDE must also be a module. The bogus CONFIG_PARIDE_PARPORT option | 5 | # PARIDE must also be a module. The bogus CONFIG_PARIDE_PARPORT option |
6 | # controls the choices given to the user ... | 6 | # controls the choices given to the user ... |
7 | # PARIDE only supports PC style parports. Tough for USB or other parports... | ||
7 | config PARIDE_PARPORT | 8 | config PARIDE_PARPORT |
8 | tristate | 9 | tristate |
9 | depends on PARIDE!=n | 10 | depends on PARIDE!=n |
10 | default m if PARPORT=m | 11 | default m if PARPORT_PC=m |
11 | default y if PARPORT!=m | 12 | default y if PARPORT_PC!=m |
12 | 13 | ||
13 | comment "Parallel IDE high-level drivers" | 14 | comment "Parallel IDE high-level drivers" |
14 | depends on PARIDE | 15 | depends on PARIDE |
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 68c60a5bcdab..ffd6abd6d5a0 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c | |||
@@ -154,7 +154,7 @@ static int ramdisk_commit_write(struct file *file, struct page *page, | |||
154 | 154 | ||
155 | /* | 155 | /* |
156 | * ->writepage to the the blockdev's mapping has to redirty the page so that the | 156 | * ->writepage to the the blockdev's mapping has to redirty the page so that the |
157 | * VM doesn't go and steal it. We return WRITEPAGE_ACTIVATE so that the VM | 157 | * VM doesn't go and steal it. We return AOP_WRITEPAGE_ACTIVATE so that the VM |
158 | * won't try to (pointlessly) write the page again for a while. | 158 | * won't try to (pointlessly) write the page again for a while. |
159 | * | 159 | * |
160 | * Really, these pages should not be on the LRU at all. | 160 | * Really, these pages should not be on the LRU at all. |
@@ -165,7 +165,7 @@ static int ramdisk_writepage(struct page *page, struct writeback_control *wbc) | |||
165 | make_page_uptodate(page); | 165 | make_page_uptodate(page); |
166 | SetPageDirty(page); | 166 | SetPageDirty(page); |
167 | if (wbc->for_reclaim) | 167 | if (wbc->for_reclaim) |
168 | return WRITEPAGE_ACTIVATE; | 168 | return AOP_WRITEPAGE_ACTIVATE; |
169 | unlock_page(page); | 169 | unlock_page(page); |
170 | return 0; | 170 | return 0; |
171 | } | 171 | } |
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 1ded3b433459..9251f4131b53 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c | |||
@@ -770,7 +770,7 @@ static inline void carm_end_request_queued(struct carm_host *host, | |||
770 | rc = end_that_request_first(req, uptodate, req->hard_nr_sectors); | 770 | rc = end_that_request_first(req, uptodate, req->hard_nr_sectors); |
771 | assert(rc == 0); | 771 | assert(rc == 0); |
772 | 772 | ||
773 | end_that_request_last(req); | 773 | end_that_request_last(req, uptodate); |
774 | 774 | ||
775 | rc = carm_put_request(host, crq); | 775 | rc = carm_put_request(host, crq); |
776 | assert(rc == 0); | 776 | assert(rc == 0); |
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 10740a065088..a05fe5843e6c 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -951,7 +951,7 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) | |||
951 | static void ub_end_rq(struct request *rq, int uptodate) | 951 | static void ub_end_rq(struct request *rq, int uptodate) |
952 | { | 952 | { |
953 | end_that_request_first(rq, uptodate, rq->hard_nr_sectors); | 953 | end_that_request_first(rq, uptodate, rq->hard_nr_sectors); |
954 | end_that_request_last(rq); | 954 | end_that_request_last(rq, uptodate); |
955 | } | 955 | } |
956 | 956 | ||
957 | static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, | 957 | static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, |
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 2d518aa2720a..063f0304a163 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -305,7 +305,7 @@ static void viodasd_end_request(struct request *req, int uptodate, | |||
305 | if (end_that_request_first(req, uptodate, num_sectors)) | 305 | if (end_that_request_first(req, uptodate, num_sectors)) |
306 | return; | 306 | return; |
307 | add_disk_randomness(req->rq_disk); | 307 | add_disk_randomness(req->rq_disk); |
308 | end_that_request_last(req); | 308 | end_that_request_last(req, uptodate); |
309 | } | 309 | } |
310 | 310 | ||
311 | /* | 311 | /* |