aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-06-17 19:42:23 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-06-17 19:42:23 -0400
commit3237ee78fc00f786d5f5aec6f9310b0e39069f15 (patch)
tree4c94e70ab846ffcb8bb5715fb3c8d8473358a323 /drivers/block
parent9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff)
parentdf0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (diff)
merge by hand (fix up qla_os.c merge error)
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c12
-rw-r--r--drivers/block/elevator.c13
-rw-r--r--drivers/block/ll_rw_blk.c20
-rw-r--r--drivers/block/paride/pd.c2
-rw-r--r--drivers/block/sx8.c4
5 files changed, 25 insertions, 26 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 8f7c1a1ed7f..abde27027c0 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -41,6 +41,7 @@
41#include <asm/uaccess.h> 41#include <asm/uaccess.h>
42#include <asm/io.h> 42#include <asm/io.h>
43 43
44#include <linux/dma-mapping.h>
44#include <linux/blkdev.h> 45#include <linux/blkdev.h>
45#include <linux/genhd.h> 46#include <linux/genhd.h>
46#include <linux/completion.h> 47#include <linux/completion.h>
@@ -126,8 +127,6 @@ static struct board_type products[] = {
126#define MAX_CTLR_ORIG 8 127#define MAX_CTLR_ORIG 8
127 128
128 129
129#define CCISS_DMA_MASK 0xFFFFFFFF /* 32 bit DMA */
130
131static ctlr_info_t *hba[MAX_CTLR]; 130static ctlr_info_t *hba[MAX_CTLR];
132 131
133static void do_cciss_request(request_queue_t *q); 132static void do_cciss_request(request_queue_t *q);
@@ -2393,11 +2392,6 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
2393 printk(KERN_ERR "cciss: Unable to Enable PCI device\n"); 2392 printk(KERN_ERR "cciss: Unable to Enable PCI device\n");
2394 return( -1); 2393 return( -1);
2395 } 2394 }
2396 if (pci_set_dma_mask(pdev, CCISS_DMA_MASK ) != 0)
2397 {
2398 printk(KERN_ERR "cciss: Unable to set DMA mask\n");
2399 return(-1);
2400 }
2401 2395
2402 subsystem_vendor_id = pdev->subsystem_vendor; 2396 subsystem_vendor_id = pdev->subsystem_vendor;
2403 subsystem_device_id = pdev->subsystem_device; 2397 subsystem_device_id = pdev->subsystem_device;
@@ -2747,9 +2741,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
2747 hba[i]->pdev = pdev; 2741 hba[i]->pdev = pdev;
2748 2742
2749 /* configure PCI DMA stuff */ 2743 /* configure PCI DMA stuff */
2750 if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) 2744 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK))
2751 printk("cciss: using DAC cycles\n"); 2745 printk("cciss: using DAC cycles\n");
2752 else if (!pci_set_dma_mask(pdev, 0xffffffff)) 2746 else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK))
2753 printk("cciss: not using DAC cycles\n"); 2747 printk("cciss: not using DAC cycles\n");
2754 else { 2748 else {
2755 printk("cciss: no suitable DMA available\n"); 2749 printk("cciss: no suitable DMA available\n");
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c
index 89982925f9e..f831f08f839 100644
--- a/drivers/block/elevator.c
+++ b/drivers/block/elevator.c
@@ -286,6 +286,13 @@ void elv_requeue_request(request_queue_t *q, struct request *rq)
286 } 286 }
287 287
288 /* 288 /*
289 * the request is prepped and may have some resources allocated.
290 * allowing unprepped requests to pass this one may cause resource
291 * deadlock. turn on softbarrier.
292 */
293 rq->flags |= REQ_SOFTBARRIER;
294
295 /*
289 * if iosched has an explicit requeue hook, then use that. otherwise 296 * if iosched has an explicit requeue hook, then use that. otherwise
290 * just put the request at the front of the queue 297 * just put the request at the front of the queue
291 */ 298 */
@@ -381,6 +388,12 @@ struct request *elv_next_request(request_queue_t *q)
381 if (ret == BLKPREP_OK) { 388 if (ret == BLKPREP_OK) {
382 break; 389 break;
383 } else if (ret == BLKPREP_DEFER) { 390 } else if (ret == BLKPREP_DEFER) {
391 /*
392 * the request may have been (partially) prepped.
393 * we need to keep this request in the front to
394 * avoid resource deadlock. turn on softbarrier.
395 */
396 rq->flags |= REQ_SOFTBARRIER;
384 rq = NULL; 397 rq = NULL;
385 break; 398 break;
386 } else if (ret == BLKPREP_KILL) { 399 } else if (ret == BLKPREP_KILL) {
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index 11ef9d9ea13..f20eba22b14 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -2038,7 +2038,6 @@ EXPORT_SYMBOL(blk_requeue_request);
2038 * @rq: request to be inserted 2038 * @rq: request to be inserted
2039 * @at_head: insert request at head or tail of queue 2039 * @at_head: insert request at head or tail of queue
2040 * @data: private data 2040 * @data: private data
2041 * @reinsert: true if request it a reinsertion of previously processed one
2042 * 2041 *
2043 * Description: 2042 * Description:
2044 * Many block devices need to execute commands asynchronously, so they don't 2043 * Many block devices need to execute commands asynchronously, so they don't
@@ -2053,8 +2052,9 @@ EXPORT_SYMBOL(blk_requeue_request);
2053 * host that is unable to accept a particular command. 2052 * host that is unable to accept a particular command.
2054 */ 2053 */
2055void blk_insert_request(request_queue_t *q, struct request *rq, 2054void blk_insert_request(request_queue_t *q, struct request *rq,
2056 int at_head, void *data, int reinsert) 2055 int at_head, void *data)
2057{ 2056{
2057 int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
2058 unsigned long flags; 2058 unsigned long flags;
2059 2059
2060 /* 2060 /*
@@ -2071,20 +2071,12 @@ void blk_insert_request(request_queue_t *q, struct request *rq,
2071 /* 2071 /*
2072 * If command is tagged, release the tag 2072 * If command is tagged, release the tag
2073 */ 2073 */
2074 if (reinsert) 2074 if (blk_rq_tagged(rq))
2075 blk_requeue_request(q, rq); 2075 blk_queue_end_tag(q, rq);
2076 else {
2077 int where = ELEVATOR_INSERT_BACK;
2078
2079 if (at_head)
2080 where = ELEVATOR_INSERT_FRONT;
2081 2076
2082 if (blk_rq_tagged(rq)) 2077 drive_stat_acct(rq, rq->nr_sectors, 1);
2083 blk_queue_end_tag(q, rq); 2078 __elv_add_request(q, rq, where, 0);
2084 2079
2085 drive_stat_acct(rq, rq->nr_sectors, 1);
2086 __elv_add_request(q, rq, where, 0);
2087 }
2088 if (blk_queue_plugged(q)) 2080 if (blk_queue_plugged(q))
2089 __generic_unplug_device(q); 2081 __generic_unplug_device(q);
2090 else 2082 else
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 202a5a74ad3..fa49d62626b 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -723,7 +723,7 @@ static int pd_special_command(struct pd_unit *disk,
723 rq.ref_count = 1; 723 rq.ref_count = 1;
724 rq.waiting = &wait; 724 rq.waiting = &wait;
725 rq.end_io = blk_end_sync_rq; 725 rq.end_io = blk_end_sync_rq;
726 blk_insert_request(disk->gd->queue, &rq, 0, func, 0); 726 blk_insert_request(disk->gd->queue, &rq, 0, func);
727 wait_for_completion(&wait); 727 wait_for_completion(&wait);
728 rq.waiting = NULL; 728 rq.waiting = NULL;
729 if (rq.errors) 729 if (rq.errors)
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 797f5988c2b..5ed3a637945 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -614,7 +614,7 @@ static int carm_array_info (struct carm_host *host, unsigned int array_idx)
614 spin_unlock_irq(&host->lock); 614 spin_unlock_irq(&host->lock);
615 615
616 DPRINTK("blk_insert_request, tag == %u\n", idx); 616 DPRINTK("blk_insert_request, tag == %u\n", idx);
617 blk_insert_request(host->oob_q, crq->rq, 1, crq, 0); 617 blk_insert_request(host->oob_q, crq->rq, 1, crq);
618 618
619 return 0; 619 return 0;
620 620
@@ -653,7 +653,7 @@ static int carm_send_special (struct carm_host *host, carm_sspc_t func)
653 crq->msg_bucket = (u32) rc; 653 crq->msg_bucket = (u32) rc;
654 654
655 DPRINTK("blk_insert_request, tag == %u\n", idx); 655 DPRINTK("blk_insert_request, tag == %u\n", idx);
656 blk_insert_request(host->oob_q, crq->rq, 1, crq, 0); 656 blk_insert_request(host->oob_q, crq->rq, 1, crq);
657 657
658 return 0; 658 return 0;
659} 659}