|
@@ -32,6 +32,7 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02
|
32
|
32
|
#include "etherboot.h"
|
33
|
33
|
#include "nic.h"
|
34
|
34
|
#include "ns8390.h"
|
|
35
|
+#include <gpxe/ethernet.h>
|
35
|
36
|
#ifdef INCLUDE_NS8390
|
36
|
37
|
#include <gpxe/pci.h>
|
37
|
38
|
#else
|
|
@@ -588,7 +589,6 @@ static int ns8390_poll(struct nic *nic, int retrieve)
|
588
|
589
|
NS8390_DISABLE - Turn off adapter
|
589
|
590
|
**************************************************************************/
|
590
|
591
|
static void ns8390_disable ( struct nic *nic ) {
|
591
|
|
- /* reset and disable merge */
|
592
|
592
|
ns8390_reset(nic);
|
593
|
593
|
}
|
594
|
594
|
|
|
@@ -687,15 +687,16 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
|
687
|
687
|
for (i=0; i<ETH_ALEN; i++) {
|
688
|
688
|
nic->node_addr[i] = inb(i+eth_asic_base+WD_LAR);
|
689
|
689
|
}
|
690
|
|
- printf("\n%s base %#hx", brd->name, eth_asic_base);
|
|
690
|
+ DBG ( "\n%s base %4.4x", brd->name, eth_asic_base );
|
691
|
691
|
if (eth_flags & FLAG_790) {
|
692
|
692
|
#ifdef WD_790_PIO
|
693
|
|
- printf(", PIO mode, addr %!\n", nic->node_addr);
|
|
693
|
+ DBG ( ", PIO mode, addr %s\n", eth_ntoa ( nic->node_addr ) );
|
694
|
694
|
eth_bmem = 0;
|
695
|
695
|
eth_flags |= FLAG_PIO; /* force PIO mode */
|
696
|
696
|
outb(0, eth_asic_base+WD_MSR);
|
697
|
697
|
#else
|
698
|
|
- printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr);
|
|
698
|
+ DBG ( ", Memory %x, MAC Addr %s\n", eth_bmem, eth_ntoa ( nic->node_addr) );
|
|
699
|
+
|
699
|
700
|
outb(WD_MSR_MENB, eth_asic_base+WD_MSR);
|
700
|
701
|
outb((inb(eth_asic_base+0x04) |
|
701
|
702
|
0x80), eth_asic_base+0x04);
|
|
@@ -706,7 +707,9 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
|
706
|
707
|
~0x80), eth_asic_base+0x04);
|
707
|
708
|
#endif
|
708
|
709
|
} else {
|
709
|
|
- printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr);
|
|
710
|
+
|
|
711
|
+ DBG (", Memory %x, MAC Addr %s\n", eth_bmem, eth_ntoa ( nic->node_addr) );
|
|
712
|
+
|
710
|
713
|
outb(((unsigned)(eth_bmem >> 13) & 0x3F) | 0x40, eth_asic_base+WD_MSR);
|
711
|
714
|
}
|
712
|
715
|
if (eth_flags & FLAG_16BIT) {
|
|
@@ -818,16 +821,17 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
|
818
|
821
|
|
819
|
822
|
outb(_3COM_CR_EALO | _3COM_CR_XSEL, eth_asic_base + _3COM_CR);
|
820
|
823
|
nic->ioaddr = eth_nic_base;
|
821
|
|
- printf("\n3Com 3c503 base %#hx, ", eth_nic_base);
|
|
824
|
+ DBG ( "\n3Com 3c503 base %4.4x, ", eth_nic_base );
|
822
|
825
|
if (eth_flags & FLAG_PIO)
|
823
|
|
- printf("PIO mode");
|
|
826
|
+ DBG ( "PIO mode" );
|
824
|
827
|
else
|
825
|
|
- printf("memory %#x", eth_bmem);
|
|
828
|
+ DBG ( "memory %4.4x", eth_bmem );
|
826
|
829
|
for (i=0; i<ETH_ALEN; i++) {
|
827
|
830
|
nic->node_addr[i] = inb(eth_nic_base+i);
|
828
|
831
|
}
|
829
|
|
- printf(", %s, addr %!\n", nic->flags ? "AUI" : "internal xcvr",
|
830
|
|
- nic->node_addr);
|
|
832
|
+ DBG ( ", %s, MAC Addr %s\n", nic->flags ? "AUI" : "internal xcvr",
|
|
833
|
+ eth_ntoa ( nic->node_addr ) );
|
|
834
|
+
|
831
|
835
|
outb(_3COM_CR_XSEL, eth_asic_base + _3COM_CR);
|
832
|
836
|
/*
|
833
|
837
|
* Initialize GA configuration register. Set bank and enable shared
|
|
@@ -923,9 +927,9 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
|
923
|
927
|
nic->node_addr[i] = romdata[i + ((eth_flags & FLAG_16BIT) ? i : 0)];
|
924
|
928
|
}
|
925
|
929
|
nic->ioaddr = eth_nic_base;
|
926
|
|
- printf("\nNE%c000 base %#hx, addr %!\n",
|
927
|
|
- (eth_flags & FLAG_16BIT) ? '2' : '1', eth_nic_base,
|
928
|
|
- nic->node_addr);
|
|
930
|
+ DBG ( "\nNE%c000 base %4.4x, MAC Addr %s\n",
|
|
931
|
+ (eth_flags & FLAG_16BIT) ? '2' : '1', eth_nic_base,
|
|
932
|
+ eth_ntoa ( nic->node_addr ) );
|
929
|
933
|
}
|
930
|
934
|
}
|
931
|
935
|
#endif
|