public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cciss 2.6 DMA mapping
@ 2005-06-10 19:51 mike.miller
  2005-06-13  3:00 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: mike.miller @ 2005-06-10 19:51 UTC (permalink / raw)
  To: akpm, axboe, jgarzik; +Cc: linux-kernel, linux-scsi

Patch removes our homegrown DMA masks and uses the ones defined in the kernel.
This patch replaces the broken one I sent in earlier. It has been tested and works. Please discard the first submission.

Signed-off-by: Mike Miller <mike.miller@hp.com>

 cciss.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
--------------------------------------------------------------------------------
diff -burNp lx2612-rc6.orig/drivers/block/cciss.c lx2612-rc6/drivers/block/cciss.c
--- lx2612-rc6.orig/drivers/block/cciss.c	2005-06-10 08:43:05.516957392 -0500
+++ lx2612-rc6/drivers/block/cciss.c	2005-06-10 13:10:28.527049144 -0500
@@ -41,6 +41,7 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
+#include <linux/dma-mapping.h>
 #include <linux/blkdev.h>
 #include <linux/genhd.h>
 #include <linux/completion.h>
@@ -126,8 +127,6 @@ static struct board_type products[] = {
 #define MAX_CTLR_ORIG 	8
 
 
-#define CCISS_DMA_MASK	0xFFFFFFFF	/* 32 bit DMA */
-
 static ctlr_info_t *hba[MAX_CTLR];
 
 static void do_cciss_request(request_queue_t *q);
@@ -2393,11 +2392,6 @@ static int cciss_pci_init(ctlr_info_t *c
 		printk(KERN_ERR "cciss: Unable to Enable PCI device\n");
 		return( -1);
 	}
-	if (pci_set_dma_mask(pdev, CCISS_DMA_MASK ) != 0)
-	{
-		printk(KERN_ERR "cciss:  Unable to set DMA mask\n");
-		return(-1);
-	}
 
 	subsystem_vendor_id = pdev->subsystem_vendor;
 	subsystem_device_id = pdev->subsystem_device;
@@ -2747,9 +2741,9 @@ static int __devinit cciss_init_one(stru
 	hba[i]->pdev = pdev;
 
 	/* configure PCI DMA stuff */
-	if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL))
+	if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK))
 		printk("cciss: using DAC cycles\n");
-	else if (!pci_set_dma_mask(pdev, 0xffffffff))
+	else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK))
 		printk("cciss: not using DAC cycles\n");
 	else {
 		printk("cciss: no suitable DMA available\n");

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cciss 2.6 DMA mapping
  2005-06-10 19:51 [PATCH] cciss 2.6 DMA mapping mike.miller
@ 2005-06-13  3:00 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-06-13  3:00 UTC (permalink / raw)
  To: mike.miller; +Cc: akpm, axboe, linux-kernel, linux-scsi

mike.miller@hp.com wrote:
> Patch removes our homegrown DMA masks and uses the ones defined in the kernel.
> This patch replaces the broken one I sent in earlier. It has been tested and works. Please discard the first submission.
> 
> Signed-off-by: Mike Miller <mike.miller@hp.com>

ACK



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-13  3:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-10 19:51 [PATCH] cciss 2.6 DMA mapping mike.miller
2005-06-13  3:00 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox