Browse Source

eth_ntoa and warnings cleanup

tags/v0.9.3
Marty Connor 18 years ago
parent
commit
727a88709e
1 changed files with 8 additions and 7 deletions
  1. 8
    7
      src/drivers/net/via-rhine.c

+ 8
- 7
src/drivers/net/via-rhine.c View File

49
 #include "etherboot.h"
49
 #include "etherboot.h"
50
 #include "nic.h"
50
 #include "nic.h"
51
 #include <gpxe/pci.h>
51
 #include <gpxe/pci.h>
52
+#include <gpxe/ethernet.h>
52
 #include "timer.h"
53
 #include "timer.h"
53
 
54
 
54
 /* define all ioaddr */
55
 /* define all ioaddr */
691
 static void WriteMII (char, char, char, int);
692
 static void WriteMII (char, char, char, int);
692
 static void MIIDelay (void);
693
 static void MIIDelay (void);
693
 static void rhine_init_ring (struct nic *dev);
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
 static void rhine_reset (struct nic *nic);
696
 static void rhine_reset (struct nic *nic);
696
 static int rhine_poll (struct nic *nic, int retreive);
697
 static int rhine_poll (struct nic *nic, int retreive);
697
 static void rhine_transmit (struct nic *nic, const char *d, unsigned int t,
698
 static void rhine_transmit (struct nic *nic, const char *d, unsigned int t,
1073
     /* Perhaps this should be read from the EEPROM? */
1074
     /* Perhaps this should be read from the EEPROM? */
1074
     for (i = 0; i < ETH_ALEN; i++)
1075
     for (i = 0; i < ETH_ALEN; i++)
1075
 	nic->node_addr[i] = inb (byPAR0 + i);
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
     /* restart MII auto-negotiation */
1080
     /* restart MII auto-negotiation */
1079
     WriteMII (0, 9, 1, ioaddr);
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
     for (i = 0; i < 5; i++)
1083
     for (i = 0; i < 5; i++)
1082
     {
1084
     {
1083
 	/* need to wait 1 millisecond - we will round it up to 50-100ms */
1085
 	/* need to wait 1 millisecond - we will round it up to 50-100ms */
1087
 	if (ReadMII (1, ioaddr) & 0x0020)
1089
 	if (ReadMII (1, ioaddr) & 0x0020)
1088
 	    break;
1090
 	    break;
1089
     }
1091
     }
1090
-    printf ("OK\n");
1092
+    printf ("OK.\n");
1091
 
1093
 
1092
-#if	0
1094
+#if 0
1093
 	/* JJM : for Debug */
1095
 	/* JJM : for Debug */
1094
 	printf("MII : Address %hhX ",inb(ioaddr+0x6c));
1096
 	printf("MII : Address %hhX ",inb(ioaddr+0x6c));
1095
 	{
1097
 	{
1163
 }
1165
 }
1164
 
1166
 
1165
 static void 
1167
 static void 
1166
-rhine_disable ( struct nic *nic, struct pci_device *pci __unused ) {
1168
+rhine_disable ( struct nic *nic ) {
1167
 
1169
 
1168
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1170
     struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
1169
     int ioaddr = tp->ioaddr;
1171
     int ioaddr = tp->ioaddr;
1170
 
1172
 
1171
-    /* merge reset and disable */
1172
     rhine_reset(nic);
1173
     rhine_reset(nic);
1173
 
1174
 
1174
     printf ("rhine disable\n");
1175
     printf ("rhine disable\n");

Loading…
Cancel
Save