summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_rl.c
diff options
context:
space:
mode:
authorroger <roger@FreeBSD.org>2000-11-24 17:36:07 +0000
committerroger <roger@FreeBSD.org>2000-11-24 17:36:07 +0000
commit31f2e4e21b13a63391cbc5cc934b038d2921a052 (patch)
tree47f461f4149fe5022b34745b7a18e29bc71d6131 /sys/pci/if_rl.c
parentca4258e27f99dd277c23b5dcaadad496a5ecd45c (diff)
downloadFreeBSD-src-31f2e4e21b13a63391cbc5cc934b038d2921a052.zip
FreeBSD-src-31f2e4e21b13a63391cbc5cc934b038d2921a052.tar.gz
Print a warning when we detect a Realtek 8139B chip
(identified by the IO map being 256 bytes long instead of 128) This chip works very unreliably on my Lanner embedded PC with the rl driver. Lots of watchdog timeouts or poor performance. Forcing the media type to 10 Meg (ifconfig rl0 media 10baseT/UTP) is a good workaround. This looks very similar to the problem reported in PR kern/18790 It is interesting to note that the linux driver has lots of special case code for this chip.
Diffstat (limited to 'sys/pci/if_rl.c')
-rw-r--r--sys/pci/if_rl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 2657ddf..7fb1415 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -863,6 +863,16 @@ static int rl_attach(dev)
goto fail;
}
+ /* Detect the Realtek 8139B. For some reason, this chip is very
+ * unstable when left to autoselect the media
+ * The best workaround is to set the device to the required
+ * media type or to set it to the 10 Meg speed.
+ */
+
+ if ((rman_get_end(sc->rl_res)-rman_get_start(sc->rl_res))==0xff) {
+ printf("rl%d: Realtek 8139B detected. Warning, this may be unstable in autoselect mode\n", unit);
+ }
+
sc->rl_btag = rman_get_bustag(sc->rl_res);
sc->rl_bhandle = rman_get_bushandle(sc->rl_res);
OpenPOWER on IntegriCloud