linux_dsm_epyc7002/drivers/net/ethernet
Russell King 388ca27ffd net: marvell: mvpp2: phylink compliance updates
Sven Auhagen reported issues with negotiation on a couple of his
platforms using a mixture of SFP and PHYs in various different
modes.  Debugging to root cause proved difficult, but essentially
the problem comes down to the mvpp2 phylink implementation being
slightly at odds with what is expected.

phylink operates in three modes: phy, fixed-link, and in-band mode.

In the first two modes, the expected behaviour from a MAC driver is
that phylink resolves the operating mode and passes the mode to the
MAC driver for it to program, including when the link should be
brought up or taken down.  This is basically the same as the libphy
approach.  This does not negate the requirement to advertise a correct
control word for interface modes that have control words where that
can be reasonably controlled.

The second mode is in-band mode, where the MAC is expected to use the
in-band control word to determine the operating mode.

The mvneta driver implements the correct pattern required to support
this: configure the port interface type separately from the in-band
mode(s).  This is now specified in the phylink documentation patches.

mvpp2 was programming in-band mode for SGMII and the 802.3z modes no
what, and avoided forcing the link up in fixed/phy modes.  This caused
a problem with some boards where the PHY is by default programmed to
enter AN bypass mode, the PHY would report that the link was up, but
the mvpp2 never completed the exchange of control word.

Another issue that mvpp2 has is it sets SGMII AN format control word
for both SGMII and 802.3z modes. The format of the control word is
defined by MVPP2_GMAC_INBAND_AN_MASK, which should be set for SGMII
and clear for 802.3z. Available Marvell documentation for earlier
GMAC implementations does not make this clear, but this has been
ascertained via extensive testing on earlier GMAC implementations,
and then confirmed with a Macchiatobin Single Shot connected to a
Clearfog: when MVPP2_GMAC_INBAND_AN_MASK is set, the clearfog does
not receive the advertised pause mode settings.

Lastly, there is no flow control in the in-band control word in Cisco
SGMII, setting the flow control autonegotiation bit even with a PHY
that has the Marvell extension to send this information does not result
in the flow control being enabled at the MAC.  We need to do this
manually using the information provided via phylink.

Re-code mvpp2's mac_config() and mac_link_up() to follow this pattern.
This allows Sven Auhagen's board and Macchiatobin to reliably bring
the link up with the 88e1512 PHY with phylink operating in PHY mode
with COMPHY built as a module but the rest of the networking built-in,
and u-boot having brought up the interface.  in-band mode requires an
additional patch to resolve another problem.

Tested-by: Sven Auhagen <sven.auhagen@voleatech.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-08 23:08:39 -08:00
..
3com net: 3c509: mark expected switch fall-throughs 2019-01-23 09:06:36 -08:00
8390
adaptec
aeroflex cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
agere
alacritech cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
allwinner
alteon net: alteon: replace dev_kfree_skb_irq by dev_consume_skb_irq 2019-01-28 23:09:19 -08:00
altera net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case 2019-01-27 10:39:07 -08:00
amazon cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-29 21:18:54 -08:00
apm cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
apple net: apple: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-01-28 23:09:19 -08:00
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
arc
atheros atheros: atl2: fix an indentaion issue on a return statement 2019-02-02 20:14:39 -08:00
aurora
broadcom bnx2x: Use struct_size() in kzalloc() 2019-02-08 22:57:28 -08:00
brocade bna: fix indentation issue on call to bfa_ioc_pf_failed 2019-02-02 20:14:38 -08:00
cadence net: macb: add sam9x60-macb compatibility string 2019-02-08 15:19:50 -08:00
calxeda
cavium Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
chelsio cxgb4: Update 1.22.9.0 as the latest firmware supported. 2019-02-06 13:42:09 -08:00
cirrus net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
cisco enic: fix checksum validation for IPv6 2019-02-01 14:41:42 -08:00
cortina
davicom davicom: Annotate implicit fall through in dm9000_set_io 2019-01-17 15:08:17 -08:00
dec Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
dlink net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
emulex benet: remove broken and unused macro 2019-01-28 10:56:01 -08:00
ezchip
faraday cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
fujitsu
hisilicon net: hns3: MAC table entry count function increases operation 0 value protection measures 2019-02-02 08:24:09 -08:00
hp
huawei hinic: Add pci device ids 2019-01-22 14:54:08 -08:00
i825xx net: i825xx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-01-28 10:53:28 -08:00
ibm net: emac: remove IBM_EMAC_RX_SKB_HEADROOM 2019-02-06 19:50:41 -08:00
intel ixgbe: Use struct_size() helper 2019-02-08 23:03:48 -08:00
marvell net: marvell: mvpp2: phylink compliance updates 2019-02-08 23:08:39 -08:00
mediatek net: ethernet: mediatek: support MT7621 SoC ethernet hardware 2019-01-30 14:26:07 -08:00
mellanox mlxsw: spectrum_router: Use struct_size() in kzalloc() 2019-02-08 22:57:28 -08:00
micrel
microchip lan743x: Provide Read/Write Access to on chip OTP 2019-01-26 09:35:21 -08:00
moxa
mscc mscc: ocelot: Implement ndo_get_port_parent_id() 2019-02-06 14:16:12 -08:00
myricom cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
natsemi
neterion net: vxge: fix indentation issue 2019-01-18 14:02:32 -08:00
netronome nfp: flower: cmsg: use struct_size() helper 2019-02-08 22:57:28 -08:00
ni net: nixge: Add support for fixed-link configurations 2019-02-05 10:34:34 -08:00
nuvoton w90p910_ether: remove incorrect __init annotation 2018-12-14 14:42:51 -08:00
nvidia
nxp
oki-semi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
packetengines
pasemi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
qlogic qede: Add ethtool interface for SmartAN query. 2019-02-08 22:39:01 -08:00
qualcomm cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
rdc
realtek r8169: Avoid pointer aliasing 2019-02-06 13:40:08 -08:00
renesas sh_eth: offload RX checksum on SH7763 2019-02-04 13:31:00 -08:00
rocker rocker: Implement ndo_get_port_parent_id() 2019-02-06 14:16:50 -08:00
samsung cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
seeq
sfc sfc: add bundle partition definitions to mtd 2019-02-08 11:41:21 -08:00
sgi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
silan
sis
smsc net: smsc: epic100: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
socionext cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
sun Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
synopsys
tehuti net: tehuti: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-29 21:18:54 -08:00
toshiba
tundra cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
via net: via-velocity: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
wiznet
xilinx cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: fix indentation issues 2019-01-18 14:02:55 -08:00
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile
netx-eth.c