Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
> 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 >

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
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

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
> 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

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
On 12/3/18 12:21 PM, Andrew Lunn wrote: > On Mon, Dec 03, 2018 at 05:02:40PM +, Steve Douthit wrote: >> On 12/3/18 11:54 AM, Andrew Lunn wrote: +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, + int regnum) +{ + struct

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
On Mon, Dec 03, 2018 at 05:02:40PM +, Steve Douthit wrote: > On 12/3/18 11:54 AM, Andrew Lunn wrote: > >> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, > >> + int regnum) > >> +{ > >> + struct ixgbe_adapter *adapter = (struct

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
On 12/3/18 11:54 AM, Andrew Lunn wrote: >> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, >> + int regnum) >> +{ >> +struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)bus->priv; >> +struct ixgbe_hw *hw = >hw; >> +u32 gssr

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, > +int regnum) > +{ > + struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)bus->priv; > + struct ixgbe_hw *hw = >hw; > + u32 gssr = hw->phy.phy_semaphore_mask |

[PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
Most dsa devices expect a 'struct mii_bus' pointer to talk to switches via the MII interface. Signed-off-by: Stephen Douthit --- drivers/net/ethernet/intel/Kconfig| 1 + drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +