791-tg3-no-pci-sleep.patch 712 B

1234567891011121314151617
  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. --- a/drivers/net/ethernet/broadcom/tg3.c
  6. +++ b/drivers/net/ethernet/broadcom/tg3.c
  7. @@ -4263,7 +4263,8 @@ static int tg3_power_down_prepare(struct
  8. static void tg3_power_down(struct tg3 *tp)
  9. {
  10. pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
  11. - pci_set_power_state(tp->pdev, PCI_D3hot);
  12. + if (!tg3_flag(tp, ROBOSWITCH))
  13. + pci_set_power_state(tp->pdev, PCI_D3hot);
  14. }
  15. static void tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u16 *speed, u8 *duplex)