[PATCH net-next v2 3/3] net: phy: marvell-88x2222: swap 1G/10G modes on autoneg

2021-04-13 Thread Ivan Bornyakov
nk to be established. And vice versa. If 10GBase-R link can't be established for quite a time, and autonegotiation is enabled, and there is signal in line, switch line interface type to appropriate 1G mode, i.e. 1000Base-X or SGMII, if supported. Signed-off-by: Ivan Bornyakov --- drive

[PATCH net-next v2 0/3] net: phy: marvell-88x2222: a couple of improvements

2021-04-13 Thread Ivan Bornyakov
for the sake of easier review. Ivan Bornyakov (3): net: phy: marvell-88x: check that link is operational net: phy: marvell-88x: move read_status after config_aneg net: phy: marvell-88x: swap 1G/10G modes on autoneg drivers/net/phy/marvell-88x.c | 314 -

[PATCH net-next v2 1/3] net: phy: marvell-88x2222: check that link is operational

2021-04-13 Thread Ivan Bornyakov
to the tranciever, check only PMD Recieve Signal Detect register. Signed-off-by: Ivan Bornyakov --- drivers/net/phy/marvell-88x.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/net/phy/marvell-88x.c b/drivers/net/phy/marvell-88x.c index

[PATCH net-next v2 2/3] net: phy: marvell-88x2222: move read_status after config_aneg

2021-04-13 Thread Ivan Bornyakov
No functional changes, just move read link status routines below autonegotiation configuration to make future functional changes more distinct. Signed-off-by: Ivan Bornyakov --- drivers/net/phy/marvell-88x.c | 196 +++--- 1 file changed, 98 insertions(+), 98

Re: [PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational

2021-04-13 Thread Ivan Bornyakov
On Tue, Apr 13, 2021 at 10:23:48AM +0100, Russell King - ARM Linux admin wrote: > On Tue, Apr 13, 2021 at 10:19:30AM +0300, Ivan Bornyakov wrote: > > On Tue, Apr 13, 2021 at 01:40:32AM +0200, Andrew Lunn wrote: > > > On Mon, Apr 12, 2021 at 03:16:59PM +0300, Ivan Bornyakov wrote

Re: [PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational

2021-04-13 Thread Ivan Bornyakov
On Tue, Apr 13, 2021 at 01:40:32AM +0200, Andrew Lunn wrote: > On Mon, Apr 12, 2021 at 03:16:59PM +0300, Ivan Bornyakov wrote: > > Some SFP modules uses RX_LOS for link indication. In such cases link > > will be always up, even without cable connected. RX_LOS changes will >

Re: [PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational

2021-04-13 Thread Ivan Bornyakov
On Tue, Apr 13, 2021 at 01:32:12AM +0200, Marek BehĂșn wrote: > On Mon, 12 Apr 2021 15:16:59 +0300 > Ivan Bornyakov wrote: > > > Some SFP modules uses RX_LOS for link indication. In such cases link > > will be always up, even without cable connected. RX_LOS changes wil

[PATCH net-next 2/2] net: phy: marvell-88x2222: swap 1G/10G modes on autoneg

2021-04-12 Thread Ivan Bornyakov
ff-by: Ivan Bornyakov --- drivers/net/phy/marvell-88x.c | 276 ++ 1 file changed, 168 insertions(+), 108 deletions(-) diff --git a/drivers/net/phy/marvell-88x.c b/drivers/net/phy/marvell-88x.c index fb285ac741b2..d16c81f08334 100644 --- a/drivers/net/phy/ma

[PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational

2021-04-12 Thread Ivan Bornyakov
Some SFP modules uses RX_LOS for link indication. In such cases link will be always up, even without cable connected. RX_LOS changes will trigger link_up()/link_down() upstream operations. Thus, check that SFP link is operational before actual read link status. Signed-off-by: Ivan Bornyakov

[PATCH net-next 0/2] net: phy: marvell-88x2222: a couple of improvements

2021-04-12 Thread Ivan Bornyakov
and 1000Base-X/SGMII if autonegotiation can't complete but there is signal in line. Ivan Bornyakov (2): net: phy: marvell-88x: check that link is operational net: phy: marvell-88x: swap 1G/10G modes on autoneg drivers/net/phy/marvell-88x.c | 296 +++-

[RESEND PATCH v4 net-next] net: phy: add Marvell 88X2222 transceiver support

2021-03-15 Thread Ivan Bornyakov
. Signed-off-by: Ivan Bornyakov --- drivers/net/phy/Kconfig | 6 + drivers/net/phy/Makefile | 1 + drivers/net/phy/marvell-88x.c | 519 ++ include/linux/marvell_phy.h | 1 + 4 files changed, 527 insertions(+) create mode 100644 drivers

Re: [PATCH v4] net: phy: add Marvell 88X2222 transceiver support

2021-03-10 Thread Ivan Bornyakov
On Wed, Mar 03, 2021 at 07:02:11PM +0300, Ivan Bornyakov wrote: > Add basic support for the Marvell 88X multi-speed ethernet > transceiver. > > This PHY provides data transmission over fiber-optic as well as Twinax > copper links. The 88X supports 2 ports of 10GBase-R and

[PATCH v4] net: phy: add Marvell 88X2222 transceiver support

2021-03-03 Thread Ivan Bornyakov
. Signed-off-by: Ivan Bornyakov --- drivers/net/phy/Kconfig | 6 + drivers/net/phy/Makefile | 1 + drivers/net/phy/marvell-88x.c | 519 ++ include/linux/marvell_phy.h | 1 + 4 files changed, 527 insertions(+) create mode 100644 drivers

Re: [PATCH v3] net: phy: add Marvell 88X2222 transceiver support

2021-03-03 Thread Ivan Bornyakov
On Wed, Mar 03, 2021 at 11:36:55AM +, Russell King - ARM Linux admin wrote: > > > + linkmode_set_bit(ETHTOOL_LINK_MODE_1baseKR_Full_BIT, supported); > > Does the PHY support backplane links? > It looks like it does, but our hardware only have SFP cages, so I'll drop backplane link mod

[PATCH v3] net: phy: add Marvell 88X2222 transceiver support

2021-03-03 Thread Ivan Bornyakov
. Signed-off-by: Ivan Bornyakov --- drivers/net/phy/Kconfig | 6 + drivers/net/phy/Makefile | 1 + drivers/net/phy/marvell-88x.c | 533 ++ include/linux/marvell_phy.h | 1 + 4 files changed, 541 insertions(+) create mode 100644 drivers

Re: [PATCH v2] net: phy: add Marvell 88X2222 transceiver support

2021-02-20 Thread Ivan Bornyakov
On Sat, Feb 20, 2021 at 11:53:04AM +, Russell King - ARM Linux admin wrote: > On Sat, Feb 20, 2021 at 12:46:23PM +0300, Ivan Bornyakov wrote: > > + > > + switch (sfp_interface) { > > + case PHY_INTERFACE_MODE_10GBASER: > > +

[PATCH v2] net: phy: add Marvell 88X2222 transceiver support

2021-02-20 Thread Ivan Bornyakov
. Signed-off-by: Ivan Bornyakov --- drivers/net/phy/Kconfig | 6 + drivers/net/phy/Makefile | 1 + drivers/net/phy/marvell-88x.c | 510 ++ include/linux/marvell_phy.h | 1 + 4 files changed, 518 insertions(+) create mode 100644 drivers

Re: [PATCH] net: phy: add Marvell 88X2222 transceiver support

2021-02-02 Thread Ivan Bornyakov
On Tue, Feb 02, 2021 at 04:48:01PM +, Russell King - ARM Linux admin wrote: > On Mon, Feb 01, 2021 at 10:22:51PM +0300, Ivan Bornyakov wrote: > > +/* PMD Transmit Disable */ > > +#defineMV_TX_DISABLE 0x0009 > > +#defineMV_TX_DISABLE_GLOBALB

Re: [PATCH] net: phy: add Marvell 88X2222 transceiver support

2021-02-02 Thread Ivan Bornyakov
On Mon, Feb 01, 2021 at 11:56:01PM +0100, Andrew Lunn wrote: > > +static int mv_config_init(struct phy_device *phydev) > > +{ > > + linkmode_zero(phydev->supported); > > + linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported); > > + linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BI

[PATCH] net: phy: add Marvell 88X2222 transceiver support

2021-02-01 Thread Ivan Bornyakov
-R, RXAUI, 1000Base-X and 2 ports of XAUI. This driver, however, supports only XAUI on the host-side and 1000Base-X/10GBase-R on the line-side, for now. Interrupts are not supported also. Internal registers access compliant with the Clause 45 specification. Signed-off-by: Ivan Bornyakov

[PATCH] atm: zatm: fix memcmp casting

2018-05-25 Thread Ivan Bornyakov
memcmp() returns int, but eprom_try_esi() cast it to unsigned char. One can lose significant bits and get 0 from non-0 value returned by the memcmp(). Signed-off-by: Ivan Bornyakov --- drivers/atm/zatm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atm/zatm.c