diff options
author | Warner Losh <imp@FreeBSD.org> | 2005-10-13 22:06:02 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2005-10-13 22:06:02 +0000 |
commit | fab4f065825b97c44e03de38c4656883642486cc (patch) | |
tree | 9bd775959626d554b64ed4dab876a6a80854cfe5 /sys/dev/ed | |
parent | d0a2acd430c89bdf771aaa6c249cd31e7b021a7e (diff) | |
download | src-fab4f065825b97c44e03de38c4656883642486cc.tar.gz src-fab4f065825b97c44e03de38c4656883642486cc.zip |
o Fix probing of rtl80x9 parts. We shouldn't be calling
ed_probe_generic8390 where we're calling it. It will be done as part
of ed_probe_Novel_generic after things are setup in a way that
ed_probe_generic8390 will grok.
o Fix operator precedence botch that causes a panic when setting the media
type for 10baseT connections.
o Save the type of device so that it prints with the rest of the probe.
# this should make it work with qemu again, but only if it has my patches
# to actually implement the RTL8029 specific registers.
Notes
Notes:
svn path=/head/; revision=151299
Diffstat (limited to 'sys/dev/ed')
-rw-r--r-- | sys/dev/ed/if_ed_rtl80x9.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ed/if_ed_rtl80x9.c b/sys/dev/ed/if_ed_rtl80x9.c index f2c1a4373044..cec1b61890cd 100644 --- a/sys/dev/ed/if_ed_rtl80x9.c +++ b/sys/dev/ed/if_ed_rtl80x9.c @@ -75,14 +75,12 @@ int ed_probe_RTL80x9(device_t dev, int port_rid, int flags) { struct ed_softc *sc = device_get_softc(dev); + char *ts; int error; if ((error = ed_alloc_port(dev, port_rid, ED_NOVELL_IO_PORTS))) return (error); - if (!ed_probe_generic8390(sc)) - return (ENXIO); - 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); @@ -92,9 +90,11 @@ ed_probe_RTL80x9(device_t dev, int port_rid, int flags) switch (ed_nic_inb(sc, ED_RTL80X9_80X9ID1)) { case ED_RTL8019_ID1: sc->chip_type = ED_CHIP_TYPE_RTL8019; + ts = "RTL8019"; break; case ED_RTL8029_ID1: sc->chip_type = ED_CHIP_TYPE_RTL8029; + ts = "RTL8029"; break; default: return (ENXIO); @@ -106,6 +106,7 @@ ed_probe_RTL80x9(device_t dev, int port_rid, int flags) if ((error = ed_probe_Novell_generic(dev, flags))) return (error); + sc->type_str = ts; sc->sc_media_ioctl = &ed_rtl80x9_media_ioctl; ifmedia_init(&sc->ifmedia, 0, ed_rtl_set_media, ed_rtl_get_media); @@ -129,8 +130,8 @@ ed_probe_RTL80x9(device_t dev, int port_rid, int flags) break; case ED_RTL80X9_CF2_10_T: ifmedia_set(&sc->ifmedia, IFM_ETHER | IFM_10_T | - (ed_nic_inb(sc, ED_RTL80X9_CONFIG3) - & ED_RTL80X9_CF3_FUDUP) ? IFM_FDX : 0); + ((ed_nic_inb(sc, ED_RTL80X9_CONFIG3) + & ED_RTL80X9_CF3_FUDUP) ? IFM_FDX : 0)); break; } return (0); |