]> git.baikalelectronics.ru Git - kernel.git/commit
forcedeth: power down phy when interface is down
authorEd Swierk <eswierk@arastra.com>
Mon, 1 Dec 2008 12:24:43 +0000 (12:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Dec 2008 05:06:42 +0000 (21:06 -0800)
commite11744a85eb4a29ba707b29650bc02f484f925a1
tree91b9e3fa5d0670e98811a43a1f2ad6e1cbe668f7
parentecb81e3b01c0e56ca1b13c2aa8d1a751717f7a29
forcedeth: power down phy when interface is down

Bring the physical link down when the interface is down by placing the PHY
in power-down state, unless WOL is enabled.  This mirrors the behavior of
other drivers including e1000 and tg3.

Without the patch, ifconfig down leaves the physical link up, which confuses
datacenter users who expect the link lights both on the NIC and the switch to
go out when they bring an interface down.

Furthermore, even though the phy is powered on, autonegotiation stops working,
so a normally gigabit link might suddenly become 100 Mbit half-duplex when the
interface goes down, and become gigabit when it comes up again.

Ayaz said:

  I would not include this patch until further testing is performed.  NVIDIA
  MCP chips use 3rd party PHY vendors.  By powering down the phy, it could
  have adverse affects on certain phys.

Arthur Jones said:

  I just ran across this patch.  Tested on a Marvell 88E1121R (GigE PHY)
  and works great.  This is a very important feature for me.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Tested-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/forcedeth.c