diff options
author | Marty Connor | 2006-09-25 05:21:25 +0200 |
---|---|---|
committer | Marty Connor | 2006-09-25 05:21:25 +0200 |
commit | eefac0e2581aabbc349e50e9ca0f309a03b6d0ef (patch) | |
tree | 688a46ddbebb7ff40b9a5a4b86278fe09da27058 /src/drivers/net | |
parent | eth_ntoa and warnings fixups (diff) | |
download | ipxe-eefac0e2581aabbc349e50e9ca0f309a03b6d0ef.tar.gz ipxe-eefac0e2581aabbc349e50e9ca0f309a03b6d0ef.tar.xz ipxe-eefac0e2581aabbc349e50e9ca0f309a03b6d0ef.zip |
eth_ntoa and warnings fixups
Diffstat (limited to 'src/drivers/net')
-rw-r--r-- | src/drivers/net/natsemi.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c index e80935bd..d8b1d208 100644 --- a/src/drivers/net/natsemi.c +++ b/src/drivers/net/natsemi.c @@ -55,7 +55,9 @@ #include "etherboot.h" #include "nic.h" +#include "pcibios.h" #include <gpxe/pci.h> +#include <gpxe/ethernet.h> /* defines */ @@ -222,7 +224,7 @@ static void natsemi_set_rx_mode(struct nic *nic); static void natsemi_check_duplex(struct nic *nic); static void natsemi_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); static int natsemi_poll(struct nic *nic, int retrieve); -static void natsemi_disable(struct nic *nic, struct pci_device *pci); +static void natsemi_disable(struct nic *nic); static void natsemi_irq(struct nic *nic, irq_action_t action); /* @@ -244,7 +246,7 @@ natsemi_probe ( struct nic *nic, struct pci_device *pci ) { int i; int prev_eedata; - u32 tmp; + uint32_t tmp; if (pci->ioaddr == 0) return 0; @@ -266,7 +268,7 @@ natsemi_probe ( struct nic *nic, struct pci_device *pci ) { * in PCI config space. Some boards apparently need * to be brought to D0 in this manner. */ - pci_read_config_dword(pci, PCIPM, &tmp); + pci_read_config_dword ( pci, PCIPM, &tmp ); if (tmp & (0x03|0x100)) { /* D0 state, disable PME assertion */ u32 newtmp = tmp & ~(0x03|0x100); @@ -283,9 +285,9 @@ natsemi_probe ( struct nic *nic, struct pci_device *pci ) { prev_eedata = eedata; } - printf("\nnatsemi_probe: MAC addr %! at ioaddr %#hX\n", - nic->node_addr, ioaddr); - printf("natsemi_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id); + DBG ( "\nnatsemi_probe: MAC addr %s at ioaddr %4.4lx\n", + eth_ntoa ( nic->node_addr ), ioaddr); + DBG ( "natsemi_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id ); /* Reset the chip to erase any previous misconfiguration. */ outl(ChipReset, ioaddr + ChipCmd); @@ -507,7 +509,7 @@ natsemi_init_txd(struct nic *nic __unused) /* load Transmit Descriptor Register */ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); if (natsemi_debug > 1) - printf("natsemi_init_txd: TX descriptor register loaded with: %X\n", + printf("natsemi_init_txd: TX descriptor register loaded with: %lx\n", inl(ioaddr + TxRingPtr)); } @@ -533,7 +535,7 @@ natsemi_init_rxd(struct nic *nic __unused) rxd[i].cmdsts = (u32) RX_BUF_SIZE; rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); if (natsemi_debug > 1) - printf("natsemi_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", + printf("natsemi_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%4.4x\n", i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); } @@ -541,7 +543,7 @@ natsemi_init_rxd(struct nic *nic __unused) outl(virt_to_bus(&rxd[0]), ioaddr + RxRingPtr); if (natsemi_debug > 1) - printf("natsemi_init_rxd: RX descriptor register loaded with: %X\n", + printf("natsemi_init_rxd: RX descriptor register loaded with: %lx\n", inl(ioaddr + RxRingPtr)); } @@ -611,7 +613,7 @@ natsemi_transmit(struct nic *nic, /* load Transmit Descriptor Register */ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); if (natsemi_debug > 1) - printf("natsemi_transmit: TX descriptor register loaded with: %X\n", + printf("natsemi_transmit: TX descriptor register loaded with: %lx\n", inl(ioaddr + TxRingPtr)); memcpy(txb, d, ETH_ALEN); @@ -722,7 +724,7 @@ natsemi_poll(struct nic *nic, int retrieve) */ static void -natsemi_disable ( struct nic *nic, struct pci_device *pci __unused ) { +natsemi_disable ( struct nic *nic ) { natsemi_init(nic); |