From 861db030d1931e500b654cc707b1a2a15c38986e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 6 Oct 2009 15:49:36 +0100 Subject: [PATCH] --- yaml --- r: 175143 b: refs/heads/master c: 9251d71a4ec3e20189bb182cdc3af00f1152da81 h: refs/heads/master i: 175141: 81dfe16e8a7ab3179598b9780c639ec46802e8f9 175139: 159fc4a7d25d06855ef9725a75dc900e40f91f46 175135: 093774e717a5ad91abfe2b80b33b6c9951f8b6ce v: v3 --- [refs] | 2 +- trunk/drivers/staging/et131x/et1310_tx.c | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index e0259b5684ec..c480fdbaabf8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c1996fc2ee1df6ecefe9f950f196cfc9b1d403e4 +refs/heads/master: 9251d71a4ec3e20189bb182cdc3af00f1152da81 diff --git a/trunk/drivers/staging/et131x/et1310_tx.c b/trunk/drivers/staging/et131x/et1310_tx.c index 5fe72ba652f8..e9f30b5a3564 100644 --- a/trunk/drivers/staging/et131x/et1310_tx.c +++ b/trunk/drivers/staging/et131x/et1310_tx.c @@ -282,23 +282,19 @@ void et131x_init_send(struct et131x_adapter *adapter) tx_ring->TCBReadyQueueHead = tcb; - /* Go through and set up each TCB */ - for (ct = 0; ct < NUM_TCB; ct++) { - memset(tcb, 0, sizeof(struct tcb)); + memset(tcb, 0, sizeof(struct tcb) * NUM_TCB); + /* Go through and set up each TCB */ + for (ct = 0; ct++ < NUM_TCB; tcb++) { /* Set the link pointer in HW TCB to the next TCB in the * chain. If this is the last TCB in the chain, also set the * tail pointer. */ - if (ct < NUM_TCB - 1) - tcb->Next = tcb + 1; - else { - tx_ring->TCBReadyQueueTail = tcb; - tcb->Next = NULL; - } + tcb->Next = tcb + 1; - tcb++; - } + tcb--; + tx_ring->TCBReadyQueueTail = tcb; + tcb->Next = NULL; /* Curr send queue should now be empty */ tx_ring->CurrSendHead = NULL; tx_ring->CurrSendTail = NULL;