Browse Source

enabled interrupt in natsemi.c

tags/v0.9.3
Udayan Kumar 18 years ago
parent
commit
0d4ecfa63c
1 changed files with 16 additions and 0 deletions
  1. 16
    0
      src/drivers/net/natsemi.c

+ 16
- 0
src/drivers/net/natsemi.c View File

@@ -200,6 +200,14 @@ enum desc_status_bits {
200 200
     RxTooLong = 0x00400000
201 201
 };
202 202
 
203
+/*Bits in Interrupt Mask register */
204
+
205
+enum Intr_mask_register_bits {
206
+    RxOk       = 0x001,
207
+    RxErr      = 0x004,
208
+    TxOk       = 0x040,
209
+    TxErr      = 0x100 
210
+};	
203 211
 
204 212
 
205 213
 /*  EEPROM access , values are devices specific*/
@@ -407,6 +415,12 @@ static int nat_open ( struct net_device *netdev ) {
407 415
 	/*start the receiver  */
408 416
         outl(RxOn, nat->ioaddr + ChipCmd);
409 417
 
418
+	/*enable interrupts*/
419
+	outl((RxOk|RxErr|TxOk|TxErr),nat->ioaddr + IntrMask); 
420
+	outl(1,nat->ioaddr +IntrEnable);
421
+
422
+
423
+
410 424
 
411 425
 	return 0;
412 426
 }
@@ -430,6 +444,8 @@ static void nat_close ( struct net_device *netdev ) {
430 444
 		
431 445
 		free_iob( nat->iobuf[i] );
432 446
 	}
447
+	/* disable interrupts */
448
+	outl(0,nat->ioaddr +IntrEnable);
433 449
 }
434 450
 
435 451
 /** 

Loading…
Cancel
Save