Re: [PATCH 2/2] ipg: redundancy with mii.h

From: David Vrabel
Date: Sat May 20 2006 - 17:02:44 EST


Apologies for the (very) late response.

0007-ipg-plug-leaks-in-the-error-path-of-ipg_nic_open.txt broke receive since it was skipping the initialization of the Rx buffers. Patch attached.

Did anyone manage to get a response from IC Plus regarding the required Signed-off-by line?

David Vrabel ipg: initialize Rx buffers correctly

A previous patch resulted in the initialization of the Rx buffers
being skipped.

Signed-off-by: David Vrabel <dvrabel@xxxxxxxxxx>

--- linux-source-2.6.16.orig/drivers/net/ipg.c 2006-05-20 21:38:44.604788258 +0100
+++ linux-source-2.6.16/drivers/net/ipg.c 2006-05-20 21:39:14.298898552 +0100
@@ -1298,18 +1298,16 @@
sp->RxBuffNotReady = 0;

for (i = 0; i < IPG_RFDLIST_LENGTH; i++) {
- if (!sp->RxBuff[i])
- continue;
-
- /* Free any allocated receive buffers. */
- pci_unmap_single(sp->pdev,
- sp->RxBuffDMAhandle[i].dmahandle,
- sp->RxBuffDMAhandle[i].len,
- PCI_DMA_FROMDEVICE);
-
- IPG_DEV_KFREE_SKB(sp->RxBuff[i]);
- sp->RxBuff[i] = NULL;
+ if (sp->RxBuff[i]) {
+ /* Free any allocated receive buffers. */
+ pci_unmap_single(sp->pdev,
+ sp->RxBuffDMAhandle[i].dmahandle,
+ sp->RxBuffDMAhandle[i].len,
+ PCI_DMA_FROMDEVICE);

+ IPG_DEV_KFREE_SKB(sp->RxBuff[i]);
+ sp->RxBuff[i] = NULL;
+ }
/* Clear out the RFS field. */
sp->RFDList[i].RFS = 0x0000000000000000;