Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+17 −18
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
#endif

	/* 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,
						    bufsize,
						    &rx_ring->pFbr1RingPa);
@@ -199,7 +199,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)

#ifdef USE_FBR0
	/* 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,
						    bufsize,
						    &rx_ring->pFbr0RingPa);
@@ -450,11 +450,10 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
		rx_ring->pFbr1RingVa = (void *)((uint8_t *)
				rx_ring->pFbr1RingVa - rx_ring->Fbr1offset);

		bufsize =
		    (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff;
		bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries)
	                                                        + 0xfff;

		pci_free_consistent(adapter->pdev,
				    bufsize,
		pci_free_consistent(adapter->pdev, bufsize,
                                rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa);

		rx_ring->pFbr1RingVa = NULL;
@@ -484,8 +483,8 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
		rx_ring->pFbr0RingVa = (void *)((uint8_t *)
				rx_ring->pFbr0RingVa - rx_ring->Fbr0offset);

		bufsize =
		    (sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff;
		bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries)
                                                                + 0xfff;

		pci_free_consistent(adapter->pdev,
				    bufsize,
@@ -596,7 +595,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
{
	struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma;
	struct _rx_ring_t *rx_local = &etdev->RxRing;
	PFBR_DESC_t fbr_entry;
	struct fbr_desc *fbr_entry;
	u32 entry;
	u32 psr_num_des;
	unsigned long flags;
@@ -636,7 +635,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
	rx_local->local_psr_full = 0;

	/* 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++) {
		fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry];
		fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry];
@@ -661,7 +660,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)

#ifdef USE_FBR0
	/* 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++) {
		fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[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)
		spin_lock_irqsave(&etdev->FbrLock, flags);

		if (ri == 1) {
			PFBR_DESC_t next =
			    (PFBR_DESC_t) (rx_local->pFbr1RingVa) +
			struct fbr_desc *next =
			    (struct fbr_desc *) (rx_local->pFbr1RingVa) +
                		            INDEX10(rx_local->local_Fbr1_full);

			/* Handle the Free Buffer Ring advancement here. Write
@@ -1134,8 +1133,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
		}
#ifdef USE_FBR0
		else {
			PFBR_DESC_t next =
			    (PFBR_DESC_t) rx_local->pFbr0RingVa +
			struct fbr_desc *next = (struct fbr_desc *)
				rx_local->pFbr0RingVa +
					INDEX10(rx_local->local_Fbr0_full);

			/* Handle the Free Buffer Ring advancement here. Write
+3 −2
Original line number Diff line number Diff line
@@ -91,11 +91,12 @@
#define ALCATEL_BROADCAST_PKT	0x02000000

/* typedefs for Free Buffer Descriptors */
typedef struct _FBR_DESC_t {
struct fbr_desc
{
	u32 addr_lo;
	u32 addr_hi;
	u32 word2;		/* Bits 10-31 reserved, 0-9 descriptor */
} FBR_DESC_t, *PFBR_DESC_t;
};

/* Typedefs for Packet Status Ring Descriptors */
typedef union _PKT_STAT_DESC_WORD0_t {