Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorDavid S. Miller <davem@davemloft.net>
Tue, 27 Apr 2010 19:49:13 +0000 (12:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Apr 2010 19:49:13 +0000 (12:49 -0700)
Conflicts:
drivers/net/e100.c
drivers/net/e1000e/netdev.c

19 files changed:
1  2 
drivers/net/Makefile
drivers/net/e100.c
drivers/net/e1000e/82571.c
drivers/net/e1000e/e1000.h
drivers/net/e1000e/netdev.c
drivers/net/gianfar.c
drivers/net/ixgbe/ixgbe_82599.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_type.h
drivers/net/ks8851.c
drivers/net/r8169.c
drivers/net/tg3.c
net/core/rtnetlink.c
net/ipv4/inet_connection_sock.c
net/ipv6/inet6_connection_sock.c
net/ipv6/ip6_output.c
net/ipv6/xfrm6_policy.c
net/rds/rdma_transport.c
net/x25/af_x25.c

Simple merge
index 3e8d0005540fb96cd478d738430bd251ce4ebf23,791080303db100cf7f5f53d961253846e6e3049e..ef97bfcef9dd70386dae81d2066d84774b3fc6dd
@@@ -2278,10 -2264,15 +2279,15 @@@ static void e100_tx_timeout_task(struc
        struct nic *nic = container_of(work, struct nic, tx_timeout_task);
        struct net_device *netdev = nic->netdev;
  
 -      DPRINTK(TX_ERR, DEBUG, "scb.status=0x%02X\n",
 -              ioread8(&nic->csr->scb.status));
 +      netif_printk(nic, tx_err, KERN_DEBUG, nic->netdev,
 +                   "scb.status=0x%02X\n", ioread8(&nic->csr->scb.status));
-       e100_down(netdev_priv(netdev));
-       e100_up(netdev_priv(netdev));
+       rtnl_lock();
+       if (netif_running(netdev)) {
+               e100_down(netdev_priv(netdev));
+               e100_up(netdev_priv(netdev));
+       }
+       rtnl_unlock();
  }
  
  static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
Simple merge
Simple merge
index 5f70c437fa41052f90ded16a092cb75e38981603,fb8fc7d1b50d970766b3b666336618517ea60e29..2476f8c24c54240110ac050ff3da1a7fd86535ba
@@@ -4634,46 -4613,79 +4642,60 @@@ static void e1000_complete_shutdown(str
        }
  }
  
- static void e1000e_disable_l1aspm(struct pci_dev *pdev)
+ #ifdef CONFIG_PCIEASPM
+ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
+ {
+       pci_disable_link_state(pdev, state);
+ }
+ #else
+ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
  {
        int pos;
-       u16 val;
+       u16 reg16;
  
        /*
-        * 82573 workaround - disable L1 ASPM on mobile chipsets
-        *
-        * L1 ASPM on various mobile (ich7) chipsets do not behave properly
-        * resulting in lost data or garbage information on the pci-e link
-        * level. This could result in (false) bad EEPROM checksum errors,
-        * long ping times (up to 2s) or even a system freeze/hang.
-        *
-        * Unfortunately this feature saves about 1W power consumption when
-        * active.
+        * Both device and parent should have the same ASPM setting.
+        * Disable ASPM in downstream component first and then upstream.
         */
-       pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
-       pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, &val);
-       if (val & 0x2) {
-               dev_warn(&pdev->dev, "Disabling L1 ASPM\n");
-               val &= ~0x2;
-               pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, val);
-       }
+       pos = pci_pcie_cap(pdev);
+       pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, &reg16);
+       reg16 &= ~state;
+       pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16);
+       pos = pci_pcie_cap(pdev->bus->self);
+       pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, &reg16);
+       reg16 &= ~state;
+       pci_write_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, reg16);
+ }
+ #endif
+ void e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
+ {
+       dev_info(&pdev->dev, "Disabling ASPM %s %s\n",
+                (state & PCIE_LINK_STATE_L0S) ? "L0s" : "",
+                (state & PCIE_LINK_STATE_L1) ? "L1" : "");
+       __e1000e_disable_aspm(pdev, state);
  }
  
 -#ifdef CONFIG_PM
 -static int e1000_suspend(struct pci_dev *pdev, pm_message_t state)
 +#ifdef CONFIG_PM_OPS
 +static bool e1000e_pm_ready(struct e1000_adapter *adapter)
  {
 -      int retval;
 -      bool wake;
 -
 -      retval = __e1000_shutdown(pdev, &wake);
 -      if (!retval)
 -              e1000_complete_shutdown(pdev, true, wake);
 -
 -      return retval;
 +      return !!adapter->tx_ring->buffer_info;
  }
  
 -static int e1000_resume(struct pci_dev *pdev)
 +static int __e1000_resume(struct pci_dev *pdev)
  {
        struct net_device *netdev = pci_get_drvdata(pdev);
        struct e1000_adapter *adapter = netdev_priv(netdev);
        struct e1000_hw *hw = &adapter->hw;
        u32 err;
  
-       e1000e_disable_l1aspm(pdev);
+       pci_set_power_state(pdev, PCI_D0);
+       pci_restore_state(pdev);
+       pci_save_state(pdev);
+       if (adapter->flags2 & FLAG2_DISABLE_ASPM_L1)
+               e1000e_disable_aspm(pdev, PCIE_LINK_STATE_L1);
  
 -      err = pci_enable_device_mem(pdev);
 -      if (err) {
 -              dev_err(&pdev->dev,
 -                      "Cannot enable PCI device from suspend\n");
 -              return err;
 -      }
 -
 -      pci_set_master(pdev);
 -
 -      pci_enable_wake(pdev, PCI_D3hot, 0);
 -      pci_enable_wake(pdev, PCI_D3cold, 0);
 -
        e1000e_set_interrupt_capability(adapter);
        if (netif_running(netdev)) {
                err = e1000_request_irq(adapter);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge