Skip to contentSkip to conversation

use PCI_DMA_*BIT in ioc3-eth.c

PATCH In review Eric Sesterhenn / snakebyte 2 participants 3 messages Jan 5, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use PCI_DMA_*BIT in ioc3-eth.c

hi,

this changes the 0xfff.. constants used for pci_set_dma* to defines in the ioc3 driver.

drivers/net/ioc3-eth.c renamed from drivers/net/ioc3-eth.c.orig +3 -3
@@ -1195,17 +1195,17 @@ static int ioc3_probe(struct pci_dev *pd
 	int err, pci_using_dac;
 
 	/* Configure DMA attributes. */
-	err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+	err = pci_set_dma_mask(pdev, PCI_DMA_64BIT);
 	if (!err) {
 		pci_using_dac = 1;
-		err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+		err = pci_set_consistent_dma_mask(pdev, PCI_DMA_64BIT);
 		if (err < 0) {
 			printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
 			       "for consistent allocations\n", pci_name(pdev));
 			goto out;
 		}
 	} else {
-		err = pci_set_dma_mask(pdev, 0xffffffffULL);
+		err = pci_set_dma_mask(pdev, PCI_DMA_32BIT);
 		if (err) {
 			printk(KERN_ERR "%s: No usable DMA configuration, "
 			       "aborting.\n", pci_name(pdev));

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

#1 lore raw
Quoted 2 lines · Eric Sesterhenn / snakebyte

this changes the 0xfff.. constants used for pci_set_dma* to defines in the ioc3 driver.

This one is alread in -kj [1]. Guess I did them all, they're just not all in mainline.

[1]
http://coderock.org/kj/2.6.15-rc5-kj1/2.6.15-rc5-kj1-broken-out/drivers_net_ioc3_eth_c_use_dma_32_64_bit_mask.patch

Cheers, Tobias

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

#2 lore raw
In reply to Eric Sesterhenn / snakebyte
Quoted 6 lines · Tobias Klauser
Quoted 2 lines · Eric Sesterhenn / snakebyte

this changes the 0xfff.. constants used for pci_set_dma* to defines in the ioc3 driver.

This one is alread in -kj [1]. Guess I did them all, they're just not all in mainline.

Nice, this saves some work. guess we can remove this from the TODO list then. same should apply to MOD_{DEC,INC}_USE_COUNT after the two patches i send last month get into -kj or mainline.

Eric

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