瀏覽代碼

eth_ntoa and warnings fixups

tags/v0.9.3
Marty Connor 18 年之前
父節點
當前提交
9e71390930
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6
    6
      src/drivers/net/epic100.c

+ 6
- 6
src/drivers/net/epic100.c 查看文件

6
 
6
 
7
 #include "etherboot.h"
7
 #include "etherboot.h"
8
 #include <gpxe/pci.h>
8
 #include <gpxe/pci.h>
9
+#include <gpxe/ethernet.h>
9
 #include "nic.h"
10
 #include "nic.h"
10
 #include "timer.h"
11
 #include "timer.h"
11
 #include "console.h"
12
 #include "console.h"
50
 
51
 
51
 static void	epic100_open(void);
52
 static void	epic100_open(void);
52
 static void	epic100_init_ring(void);
53
 static void	epic100_init_ring(void);
53
-static void	epic100_disable(struct nic *nic, struct pci_device *pci);
54
+static void	epic100_disable(struct nic *nic);
54
 static int	epic100_poll(struct nic *nic, int retrieve);
55
 static int	epic100_poll(struct nic *nic, int retrieve);
55
 static void	epic100_transmit(struct nic *nic, const char *destaddr,
56
 static void	epic100_transmit(struct nic *nic, const char *destaddr,
56
 				 unsigned int type, unsigned int len, const char *data);
57
 				 unsigned int type, unsigned int len, const char *data);
187
     for (i = 0; i < 3; i++)
188
     for (i = 0; i < 3; i++)
188
 	*ap++ = inw(lan0 + i*4);
189
 	*ap++ = inw(lan0 + i*4);
189
 
190
 
190
-    printf(" I/O %#hX %! ", ioaddr, nic->node_addr);
191
+    DBG ( " I/O %4.4x %s ", ioaddr, eth_ntoa ( nic->node_addr ) );
191
 
192
 
192
     /* Find the connected MII xcvrs. */
193
     /* Find the connected MII xcvrs. */
193
     for (phy = 0, phy_idx = 0; phy < 32 && phy_idx < sizeof(phys); phy++) {
194
     for (phy = 0, phy_idx = 0; phy < 32 && phy_idx < sizeof(phys); phy++) {
314
     entry = cur_tx % TX_RING_SIZE;
315
     entry = cur_tx % TX_RING_SIZE;
315
 
316
 
316
     if ((tx_ring[entry].status & TRING_OWN) == TRING_OWN) {
317
     if ((tx_ring[entry].status & TRING_OWN) == TRING_OWN) {
317
-	printf("eth_transmit: Unable to transmit. status=%hX. Resetting...\n",
318
+	printf("eth_transmit: Unable to transmit. status=%4.4lx. Resetting...\n",
318
 	       tx_ring[entry].status);
319
 	       tx_ring[entry].status);
319
 
320
 
320
 	epic100_open();
321
 	epic100_open();
353
 	/* Wait */;
354
 	/* Wait */;
354
 
355
 
355
     if ((le32_to_cpu(tx_ring[entry].status) & TRING_OWN) != 0)
356
     if ((le32_to_cpu(tx_ring[entry].status) & TRING_OWN) != 0)
356
-	printf("Oops, transmitter timeout, status=%hX\n",
357
+	printf("Oops, transmitter timeout, status=%4.4lX\n",
357
 	    tx_ring[entry].status);
358
 	    tx_ring[entry].status);
358
 }
359
 }
359
 
360
 
417
 }
418
 }
418
 
419
 
419
 
420
 
420
-static void epic100_disable ( struct nic *nic __unused,
421
-			      struct pci_device *pci __unused ) {
421
+static void epic100_disable ( struct nic *nic __unused ) {
422
 	/* Soft reset the chip. */
422
 	/* Soft reset the chip. */
423
 	outl(GC_SOFT_RESET, genctl);
423
 	outl(GC_SOFT_RESET, genctl);
424
 }
424
 }

Loading…
取消
儲存