Skip to contentSkip to conversation

ppc32: reorg DMA API, add coherent alloc in irq

PATCH Arjan van de Ven 3 participants 3 messages May 30, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 5 lines · Linux Kernel Mailing List

ChangeSet 1.1770, 2004/05/29 10:56:14-07:00, [email protected]

[PATCH] ppc32: reorg DMA API, add coherent alloc in irq

From: Matt Porter <[email protected]>

this breaks the acenic driver:

In file included from drivers/net/acenic.c:186:
drivers/net/acenic.h:598: error: syntax error before "DECLARE_PCI_UNMAP_ADDR"
drivers/net/acenic.h:598: warning: no semicolon at end of struct or union
drivers/net/acenic.h:609: error: syntax error before "DECLARE_PCI_UNMAP_ADDR"
drivers/net/acenic.h:609: warning: no semicolon at end of struct or union
drivers/net/acenic.h:621: error: field tx_skbuff' has incomplete type drivers/net/acenic.h:622: error: field rx_std_skbuff' has incomplete type
drivers/net/acenic.h:623: error: field `rx_mini_skbuff' has incomplete type
drivers/net/acenic.h:624: error: field `rx_jumbo_skbuff' has incomplete type
drivers/net/acenic.c: In function `acenic_remove_one':
drivers/net/acenic.c:667: warning: implicit declaration of function `pci_unmap_addr'
drivers/net/acenic.c: In function `ace_load_std_rx_ring':
drivers/net/acenic.c:1704: warning: implicit declaration of function `pci_unmap_addr_set'
drivers/net/acenic.c: In function `ace_rx_int':
drivers/net/acenic.c:2036: error: dereferencing pointer to incomplete type
drivers/net/acenic.c:2037: error: dereferencing pointer to incomplete type
drivers/net/acenic.c:2039: error: `mapping' undeclared (first use in this function)
drivers/net/acenic.c:2039: error: (Each undeclared identifier is reported only once
drivers/net/acenic.c:2039: error: for each function it appears in.) drivers/net/acenic.c: In function `ace_tx_int':

... etc ...

#2 lore raw
Quoted 5 lines · Arjan van de Ven
Quoted 4 lines · Linux Kernel Mailing List

ChangeSet 1.1770, 2004/05/29 10:56:14-07:00, [email protected]

[PATCH] ppc32: reorg DMA API, add coherent alloc in irq

Quoted 7 lines
Quoted 1 line

From: Matt Porter <[email protected]>

this breaks the acenic driver:

In file included from drivers/net/acenic.c:186:
drivers/net/acenic.h:598: error: syntax error before "DECLARE_PCI_UNMAP_ADDR"

[snip]

This patch should help.

PPC32: Put back DECLARE_PCI_UNMAP_??? and friends accidentaly removed during DMA API reorganization.

===== include/asm-ppc/pci.h 1.28 vs edited =====

include/asm-ppc/pci.h +8 -0
@@ -61,6 +61,14 @@
  */
 #define PCI_DMA_BUS_IS_PHYS     (1)
 
+/* pci_unmap_{page,single} is a nop so... */
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
+#define pci_unmap_addr(PTR, ADDR_NAME)		(0)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)	do { } while (0)
+#define pci_unmap_len(PTR, LEN_NAME)		(0)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)	do { } while (0)
+
 /*
  * At present there are very few 32-bit PPC machines that can have
  * memory above the 4GB point, and we don't support that.
#3 lore raw
Quoted 31 lines · Eugene Surovegin
Quoted 5 lines · Arjan van de Ven
Quoted 4 lines · Linux Kernel Mailing List

ChangeSet 1.1770, 2004/05/29 10:56:14-07:00, [email protected]

[PATCH] ppc32: reorg DMA API, add coherent alloc in irq

Quoted 7 lines
Quoted 1 line

From: Matt Porter <[email protected]>

this breaks the acenic driver:

In file included from drivers/net/acenic.c:186:
drivers/net/acenic.h:598: error: syntax error before "DECLARE_PCI_UNMAP_ADDR"

[snip]

This patch should help.

PPC32: Put back DECLARE_PCI_UNMAP_??? and friends accidentaly removed during DMA API reorganization.

===== include/asm-ppc/pci.h 1.28 vs edited =====

include/asm-ppc/pci.h +1 -0
@@ -61,6 +61,14 @@
  */
 #define PCI_DMA_BUS_IS_PHYS     (1)
 
+/* pci_unmap_{page,single} is a nop so... */

include/asm-ppc/pci.h line 74

Quoted 10 lines
include/asm-ppc/pci.h +7 -0
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
+#define pci_unmap_addr(PTR, ADDR_NAME)		(0)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)	do { } while (0)
+#define pci_unmap_len(PTR, LEN_NAME)		(0)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)	do { } while (0)
+
 /*
  * At present there are very few 32-bit PPC machines that can have
  * memory above the 4GB point, and we don't support that.

Yes, thanks. This is much better after I obviously fat-fingered those calls away. acenic builds here again.

Andrew/Linus, please apply Eugene's patch to fix my breakage. ;)

-Matt