linux/drivers/net/ethernet
Florian Fainelli bf1a85a838 Revert "net: ethernet: bcmgenet: use phydev from struct net_device"
This reverts commit 62469c7600 ("net: ethernet: bcmgenet: use phydev
from struct net_device") because it causes GENETv1/2/3 adapters to
expose the following behavior after an ifconfig down/up sequence:

PING fainelli-linux (10.112.156.244): 56 data bytes
64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.352 ms
64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.472 ms (DUP!)
64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.496 ms (DUP!)
64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.517 ms (DUP!)
64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.536 ms (DUP!)
64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.557 ms (DUP!)
64 bytes from 10.112.156.244: seq=1 ttl=61 time=752.448 ms (DUP!)

This was previously fixed by commit 5dbebbb44a ("net: bcmgenet:
Software reset EPHY after power on") but the commit we are reverting was
essentially making this previous commit void, here is why.

Without commit 62469c7600 we would have the following scenario after
an ifconfig down then up sequence:

- bcmgenet_open() calls bcmgenet_power_up() to make sure the PHY is
  initialized *before* we get to initialize the UniMAC, this is
  critical to ensure the PHY is in a correct state, priv->phydev is
  valid, this code executes fine

- second time from bcmgenet_mii_probe(), through the normal
  phy_init_hw() call (which arguably could be optimized out)

Everything is fine in that case. With commit 62469c7600, we would have
the following scenario to happen after an ifconfig down then up
sequence:

- bcmgenet_close() calls phy_disonnect() which makes dev->phydev become
  NULL

- when bcmgenet_open() executes again and calls bcmgenet_mii_reset() from
  bcmgenet_power_up() to initialize the internal PHY, the NULL check
  becomes true, so we do not reset the PHY, yet we keep going on and
  initialize the UniMAC, causing MAC activity to occur

- we call bcmgenet_mii_reset() from bcmgenet_mii_probe(), but this is
  too late, the PHY is botched, and causes the above bogus pings/packets
  transmission/reception to occur

Reported-by: Jaedon Shin <jaedon.shin@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-09-27 07:41:12 -04:00
..
3com
8390 net: ethernet: ax88796: avoid null pointer dereference 2016-08-01 13:32:51 -07:00
adaptec
adi net: ethernet: adi: bfin_mac: use phy_ethtool_{get|set}_link_ksettings 2016-07-17 23:22:02 -07:00
aeroflex
agere Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-07-24 00:53:32 -04:00
allwinner net: ethernet: sun4i-emac: use phy_ethtool_{get|set}_link_ksettings 2016-06-22 16:22:41 -04:00
alteon
altera ethernet: altera: add missing of_node_put 2016-08-01 21:42:57 -07:00
amd net: amd-xgbe: use correct format specifier 2016-08-01 13:32:51 -07:00
apm net: xgene: fix maybe-uninitialized variable 2016-08-03 11:52:16 -07:00
apple
arc net: arc_emac: add missing of_node_put() in arc_emac_probe() 2016-08-06 00:07:38 -04:00
atheros Add Killer E2500 device ID in alx driver. 2016-08-29 00:23:50 -04:00
aurora ethernet: aurora: nb8800: add missing of_node_put after calling of_parse_phandle 2016-08-01 21:43:47 -07:00
broadcom Revert "net: ethernet: bcmgenet: use phydev from struct net_device" 2016-09-27 07:41:12 -04:00
brocade bna: fix crash in bnad_get_strings() 2016-09-17 10:18:02 -04:00
cadence net: macb: initialize checksum when using checksum offloading 2016-09-06 13:43:39 -07:00
calxeda
cavium net: thunderx: Fix for issues with multiple CQEs posted for a TSO packet 2016-09-01 14:50:47 -07:00
chelsio cxgb4/cxgb4vf: Allocate more queues for 25G and 100G adapter 2016-09-21 00:48:09 -04:00
cirrus
cisco net: enic: use correct type specifier 2016-08-01 13:32:52 -07:00
davicom dm9000: Fix irq trigger type setup on non-dt platforms 2016-08-09 15:08:22 -07:00
dec net: tulip: fix spelling mistake: "attemping" -> "attempting" 2016-07-30 23:13:51 -07:00
dlink
emulex be2net: perform temperature query in adapter regardless of its interface state 2016-07-26 23:17:42 -07:00
ezchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-07-24 00:53:32 -04:00
faraday net/faraday: Disallow using reversed MAC address from hardware 2016-07-20 21:05:18 -07:00
freescale net: fec: align IP header in hardware 2016-09-27 07:39:34 -04:00
fujitsu
hisilicon net: hns: dereference ppe_cb->ppe_common_cb if it is non-null 2016-08-26 11:44:56 -07:00
hp
i825xx
ibm net/ibm/emac: add mutex to 'set multicast list' 2016-09-16 04:21:47 -04:00
intel i40e: Fix kernel panic on enable/disable LLDP 2016-09-01 14:20:28 -07:00
marvell ethernet: marvell: pxa168_eth: add missing of_node_put after calling of_parse_phandle 2016-08-01 21:43:48 -07:00
mediatek net: ethernet: mediatek: fix module loading automatically based on MODULE_DEVICE_TABLE 2016-09-16 04:19:54 -04:00
mellanox net/mlx4_core: Fix to clean devlink resources 2016-09-22 01:41:27 -04:00
micrel
microchip enc28j60: Fix race condition in enc28j60 driver 2016-07-02 14:48:14 -04:00
moxa
myricom
natsemi
neterion net: s2io: simplify logical constraint 2016-08-01 13:32:52 -07:00
netronome nfp: fix error return code in nfp_net_netdev_open() 2016-09-16 04:27:05 -04:00
nuvoton
nvidia
nxp net: lpc_eth: Check clk_prepare_enable() error 2016-08-23 17:10:16 -07:00
oki-semi
packetengines
pasemi net: ethernet: pasemi_mac: use phy_ethtool_{get|set}_link_ksettings 2016-07-15 16:41:34 -07:00
qlogic qed: Fix stack corruption on probe 2016-09-20 04:57:16 -04:00
qualcomm
rdc net: r6040: Bump version and date 2016-07-05 00:10:30 -07:00
realtek 8139cp: Fix one possible deadloop in cp_rx_poll 2016-08-25 17:02:48 -07:00
renesas net: ethernet: renesas: sh_eth: add POST registers for rz 2016-09-10 21:09:10 -07:00
rocker net: add dev arg to ndo_neigh_construct/destroy 2016-07-05 09:06:28 -07:00
samsung net: ethernet: sxgbe: use phy_ethtool_{get|set}_link_ksettings 2016-06-28 09:12:35 -04:00
seeq
sfc sfc: fix potential stack corruption from running past stat bitmask 2016-08-26 21:40:44 -07:00
sgi
silan
sis
smsc net: smsc: remove build warning of duplicate definition 2016-09-06 13:44:33 -07:00
stmicro stmmac: fix PWRDWN into the PMT register for global unicast. 2016-09-18 22:21:06 -04:00
sun
synopsys dwc_eth_qos: do not register semi-initialized device 2016-09-09 19:20:21 -07:00
tehuti net: tehuti: fix typo: "eneble" -> "enable" 2016-08-21 15:21:36 -07:00
ti drivers: net: cpsw: fix kmemleak false-positive reports for sk buffers 2016-08-09 14:54:59 -07:00
tile timers, driver/net/ethernet/tile: Initialize the egress timer as pinned 2016-07-07 10:25:14 +02:00
toshiba net: ethernet: tc35815: use phy_ethtool_{get|set}_link_ksettings 2016-07-15 16:41:33 -07:00
tundra net/ethernet: tundra: fix dump_eth_one warning in tsi108_eth 2016-08-08 13:08:21 -07:00
via
wiznet
xilinx net: xilinx: emaclite: Fallback to random MAC address. 2016-08-20 22:11:29 -07:00
xircom ethernet: xircom: fix spelling mistakes on "excessive collisions" 2016-06-27 04:19:14 -04:00
xscale net: ethernet: ixp4xx_eth: use phy_ethtool_{get|set}_link_ksettings 2016-07-04 15:59:52 -07:00
dnet.c net: ethernet: dnet: use phy_ethtool_{get|set}_link_ksettings 2016-06-28 05:10:26 -04:00
dnet.h net: ethernet: dnet: use phydev from struct net_device 2016-06-28 05:10:26 -04:00
ec_bhf.c
ethoc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-07-24 00:53:32 -04:00
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c net: ethernet: lantiq_etop: use phy_ethtool_{get|set}_link_ksettings 2016-07-04 15:59:51 -07:00
Makefile
netx-eth.c