Procházet zdrojové kódy

eth_ntoa and warnings cleanup

tags/v0.9.3
Marty Connor před 18 roky
rodič
revize
727a88709e
1 změnil soubory, kde provedl 8 přidání a 7 odebrání
  1. 8
    7
      src/drivers/net/via-rhine.c

+ 8
- 7
src/drivers/net/via-rhine.c Zobrazit soubor

@@ -49,6 +49,7 @@ static const char *version = "rhine.c v1.0.2 2004-10-29\n";
49 49
 #include "etherboot.h"
50 50
 #include "nic.h"
51 51
 #include <gpxe/pci.h>
52
+#include <gpxe/ethernet.h>
52 53
 #include "timer.h"
53 54
 
54 55
 /* define all ioaddr */
@@ -691,7 +692,7 @@ static int ReadMII (int byMIIIndex, int);
691 692
 static void WriteMII (char, char, char, int);
692 693
 static void MIIDelay (void);
693 694
 static void rhine_init_ring (struct nic *dev);
694
-static void rhine_disable (struct nic *nic, struct pci_device *pci);
695
+static void rhine_disable (struct nic *nic);
695 696
 static void rhine_reset (struct nic *nic);
696 697
 static int rhine_poll (struct nic *nic, int retreive);
697 698
 static void rhine_transmit (struct nic *nic, const char *d, unsigned int t,
@@ -1073,11 +1074,12 @@ rhine_probe1 (struct nic *nic, struct pci_device *pci, int ioaddr, int chip_id,
1073 1074
     /* Perhaps this should be read from the EEPROM? */
1074 1075
     for (i = 0; i < ETH_ALEN; i++)
1075 1076
 	nic->node_addr[i] = inb (byPAR0 + i);
1076
-    printf ("IO address %hX Ethernet Address: %!\n", ioaddr, nic->node_addr);
1077
+
1078
+    DBG ( "IO address %#hX Ethernet Address: %s\n", ioaddr, eth_ntoa ( nic->node_addr ) );
1077 1079
 
1078 1080
     /* restart MII auto-negotiation */
1079 1081
     WriteMII (0, 9, 1, ioaddr);
1080
-    printf ("Analyzing Media type,this will take several seconds........");
1082
+    printf ("Analyzing Media type,this may take several seconds... ");
1081 1083
     for (i = 0; i < 5; i++)
1082 1084
     {
1083 1085
 	/* need to wait 1 millisecond - we will round it up to 50-100ms */
@@ -1087,9 +1089,9 @@ rhine_probe1 (struct nic *nic, struct pci_device *pci, int ioaddr, int chip_id,
1087 1089
 	if (ReadMII (1, ioaddr) & 0x0020)
1088 1090
 	    break;
1089 1091
     }
1090
-    printf ("OK\n");
1092
+    printf ("OK.\n");
1091 1093
 
1092
-#if	0
1094
+#if 0
1093 1095
 	/* JJM : for Debug */
1094 1096
 	printf("MII : Address %hhX ",inb(ioaddr+0x6c));
1095 1097
 	{
@@ -1163,12 +1165,11 @@ rhine_probe1 (struct nic *nic, struct pci_device *pci, int ioaddr, int chip_id,
1163 1165
 }
1164 1166
 
1165 1167
 static void 
1166
-rhine_disable ( struct nic *nic, struct pci_device *pci __unused ) {
1168
+rhine_disable ( struct nic *nic ) {
1167 1169
 
1168 1170
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1169 1171
     int ioaddr = tp->ioaddr;
1170 1172
 
1171
-    /* merge reset and disable */
1172 1173
     rhine_reset(nic);
1173 1174
 
1174 1175
     printf ("rhine disable\n");

Načítá se…
Zrušit
Uložit