Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Marek Behún
On Mon, 12 Apr 2021 18:38:29 +0200 Pali Rohár wrote: > On Monday 12 April 2021 18:12:35 Andrew Lunn wrote: > > On Mon, Apr 12, 2021 at 05:52:39PM +0200, Pali Rohár wrote: > > > On Monday 12 April 2021 17:32:33 Andrew Lunn wrote: > > > > > Anyway, now I'm looking at phy/marvell.c driver again

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Pali Rohár
On Monday 12 April 2021 18:12:35 Andrew Lunn wrote: > On Mon, Apr 12, 2021 at 05:52:39PM +0200, Pali Rohár wrote: > > On Monday 12 April 2021 17:32:33 Andrew Lunn wrote: > > > > Anyway, now I'm looking at phy/marvell.c driver again and it supports > > > > only 88E6341 and 88E6390 families from

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Andrew Lunn
On Mon, Apr 12, 2021 at 05:52:39PM +0200, Pali Rohár wrote: > On Monday 12 April 2021 17:32:33 Andrew Lunn wrote: > > > Anyway, now I'm looking at phy/marvell.c driver again and it supports > > > only 88E6341 and 88E6390 families from whole 88E63xxx range. > > > > > > So do we need to define for

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Pali Rohár
On Monday 12 April 2021 17:32:33 Andrew Lunn wrote: > > Anyway, now I'm looking at phy/marvell.c driver again and it supports > > only 88E6341 and 88E6390 families from whole 88E63xxx range. > > > > So do we need to define for now table for more than > > MV88E6XXX_FAMILY_6341 and

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Andrew Lunn
> Anyway, now I'm looking at phy/marvell.c driver again and it supports > only 88E6341 and 88E6390 families from whole 88E63xxx range. > > So do we need to define for now table for more than > MV88E6XXX_FAMILY_6341 and MV88E6XXX_FAMILY_6390 entries? Probably not. I've no idea if the 6393 has an

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Pali Rohár
On Monday 12 April 2021 16:44:11 Andrew Lunn wrote: > On Mon, Apr 12, 2021 at 03:34:47PM +0200, Pali Rohár wrote: > > On Monday 12 April 2021 15:15:07 Andrew Lunn wrote: > > > > +static u16 mv88e6xxx_physid_for_family(enum mv88e6xxx_family family); > > > > + > > > > > > No forward declaration

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Andrew Lunn
On Mon, Apr 12, 2021 at 03:34:47PM +0200, Pali Rohár wrote: > On Monday 12 April 2021 15:15:07 Andrew Lunn wrote: > > > +static u16 mv88e6xxx_physid_for_family(enum mv88e6xxx_family family); > > > + > > > > No forward declaration please. Move the code around. It is often best > > to do that in a

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Pali Rohár
On Monday 12 April 2021 16:30:03 Andrew Lunn wrote: > > > > +/* This table contains representative model for every family */ > > > > +static const enum mv88e6xxx_model family_model_table[] = { > > > > + [MV88E6XXX_FAMILY_6095] = MV88E6095, > > > > + [MV88E6XXX_FAMILY_6097] = MV88E6097,

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Andrew Lunn
> > > +/* This table contains representative model for every family */ > > > +static const enum mv88e6xxx_model family_model_table[] = { > > > + [MV88E6XXX_FAMILY_6095] = MV88E6095, > > > + [MV88E6XXX_FAMILY_6097] = MV88E6097, > > > + [MV88E6XXX_FAMILY_6185] = MV88E6185, > > > +

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Pali Rohár
On Monday 12 April 2021 15:15:07 Andrew Lunn wrote: > > +static u16 mv88e6xxx_physid_for_family(enum mv88e6xxx_family family); > > + > > No forward declaration please. Move the code around. It is often best > to do that in a patch which just moves code, no other changes. It > makes it easier to

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Andrew Lunn
> +static u16 mv88e6xxx_physid_for_family(enum mv88e6xxx_family family); > + No forward declaration please. Move the code around. It is often best to do that in a patch which just moves code, no other changes. It makes it easier to review. > static int mv88e6xxx_mdio_read(struct mii_bus *bus,

[PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Pali Rohár
Since commit fee2d546414d ("net: phy: marvell: mv88e6390 temperature sensor reading"), Linux reports the temperature of Topaz hwmon as constant -75°C. This is because switches from the Topaz family (88E6141 / 88E6341) have the address of the temperature sensor register different from Peridot.