adm8668: drop 3.14
[openwrt.git] / target / linux / brcm47xx / patches-3.14 / 791-tg3-no-pci-sleep.patch
1 When the Ethernet controller is powered down and someone wants to 
2 access the mdio bus like the witch driver (b53) the system crashed if 
3 PCI_D3hot was set before. This patch deactivates this power sawing mode 
4 when a switch driver is in use.
5
6 --- a/drivers/net/ethernet/broadcom/tg3.c
7 +++ b/drivers/net/ethernet/broadcom/tg3.c
8 @@ -4269,7 +4269,8 @@ static int tg3_power_down_prepare(struct
9  static void tg3_power_down(struct tg3 *tp)
10  {
11         pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
12 -       pci_set_power_state(tp->pdev, PCI_D3hot);
13 +       if (!tg3_flag(tp, ROBOSWITCH))
14 +               pci_set_power_state(tp->pdev, PCI_D3hot);
15  }
16  
17  static void tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u16 *speed, u8 *duplex)