Browse Source

Updated to new API.

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
091a579be1
1 changed files with 12 additions and 11 deletions
  1. 12
    11
      src/drivers/net/cs89x0.c

+ 12
- 11
src/drivers/net/cs89x0.c View File

@@ -435,10 +435,6 @@ static int cs89x0_poll(struct nic *nic, int retrieve)
435 435
 	return 1;
436 436
 }
437 437
 
438
-static void cs89x0_disable ( struct nic *nic ) {
439
-	cs89x0_reset(nic);
440
-}
441
-
442 438
 static void cs89x0_irq(struct nic *nic __unused, irq_action_t action __unused)
443 439
 {
444 440
   switch ( action ) {
@@ -456,7 +452,6 @@ static struct nic_operations cs89x0_operations = {
456 452
 	.poll		= cs89x0_poll,
457 453
 	.transmit	= cs89x0_transmit,
458 454
 	.irq		= cs89x0_irq,
459
-	.disable	= cs89x0_disable,
460 455
 };
461 456
 
462 457
 /**************************************************************************
@@ -480,15 +475,13 @@ static int cs89x0_probe_addr ( isa_probe_addr_t ioaddr ) {
480 475
 	return 1;
481 476
 }
482 477
 
483
-static int cs89x0_probe ( struct dev *dev, struct isa_device *isa ) {
484
-	struct nic *nic = nic_device ( dev );
485
-
478
+static int cs89x0_probe ( struct nic *nic, struct isa_device *isa ) {
486 479
 	int      i, result = -1;
487 480
 	unsigned rev_type = 0, isa_cnf, cs_revision;
488 481
 	unsigned short eeprom_buff[CHKSUM_LEN];
489 482
 
490
-	nic->ioaddr = ( isa->ioaddr & ~1 );
491
-	nic->irqno  = 0;
483
+	isa_fill_nic ( nic, isa );
484
+	nic->ioaddr &= ~1; /* LSB = 1 indicates a more aggressive probe */
492 485
 
493 486
 	eth_nic_base = nic->ioaddr;
494 487
 
@@ -684,6 +677,11 @@ static int cs89x0_probe ( struct dev *dev, struct isa_device *isa ) {
684 677
 	nic->nic_op   = &cs89x0_operations;
685 678
 	return 1;
686 679
 }
680
+
681
+static void cs89x0_disable ( struct nic *nic,
682
+			     struct isa_device *isa __unused ) {
683
+	cs89x0_reset(nic);
684
+}
687 685
 	
688 686
 static isa_probe_addr_t cs89x0_probe_addrs[] = { 
689 687
 #ifndef EMBEDDED
@@ -699,9 +697,12 @@ static isa_probe_addr_t cs89x0_probe_addrs[] = {
699 697
 };
700 698
 
701 699
 static struct isa_driver cs89x0_driver =
702
-	ISA_DRIVER ( "CS89x0", cs89x0_probe_addrs, cs89x0_probe_addr,
700
+	ISA_DRIVER ( cs89x0_probe_addrs, cs89x0_probe_addr,
703 701
 		     ISAPNP_VENDOR('C','S','C'), 0x0007 );
704 702
 
703
+DRIVER ( "cs89x0", nic_driver, isa_driver, cs89x0_driver,
704
+	 cs89x0_probe, cs89x0_disable );
705
+
705 706
 ISA_ROM ( "cs89x0", "Crystal Semiconductor CS89x0" );
706 707
 
707 708
 /*

Loading…
Cancel
Save