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

Staging: et131x: rx_status_block_t is now clean

So kill off the top level type and turn it into a struct
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c9a8ad18
...@@ -361,8 +361,8 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) ...@@ -361,8 +361,8 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
/* Allocate an area of memory for writeback of status information */ /* Allocate an area of memory for writeback of status information */
rx_ring->pRxStatusVa = pci_alloc_consistent(adapter->pdev, rx_ring->pRxStatusVa = pci_alloc_consistent(adapter->pdev,
sizeof(RX_STATUS_BLOCK_t), sizeof(struct rx_status_block),
&rx_ring->pRxStatusPa); &rx_ring->pRxStatusPa);
if (!rx_ring->pRxStatusVa) { if (!rx_ring->pRxStatusVa) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev,
"Cannot alloc memory for Status Block\n"); "Cannot alloc memory for Status Block\n");
...@@ -508,7 +508,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) ...@@ -508,7 +508,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
/* Free area of memory for the writeback of status information */ /* Free area of memory for the writeback of status information */
if (rx_ring->pRxStatusVa) { if (rx_ring->pRxStatusVa) {
pci_free_consistent(adapter->pdev, pci_free_consistent(adapter->pdev,
sizeof(RX_STATUS_BLOCK_t), sizeof(struct rx_status_block),
rx_ring->pRxStatusVa, rx_ring->pRxStatusPa); rx_ring->pRxStatusVa, rx_ring->pRxStatusPa);
rx_ring->pRxStatusVa = NULL; rx_ring->pRxStatusVa = NULL;
...@@ -614,7 +614,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) ...@@ -614,7 +614,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
&rx_dma->dma_wb_base_hi); &rx_dma->dma_wb_base_hi);
writel((u32) rx_local->pRxStatusPa, &rx_dma->dma_wb_base_lo); writel((u32) rx_local->pRxStatusPa, &rx_dma->dma_wb_base_lo);
memset(rx_local->pRxStatusVa, 0, sizeof(RX_STATUS_BLOCK_t)); memset(rx_local->pRxStatusVa, 0, sizeof(struct rx_status_block));
/* Set the address and parameters of the packet status ring into the /* Set the address and parameters of the packet status ring into the
* 1310's registers * 1310's registers
...@@ -786,7 +786,7 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev) ...@@ -786,7 +786,7 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev)
PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
{ {
struct _rx_ring_t *rx_local = &etdev->RxRing; struct _rx_ring_t *rx_local = &etdev->RxRing;
PRX_STATUS_BLOCK_t status; struct rx_status_block *status;
PPKT_STAT_DESC_t psr; PPKT_STAT_DESC_t psr;
PMP_RFD rfd; PMP_RFD rfd;
u32 i; u32 i;
...@@ -803,7 +803,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) ...@@ -803,7 +803,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
* interrupt. It contains the next to be used entry in the Packet * interrupt. It contains the next to be used entry in the Packet
* Status Ring, and also the two Free Buffer rings. * Status Ring, and also the two Free Buffer rings.
*/ */
status = (PRX_STATUS_BLOCK_t) rx_local->pRxStatusVa; status = (struct rx_status_block *)rx_local->pRxStatusVa;
word1 = status->Word1 >> 16; /* Get the useful bits */ word1 = status->Word1 >> 16; /* Get the useful bits */
/* Check the PSR and wrap bits do not match */ /* Check the PSR and wrap bits do not match */
......
...@@ -219,13 +219,13 @@ typedef struct _PKT_STAT_DESC_t { ...@@ -219,13 +219,13 @@ typedef struct _PKT_STAT_DESC_t {
*/ */
/* /*
* RX_STATUS_BLOCK_t is sructure representing the status of the Rx DMA engine * struct rx_status_block is a structure representing the status of the Rx
* it sits in free memory, and is pointed to by 0x101c / 0x1020 * DMA engine it sits in free memory, and is pointed to by 0x101c / 0x1020
*/ */
typedef struct _rx_status_block_t { struct rx_status_block {
u32 Word0; u32 Word0;
u32 Word1; u32 Word1;
} RX_STATUS_BLOCK_t, *PRX_STATUS_BLOCK_t; };
/* /*
* Structure for look-up table holding free buffer ring pointers * Structure for look-up table holding free buffer ring pointers
......
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