More if_re headaches for Sephe
Sepherosa Ziehau
sepherosa at gmail.com
Sun Dec 7 18:52:13 PST 2008
On Mon, Dec 8, 2008 at 10:21 AM, walt <wa1ter at myrealbox.com> wrote:
> Hi Sephe,
>
> I see you've already put a lot of work into the realtek driver,
> and now I have another problem to report, sorry.
>
> Your commit <d4d77345> on Oct 9, "Use hardware timer to simulate
> interrupt moderation", broke the emulated realtek driver in the
> kvm flavor of qemu.
>
> The bootup ifconfig seems to go okay; 'ifconfig re0' looks like
> everything *should* be working, but it seems that no packets
> ever go anywhere. Reverting the above commit fixes the problem.
>
> Well, I should mention that during bootup, dhcp seems to work
> okay -- re0 winds up with the appropriate IP address assigned
> by the kvm emulated machine -- so at least *some* packets get
> somewhere, but certainly not out to the internet after bootup.
>
> But I'm not finished complaining yet :o( The watchdog timeouts
> that you recently committed a fix for are still happening for
That's for PCIe 10/100 devices.
> me when running dfly under kvm. (I don't have a real machine
> with a realtek nic, sorry.)
>
> pciconf says: chip=0x813910 rev=0x20.
Looks like 8139C+
Could you also give me the dmesg related to re0?
>
> I'd be very happy to try any patches or diagnostic tests you
> can think of.
>
> Thanks Sephe!
>
Please test the attached patch.
Best Regards,
sephe
--
Live Free or Die
diff --git a/sys/dev/netif/re/if_re.c b/sys/dev/netif/re/if_re.c
index d49ecd3..c7afcc0 100644
--- a/sys/dev/netif/re/if_re.c
+++ b/sys/dev/netif/re/if_re.c
@@ -200,7 +200,7 @@ static const struct re_type {
static const struct re_hwrev re_hwrevs[] = {
{ RE_HWREV_8139CPLUS, RE_MACVER_UNKN, ETHERMTU,
- RE_C_HWCSUM | RE_C_8139CP },
+ RE_C_HWCSUM | RE_C_8139CP | RE_C_FASTE },
{ RE_HWREV_8169, RE_MACVER_UNKN, ETHERMTU,
RE_C_HWCSUM | RE_C_8169 },
@@ -1375,7 +1375,12 @@ re_attach(device_t dev)
sc->re_sim_time = 75; /* 75us */
else
sc->re_sim_time = 125; /* 125us */
- sc->re_imtype = RE_IMTYPE_SIM; /* simulated interrupt moderation */
+ if (!RE_IS_8139CP(sc)) {
+ /* simulated interrupt moderation */
+ sc->re_imtype = RE_IMTYPE_SIM;
+ } else {
+ sc->re_imtype = RE_IMTYPE_NONE;
+ }
re_config_imtype(sc, sc->re_imtype);
sysctl_ctx_init(&sc->re_sysctl_ctx);
More information about the Bugs
mailing list