Date: Sat, 11 Feb 2012 21:20:20 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Juli Mallett <jmallett@freebsd.org> Cc: Aleksandr Rybalko <ray@ddteam.net>, Stefan Bethke <stb@lassitu.de>, FreeBSD-arch <freebsd-arch@freebsd.org>, Aleksandr Rybalko <ray@freebsd.org>, Marius Strobl <marius@alchemy.franken.de> Subject: Re: Extending sys/dev/mii Message-ID: <CAJ-VmonHKp6Fxmnr2_4xEH-5PPb3ap6d3bVhG1nu-G5okpYCvA@mail.gmail.com> In-Reply-To: <CACVs6=8Z89tYBgJG6xkbKxSG99KHMbpECHhV7F9cLJKkLzuVQA@mail.gmail.com> References: <95372FB3-406F-46C2-8684-4FDB672D9FCF@lassitu.de> <20120106214741.GB88161@alchemy.franken.de> <F60B2B70-049F-4497-BBA8-3C421088C1EA@lassitu.de> <20120108130039.GG88161@alchemy.franken.de> <23477898-8D85-498C-8E30-192810BD68A8@lassitu.de> <20120111193738.GB44286@alchemy.franken.de> <66DDA0A2-F878-43FF-8824-54868F493B18@lassitu.de> <20120125221753.GA17821@alchemy.franken.de> <AF2CF7A4-27B8-4181-96F5-7998B126CD1C@lassitu.de> <CAJ-VmomcgC6V-sY7jN%2Bh6T7uPfVesPBV%2BKPu2TVD4YDKrdk4LQ@mail.gmail.com> <20120211111731.GE39861@alchemy.franken.de> <20120211144544.c91701d9.ray@ddteam.net> <CAJ-Vmo=CLMcO%2BR21TVKC3zVGS4rHO2Ca31D9ts2kNwpnhAtOvQ@mail.gmail.com> <B1700D0A-240D-4274-AA3F-FCA798AD2F14@bsdimp.com> <CAJ-Vmon=cPivcJjb_dvuMzsok2Qp-MeNLK0uNo5g8O2ekEaOMA@mail.gmail.com> <58EA57DC-75DF-4813-BB03-FD27F2A49BA2@bsdimp.com> <CACVs6=8Z89tYBgJG6xkbKxSG99KHMbpECHhV7F9cLJKkLzuVQA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11 February 2012 21:06, Juli Mallett <jmallett@freebsd.org> wrote: >> The PHYs don't sit on arge1. =A0They sit on another device that the driv= er bogusly assumes is tightly coupled to arge1, when in fact it isn't. > > YES! =A0Thank you! =A0And even if it were tightly coupled in hardware, > there's no reason our device tree needs to mirror that, FDT or not. > Just break out an "arge controller" device, attach arge0 and arge1 to > it, and let it manage the MDIO bus. =A0No shortcomings, as far as I can > tell. =A0You can even be extra clever and say that the switch is > attached to that device, not either of the arge devices, and that one > of the arge devices happens to be connected to the switch's CPU/host > port. =A0But that's probably a bit much to ask for. I'm tempted to just go ahead and do this, and have: * argec: initial device probe/attach, handle mdio/miibus configuration * if_arge: child of argec (with all register accesses going via it), doing the rest of ethernet stuff .. then what, we have argec0/argec1 first probe/attach, then have if_arge0/if_arge1 probe/attach with the relevant miibus PHYs attach to wherever they need to? There'll need to be some kind of locking there so both the argecX and the if_argeX don't clash. Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonHKp6Fxmnr2_4xEH-5PPb3ap6d3bVhG1nu-G5okpYCvA>