In the ISA case, we call ed_probe_WD80x3 before we call

ed_probe_rtl80x9.  In the pci case we call ed_probe_rtl80x9 first.  In
the PCI case we were using the correct nic_offset by accident because
softc is initialized to zero.  In the isa case we were using the wrong
value by accident, since ed_probe_WD80x3 sets the offset value to
0x10.  This lead to the identification routines failing.  Fix this
problem by always initalizing the nic_offset and asic_offset before
making ed_{asic,nic}_{in,out}* calls.
This commit is contained in:
Warner Losh 2005-10-22 05:14:18 +00:00
parent 36dc24e61e
commit 201aec8321

View file

@ -80,6 +80,9 @@ ed_probe_RTL80x9(device_t dev, int port_rid, int flags)
if ((error = ed_alloc_port(dev, port_rid, ED_NOVELL_IO_PORTS)))
return (error);
sc->asic_offset = ED_NOVELL_ASIC_OFFSET;
sc->nic_offset = ED_NOVELL_NIC_OFFSET;
if (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_PS0 | ED_CR_PS1))
ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP);
@ -100,9 +103,6 @@ ed_probe_RTL80x9(device_t dev, int port_rid, int flags)
return (ENXIO);
}
sc->asic_offset = ED_NOVELL_ASIC_OFFSET;
sc->nic_offset = ED_NOVELL_NIC_OFFSET;
if ((error = ed_probe_Novell_generic(dev, flags)))
return (error);