Skip to contentSkip to conversation

drivers/scsi/gdth.c Use the DMA_32BIT_MASK constant

PATCH In review Henry 4 participants 5 messages May 28, 2005 – May 29, 2005

Subsystems (2)
lore
Share & tools
lore

Henry

author
#0 lore raw

PATCH 1/1 drivers/scsi/gdth.c Use the DMA_32BIT_MASK constant

Hi, this is my first patch for linux kernel. Don't know if its correct, please check. Its based on an item on the TODO list

Signed-off-by Kouzinopoulos Haris <haris at mpa.gr>
drivers/scsi/gdth.c.patch renamed from drivers/scsi/gdth.c +4 -3
@@ -388,6 +388,7 @@
 #include <linux/proc_fs.h>
 #include <linux/time.h>
 #include <linux/timer.h>
+#include <linux/dma-mapping.h>
 #ifdef GDTH_RTC
 #include <linux/mc146818rtc.h>
 #endif
@@ -4529,15 +4530,15 @@ static int __init gdth_detect(Scsi_Host_
             if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat &GDT_64BIT)||
                 /* 64-bit DMA only supported from FW >= x.43 */
                 (!ha->dma64_support)) {
-                if (pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffff)) {
+                if (pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) {
                     printk(KERN_WARNING "GDT-PCI %d: Unable to set 32-bit DMA\n", hanum);
                     err = TRUE;
                 }
             } else {
                 shp->max_cmd_len = 16;
-                if (!pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffffffffffffULL)) {
+                if (!pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) {
                     printk("GDT-PCI %d: 64-bit DMA enabled\n", hanum);
-                } else if (pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffff)) {
+                } else if (pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) {
                     printk(KERN_WARNING "GDT-PCI %d: Unable to set 64/32-bit DMA\n", hanum);
                     err = TRUE;
                 }

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

drivers/scsi/gdth.c.patch static int __init gdth_detect(Scsi_Host_ · line 4539

Quoted 2 lines · Henry
drivers/scsi/gdth.c.patch renamed from drivers/scsi/gdth.c +1 -1
-                if (!pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffffffffffffULL)) {
+                if (!pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) {

This should be DMA_64BIT_MASK

Dave

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw
In reply to Henry
Quoted 2 lines · Henry

Hi, this is my first patch for linux kernel. Don't know if its correct, please check. Its based on an item on the TODO list

I already submitted this patch [1] a while ago (with the correct constants). Please check the archive at [2] before sending patches.

Thanks, Tobias

[1]
http://lists.osdl.org/pipermail/kernel-janitors/2005-March/003838.html
[2] http://lists.osdl.org/pipermail/kernel-janitors/

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

author
#3 lore raw
In reply to Henry

Hey, sorry for the the mess. I'll be more carefull next time

Στις Σαβ 28 Μαι 2005 10:34, ο/η Tobias Klauser έγραψε:

Quoted 13 lines · Henry
Quoted 2 lines

Hi, this is my first patch for linux kernel. Don't know if its correct, please check. Its based on an item on the TODO list

I already submitted this patch [1] a while ago (with the correct constants). Please check the archive at [2] before sending patches.

Thanks, Tobias

[1]
http://lists.osdl.org/pipermail/kernel-janitors/2005-March/003838.html
[2] http://lists.osdl.org/pipermail/kernel-janitors/

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors