瀏覽代碼

warnings cleanup

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

+ 15
- 14
src/drivers/net/sis900.c 查看文件

@@ -44,10 +44,10 @@
44 44
 /* Includes */
45 45
 
46 46
 #include "etherboot.h"
47
-#include "nic.h"
47
+#include "dev.h"
48 48
 #include <gpxe/pci.h>
49
+#include "nic.h"
49 50
 #include "timer.h"
50
-#include "dev.h"
51 51
 
52 52
 #include "sis900.h"
53 53
 
@@ -121,15 +121,16 @@ static struct mii_phy {
121 121
 } mii;
122 122
 
123 123
 
124
+
125
+#if 0
124 126
 // PCI to ISA bridge for SIS640E access
125 127
 static struct pci_device_id pci_isa_bridge_list[] = {
126 128
 	{ .vendor = 0x1039, .device = 0x0008,
127 129
 		.name = "SIS 85C503/5513 PCI to ISA bridge"},
128 130
 };
129 131
 
130
-PCI_DRIVER ( sis_bridge_pci_driver, pci_isa_bridge_list, PCI_NO_CLASS );
132
+PCI_DRIVER( sis_bridge_pci_driver, pci_isa_bridge_list, PCI_NO_CLASS );
131 133
 
132
-#if 0
133 134
 static struct device_driver sis_bridge_driver = {
134 135
     .name = "SIS ISA bridge",
135 136
     .bus_driver = &pci_driver,
@@ -162,7 +163,7 @@ static void sis900_transmit(struct nic *nic, const char *d,
162 163
                             unsigned int t, unsigned int s, const char *p);
163 164
 static int  sis900_poll(struct nic *nic, int retrieve);
164 165
 
165
-static void sis900_disable(struct nic *nic, struct pci_device *pci);
166
+static void sis900_disable(struct nic *nic);
166 167
 
167 168
 static void sis900_irq(struct nic *nic, irq_action_t action);
168 169
 
@@ -251,7 +252,9 @@ static int sis630e_get_mac_addr(struct pci_device * pci_dev __unused, struct nic
251 252
 {
252 253
 	u8 reg;
253 254
 	int i;
255
+#if 0
254 256
 	struct bus_loc bus_loc;
257
+#endif
255 258
 	union {
256 259
 	    struct bus_dev bus_dev;
257 260
 	    struct pci_device isa_bridge;
@@ -376,9 +379,7 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) {
376 379
     if (revision == SIS630ET_900_REV)
377 380
 	outl(ACCESSMODE | inl(ioaddr + cr), ioaddr + cr);
378 381
 
379
-    printf("\nsis900_probe: MAC addr %! at ioaddr %#hX\n",
380
-           nic->node_addr, ioaddr);
381
-    printf("sis900_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id);
382
+    DBG( "sis900_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id );
382 383
 
383 384
     /* probe for mii transceiver */
384 385
     /* search for total of 32 possible mii phy addresses */
@@ -693,7 +694,7 @@ sis900_init_rxfilter(struct nic *nic)
693 694
         outl(w, ioaddr + rfdr);
694 695
 
695 696
         if (sis900_debug > 0)
696
-            printf("sis900_init_rxfilter: Receive Filter Addrss[%d]=%X\n",
697
+            printf("sis900_init_rxfilter: Receive Filter Addrss[%d]=%lX\n",
697 698
                    i, inl(ioaddr + rfdr));
698 699
     }
699 700
 
@@ -722,7 +723,7 @@ sis900_init_txd(struct nic *nic __unused)
722 723
     /* load Transmit Descriptor Register */
723 724
     outl(virt_to_bus(&txd), ioaddr + txdp); 
724 725
     if (sis900_debug > 0)
725
-        printf("sis900_init_txd: TX descriptor register loaded with: %X\n", 
726
+        printf("sis900_init_txd: TX descriptor register loaded with: %lX\n", 
726 727
                inl(ioaddr + txdp));
727 728
 }
728 729
 
@@ -749,7 +750,7 @@ sis900_init_rxd(struct nic *nic __unused)
749 750
         rxd[i].cmdsts = (u32) RX_BUF_SIZE;
750 751
         rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]);
751 752
         if (sis900_debug > 0)
752
-            printf("sis900_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", 
753
+            printf("sis900_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%X\n", 
753 754
                    i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr);
754 755
     }
755 756
 
@@ -757,7 +758,7 @@ sis900_init_rxd(struct nic *nic __unused)
757 758
     outl(virt_to_bus(&rxd[0]), ioaddr + rxdp);
758 759
 
759 760
     if (sis900_debug > 0)
760
-        printf("sis900_init_rxd: RX descriptor register loaded with: %X\n", 
761
+        printf("sis900_init_rxd: RX descriptor register loaded with: %lX\n", 
761 762
                inl(ioaddr + rxdp));
762 763
 
763 764
 }
@@ -1110,7 +1111,7 @@ sis900_transmit(struct nic  *nic,
1110 1111
     /* load Transmit Descriptor Register */
1111 1112
     outl(virt_to_bus(&txd), ioaddr + txdp); 
1112 1113
     if (sis900_debug > 1)
1113
-        printf("sis900_transmit: TX descriptor register loaded with: %X\n", 
1114
+        printf("sis900_transmit: TX descriptor register loaded with: %lX\n", 
1114 1115
                inl(ioaddr + txdp));
1115 1116
 
1116 1117
     memcpy(txb, d, ETH_ALEN);
@@ -1227,7 +1228,7 @@ sis900_poll(struct nic *nic, int retrieve)
1227 1228
  */
1228 1229
 
1229 1230
 static void
1230
-sis900_disable ( struct nic *nic, struct pci_device *pci __unused ) {
1231
+sis900_disable ( struct nic *nic ) {
1231 1232
 
1232 1233
     sis900_init(nic);
1233 1234
 

Loading…
取消
儲存