Merge branch 'master' into for-next
Jiri Kosina [Sun, 8 Apr 2012 19:48:52 +0000 (21:48 +0200)]
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.

Conflicts:
drivers/net/ethernet/realtek/r8169.c

14 files changed:
1  2 
MAINTAINERS
Makefile
arch/alpha/kernel/pci_iommu.c
arch/mips/kernel/mips-mt.c
arch/mips/pci/pci-lantiq.c
drivers/gpu/drm/radeon/radeon_gart.c
drivers/mtd/devices/docg3.c
drivers/net/ethernet/realtek/r8169.c
drivers/power/bq27x00_battery.c
drivers/regulator/tps65910-regulator.c
drivers/usb/gadget/u_serial.c
drivers/video/au1100fb.c
fs/btrfs/disk-io.c
sound/pci/hda/patch_realtek.c

diff --cc MAINTAINERS
Simple merge
diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -5974,61 -5662,84 +5662,84 @@@ static int rtl_open(struct net_device *
  {
        struct rtl8169_private *tp = netdev_priv(dev);
        void __iomem *ioaddr = tp->mmio_addr;
-       unsigned long flags;
-       u32 mc_filter[2];       /* Multicast hash filter */
-       int rx_mode;
-       u32 tmp = 0;
+       struct pci_dev *pdev = tp->pci_dev;
+       int retval = -ENOMEM;
  
-       if (dev->flags & IFF_PROMISC) {
-               /* Unconditionally log net taps. */
-               netif_notice(tp, link, dev, "Promiscuous mode enabled\n");
-               rx_mode =
-                   AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
-                   AcceptAllPhys;
-               mc_filter[1] = mc_filter[0] = 0xffffffff;
-       } else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
-                  (dev->flags & IFF_ALLMULTI)) {
-               /* Too many to filter perfectly -- accept all multicasts. */
-               rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
-               mc_filter[1] = mc_filter[0] = 0xffffffff;
-       } else {
-               struct netdev_hw_addr *ha;
+       pm_runtime_get_sync(&pdev->dev);
  
-               rx_mode = AcceptBroadcast | AcceptMyPhys;
-               mc_filter[1] = mc_filter[0] = 0;
-               netdev_for_each_mc_addr(ha, dev) {
-                       int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
-                       mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
-                       rx_mode |= AcceptMulticast;
-               }
-       }
+       /*
 -       * Rx and Tx desscriptors needs 256 bytes alignment.
++       * Rx and Tx descriptors needs 256 bytes alignment.
+        * dma_alloc_coherent provides more.
+        */
+       tp->TxDescArray = dma_alloc_coherent(&pdev->dev, R8169_TX_RING_BYTES,
+                                            &tp->TxPhyAddr, GFP_KERNEL);
+       if (!tp->TxDescArray)
+               goto err_pm_runtime_put;
  
-       spin_lock_irqsave(&tp->lock, flags);
+       tp->RxDescArray = dma_alloc_coherent(&pdev->dev, R8169_RX_RING_BYTES,
+                                            &tp->RxPhyAddr, GFP_KERNEL);
+       if (!tp->RxDescArray)
+               goto err_free_tx_0;
  
-       tmp = (RTL_R32(RxConfig) & ~RX_CONFIG_ACCEPT_MASK) | rx_mode;
+       retval = rtl8169_init_ring(dev);
+       if (retval < 0)
+               goto err_free_rx_1;
  
-       if (tp->mac_version > RTL_GIGA_MAC_VER_06) {
-               u32 data = mc_filter[0];
+       INIT_WORK(&tp->wk.work, rtl_task);
  
-               mc_filter[0] = swab32(mc_filter[1]);
-               mc_filter[1] = swab32(data);
-       }
+       smp_mb();
  
-       RTL_W32(MAR0 + 4, mc_filter[1]);
-       RTL_W32(MAR0 + 0, mc_filter[0]);
+       rtl_request_firmware(tp);
  
-       RTL_W32(RxConfig, tmp);
+       retval = request_irq(pdev->irq, rtl8169_interrupt,
+                            (tp->features & RTL_FEATURE_MSI) ? 0 : IRQF_SHARED,
+                            dev->name, dev);
+       if (retval < 0)
+               goto err_release_fw_2;
+       rtl_lock_work(tp);
+       set_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags);
+       napi_enable(&tp->napi);
  
-       spin_unlock_irqrestore(&tp->lock, flags);
+       rtl8169_init_phy(dev, tp);
+       __rtl8169_set_features(dev, dev->features);
+       rtl_pll_power_up(tp);
+       rtl_hw_start(dev);
+       netif_start_queue(dev);
+       rtl_unlock_work(tp);
+       tp->saved_wolopts = 0;
+       pm_runtime_put_noidle(&pdev->dev);
+       rtl8169_check_link_status(dev, tp, ioaddr);
+ out:
+       return retval;
+ err_release_fw_2:
+       rtl_release_firmware(tp);
+       rtl8169_rx_clear(tp);
+ err_free_rx_1:
+       dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
+                         tp->RxPhyAddr);
+       tp->RxDescArray = NULL;
+ err_free_tx_0:
+       dma_free_coherent(&pdev->dev, R8169_TX_RING_BYTES, tp->TxDescArray,
+                         tp->TxPhyAddr);
+       tp->TxDescArray = NULL;
+ err_pm_runtime_put:
+       pm_runtime_put_noidle(&pdev->dev);
+       goto out;
  }
  
- /**
-  *  rtl8169_get_stats - Get rtl8169 read/write statistics
-  *  @dev: The Ethernet Device to get statistics for
-  *
-  *  Get TX/RX statistics for rtl8169
-  */
- static struct net_device_stats *rtl8169_get_stats(struct net_device *dev)
+ static struct rtnl_link_stats64 *
+ rtl8169_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
  {
        struct rtl8169_private *tp = netdev_priv(dev);
        void __iomem *ioaddr = tp->mmio_addr;
Simple merge
  #include <linux/mfd/tps65910.h>
  
  #define TPS65910_SUPPLY_STATE_ENABLED 0x1
+ #define EXT_SLEEP_CONTROL (TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 |     \
+                       TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2 |          \
+                       TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3 |          \
+                       TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP)
  
 -/* supported VIO voltages in milivolts */
 +/* supported VIO voltages in millivolts */
  static const u16 VIO_VSEL_table[] = {
        1500, 1800, 2500, 3300,
  };
Simple merge
Simple merge
Simple merge
Simple merge