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
  */
302
  */
303
 static void rtl_reset ( struct rtl8139_nic *rtl ) {
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
 	/* Reset chip */
311
 	/* Reset chip */
306
 	outb ( CmdReset, rtl->ioaddr + ChipCmd );
312
 	outb ( CmdReset, rtl->ioaddr + ChipCmd );
307
 	mdelay ( 10 );
313
 	mdelay ( 10 );
340
 	outl ( ( ( TX_DMA_BURST << 8 ) | ( TX_IPG << 24 ) ),
346
 	outl ( ( ( TX_DMA_BURST << 8 ) | ( TX_IPG << 24 ) ),
341
 	       rtl->ioaddr + TxConfig );
347
 	       rtl->ioaddr + TxConfig );
342
 
348
 
349
+	/* Enable interrupts */
350
+	outw ( ( ROK | RER | TOK | TER ), rtl->ioaddr + IntrMask );
351
+
343
 	return 0;
352
 	return 0;
344
 }
353
 }
345
 
354
 

Loading…
Cancel
Save