From: Steve Douthit <stephend@silicom-usa.com> To: Andrew Lunn <andrew@lunn.ch> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, "David S. Miller" <davem@davemloft.net>, "intel-wired-lan@lists.osuosl.org" <intel-wired-lan@lists.osuosl.org>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, Florian Fainelli <f.fainelli@gmail.com> Subject: Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus Date: Mon, 3 Dec 2018 18:38:40 +0000 [thread overview] Message-ID: <8ff5f4f0-9a4a-d601-3add-fcfc91b6414d@silicom-usa.com> (raw) In-Reply-To: <20181203181811.GM25748@lunn.ch> On 12/3/18 1:18 PM, Andrew Lunn wrote: >> Agreed, but I'd argue it's the same behavior we have today with the >> existing MII ioctls in this driver. That's not to say this is good, >> it's just not any less broken than the current state of things. > > Agreed. > > I actually would be happy with a warning in the commit message that > this code is not sufficient to make use of Linux PHY drivers, because > of the hardware polling. You can then leave fixing that to whoever > needs Linux PHY drivers. OK, will update for v3. >> AFAICT the polling hardware only pokes the device address that the >> driver stores in 'hw->phy.mdio.prtad', so the PHY polling unit would >> never see the switch, if it's even polling at all. Some of the MAC >> configurations will store MDIO_PRTAD_NONE, in which case I wouldn't >> expect the polling unit to be active. It's up to the board designer to >> ensure there's no address conflicts on the bus. > > Well, the 6390 does use address 0-10 for its port registers, and there > is something which looks like a PHYID in register 3. So for your use > case of DSA, it would be good to ensure it really is disabled. You can actually strap the 6390 and friends for a multi-chip mode where they claim only a single address, instead of one per port, plus a couple more for global registers. It vastly slows things down because of the extra indirection, but it allows the switch to play nicely with other MDIO devs. >> Then in the ioctl code, in addition to checking the mii_bus is >> available, also check that the requested address is one that phy_mask >> says mii_bus owns, otherwise we fall through to the old code. > > I'm not too bothered with the ioctl. It is there so you can shoot > yourself in the foot. The hardware polling unit just adds more > interesting weapons you can use to shoot yourself in the foot. Hooray for enhanced anti-foot artillery :)
WARNING: multiple messages have this Message-ID (diff)
From: Steve Douthit <stephend@silicom-usa.com> To: intel-wired-lan@osuosl.org Subject: [Intel-wired-lan] [PATCH net-next v2 1/2] ixgbe: register a mdiobus Date: Mon, 3 Dec 2018 18:38:40 +0000 [thread overview] Message-ID: <8ff5f4f0-9a4a-d601-3add-fcfc91b6414d@silicom-usa.com> (raw) In-Reply-To: <20181203181811.GM25748@lunn.ch> On 12/3/18 1:18 PM, Andrew Lunn wrote: >> Agreed, but I'd argue it's the same behavior we have today with the >> existing MII ioctls in this driver. That's not to say this is good, >> it's just not any less broken than the current state of things. > > Agreed. > > I actually would be happy with a warning in the commit message that > this code is not sufficient to make use of Linux PHY drivers, because > of the hardware polling. You can then leave fixing that to whoever > needs Linux PHY drivers. OK, will update for v3. >> AFAICT the polling hardware only pokes the device address that the >> driver stores in 'hw->phy.mdio.prtad', so the PHY polling unit would >> never see the switch, if it's even polling at all. Some of the MAC >> configurations will store MDIO_PRTAD_NONE, in which case I wouldn't >> expect the polling unit to be active. It's up to the board designer to >> ensure there's no address conflicts on the bus. > > Well, the 6390 does use address 0-10 for its port registers, and there > is something which looks like a PHYID in register 3. So for your use > case of DSA, it would be good to ensure it really is disabled. You can actually strap the 6390 and friends for a multi-chip mode where they claim only a single address, instead of one per port, plus a couple more for global registers. It vastly slows things down because of the extra indirection, but it allows the switch to play nicely with other MDIO devs. >> Then in the ioctl code, in addition to checking the mii_bus is >> available, also check that the requested address is one that phy_mask >> says mii_bus owns, otherwise we fall through to the old code. > > I'm not too bothered with the ioctl. It is there so you can shoot > yourself in the foot. The hardware polling unit just adds more > interesting weapons you can use to shoot yourself in the foot. Hooray for enhanced anti-foot artillery :)
next prev parent reply other threads:[~2018-12-03 18:38 UTC|newest] Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-03 16:32 [PATCH net-next v2 0/2] Add mii_bus to ixgbe driver for dsa devs Steve Douthit 2018-12-03 16:32 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 16:32 ` [PATCH net-next v2 1/2] ixgbe: register a mdiobus Steve Douthit 2018-12-03 16:32 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 16:54 ` Andrew Lunn 2018-12-03 16:54 ` [Intel-wired-lan] " Andrew Lunn 2018-12-03 17:02 ` Steve Douthit 2018-12-03 17:02 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 17:21 ` Andrew Lunn 2018-12-03 17:21 ` [Intel-wired-lan] " Andrew Lunn 2018-12-03 17:59 ` Steve Douthit 2018-12-03 17:59 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 18:18 ` Andrew Lunn 2018-12-03 18:18 ` [Intel-wired-lan] " Andrew Lunn 2018-12-03 18:38 ` Steve Douthit [this message] 2018-12-03 18:38 ` Steve Douthit 2018-12-03 18:54 ` Andrew Lunn 2018-12-03 18:54 ` [Intel-wired-lan] " Andrew Lunn 2018-12-03 16:33 ` [PATCH net-next v2 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit 2018-12-03 16:33 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 18:55 ` [PATCH net-next v3 0/2] Add mii_bus to ixgbe driver for dsa devs Steve Douthit 2018-12-03 18:55 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 18:55 ` [PATCH net-next v3 1/2] ixgbe: register a mdiobus Steve Douthit 2018-12-03 18:55 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 19:00 ` Andrew Lunn 2018-12-03 19:00 ` [Intel-wired-lan] " Andrew Lunn 2018-12-03 19:07 ` Florian Fainelli 2018-12-03 19:07 ` [Intel-wired-lan] " Florian Fainelli 2018-12-03 19:44 ` Steve Douthit 2018-12-03 19:44 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 19:45 ` Florian Fainelli 2018-12-03 19:45 ` [Intel-wired-lan] " Florian Fainelli 2018-12-03 18:55 ` [PATCH net-next v3 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit 2018-12-03 18:55 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 19:01 ` Andrew Lunn 2018-12-03 19:01 ` [Intel-wired-lan] " Andrew Lunn 2018-12-03 19:07 ` Florian Fainelli 2018-12-03 19:07 ` [Intel-wired-lan] " Florian Fainelli 2018-12-03 20:14 ` [PATCH net-next v4 0/2] Add mii_bus to ixgbe driver for dsa devs Steve Douthit 2018-12-03 20:14 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 20:15 ` [PATCH net-next v4 1/2] ixgbe: register a mdiobus Steve Douthit 2018-12-03 20:15 ` [Intel-wired-lan] " Steve Douthit 2018-12-04 16:58 ` Bowers, AndrewX 2018-12-04 16:58 ` [Intel-wired-lan] " Bowers, AndrewX 2018-12-03 20:15 ` [PATCH net-next v4 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit 2018-12-03 20:15 ` [Intel-wired-lan] " Steve Douthit 2018-12-04 16:59 ` Bowers, AndrewX 2018-12-04 16:59 ` [Intel-wired-lan] " Bowers, AndrewX 2018-12-03 20:51 ` [PATCH net-next v4 0/2] Add mii_bus to ixgbe driver for dsa devs Florian Fainelli 2018-12-03 20:51 ` [Intel-wired-lan] " Florian Fainelli 2018-12-03 23:42 ` Steve Douthit 2018-12-03 23:42 ` [Intel-wired-lan] " Steve Douthit 2018-12-03 23:46 ` Florian Fainelli 2018-12-03 23:46 ` [Intel-wired-lan] " Florian Fainelli 2018-12-04 10:40 ` Andrew Lunn 2018-12-04 10:40 ` [Intel-wired-lan] " Andrew Lunn 2018-12-04 16:02 ` Steve Douthit 2018-12-04 16:02 ` [Intel-wired-lan] " Steve Douthit 2018-12-06 15:50 ` [PATCH net-next v5 " Steve Douthit 2018-12-06 15:50 ` [Intel-wired-lan] " Steve Douthit 2018-12-06 15:50 ` [PATCH net-next v5 1/2] ixgbe: register a mdiobus Steve Douthit 2018-12-06 15:50 ` [Intel-wired-lan] " Steve Douthit 2018-12-06 15:50 ` [PATCH net-next v5 2/2] ixgbe: use mii_bus to handle MII related ioctls Steve Douthit 2018-12-06 15:50 ` [Intel-wired-lan] " Steve Douthit
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=8ff5f4f0-9a4a-d601-3add-fcfc91b6414d@silicom-usa.com \ --to=stephend@silicom-usa.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=f.fainelli@gmail.com \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=jeffrey.t.kirsher@intel.com \ --cc=netdev@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.