tg3: Skip powering down function 0 on certain serdes devices
authorNithin Sujir <nsujir@broadcom.com>
Mon, 13 May 2013 11:04:15 +0000 (11:04 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 30 May 2013 13:34:59 +0000 (14:34 +0100)
commitf5dd62805f100ddad8c0a856b530800aae92cc5d
tree43830df2dc0e03132fa4ff078412460c1b888a57
parent9ea470782e37a58e3fc2e592648248fb8fb6ca31
tg3: Skip powering down function 0 on certain serdes devices

commit 44f3b503c16425c8e9db4bbaa2fc9cd0c9d0ba91 upstream.

On the 5718, 5719 and 5720 serdes devices, powering down function 0
results in all the other ports being powered down. Add code to skip
function 0 power down.

v2:
 - Modify tg3_phy_power_bug() function to use a switch instead of a
   complicated if statement. Suggested by Joe Perches.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2:
 s/tg3_asic_rev\(tp\)/GET_ASIC_REV(tp->pci_chip_rev_id)/]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/broadcom/tg3.c