Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186700
b: refs/heads/master
c: 8f12785
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 0bcf866 commit aa766a2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ba64c1ba5f26a445255dd7684c175e298d84d07
refs/heads/master: 8f12785dd008f4ad94e3c9aad00517e082563935
54 changes: 27 additions & 27 deletions trunk/drivers/staging/et131x/et1310_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
u32 i, j;
u32 bufsize;
u32 pktStatRingSize, FBRChunkSize;
RX_RING_t *rx_ring;
struct rx_ring *rx_ring;

/* Setup some convenience pointers */
rx_ring = (RX_RING_t *) &adapter->RxRing;
rx_ring = &adapter->rx_ring;

/* Alloc memory for the lookup table */
#ifdef USE_FBR0
Expand Down Expand Up @@ -162,10 +162,10 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
}

#ifdef USE_FBR0
adapter->RxRing.PsrNumEntries = adapter->RxRing.Fbr0NumEntries +
adapter->RxRing.Fbr1NumEntries;
adapter->rx_ring.PsrNumEntries = adapter->rx_ring.Fbr0NumEntries +
adapter->rx_ring.Fbr1NumEntries;
#else
adapter->RxRing.PsrNumEntries = adapter->RxRing.Fbr1NumEntries;
adapter->rx_ring.PsrNumEntries = adapter->rx_ring.Fbr1NumEntries;
#endif

/* Allocate an area of memory for Free Buffer Ring 1 */
Expand Down Expand Up @@ -338,7 +338,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)

/* Allocate an area of memory for FIFO of Packet Status ring entries */
pktStatRingSize =
sizeof(struct pkt_stat_desc) * adapter->RxRing.PsrNumEntries;
sizeof(struct pkt_stat_desc) * adapter->rx_ring.PsrNumEntries;

rx_ring->pPSRingVa = pci_alloc_consistent(adapter->pdev,
pktStatRingSize,
Expand Down Expand Up @@ -402,10 +402,10 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
u32 bufsize;
u32 pktStatRingSize;
PMP_RFD rfd;
RX_RING_t *rx_ring;
struct rx_ring *rx_ring;

/* Setup some convenience pointers */
rx_ring = (RX_RING_t *) &adapter->RxRing;
rx_ring = &adapter->rx_ring;

/* Free RFDs and associated packet descriptors */
WARN_ON(rx_ring->nReadyRecv != rx_ring->NumRfd);
Expand All @@ -416,7 +416,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)

list_del(&rfd->list_node);
rfd->Packet = NULL;
kmem_cache_free(adapter->RxRing.RecvLookaside, rfd);
kmem_cache_free(adapter->rx_ring.RecvLookaside, rfd);
}

/* Free Free Buffer Ring 1 */
Expand Down Expand Up @@ -496,7 +496,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
/* Free Packet Status Ring */
if (rx_ring->pPSRingVa) {
pktStatRingSize =
sizeof(struct pkt_stat_desc) * adapter->RxRing.PsrNumEntries;
sizeof(struct pkt_stat_desc) * adapter->rx_ring.PsrNumEntries;

pci_free_consistent(adapter->pdev, pktStatRingSize,
rx_ring->pPSRingVa, rx_ring->pPSRingPa);
Expand Down Expand Up @@ -545,10 +545,10 @@ int et131x_init_recv(struct et131x_adapter *adapter)
PMP_RFD rfd = NULL;
u32 rfdct;
u32 numrfd = 0;
RX_RING_t *rx_ring = NULL;
struct rx_ring *rx_ring;

/* Setup some convenience pointers */
rx_ring = (RX_RING_t *) &adapter->RxRing;
rx_ring = &adapter->rx_ring;

/* Setup each RFD */
for (rfdct = 0; rfdct < rx_ring->NumRfd; rfdct++) {
Expand Down Expand Up @@ -592,7 +592,7 @@ int et131x_init_recv(struct et131x_adapter *adapter)
void ConfigRxDmaRegs(struct et131x_adapter *etdev)
{
struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma;
struct _rx_ring_t *rx_local = &etdev->RxRing;
struct rx_ring *rx_local = &etdev->rx_ring;
struct fbr_desc *fbr_entry;
u32 entry;
u32 psr_num_des;
Expand Down Expand Up @@ -741,19 +741,19 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev)
/* Setup the receive dma configuration register for normal operation */
u32 csr = 0x2000; /* FBR1 enable */

if (etdev->RxRing.Fbr1BufferSize == 4096)
if (etdev->rx_ring.Fbr1BufferSize == 4096)
csr |= 0x0800;
else if (etdev->RxRing.Fbr1BufferSize == 8192)
else if (etdev->rx_ring.Fbr1BufferSize == 8192)
csr |= 0x1000;
else if (etdev->RxRing.Fbr1BufferSize == 16384)
else if (etdev->rx_ring.Fbr1BufferSize == 16384)
csr |= 0x1800;
#ifdef USE_FBR0
csr |= 0x0400; /* FBR0 enable */
if (etdev->RxRing.Fbr0BufferSize == 256)
if (etdev->rx_ring.Fbr0BufferSize == 256)
csr |= 0x0100;
else if (etdev->RxRing.Fbr0BufferSize == 512)
else if (etdev->rx_ring.Fbr0BufferSize == 512)
csr |= 0x0200;
else if (etdev->RxRing.Fbr0BufferSize == 1024)
else if (etdev->rx_ring.Fbr0BufferSize == 1024)
csr |= 0x0300;
#endif
writel(csr, &etdev->regs->rxdma.csr);
Expand Down Expand Up @@ -783,7 +783,7 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev)
*/
PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
{
struct _rx_ring_t *rx_local = &etdev->RxRing;
struct rx_ring *rx_local = &etdev->rx_ring;
struct rx_status_block *status;
struct pkt_stat_desc *psr;
PMP_RFD rfd;
Expand Down Expand Up @@ -1006,7 +1006,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
*/
void et131x_reset_recv(struct et131x_adapter *etdev)
{
WARN_ON(list_empty(&etdev->RxRing.RecvList));
WARN_ON(list_empty(&etdev->rx_ring.RecvList));

}

Expand All @@ -1024,8 +1024,8 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev)

/* Process up to available RFD's */
while (count < NUM_PACKETS_HANDLED) {
if (list_empty(&etdev->RxRing.RecvList)) {
WARN_ON(etdev->RxRing.nReadyRecv != 0);
if (list_empty(&etdev->rx_ring.RecvList)) {
WARN_ON(etdev->rx_ring.nReadyRecv != 0);
done = false;
break;
}
Expand All @@ -1050,20 +1050,20 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev)
etdev->Stats.ipackets++;

/* Set the status on the packet, either resources or success */
if (etdev->RxRing.nReadyRecv < RFD_LOW_WATER_MARK) {
if (etdev->rx_ring.nReadyRecv < RFD_LOW_WATER_MARK) {
dev_warn(&etdev->pdev->dev,
"RFD's are running out\n");
}
count++;
}

if (count == NUM_PACKETS_HANDLED || !done) {
etdev->RxRing.UnfinishedReceives = true;
etdev->rx_ring.UnfinishedReceives = true;
writel(PARM_TX_TIME_INT_DEF * NANO_IN_A_MICRO,
&etdev->regs->global.watchdog_timer);
} else
/* Watchdog timer will disable itself if appropriate. */
etdev->RxRing.UnfinishedReceives = false;
etdev->rx_ring.UnfinishedReceives = false;
}

static inline u32 bump_fbr(u32 *fbr, u32 limit)
Expand Down Expand Up @@ -1091,7 +1091,7 @@ static inline u32 bump_fbr(u32 *fbr, u32 limit)
*/
void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
{
struct _rx_ring_t *rx_local = &etdev->RxRing;
struct rx_ring *rx_local = &etdev->rx_ring;
struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma;
u16 bi = rfd->bufferindex;
u8 ri = rfd->ringindex;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/et131x/et1310_rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ struct fbr_lookup {
};

/*
* RX_RING_t is sructure representing the adaptor's local reference(s) to the
* rings
* struct rx_ring is the ssructure representing the adaptor's local
* reference(s) to the rings
*/
typedef struct _rx_ring_t {
struct rx_ring {
#ifdef USE_FBR0
void *pFbr0RingVa;
dma_addr_t pFbr0RingPa;
Expand Down Expand Up @@ -239,7 +239,7 @@ typedef struct _rx_ring_t {

/* lookaside lists */
struct kmem_cache *RecvLookaside;
} RX_RING_t, *PRX_RING_t;
};

/* Forward reference of RFD */
struct _MP_RFD;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/et131x/et131x_adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ struct et131x_adapter {
struct tx_ring tx_ring;

/* Rx Memory Variables */
RX_RING_t RxRing;
struct rx_ring rx_ring;

/* Loopback specifics */
u8 ReplicaPhyLoopbk; /* Replica Enable */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/et131x/et131x_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ irqreturn_t et131x_isr(int irq, void *dev_id)
if (++tcb->stale > 1)
status |= ET_INTR_TXDMA_ISR;

if (adapter->RxRing.UnfinishedReceives)
if (adapter->rx_ring.UnfinishedReceives)
status |= ET_INTR_RXDMA_XFR_DONE;
else if (tcb == NULL)
writel(0, &adapter->regs->global.watchdog_timer);
Expand Down

0 comments on commit aa766a2

Please sign in to comment.