From acd6923419a86b702232316d9daae546732a366b Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 22 Oct 2005 05:14:18 +0000 Subject: 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. --- sys/dev/ed/if_ed_rtl80x9.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/ed') diff --git a/sys/dev/ed/if_ed_rtl80x9.c b/sys/dev/ed/if_ed_rtl80x9.c index cec1b618..c6a7d76 100644 --- a/sys/dev/ed/if_ed_rtl80x9.c +++ b/sys/dev/ed/if_ed_rtl80x9.c @@ -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); -- cgit v1.1