Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Dec 2011 17:03:08 +0100
From:      Stefan Bethke <stb@lassitu.de>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Aleksandr Rybalko <ray@ddteam.net>, freebsd-mips@freebsd.org
Subject:   Re: arge problem on MR3420
Message-ID:  <A50EA4D4-A2BE-49DB-B545-FB2568200135@lassitu.de>
In-Reply-To: <CAJ-VmoncaNavvGns9dM_Kc_BiuKNbNpmNijiYKAOh13bQ967Rw@mail.gmail.com>
References:  <B40E8E4D-115F-46EF-A51F-52E562EF166E@lassitu.de> <CAJ-VmokWLzfjd%2B=_=tSt7ukc=gK2kd9H5s7sH-7bbzSpzBFUcQ@mail.gmail.com> <20111231000638.d257448c.ray@ddteam.net> <98BA8EF5-E808-43F8-92A8-68B14CAF998F@lassitu.de> <2A05E0AA-5AA5-47FD-90EA-BD6B23A01EFE@lassitu.de> <CAJ-VmoncaNavvGns9dM_Kc_BiuKNbNpmNijiYKAOh13bQ967Rw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Am 31.12.2011 um 17:01 schrieb Adrian Chadd:

> On 31 December 2011 04:36, Stefan Bethke <stb@lassitu.de> wrote:
>> Am 30.12.2011 um 23:49 schrieb Stefan Bethke:
>>=20
>>> OK, trying to pull in everyone.  There seems to be a problem with =
if_arge on certain chips/platforms.  I've encountered it on TL-MR3420 =
and WRT-160NL.  I'm currently working off Adrians gitorious repo.
>>=20
>> The problem is limited to BOOTP; if I mount a USB stick as root, I =
can bring up arge1 without issue.
>>=20
>> On the AR7241, arge0 is connected to a phy and the blue WAN port, =
arge1 is connected to the built-in switch.  The port speeds are fixed =
(1000 for the switch, 100 for the phy).
>>=20
>> With BOOTP enabled, I'm getting an interrupt storm on intr 3.  I've =
enabled debugging for arge, and it seems there is a TX underrun that is =
not being cleared in that case.  I'm not fully understanding the code, =
so I'm not sure why the TX underrun is not being cleared, or keeps =
reoccurring.
>=20
> Is the bootp code somehow tickling the interface setup in a way that
> isn't the same as the userland-driven config?
>=20
> Ie, a tx underrun should only occur if it runs out of TX descriptor
> slots. That's fine, it just means that it go to the end of the
> descriptor list. It's not _necessarily_ an error condition.
>=20
> And it should only _keep_ occuring if someone/something keeps tickling
> the DMA_TX_CONTROL_EN bit.
>=20
> So when the underrun occurs, what's the state of the TX ring head/tail =
pointers?
>=20
> The code in arge_intr() should be self explanatory. If any frames were
> sent, call arge_start_locked(). The call to arge_encap() throws
> something into the TX ring and then sets DMA_TX_CONTROL_EN.
>=20
> How about adding a printf() to arge_start_locked() and arge_encap(),
> see if they're constantly being called.

I'll do that next year :-)

I believe the BOOTP code starts before timers are running, would that =
affect things?


Stefan

--=20
Stefan Bethke <stb@lassitu.de>   Fon +49 151 14070811






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A50EA4D4-A2BE-49DB-B545-FB2568200135>