[realtek] realtek 8139 v1.17 driver

jhorton@equiinet.com jhorton@equiinet.com
Wed Feb 27 05:49:01 2002


This is a multi-part message in MIME format.
--------------652CB49DC4418253DD3EA8D9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
I have been using an rtl8139 with the 1.17 driver and have found that it

locks up when under stress. Looking at the mailing list, this seems to
be a known problem and the workaround is to down and up the interface
again.
In my case I have found that the card locks up when the status in the
interrupt handler function is 0x20 or 0x21.
Has anyone else seen this problem with the 1.17 driver?
I have attached a diff which seems to solve the problem when using the
1.17 driver. I would appreciate feedback as to whether my approach is
appropriate here (I re-enable the Rx and Tx and I am sure that you are
all far more familiar with this hardware than I am - so can probably
think of something better!!)

Thanks
John

--------------652CB49DC4418253DD3EA8D9
Content-Type: text/plain; charset=us-ascii;
 name="rtl8139.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="rtl8139.diff"

--- rtl8139_v17.c	Wed Feb 27 09:59:33 2002
+++ rtl8139.c	Wed Feb 27 09:18:25 2002
@@ -1110,6 +1110,14 @@
 			if (tp->msg_level & NETIF_MSG_DRV)
 				printk(KERN_NOTICE"%s: Abnormal interrupt, status %8.8x.\n",
 					   dev->name, status);
+			if(status==RxUnderrun||status==(RxUnderrun|RxOK)){
+				printk("resetting hardware\n");
+				/*rtl_hw_start(dev);*/
+				tp->cur_rx = 0;
+				outb(CmdTxEnb,ioaddr + ChipCmd);
+				set_rx_mode(dev);
+				outb(CmdRxEnb | CmdTxEnb,ioaddr + ChipCmd);
+			}
 
 			if (status == 0xffff)
 				break;

--------------652CB49DC4418253DD3EA8D9--