Commit 13a79c69 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

Staging: et131x: fbr_desc is now only sane types

Clean up the typdef for fbr_desc itself so we know it is done
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7d9e15eb
...@@ -170,7 +170,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) ...@@ -170,7 +170,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
#endif #endif
/* Allocate an area of memory for Free Buffer Ring 1 */ /* Allocate an area of memory for Free Buffer Ring 1 */
bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff; bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries) + 0xfff;
rx_ring->pFbr1RingVa = pci_alloc_consistent(adapter->pdev, rx_ring->pFbr1RingVa = pci_alloc_consistent(adapter->pdev,
bufsize, bufsize,
&rx_ring->pFbr1RingPa); &rx_ring->pFbr1RingPa);
...@@ -199,7 +199,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) ...@@ -199,7 +199,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
#ifdef USE_FBR0 #ifdef USE_FBR0
/* Allocate an area of memory for Free Buffer Ring 0 */ /* Allocate an area of memory for Free Buffer Ring 0 */
bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff; bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries) + 0xfff;
rx_ring->pFbr0RingVa = pci_alloc_consistent(adapter->pdev, rx_ring->pFbr0RingVa = pci_alloc_consistent(adapter->pdev,
bufsize, bufsize,
&rx_ring->pFbr0RingPa); &rx_ring->pFbr0RingPa);
...@@ -450,11 +450,10 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) ...@@ -450,11 +450,10 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
rx_ring->pFbr1RingVa = (void *)((uint8_t *) rx_ring->pFbr1RingVa = (void *)((uint8_t *)
rx_ring->pFbr1RingVa - rx_ring->Fbr1offset); rx_ring->pFbr1RingVa - rx_ring->Fbr1offset);
bufsize = bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries)
(sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff; + 0xfff;
pci_free_consistent(adapter->pdev, pci_free_consistent(adapter->pdev, bufsize,
bufsize,
rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa); rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa);
rx_ring->pFbr1RingVa = NULL; rx_ring->pFbr1RingVa = NULL;
...@@ -484,8 +483,8 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) ...@@ -484,8 +483,8 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
rx_ring->pFbr0RingVa = (void *)((uint8_t *) rx_ring->pFbr0RingVa = (void *)((uint8_t *)
rx_ring->pFbr0RingVa - rx_ring->Fbr0offset); rx_ring->pFbr0RingVa - rx_ring->Fbr0offset);
bufsize = bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries)
(sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff; + 0xfff;
pci_free_consistent(adapter->pdev, pci_free_consistent(adapter->pdev,
bufsize, bufsize,
...@@ -596,7 +595,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) ...@@ -596,7 +595,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
{ {
struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma; struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma;
struct _rx_ring_t *rx_local = &etdev->RxRing; struct _rx_ring_t *rx_local = &etdev->RxRing;
PFBR_DESC_t fbr_entry; struct fbr_desc *fbr_entry;
u32 entry; u32 entry;
u32 psr_num_des; u32 psr_num_des;
unsigned long flags; unsigned long flags;
...@@ -636,7 +635,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) ...@@ -636,7 +635,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
rx_local->local_psr_full = 0; rx_local->local_psr_full = 0;
/* Now's the best time to initialize FBR1 contents */ /* Now's the best time to initialize FBR1 contents */
fbr_entry = (PFBR_DESC_t) rx_local->pFbr1RingVa; fbr_entry = (struct fbr_desc *) rx_local->pFbr1RingVa;
for (entry = 0; entry < rx_local->Fbr1NumEntries; entry++) { for (entry = 0; entry < rx_local->Fbr1NumEntries; entry++) {
fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry]; fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry];
fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry]; fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry];
...@@ -661,7 +660,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) ...@@ -661,7 +660,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
#ifdef USE_FBR0 #ifdef USE_FBR0
/* Now's the best time to initialize FBR0 contents */ /* Now's the best time to initialize FBR0 contents */
fbr_entry = (PFBR_DESC_t) rx_local->pFbr0RingVa; fbr_entry = (struct fbr_desc *) rx_local->pFbr0RingVa;
for (entry = 0; entry < rx_local->Fbr0NumEntries; entry++) { for (entry = 0; entry < rx_local->Fbr0NumEntries; entry++) {
fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[entry]; fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[entry];
fbr_entry->addr_lo = rx_local->Fbr[0]->PALow[entry]; fbr_entry->addr_lo = rx_local->Fbr[0]->PALow[entry];
...@@ -1116,8 +1115,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) ...@@ -1116,8 +1115,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
spin_lock_irqsave(&etdev->FbrLock, flags); spin_lock_irqsave(&etdev->FbrLock, flags);
if (ri == 1) { if (ri == 1) {
PFBR_DESC_t next = struct fbr_desc *next =
(PFBR_DESC_t) (rx_local->pFbr1RingVa) + (struct fbr_desc *) (rx_local->pFbr1RingVa) +
INDEX10(rx_local->local_Fbr1_full); INDEX10(rx_local->local_Fbr1_full);
/* Handle the Free Buffer Ring advancement here. Write /* Handle the Free Buffer Ring advancement here. Write
...@@ -1134,8 +1133,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) ...@@ -1134,8 +1133,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
} }
#ifdef USE_FBR0 #ifdef USE_FBR0
else { else {
PFBR_DESC_t next = struct fbr_desc *next = (struct fbr_desc *)
(PFBR_DESC_t) rx_local->pFbr0RingVa + rx_local->pFbr0RingVa +
INDEX10(rx_local->local_Fbr0_full); INDEX10(rx_local->local_Fbr0_full);
/* Handle the Free Buffer Ring advancement here. Write /* Handle the Free Buffer Ring advancement here. Write
......
...@@ -91,11 +91,12 @@ ...@@ -91,11 +91,12 @@
#define ALCATEL_BROADCAST_PKT 0x02000000 #define ALCATEL_BROADCAST_PKT 0x02000000
/* typedefs for Free Buffer Descriptors */ /* typedefs for Free Buffer Descriptors */
typedef struct _FBR_DESC_t { struct fbr_desc
{
u32 addr_lo; u32 addr_lo;
u32 addr_hi; u32 addr_hi;
u32 word2; /* Bits 10-31 reserved, 0-9 descriptor */ u32 word2; /* Bits 10-31 reserved, 0-9 descriptor */
} FBR_DESC_t, *PFBR_DESC_t; };
/* Typedefs for Packet Status Ring Descriptors */ /* Typedefs for Packet Status Ring Descriptors */
typedef union _PKT_STAT_DESC_WORD0_t { typedef union _PKT_STAT_DESC_WORD0_t {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment