I (think) the AR8327 switch support now works

Adrian Chadd adrian at freebsd.org
Sat Mar 8 08:55:40 UTC 2014


Look at if_arge.c - arge_fetch_mdiobus_clock_rate() . See whether the
openwrt config sets the mdiobus frequency to something.

The AR9344 defaults to 'MAC_MII_CFG_CLOCK_DIV_58'.

Maybe you can fiddle with which divisor it uses.


-a


On 7 March 2014 11:42, Milan Obuch <freebsd-mips at dino.sk> wrote:
> On Fri, 7 Mar 2014 10:19:03 -0800
> Adrian Chadd <adrian at freebsd.org> wrote:
>
>> On 7 March 2014 05:04, Milan Obuch <freebsd-mips at dino.sk> wrote:
>> > On Thu, 6 Mar 2014 23:05:56 -0800
>> > Adrian Chadd <adrian at freebsd.org> wrote:
>> >
>> >> Hi,
>> >>
>> >> So I'd add some debugging in arswitch_readreg() and
>> >> arswitch_writereg() to see what's being read/written. It should be
>> >> obviously wrong or not.
>> >>
>> >> It may be something like the arge0/arge1 MDIO speeds need to be
>> >> changed.
>> >>
>> >>
>> >> -a
>> >
>> > Where is this debugging? I just svn update my src-current tree,
>> > built new kernel and does not see any debug info...
>>
>> There isn't any; you have to add printfs to them. :)
>>
>>
>> -a
>
> Ahh, I misunderstood you, sorry...
>
> So, yes, I did add some printfs, diff in attachment, and voila,
> arswitch1 probes and /dev/etherswitch0 got created... so this looks
> like some timing issue. I am going to repeat this test with new flash
> with fresh world, so I can actually try to do something. In the
> meantime, do you have any idea how can I adjust MDIO speed so no printf
> is necessary?
>
> Milan


More information about the freebsd-mips mailing list