summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-10-13 22:06:02 +0000
committerimp <imp@FreeBSD.org>2005-10-13 22:06:02 +0000
commitd61867ee80272ea209a0ab641788cb75f7197011 (patch)
tree9bd775959626d554b64ed4dab876a6a80854cfe5 /sys/dev/ed
parentcb3569e70ba17dcfd29d4d58d68d06021587d5f9 (diff)
downloadFreeBSD-src-d61867ee80272ea209a0ab641788cb75f7197011.zip
FreeBSD-src-d61867ee80272ea209a0ab641788cb75f7197011.tar.gz
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.
Diffstat (limited to 'sys/dev/ed')
-rw-r--r--sys/dev/ed/if_ed_rtl80x9.c11
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 f2c1a43..cec1b618 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);
OpenPOWER on IntegriCloud