Browse Source

Enable/disable interrupts at open/close time.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
290280f90e
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/drivers/net/rtl8139.c

+ 9
- 0
src/drivers/net/rtl8139.c View File

@@ -302,6 +302,12 @@ static struct nvo_fragment rtl_nvo_fragments[] = {
302 302
  */
303 303
 static void rtl_reset ( struct rtl8139_nic *rtl ) {
304 304
 
305
+	/* Disable interrupts.  May not be necessary, but datasheet
306
+	 * doesn't say that the reset command also resets the
307
+	 * interrupt mask.
308
+	 */
309
+	outw ( 0, rtl->ioaddr + IntrMask );
310
+
305 311
 	/* Reset chip */
306 312
 	outb ( CmdReset, rtl->ioaddr + ChipCmd );
307 313
 	mdelay ( 10 );
@@ -340,6 +346,9 @@ static int rtl_open ( struct net_device *netdev ) {
340 346
 	outl ( ( ( TX_DMA_BURST << 8 ) | ( TX_IPG << 24 ) ),
341 347
 	       rtl->ioaddr + TxConfig );
342 348
 
349
+	/* Enable interrupts */
350
+	outw ( ( ROK | RER | TOK | TER ), rtl->ioaddr + IntrMask );
351
+
343 352
 	return 0;
344 353
 }
345 354
 

Loading…
Cancel
Save