[PATCH net-next] net: enetc: automatically select IERB module

2021-04-20 Thread Michael Walle
: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block") Signed-off-by: Michael Walle --- drivers/net/ethernet/freescale/enetc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/d

Re: [PATCH net-next 0/5] Flow control for NXP ENETC

2021-04-20 Thread Michael Walle
Hi Vladimir, Am 2021-04-20 16:04, schrieb Vladimir Oltean: On Tue, Apr 20, 2021 at 03:27:24PM +0200, Michael Walle wrote: Hi Vladimir, Am 2021-04-17 01:42, schrieb Vladimir Oltean: > From: Vladimir Oltean > > This patch series contains logic for enabling the lossless mode on the &

Re: [PATCH net-next 0/5] Flow control for NXP ENETC

2021-04-20 Thread Michael Walle
Hi Vladimir, Am 2021-04-17 01:42, schrieb Vladimir Oltean: From: Vladimir Oltean This patch series contains logic for enabling the lossless mode on the RX rings of the ENETC, and the PAUSE thresholds on the internal FIFO memory. During testing it was found that, with the default FIFO configur

[PATCH net-next v2] net: phy: at803x: fix probe error if copper page is selected

2021-04-20 Thread Michael Walle
o see, that the parse_dt() actually enables the regulator. Thus move the regulator_enable() to the probe function and undo it in case of an error. Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init") Signed-off-by: Michael Walle --- Changes since v1: - take the b

[PATCH net-next] net: phy: at803x: fix probe error if copper page is selected

2021-04-20 Thread Michael Walle
o see, that the parse_dt() actually enables the regulator. Thus move the regulator_enable() to the probe function and undo it in case of an error. Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init") Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 21

Re: [PATCH net-next v4 2/2] of: net: fix of_get_mac_addr_nvmem() for non-platform devices

2021-04-16 Thread Michael Walle
Am 2021-04-16 05:24, schrieb Benjamin Herrenschmidt: On Mon, 2021-04-12 at 19:47 +0200, Michael Walle wrote: /** * of_get_phy_mode - Get phy mode for given device_node @@ -59,15 +60,39 @@ static int of_get_mac_addr(struct device_node *np, const char *name, u8 *addr) static int

Re: [PATCH net-next 1/3] dt-bindings: net: add nvmem-mac-address-offset property

2021-04-15 Thread Michael Walle
Am 2021-04-15 23:59, schrieb Rob Herring: On Wed, Apr 14, 2021 at 05:43:49PM +0200, Andrew Lunn wrote: On Wed, Apr 14, 2021 at 05:26:55PM +0200, Michael Walle wrote: > It is already possible to read the MAC address via a NVMEM provider. But > there are boards, esp. with many ports, whic

[PATCH net-next 3/3] net: implement nvmem-mac-address-offset DT property

2021-04-14 Thread Michael Walle
The MAC address fetched by an NVMEM provider might have an offset to it. Add the support for it in nvmem_get_mac_address(). Signed-off-by: Michael Walle --- drivers/of/of_net.c | 4 net/ethernet/eth.c | 5 + 2 files changed, 9 insertions(+) diff --git a/drivers/of/of_net.c b/drivers

[PATCH net-next 1/3] dt-bindings: net: add nvmem-mac-address-offset property

2021-04-14 Thread Michael Walle
It is already possible to read the MAC address via a NVMEM provider. But there are boards, esp. with many ports, which only have a base MAC address stored. Thus we need to have a way to provide an offset per network device. Signed-off-by: Michael Walle --- .../devicetree/bindings/net/ethernet

[PATCH net-next 2/3] net: add helper eth_addr_add()

2021-04-14 Thread Michael Walle
Sometimes you need to add an offset to a base ethernet address. Add a helper for that. Signed-off-by: Michael Walle --- include/linux/etherdevice.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 330345b1be54

[PATCH net-next 0/3] net: add support for an offset of a nvmem provided MAC address

2021-04-14 Thread Michael Walle
Boards with multiple ethernet ports might store their MAC addresses not individually per port but just store one base MAC address. To get the MAC address of a specific network port we have to add an offset. This series adds a new device tree property "nvmem-mac-address-offset". Michae

[PATCH net-next] net: enetc: fetch MAC address from device tree

2021-04-14 Thread Michael Walle
e, this is a no-op. Signed-off-by: Michael Walle --- .../net/ethernet/freescale/enetc/enetc_pf.c | 65 ++- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c index f6

Re: [PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-14 Thread Michael Walle
Hi Dan, Am 2021-04-14 07:33, schrieb Dan Carpenter: url: https://github.com/0day-ci/linux/commits/Michael-Walle/of-net-support-non-platform-devices-in-of_get_mac_address/20210406-234030 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git

[PATCH net-next v4 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-12 Thread Michael Walle
;+... x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/

[PATCH net-next v4 2/2] of: net: fix of_get_mac_addr_nvmem() for non-platform devices

2021-04-12 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- drivers/of/of_net.c | 35

[PATCH net-next v4 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-12 Thread Michael Walle
Carpenter - changed subject of patch 2/2, as suggested by Florian Fainelli changes since v2: - fixed of_get_mac_addr_nvmem() signature, which was accidentially fixed in patch 2/2 again changes since v1: - fixed stmmac_probe_config_dt() for !CONFIG_OF - added missing queue in patch subje

Re: [PATCH net-next v3 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-07 Thread Michael Walle
Am 2021-04-07 00:09, schrieb Michael Walle: [..] diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c index bc0a27de69d4..2d5d5e59aea5 100644 --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c @@ -45,42 +45,35 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface

[PATCH net-next v3 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- Please note, that I've kep

[PATCH net-next v3 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-06 Thread Michael Walle
;+... x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/

[PATCH net-next v3 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-06 Thread Michael Walle
led before of_get_mac_address(). No driver does it this way. changes since v2: - fixed of_get_mac_addr_nvmem() signature, which was accidentially fixed in patch 2/2 again changes since v1: - fixed stmmac_probe_config_dt() for !CONFIG_OF - added missing queue in patch subject Michael Walle (2):

[PATCH net-next v2 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- Please note, that I've kep

[PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-06 Thread Michael Walle
;+... x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/

[PATCH net-next v2 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-06 Thread Michael Walle
led before of_get_mac_address(). No driver does it this way. changes since v1: - fixed stmmac_probe_config_dt() for !CONFIG_OF - added missing queue in patch subject Michael Walle (2): of: net: pass the dst buffer to of_get_mac_address() of: net: fix of_get_mac_addr_nvmem() for PCI and DSA no

Re: [PATCH 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Michael Walle
Am 2021-04-06 00:13, schrieb Andrew Lunn: On Mon, Apr 05, 2021 at 11:46:04PM +0200, Michael Walle wrote: Hi Andrew, Am 2021-04-05 23:34, schrieb Andrew Lunn: > > -static int of_get_mac_addr_nvmem(struct device_node *np, u8 addr) > > +static int of_get_mac_addr_nvmem(struct device_

Re: [PATCH 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-05 Thread Michael Walle
Hi Andrew, Am 2021-04-05 23:34, schrieb Andrew Lunn: -static int of_get_mac_addr_nvmem(struct device_node *np, u8 addr) +static int of_get_mac_addr_nvmem(struct device_node *np, u8 *addr) { struct platform_device *pdev = of_find_device_by_node(np); + struct nvmem_cell *cell; +

[PATCH 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-05 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- Please note, that I've kep

[PATCH 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-05 Thread Michael Walle
;+... x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/

[PATCH 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-05 Thread Michael Walle
led before of_get_mac_address(). No driver does it this way. Michael Walle (2): of: of_net: pass the dst buffer to of_get_mac_address() of: net: fix of_get_mac_address_nvmem() for PCI and DSA nodes arch/arm/mach-mvebu/kirkwood.c| 3 +- arch/powerpc/sysdev/tsi108_dev.c

Re: [PATCH net-next] net: enetc: teardown CBDR during PF/VF unbind

2021-03-19 Thread Michael Walle
the probe error path. Fixes: 4b47c0b81ffd ("net: enetc: don't initialize unused ports from a separate code path") Reported-by: Michael Walle Signed-off-by: Vladimir Oltean Tested-by: Michael Walle Thanks! -michael

Re: [PATCH v2 net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
Am 2021-03-18 20:44, schrieb Michael Walle: Here is what Vladimir says about it: at803x_aneg_done() keeps the aneg reporting as "not done" even when the copper-side link was reported as up, but the in-band autoneg has not finished. That was the _intended_ behavior when tha

[PATCH v2 net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
which is also the fallback. Thus we can just remove at803x_aneg_done() altogether. [1] https://lore.kernel.org/netdev/fdf0074a-2572-5914-6f3e-77202cbf9...@gmail.com/ Suggested-by: Vladimir Oltean Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 31 --

Re: [PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
Am 2021-03-18 17:21, schrieb Heiner Kallweit: On 18.03.2021 16:17, Vladimir Oltean wrote: On Thu, Mar 18, 2021 at 03:54:00PM +0100, Heiner Kallweit wrote: On 18.03.2021 15:23, Michael Walle wrote: at803x_aneg_done() is pretty much dead code since the patch series "net: phy: improv

[PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
at803x_aneg_done() is pretty much dead code since the patch series "net: phy: improve and simplify phylib state machine" [1]. Remove it. [1] https://lore.kernel.org/netdev/922c223b-7bc0-e0ec-345d-2034b796a...@gmail.com/ Suggested-by: Vladimir Oltean Signed-off-by: Michael Walle --

Re: [PATCH v2 net 5/6] net: enetc: don't disable VLAN filtering in IFF_PROMISC mode

2021-03-01 Thread Michael Walle
Am 2021-02-28 23:48, schrieb Vladimir Oltean: On Sat, Feb 27, 2021 at 02:18:20PM +0100, Michael Walle wrote: Am 2021-02-27 01:16, schrieb Vladimir Oltean: > On Fri, Feb 26, 2021 at 03:49:22PM -0800, Jakub Kicinski wrote: > > On Sat, 27 Feb 2021 01:42:44 +0200 Vladimir Oltean wrote: >

Re: [PATCH v2 net 2/6] net: enetc: initialize RFS/RSS memories for unused ports too

2021-02-27 Thread Michael Walle
lize the RFS and RSS memories") Reported-by: Michael Walle Cc: Jesse Brandeburg Signed-off-by: Vladimir Oltean I had this patch in my tree for a while now. As we've learned, it really depends on a particular power-up state for the error to happen. So take this with a grain of salt: I

Re: [PATCH v2 net 5/6] net: enetc: don't disable VLAN filtering in IFF_PROMISC mode

2021-02-27 Thread Michael Walle
Am 2021-02-27 01:16, schrieb Vladimir Oltean: On Fri, Feb 26, 2021 at 03:49:22PM -0800, Jakub Kicinski wrote: On Sat, 27 Feb 2021 01:42:44 +0200 Vladimir Oltean wrote: > On Fri, Feb 26, 2021 at 03:28:36PM -0800, Jakub Kicinski wrote: > > I don't understand what you're fixing tho. > > > > Are we

Re: [PATCH v2 net-next] net: phy: icplus: call phy_restore_page() when phy_select_page() fails

2021-02-19 Thread Michael Walle
o it eventually leads to a dead lock. Fixes: 32ab60e53920 ("net: phy: icplus: add MDI/MDIX support for IP101A/G") Fixes: f9bc51e6cce2 ("net: phy: icplus: fix paged register access") Signed-off-by: Dan Carpenter Reviewed-by: Michael Walle I assume, this has to go through

Re: [PATCH net-next v2 0/2] net: phy: at803x: paging support

2021-02-18 Thread Michael Walle
Am 2021-02-18 20:26, schrieb Vladimir Oltean: On Thu, Feb 18, 2021 at 07:52:38PM +0100, Michael Walle wrote: Add paging support to the QCA AR8031/33 PHY. This will be needed if we add support for the .config_inband_aneg callback, see series [1]. The driver itself already accesses the fiber

[PATCH net-next v2 2/2] net: phy: at803x: remove at803x_aneg_done()

2021-02-18 Thread Michael Walle
at803x_aneg_done() is pretty much dead code since the patch series "net: phy: improve and simplify phylib state machine" [1]. Just remove it. [1] https://lore.kernel.org/netdev/922c223b-7bc0-e0ec-345d-2034b796a...@gmail.com/ Suggested-by: Vladimir Oltean Signed-off-by: Mic

[PATCH net-next v2 1/2] net: phy: at803x: add pages support to AR8031/33

2021-02-18 Thread Michael Walle
The AR8031 has two register sets: Copper and Fiber. The fiber page is used in case of 100Base-FX and 1000Base-X. But more importantly it is also used for the SGMII link. Add support to switch between these two. Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 35

[PATCH net-next v2 0/2] net: phy: at803x: paging support

2021-02-18 Thread Michael Walle
Vladimir Oltean mentioned that it is dead code. Therefore, the second patch will just remove it. changes since v1: - second patch will remove at803x_aneg_done() altogether Michael Walle (2): net: phy: at803x: add pages support to AR8031/33 net: phy: at803x: remove at803x_aneg_done() drivers

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-17 Thread Michael Walle
Am 2021-02-17 11:04, schrieb Russell King - ARM Linux admin: On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote: Smatch warns that there is a locking issue in this function: drivers/net/phy/icplus.c:273 ip101a_g_config_intr_pin() warn: inconsistent returns '&phydev->mdio.bus->mdio_lo

Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

2021-02-16 Thread Michael Walle
that the comments in phy_select_page() say we have to call phy_restore_page() even if the call to phy_select_page() fails. Fixes: f9bc51e6cce2 ("net: phy: icplus: fix paged register access") Signed-off-by: Dan Carpenter Reviewed-by: Michael Walle -michael

Re: [PATCH net-next 2/2] net: phy: at803x: use proper locking in at803x_aneg_done()

2021-02-14 Thread Michael Walle
Am 2021-02-14 03:24, schrieb Vladimir Oltean: On Sun, Feb 14, 2021 at 03:18:49AM +0100, Michael Walle wrote: Am 14. Februar 2021 02:57:33 MEZ schrieb Vladimir Oltean : >Hi Michael, > >On Sun, Feb 14, 2021 at 02:04:05AM +0100, Michael Walle wrote: >> at803x_aneg_done()

Re: [PATCH net-next 2/2] net: phy: at803x: use proper locking in at803x_aneg_done()

2021-02-13 Thread Michael Walle
Am 14. Februar 2021 02:57:33 MEZ schrieb Vladimir Oltean : >Hi Michael, > >On Sun, Feb 14, 2021 at 02:04:05AM +0100, Michael Walle wrote: >> at803x_aneg_done() checks if auto-negotiation is completed on the >SGMII >> side. This doesn't take the mdio bus lock and the pa

[PATCH net-next] net: phy: at803x: add MDIX support to AR8031/33

2021-02-13 Thread Michael Walle
AR8035 recently gained MDIX support. The same functions will work for the AR8031/33 PHY. We just need to add the at803x_config_aneg() callback. This was tested on a Kontron sl28 board. Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH net-next 0/2] net: phy: at803x: paging support

2021-02-13 Thread Michael Walle
/netdev/20210212172341.3489046-1-olte...@gmail.com/ Michael Walle (2): net: phy: at803x: add pages support to AR8031/33 net: phy: at803x: use proper locking in at803x_aneg_done() drivers/net/phy/at803x.c | 72 1 file changed, 51 insertions(+), 21 deletions

[PATCH net-next 2/2] net: phy: at803x: use proper locking in at803x_aneg_done()

2021-02-13 Thread Michael Walle
reading the mode register and be a bit more precise on the warning message. Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x

[PATCH net-next 1/2] net: phy: at803x: add pages support to AR8031/33

2021-02-13 Thread Michael Walle
The AR8031 has two register sets: Copper and Fiber. The fiber page is used in case of 100Base-FX and 1000Base-X. But more importantly it is also used for the SGMII link. Add support to switch between these two. Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 35

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 19:56, schrieb Vladimir Oltean: On Sat, Feb 13, 2021 at 06:09:13PM +0100, Michael Walle wrote: Am 2021-02-13 17:53, schrieb Michael Walle: > Am 2021-02-13 01:36, schrieb Vladimir Oltean: > But the Atheros PHY seems to have a problem with the SGMII link > if there is n

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 17:53, schrieb Michael Walle: Am 2021-02-13 01:36, schrieb Vladimir Oltean: But the Atheros PHY seems to have a problem with the SGMII link if there is no autoneg. No matter what I do, I can't get any traffic though if its not gigabit on the copper side. Unfortunately, I don&#

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 01:36, schrieb Vladimir Oltean: On Fri, Feb 12, 2021 at 11:40:59PM +0100, Michael Walle wrote: Am 2021-02-12 18:23, schrieb Vladimir Oltean: > From: Vladimir Oltean > > Currently Linux has no control over whether a MAC-to-PHY interface uses > in-band signaling or not,

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 01:18, schrieb Russell King - ARM Linux admin: On Fri, Feb 12, 2021 at 11:40:59PM +0100, Michael Walle wrote: Fun fact, now it may be the other way around. If the bootloader doesn't configure it and the PHY isn't reset by the hardware, it won't work in the boo

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-12 Thread Michael Walle
Am 2021-02-12 18:23, schrieb Vladimir Oltean: From: Vladimir Oltean Currently Linux has no control over whether a MAC-to-PHY interface uses in-band signaling or not, even though phylink has the managed = "in-band-status"; property which denotes that the MAC expects in-band signaling to

[PATCH net-next v4 5/9] net: phy: icplus: split IP101A/G driver

2021-02-11 Thread Michael Walle
the page select register which - according to the datasheet - is not available on the IP101A. If this register is writable, assume we have an IP101G. Split the combined IP101A/G driver into two separate drivers. Signed-off-by: Michael Walle --- Changes since v3: - none Changes since v2

[PATCH net-next v4 4/9] net: phy: icplus: use the .soft_reset() of the phy-core

2021-02-11 Thread Michael Walle
The PHY core already resets the PHY before .config_init() if a .soft_reset() op is registered. Drop the open-coded ip1xx_reset(). Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - none Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c

[PATCH net-next v4 2/9] net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G

2021-02-10 Thread Michael Walle
According to the datasheet of the IP101A/G there is no revision field and MII_PHYSID2 always reads as 0x0c54. Use PHY_ID_MATCH_EXACT() then. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - none Changes since v2: - none Changes since v1: - none drivers/net

[PATCH net-next v4 6/9] net: phy: icplus: don't set APS_EN bit on IP101G

2021-02-10 Thread Michael Walle
This bit is reserved as 'always-write-1'. While this is not a particular error, because we are only setting it, guard it by checking the model to prevent errors in the future. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - none Changes since v2: - non

[PATCH net-next v4 7/9] net: phy: icplus: fix paged register access

2021-02-10 Thread Michael Walle
is _not_ reset with a soft reset of the PHY. To ease the function reuse between the non-paged register space of the IP101A and the IP101G, add noop read_page()/write_page() callbacks so the IP101G functions can also be used for the IP101A. Signed-off-by: Michael Walle --- Changes since v3: - ad

[PATCH net-next v4 9/9] net: phy: icplus: add MDI/MDIX support for IP101A/G

2021-02-10 Thread Michael Walle
Implement the operations to set desired mode and retrieve the current mode. This feature was tested with an IP101G. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - added return code check on phy_select_page() Changes since v2: - none Changes since v1: - none

[PATCH net-next v4 8/9] net: phy: icplus: add PHY counter for IP101G

2021-02-10 Thread Michael Walle
error counters implement only support for the error counters. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - none Changes since v2: - none Changes since v1: - renamed the functions to represend a IP101G-only function - enable the counters in IP101G's c

[PATCH net-next v4 1/9] net: phy: icplus: use PHY_ID_MATCH_MODEL() macro

2021-02-10 Thread Michael Walle
Simpify the initializations of the structures. There is no functional change. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - none Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c | 19 ++- 1 file changed, 10

[PATCH net-next v4 0/9] net: phy: icplus: cleanups and new features

2021-02-10 Thread Michael Walle
her active page before booting linux. The last two patches add the new features. Michael Walle (9): net: phy: icplus: use PHY_ID_MATCH_MODEL() macro net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G net: phy: icplus: drop address operator for functions net: phy: icplus: use the .soft_re

[PATCH net-next v4 3/9] net: phy: icplus: drop address operator for functions

2021-02-10 Thread Michael Walle
Don't sometimes use the address operator and sometimes not. Drop it and make the code look uniform. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v3: - none Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c | 10 +- 1

Re: [PATCH net-next v3 9/9] net: phy: icplus: add MDI/MDIX support for IP101A/G

2021-02-10 Thread Michael Walle
Am 2021-02-10 22:08, schrieb Michael Walle: Implement the operations to set desired mode and retrieve the current mode. This feature was tested with an IP101G. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v2: - none Changes since v1: - none, except that the

Re: [PATCH net-next v3 7/9] net: phy: icplus: fix paged register access

2021-02-10 Thread Michael Walle
Am 2021-02-10 22:08, schrieb Michael Walle: Registers >= 16 are paged. Be sure to set the page. It seems this was working for now, because the default is correct for the registers used in the driver at the moment. But this will also assume, nobody will change the page select register bef

[PATCH net-next v3 9/9] net: phy: icplus: add MDI/MDIX support for IP101A/G

2021-02-10 Thread Michael Walle
Implement the operations to set desired mode and retrieve the current mode. This feature was tested with an IP101G. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v2: - none Changes since v1: - none, except that the callbacks are register for both IP101A and IP101G

[PATCH net-next v3 5/9] net: phy: icplus: split IP101A/G driver

2021-02-10 Thread Michael Walle
the page select register which - according to the datasheet - is not available on the IP101A. If this register is writable, assume we have an IP101G. Split the combined IP101A/G driver into two separate drivers. Signed-off-by: Michael Walle --- Changes since v2: - dropped the PHY_BASIC_FEATURES

[PATCH net-next v3 7/9] net: phy: icplus: fix paged register access

2021-02-10 Thread Michael Walle
is _not_ reset with a soft reset of the PHY. To ease the function reuse between the non-paged register space of the IP101A and the IP101G, add noop read_page()/write_page() callbacks so the IP101G functions can also be used for the IP101A. Signed-off-by: Michael Walle --- Changes since v2: - n

[PATCH net-next v3 6/9] net: phy: icplus: don't set APS_EN bit on IP101G

2021-02-10 Thread Michael Walle
This bit is reserved as 'always-write-1'. While this is not a particular error, because we are only setting it, guard it by checking the model to prevent errors in the future. Signed-off-by: Michael Walle --- Changes since v2: - none Changes since v1: - dropped the model check. I

[PATCH net-next v3 8/9] net: phy: icplus: add PHY counter for IP101G

2021-02-10 Thread Michael Walle
error counters implement only support for the error counters. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v2: - none Changes since v1: - renamed the functions to represend a IP101G-only function - enable the counters in IP101G's config_init() drivers/net/ph

[PATCH net-next v3 3/9] net: phy: icplus: drop address operator for functions

2021-02-10 Thread Michael Walle
Don't sometimes use the address operator and sometimes not. Drop it and make the code look uniform. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c | 10 +- 1 file changed, 5 insertions(

[PATCH net-next v3 4/9] net: phy: icplus: use the .soft_reset() of the phy-core

2021-02-10 Thread Michael Walle
The PHY core already resets the PHY before .config_init() if a .soft_reset() op is registered. Drop the open-coded ip1xx_reset(). Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c | 32

[PATCH net-next v3 1/9] net: phy: icplus: use PHY_ID_MATCH_MODEL() macro

2021-02-10 Thread Michael Walle
Simpify the initializations of the structures. There is no functional change. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions

[PATCH net-next v3 2/9] net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G

2021-02-10 Thread Michael Walle
According to the datasheet of the IP101A/G there is no revision field and MII_PHYSID2 always reads as 0x0c54. Use PHY_ID_MATCH_EXACT() then. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v2: - none Changes since v1: - none drivers/net/phy/icplus.c | 4 ++-- 1 file

[PATCH net-next v2 0/9] net: phy: icplus: cleanups and new features

2021-02-10 Thread Michael Walle
her active page before booting linux. The last two patches add the new features. Michael Walle (9): net: phy: icplus: use PHY_ID_MATCH_MODEL() macro net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G net: phy: icplus: drop address operator for functions net: phy: icplus: use the .soft_re

[PATCH net-next v2 8/9] net: phy: icplus: add PHY counter for IP101G

2021-02-10 Thread Michael Walle
error counters implement only support for the error counters. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v1: - renamed the functions to represend a IP101G-only function - enable the counters in IP101G's config_init() drivers/net/phy/icp

[PATCH net-next v2 6/9] net: phy: icplus: don't set APS_EN bit on IP101G

2021-02-10 Thread Michael Walle
This bit is reserved as 'always-write-1'. While this is not a particular error, because we are only setting it, guard it by checking the model to prevent errors in the future. Signed-off-by: Michael Walle --- Changes since v1: - dropped the model check. Instead use two different

[PATCH net-next v2 7/9] net: phy: icplus: fix paged register access

2021-02-10 Thread Michael Walle
is _not_ reset with a soft reset of the PHY. To ease the function reuse between the non-paged register space of the IP101A and the IP101G, add noop read_page()/write_page() callbacks so the IP101G functions can also be used for the IP101A. Signed-off-by: Michael Walle --- Changes since v1: - introd

[PATCH net-next v2 9/9] net: phy: icplus: add MDI/MDIX support for IP101A/G

2021-02-10 Thread Michael Walle
Implement the operations to set desired mode and retrieve the current mode. This feature was tested with an IP101G. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v1: - none, except that the callbacks are register for both IP101A and IP101G PHY drivers drivers

[PATCH net-next v2 5/9] net: phy: icplus: split IP101A/G driver

2021-02-10 Thread Michael Walle
the page select register which - according to the datasheet - is not available on the IP101A. If this register is writable, assume we have an IP101G. Split the combined IP101A/G driver into two separate drivers. Signed-off-by: Michael Walle --- Changes since v1: - use match_phy_device() as

[PATCH net-next v2 2/9] net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G

2021-02-10 Thread Michael Walle
According to the datasheet of the IP101A/G there is no revision field and MII_PHYSID2 always reads as 0x0c54. Use PHY_ID_MATCH_EXACT() then. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v1: - none drivers/net/phy/icplus.c | 4 ++-- 1 file changed, 2 insertions

[PATCH net-next v2 1/9] net: phy: icplus: use PHY_ID_MATCH_MODEL() macro

2021-02-10 Thread Michael Walle
Simpify the initializations of the structures. There is no functional change. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v1: - none drivers/net/phy/icplus.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/phy

[PATCH net-next v2 4/9] net: phy: icplus: use the .soft_reset() of the phy-core

2021-02-10 Thread Michael Walle
The PHY core already resets the PHY before .config_init() if a .soft_reset() op is registered. Drop the open-coded ip1xx_reset(). Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v1: - none drivers/net/phy/icplus.c | 32 ++-- 1 file changed

[PATCH net-next v2 3/9] net: phy: icplus: drop address operator for functions

2021-02-10 Thread Michael Walle
Don't sometimes use the address operator and sometimes not. Drop it and make the code look uniform. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn --- Changes since v1: - none drivers/net/phy/icplus.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH net-next v2 0/9] net: phy: icplus: cleanups and new features

2021-02-10 Thread Michael Walle
her active page before booting linux. The last two patches add the new features. Michael Walle (9): net: phy: icplus: use PHY_ID_MATCH_MODEL() macro net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G net: phy: icplus: drop address operator for functions net: phy: icplus: use the .soft_re

Re: [PATCH net-next 7/9] net: phy: icplus: select page before writing control register

2021-02-10 Thread Michael Walle
Am 2021-02-10 12:48, schrieb Russell King - ARM Linux admin: On Wed, Feb 10, 2021 at 12:14:35PM +0100, Michael Walle wrote: Am 2021-02-10 11:49, schrieb Russell King - ARM Linux admin: The PHY doesn't support fiber and register 0..15 are always available regardless of the selected page fo

Re: [PATCH net-next] net: phy: introduce phydev->port

2021-02-10 Thread Michael Walle
Am 2021-02-10 12:54, schrieb Russell King - ARM Linux admin: On Wed, Feb 10, 2021 at 12:20:02PM +0100, Michael Walle wrote: Am 2021-02-09 17:38, schrieb Michael Walle: > --- a/drivers/net/phy/phy.c > +++ b/drivers/net/phy/phy.c > @@ -308,7 +308,7 @@ void phy_ethtool_ksettings_g

Re: [PATCH net-next] net: phy: introduce phydev->port

2021-02-10 Thread Michael Walle
Am 2021-02-09 17:38, schrieb Michael Walle: --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -308,7 +308,7 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev, if (phydev->interface == PHY_INTERFACE_MODE_MOCA) cmd->base.port = PORT_BNC;

Re: [PATCH net-next 7/9] net: phy: icplus: select page before writing control register

2021-02-10 Thread Michael Walle
Am 2021-02-10 11:49, schrieb Russell King - ARM Linux admin: On Wed, Feb 10, 2021 at 11:38:18AM +0100, Michael Walle wrote: Am 2021-02-10 11:30, schrieb Russell King - ARM Linux admin: > On Wed, Feb 10, 2021 at 08:03:07AM +0100, Heiner Kallweit wrote: > > On 09.02.2021 17:40, Mich

Re: [PATCH net-next 7/9] net: phy: icplus: select page before writing control register

2021-02-10 Thread Michael Walle
Am 2021-02-10 11:30, schrieb Russell King - ARM Linux admin: On Wed, Feb 10, 2021 at 08:03:07AM +0100, Heiner Kallweit wrote: On 09.02.2021 17:40, Michael Walle wrote: > +out: > + return phy_restore_page(phydev, oldpage, err); If a random page was set before entering config_init,

Re: [PATCH net-next 7/9] net: phy: icplus: select page before writing control register

2021-02-10 Thread Michael Walle
Hi, Am 2021-02-10 10:03, schrieb Heiner Kallweit: [..] +    return phy_restore_page(phydev, oldpage, err); If a random page was set before entering config_init, do we actually want to restore it? Or wouldn't it be better to set the default page as part of initialization? First, I want to

Re: [PATCH net-next 7/9] net: phy: icplus: select page before writing control register

2021-02-10 Thread Michael Walle
Hi, Am 2021-02-10 08:03, schrieb Heiner Kallweit: On 09.02.2021 17:40, Michael Walle wrote: Registers >= 16 are paged. Be sure to set the page. It seems this was working for now, because the default is correct for the registers used in the driver at the moment. But this will also ass

[PATCH net-next 9/9] net: phy: icplus: add MDI/MDIX support for IP101A/G

2021-02-09 Thread Michael Walle
Implement the operations to set desired mode and retrieve the current mode. This feature was tested with an IP101G. Signed-off-by: Michael Walle --- drivers/net/phy/icplus.c | 91 1 file changed, 91 insertions(+) diff --git a/drivers/net/phy/icplus.c b

[PATCH net-next 7/9] net: phy: icplus: select page before writing control register

2021-02-09 Thread Michael Walle
is _not_ reset with a soft reset of the PHY. Add read_page()/write_page() support for the IP101G and use it accordingly. Signed-off-by: Michael Walle --- drivers/net/phy/icplus.c | 50 +++- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/drivers/

[PATCH net-next 8/9] net: phy: icplus: add PHY counter for IP101G

2021-02-09 Thread Michael Walle
error counters implement only support for the error counters. Signed-off-by: Michael Walle --- drivers/net/phy/icplus.c | 78 1 file changed, 78 insertions(+) diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index 858b9326a72d..d1b57d8

[PATCH net-next 6/9] net: phy: icplus: don't set APS_EN bit on IP101G

2021-02-09 Thread Michael Walle
This bit is reserved as 'always-write-1'. While this is not a particular error, because we are only setting it, guard it by checking the model to prevent errors in the future. Signed-off-by: Michael Walle --- drivers/net/phy/icplus.c | 15 ++- 1 file changed, 10 insert

[PATCH net-next 5/9] net: phy: icplus: add IP101A/IP101G model detection

2021-02-09 Thread Michael Walle
the page select register which - according to the datasheet - is not available on the IP101A. If this register is writable, assume we have an IP101G. Signed-off-by: Michael Walle --- drivers/net/phy/icplus.c | 43 +++- 1 file changed, 42 insertions(+), 1

[PATCH net-next 3/9] net: phy: icplus: drop address operator for functions

2021-02-09 Thread Michael Walle
Don't sometimes use the address operator and sometimes not. Drop it and make the code look uniform. Signed-off-by: Michael Walle --- drivers/net/phy/icplus.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c

[PATCH net-next 2/9] net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G

2021-02-09 Thread Michael Walle
According to the datasheet of the IP101A/G there is no revision field and MII_PHYSID2 always reads as 0x0c54. Use PHY_ID_MATCH_EXACT() then. Signed-off-by: Michael Walle --- drivers/net/phy/icplus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/icplus.c

  1   2   3   >