Date: Sun, 9 Mar 2014 09:17:32 +0100 From: Milan Obuch <freebsd-mips@dino.sk> To: Adrian Chadd <adrian@freebsd.org> Cc: freebsd-mips@freebsd.org Subject: Re: I (think) the AR8327 switch support now works Message-ID: <20140309091732.23f3052c@zeta.dino.sk> In-Reply-To: <CAJ-Vmok6gEG0rMSdAccQZkD-McTY8y7LktE1xQsXy7MNODxP2g@mail.gmail.com> References: <CAJ-Vmok0cVLnH9DQh%2Bz6XF-NQmPKy_Ez37kLtuCSRThwjQHTJQ@mail.gmail.com> <20140301143607.13a96bd6@zeta.dino.sk> <CAJ-Vmom2coTLFn0zcTa=BzxAOopMjCDUBOtQwOVOyQmCeB19wA@mail.gmail.com> <20140301200546.7ff373d1@zeta.dino.sk> <20140301231239.023b8733@zeta.dino.sk> <CAJ-VmoknT-SWVmcDX-Cx8StUVuZNX%2BqNPzLcMBdLxN7qwssNoA@mail.gmail.com> <20140307140432.0a460da1@zeta.dino.sk> <CAJ-Vmok-nF4QdVmUMGJxt4tX=X%2Bvc4_-G100ZPRnQ-2aWyNCog@mail.gmail.com> <20140307204230.3c86b9b1@zeta.dino.sk> <CAJ-Vmo=B0CG1FSCKYeaCmORJuWbJ24g=%2BQkHV7WC8DTV9m1zKA@mail.gmail.com> <20140308140901.19782009@zeta.dino.sk> <CAJ-VmokM5mPxMbbVyaSpyDcn-Fs32g4heWMPZF7n2OpnFK31oA@mail.gmail.com> <20140308173642.0a48d2c2@zeta.dino.sk> <CAJ-VmomnycSYbhf4aKaiK%2BUL%2B-aWXy_tXioRUjMVO62r%2BDpEUA@mail.gmail.com> <20140308234129.76800b5c@zeta.dino.sk> <CAJ-Vmok6gEG0rMSdAccQZkD-McTY8y7LktE1xQsXy7MNODxP2g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 8 Mar 2014 14:50:14 -0800 Adrian Chadd <adrian@freebsd.org> wrote: > Ok, well now let's figure out if the reset is working or not. > > look at arswitch_attach(): > > * It sets up the default methods; > * it calls ar8327_attach(); > * it resets the switch via arswitch_reset(); > * it calls the HAL methods to set things up; > * it attaches the PHYs; > * it attaches said PHYs; > * it starts the periodic checks via arswitch_tick(). > > So, I'd add some printf()s in arswitch_attach() to see where it's > getting to before it calls return (ENXIO) or return (err). > I did something else more. I wrote ar8327_probe() function just like the ones for internal switches are to override the current probe routine. Then I see a bunch of register reads/writes. Attachment does not succeed, anyway, but maybe you could see here something interesting: mdio0: <MDIO> on argemdio0 mdioproxy0: <MII/MDIO proxy, MDIO side> on mdio0 unknown: arswitch_probe 2 6 unknown: arswitch_probe 2 6 arswitch0: <Atheros AR8327 Ethernet Switch> on mdio0 arswitch0: arswitch_attach 1 6 arswitch0: ar8327_attach executed arswitch0: arswitch_attach 2 arswitch0: writereg 0x00000000: 0x80000000 (0x00000000) arswitch0: readreg 0x00000000: 0x12041204 arswitch0: arswitch_attach 3 arswitch0: writereg 0x00000004: 0x07600000 (0x00000000) arswitch0: writereg 0x00000008: 0x00000000 (0x00000000) arswitch0: writereg 0x0000000c: 0x00000000 (0x00000000) arswitch0: readreg 0x00000010: 0x20260000 arswitch0: writereg 0x00000050: 0x00000000 (0x00000000) arswitch0: writereg 0x00000054: 0xc737c737 (0x00000000) arswitch0: writereg 0x00000058: 0x00000000 (0x00000000) arswitch0: writereg 0x0000005c: 0x00c30c00 (0x00000000) arswitch0: writereg 0x00000010: 0xa1260000 (0x00000000) arswitch0: arswitch_attach 4 arswitch0: writereg 0x00000620: 0x000004f0 (0x00000000) arswitch0: writereg 0x00000624: 0x007f7f7f (0x00000000) arswitch0: readreg 0x00000078: 0x20262026 arswitch0: writereg 0x00000078: 0x20262344 (0x00000000) arswitch0: readreg 0x00000030: 0x80000000 arswitch0: writereg 0x00000030: 0x80000001 (0x00000000) arswitch0: arswitch_attach 5 arswitch0: writereg 0x0000007c: 0x0000007e (0x00000000) arswitch0: writereg 0x0000009c: 0x00000000 (0x00000000) arswitch0: writereg 0x00000420: 0x00010001 (0x00000000) arswitch0: writereg 0x00000424: 0x00003000 (0x00000000) arswitch0: writereg 0x00000660: 0x0014003e (0x00000000) arswitch0: writereg 0x00000080: 0x00000200 (0x00000000) arswitch0: writereg 0x000000a0: 0x00000000 (0x00000000) arswitch0: writereg 0x00000428: 0x00010001 (0x00000000) arswitch0: writereg 0x0000042c: 0x00003000 (0x00000000) arswitch0: writereg 0x0000066c: 0x0014003d (0x00000000) arswitch0: writereg 0x00000084: 0x00000200 (0x00000000) arswitch0: writereg 0x000000a4: 0x00000000 (0x00000000) arswitch0: writereg 0x00000430: 0x00010001 (0x00000000) arswitch0: writereg 0x00000434: 0x00003000 (0x00000000) arswitch0: writereg 0x00000678: 0x0014003b (0x00000000) arswitch0: writereg 0x00000088: 0x00000200 (0x00000000) arswitch0: writereg 0x000000a8: 0x00000000 (0x00000000) arswitch0: writereg 0x00000438: 0x00010001 (0x00000000) arswitch0: writereg 0x0000043c: 0x00003000 (0x00000000) arswitch0: writereg 0x00000684: 0x00140037 (0x00000000) arswitch0: writereg 0x0000008c: 0x00000200 (0x00000000) arswitch0: writereg 0x000000ac: 0x00000000 (0x00000000) arswitch0: writereg 0x00000440: 0x00010001 (0x00000000) arswitch0: writereg 0x00000444: 0x00003000 (0x00000000) arswitch0: writereg 0x00000690: 0x0014002f (0x00000000) arswitch0: writereg 0x00000090: 0x00000200 (0x00000000) arswitch0: writereg 0x000000b0: 0x00000000 (0x00000000) arswitch0: writereg 0x00000448: 0x00010001 (0x00000000) arswitch0: writereg 0x0000044c: 0x00003000 (0x00000000) arswitch0: writereg 0x0000069c: 0x0014001f (0x00000000) arswitch0: arswitch_attach 6 arswitch0: attaching PHY 0 failed arswitch0: attaching PHY 1 failed arswitch0: attaching PHY 2 failed arswitch0: attaching PHY 3 failed arswitch0: attaching PHY 4 failed device_attach: arswitch0 attach returned 6 Regards, Milan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140309091732.23f3052c>