]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear
authorDoug Berger <opendmb@gmail.com>
Wed, 30 Jun 2021 00:14:19 +0000 (17:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jul 2021 18:45:46 +0000 (11:45 -0700)
commit29abae029b1fc373fb51d2bfdd8b7b8e335e1de6
tree242fdec06d1e1c32dd2474cefb44a78a28c2429e
parent5b24fdf72897bef8d3f8b2681254fa82d92c69e8
net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear

Setting the EXT_ENERGY_DET_MASK bit allows the port energy detection
logic of the internal PHY to prevent the system from sleeping. Some
internal PHYs will report that energy is detected when the network
interface is closed which can prevent the system from going to sleep
if WoL is enabled when the interface is brought down.

Since the driver does not support waking the system on this logic,
this commit clears the bit whenever the internal PHY is powered up
and the other logic for manipulating the bit is removed since it
serves no useful function.

Fixes: 390dff99da87 ("net: bcmgenet: add main driver file")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c