Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Nov 2012 14:32:28 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Aleksandr Rybalko <ray@freebsd.org>, freebsd-embedded@freebsd.org, Luiz Otavio O Souza <loos.br@gmail.com>
Subject:   Re: if_arge eventually fails to attach PHY at boot (with arswitch)
Message-ID:  <1984A35B-D0BE-4896-96D4-32EAE746F9EC@bsdimp.com>
In-Reply-To: <CAJ-Vmoma_6hA-zKZts1-LSJ=gCo39DZVaU_f-TZuK-YA0Ggwcw@mail.gmail.com>
References:  <0FCCB08E-8517-4B5C-8621-06DAF3B86B09@gmail.com> <CAJ-Vmok5z%2BhWGHpWEL8xT0o9MyE4HXu3i0j=u3_t=jbm_j2biQ@mail.gmail.com> <F11D16D0-5EF9-46F2-A322-F06620955525@gmail.com> <CAJ-Vmo=fqT-qmkpFDu8LnLaXrCiXXYokBmkQtYNjHvtj-nU59Q@mail.gmail.com> <EF7B1630-06F8-4359-AF54-2C7CC25730E6@gmail.com> <CAJ-VmomTcy9w%2B8noQwN6XQvM01Bi6bq6XuQ227fhL=hryB-2_w@mail.gmail.com> <5BB9E514-7C57-480E-994C-BF59023BC400@gmail.com> <CAJ-VmokpY=DEZOeOXCpDWCN8Q8YZspnxF4QFLOH6iHGU6h2DoQ@mail.gmail.com> <CAJ-Vmo=p1dN6OSQwbGvWxj7xbpcB48zqy8w3WYhTink=bTkp2A@mail.gmail.com> <F223579B-2549-4854-84EA-1E1BE45EE630@gmail.com> <CAJ-VmomyJT-wCPXi=bynqX2QMt1f5XjB25s9GH2KT6-2CueQDQ@mail.gmail.com> <B37BCC2A-63FC-45F7-8946-7949011FB9FB@gmail.com> <CAJ-VmonwZgF5FJz8Wv1UN1XDurL%2BXqELSHHnBdZghSnDJQqu_w@mail.gmail.com> <20121012020904.c03ef76a.ray@ddteam.net> <CAJ-Vmo=BU72ZoWQVQNAbdBzN2ytmofBdRnWxGSg1D6Y1UO7poQ@mail.gmail.com> <23E6E442-A8CE-4024-86BF-B0D19CC696F8@gmail.com> <7E5C5ACD-B9D0-4591-B071-797F9F1E1743@gmail.com> < CAJ-Vmom9iPB%2B-JfkNRtd10rzGSDbttvbWnOSu%2B3Tj4%2BsGWRpew@mail.gmail.com> <4770DC05-A7C2-4E59-8188-ABFA404DAF23@gmail.com> <CAJ-Vmoma_6hA-zKZts1-LSJ=gCo39DZVaU_f-TZuK-YA0Ggwcw@mail.gmail.com>

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

On Nov 6, 2012, at 2:01 PM, Adrian Chadd wrote:

> Hi,
>=20
> I'm happy to make arswitch need to be specified in hints, rather than =
probed.
>=20
> Does anyone have any cleaner ideas on how to probe this stuff? It's
> very recursive (ie, arswitch exposes an mdiobus, which the arswitch
> code then tries to probe. The probing messes the mdiobus up and makes
> it difficult to find a PHY there.)
>=20
> This feels like ISA all over again..

FDT is the one true way of doing this :)

Hints are a poor, bastard step-child that beats doing without...

Warner

> :)
>=20
> Adrian
>=20
> On 6 November 2012 10:39, Luiz Otavio O Souza <loos.br@gmail.com> =
wrote:
>> On Nov 3, 2012, at 12:48 PM, Adrian Chadd wrote:
>>> On 3 November 2012 06:10, Luiz Otavio O Souza <loos.br@gmail.com> =
wrote:
>>>> Hi Adrian and sorry for the delay,
>>>>=20
>>>> Yes, there is one fix missing, but it is not ready yet... i'm work =
on the fix and hope to get it ready for a review later today or =
tomorrow.
>>>=20
>>> Cool! What is it?
>>=20
>> The arswitch driver always tries to attach to every mdio bus on the =
system. When the switch exposes his own mdio another arswitch instance =
was trying to attach to it and while trying to read from the switch =
registers it sometimes upset the switch.
>>=20
>> I've tried to fix this by others means, but agreed with Ray that =
arswitch can't be really 'detected', so i just removed the auto =
attachment from it and now it only attaches when hinted. This fixes the =
problem without any additional hack.
>>=20
>> Please let me know what you think about it.
>>=20
>> The rtl8366 may have the same problem, but for now i don't have any =
hardware to test it...
>>=20
>> Ahh, the AP96 kernel file has the arswitch device declared but there =
is no hints for it on AP96.hints, so i didn't touch it.
>>=20
>> Thanks,
>> Luiz
>>=20
> _______________________________________________
> freebsd-embedded@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to =
"freebsd-embedded-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1984A35B-D0BE-4896-96D4-32EAE746F9EC>