#include "etherboot.h"
#include "nic.h"
#include <gpxe/pci.h>
+#include <gpxe/ethernet.h>
#include "timer.h"
/* define all ioaddr */
static void WriteMII (char, char, char, int);
static void MIIDelay (void);
static void rhine_init_ring (struct nic *dev);
-static void rhine_disable (struct nic *nic, struct pci_device *pci);
+static void rhine_disable (struct nic *nic);
static void rhine_reset (struct nic *nic);
static int rhine_poll (struct nic *nic, int retreive);
static void rhine_transmit (struct nic *nic, const char *d, unsigned int t,
/* Perhaps this should be read from the EEPROM? */
for (i = 0; i < ETH_ALEN; i++)
nic->node_addr[i] = inb (byPAR0 + i);
- printf ("IO address %hX Ethernet Address: %!\n", ioaddr, nic->node_addr);
+
+ DBG ( "IO address %#hX Ethernet Address: %s\n", ioaddr, eth_ntoa ( nic->node_addr ) );
/* restart MII auto-negotiation */
WriteMII (0, 9, 1, ioaddr);
- printf ("Analyzing Media type,this will take several seconds........");
+ printf ("Analyzing Media type,this may take several seconds... ");
for (i = 0; i < 5; i++)
{
/* need to wait 1 millisecond - we will round it up to 50-100ms */
if (ReadMII (1, ioaddr) & 0x0020)
break;
}
- printf ("OK\n");
+ printf ("OK.\n");
-#if 0
+#if 0
/* JJM : for Debug */
printf("MII : Address %hhX ",inb(ioaddr+0x6c));
{
}
static void
-rhine_disable ( struct nic *nic, struct pci_device *pci __unused ) {
+rhine_disable ( struct nic *nic ) {
struct rhine_private *tp = (struct rhine_private *) nic->priv_data;
int ioaddr = tp->ioaddr;
- /* merge reset and disable */
rhine_reset(nic);
printf ("rhine disable\n");