Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jan 2011 17:29:05 +0000 (09:29 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jan 2011 17:29:05 +0000 (09:29 -0800)
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI/PM: Report wakeup events before resuming devices
  PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events
  PCI: sysfs: Update ROM to include default owner write access
  x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL
  x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available
  PCI/ACPI: Request _OSC control once for each root bridge (v3)
  PCI: enable pci=bfsort by default on future Dell systems
  PCI/PCIe: Clear Root PME Status bits early during system resume
  PCI: pci-stub: ignore zero-length id parameters
  x86/PCI: irq and pci_ids patch for Intel Patsburg
  PCI: Skip id checking if no id is passed
  PCI: fix __pci_device_probe kernel-doc warning
  PCI: make pci_restore_state return void
  PCI: Disable ASPM if BIOS asks us to
  PCI: Add mask bit definition for MSI-X table
  PCI: MSI: Move MSI-X entry definition to pci_regs.h

Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the
meantime been converted to not use legacy PCI power management, and thus
no longer use pci_restore_state() at all (and that caused trivial
conflicts with the "make pci_restore_state return void" patch)

1  2 
arch/x86/Kconfig
drivers/media/video/cafe_ccic.c
drivers/net/myri10ge/myri10ge.c
drivers/net/sfc/falcon.c
drivers/net/wireless/rt2x00/rt2x00pci.c
drivers/scsi/ipr.c
drivers/staging/sm7xx/smtcfb.c
include/linux/pci_ids.h

diff --combined arch/x86/Kconfig
@@@ -51,7 -51,6 +51,7 @@@ config X8
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_BZIP2
        select HAVE_KERNEL_LZMA
 +      select HAVE_KERNEL_XZ
        select HAVE_KERNEL_LZO
        select HAVE_HW_BREAKPOINT
        select HAVE_MIXED_BREAKPOINTS_REGS
@@@ -66,7 -65,6 +66,7 @@@
        select HAVE_SPARSE_IRQ
        select GENERIC_IRQ_PROBE
        select GENERIC_PENDING_IRQ if SMP
 +      select USE_GENERIC_SMP_HELPERS if SMP
  
  config INSTRUCTION_DECODER
        def_bool (KPROBES || PERF_EVENTS)
@@@ -205,6 -203,10 +205,6 @@@ config HAVE_INTEL_TX
        def_bool y
        depends on EXPERIMENTAL && DMAR && ACPI
  
 -config USE_GENERIC_SMP_HELPERS
 -      def_bool y
 -      depends on SMP
 -
  config X86_32_SMP
        def_bool y
        depends on X86_32 && SMP
@@@ -375,18 -377,6 +375,18 @@@ config X86_ELA
  
          If unsure, choose "PC-compatible" instead.
  
 +config X86_INTEL_CE
 +      bool "CE4100 TV platform"
 +      depends on PCI
 +      depends on PCI_GODIRECT
 +      depends on X86_32
 +      depends on X86_EXTENDED_PLATFORM
 +      select X86_REBOOTFIXUPS
 +      ---help---
 +        Select for the Intel CE media processor (CE4100) SOC.
 +        This option compiles in support for the CE4100 SOC for settop
 +        boxes and media devices.
 +
  config X86_MRST
         bool "Moorestown MID platform"
        depends on PCI
        depends on X86_EXTENDED_PLATFORM
        depends on X86_IO_APIC
        select APB_TIMER
 +      select I2C
 +      select SPI
 +      select INTEL_SCU_IPC
 +      select X86_PLATFORM_DEVICES
        ---help---
          Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
          Internet Device(MID) platform. Moorestown consists of two chips:
@@@ -480,19 -466,6 +480,19 @@@ config X86_ES700
          Support for Unisys ES7000 systems.  Say 'Y' here if this kernel is
          supposed to run on an IA32-based Unisys ES7000 system.
  
 +config X86_32_IRIS
 +      tristate "Eurobraille/Iris poweroff module"
 +      depends on X86_32
 +      ---help---
 +        The Iris machines from EuroBraille do not have APM or ACPI support
 +        to shut themselves down properly.  A special I/O sequence is
 +        needed to do so, which is what this module does at
 +        kernel shutdown.
 +
 +        This is only for Iris machines from EuroBraille.
 +
 +        If unused, say N.
 +
  config SCHED_OMIT_FRAME_POINTER
        def_bool y
        prompt "Single-depth WCHAN output"
@@@ -1168,16 -1141,16 +1168,16 @@@ config NUM
  comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
        depends on X86_32 && X86_SUMMIT && (!HIGHMEM64G || !ACPI)
  
 -config K8_NUMA
 +config AMD_NUMA
        def_bool y
        prompt "Old style AMD Opteron NUMA detection"
        depends on X86_64 && NUMA && PCI
        ---help---
 -        Enable K8 NUMA node topology detection.  You should say Y here if
 -        you have a multi processor AMD K8 system. This uses an old
 -        method to read the NUMA configuration directly from the builtin
 -        Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA
 -        instead, which also takes priority if both are compiled in.
 +        Enable AMD NUMA node topology detection.  You should say Y here if
 +        you have a multi processor AMD system. This uses an old method to
 +        read the NUMA configuration directly from the builtin Northbridge
 +        of Opteron. It is recommended to use X86_64_ACPI_NUMA instead,
 +        which also takes priority if both are compiled in.
  
  config X86_64_ACPI_NUMA
        def_bool y
@@@ -1934,13 -1907,19 +1934,19 @@@ config PCI_MMCONFI
        depends on X86_64 && PCI && ACPI
  
  config PCI_CNB20LE_QUIRK
-       bool "Read CNB20LE Host Bridge Windows"
-       depends on PCI
+       bool "Read CNB20LE Host Bridge Windows" if EMBEDDED
+       default n
+       depends on PCI && EXPERIMENTAL
        help
          Read the PCI windows out of the CNB20LE host bridge. This allows
          PCI hotplug to work on systems with the CNB20LE chipset which do
          not have ACPI.
  
+         There's no public spec for this chipset, and this functionality
+         is known to be incomplete.
+         You should say N unless you know you need this.
  config DMAR
        bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
        depends on PCI_MSI && ACPI && EXPERIMENTAL
@@@ -2068,7 -2047,7 +2074,7 @@@ config OLP
  
  config OLPC_XO1
        tristate "OLPC XO-1 support"
 -      depends on OLPC && PCI
 +      depends on OLPC && MFD_CS5535
        ---help---
          Add support for non-essential features of the OLPC XO-1 laptop.
  
@@@ -2076,17 -2055,11 +2082,17 @@@ config OLPC_OPENFIRMWAR
        bool "Support for OLPC's Open Firmware"
        depends on !X86_64 && !X86_PAE
        default n
 +      select OF
        help
          This option adds support for the implementation of Open Firmware
          that is used on the OLPC XO-1 Children's Machine.
          If unsure, say N here.
  
 +config OLPC_OPENFIRMWARE_DT
 +      bool
 +      default y if OLPC_OPENFIRMWARE && PROC_DEVICETREE
 +      select OF_PROMTREE
 +
  endif # X86_32
  
  config AMD_NB
@@@ -859,6 -859,8 +859,6 @@@ static int cafe_cam_configure(struct ca
        struct v4l2_mbus_framefmt mbus_fmt;
        int ret;
  
 -      if (cam->state != S_IDLE)
 -              return -EINVAL;
        v4l2_fill_mbus_format(&mbus_fmt, &cam->pix_format, cam->mbus_code);
        ret = sensor_call(cam, core, init, 0);
        if (ret == 0)
@@@ -2184,9 -2186,7 +2184,7 @@@ static int cafe_pci_resume(struct pci_d
        struct cafe_camera *cam = to_cam(v4l2_dev);
        int ret = 0;
  
-       ret = pci_restore_state(pdev);
-       if (ret)
-               return ret;
+       pci_restore_state(pdev);
        ret = pci_enable_device(pdev);
  
        if (ret) {
                return ret;
        }
        cafe_ctlr_init(cam);
 -      cafe_ctlr_power_down(cam);
  
        mutex_lock(&cam->s_mutex);
        if (cam->users > 0) {
                cafe_ctlr_power_up(cam);
                __cafe_cam_reset(cam);
 +      } else {
 +              cafe_ctlr_power_down(cam);
        }
        mutex_unlock(&cam->s_mutex);
  
@@@ -2736,7 -2736,7 +2736,7 @@@ again
        odd_flag = 0;
        flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST);
        if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
 -              cksum_offset = skb_transport_offset(skb);
 +              cksum_offset = skb_checksum_start_offset(skb);
                pseudo_hdr_offset = cksum_offset + skb->csum_offset;
                /* If the headers are excessively large, then we must
                 * fall back to a software checksum */
@@@ -3403,9 -3403,7 +3403,7 @@@ static int myri10ge_resume(struct pci_d
                return -EIO;
        }
  
-       status = pci_restore_state(pdev);
-       if (status)
-               return status;
+       pci_restore_state(pdev);
  
        status = pci_enable_device(pdev);
        if (status) {
@@@ -4067,7 -4065,7 +4065,7 @@@ static void myri10ge_remove(struct pci_
        if (mgp == NULL)
                return;
  
 -      flush_scheduled_work();
 +      cancel_work_sync(&mgp->watchdog_work);
        netdev = mgp->dev;
        unregister_netdev(netdev);
  
diff --combined drivers/net/sfc/falcon.c
@@@ -24,6 -24,7 +24,6 @@@
  #include "nic.h"
  #include "regs.h"
  #include "io.h"
 -#include "mdio_10g.h"
  #include "phy.h"
  #include "workarounds.h"
  
@@@ -254,6 -255,7 +254,6 @@@ int falcon_spi_cmd(struct efx_nic *efx
        /* Input validation */
        if (len > FALCON_SPI_MAX_LEN)
                return -EINVAL;
 -      BUG_ON(!mutex_is_locked(&efx->spi_lock));
  
        /* Check that previous command is not still running */
        rc = falcon_spi_poll(efx);
@@@ -717,7 -719,6 +717,7 @@@ static int falcon_mdio_write(struct net
                             int prtad, int devad, u16 addr, u16 value)
  {
        struct efx_nic *efx = netdev_priv(net_dev);
 +      struct falcon_nic_data *nic_data = efx->nic_data;
        efx_oword_t reg;
        int rc;
  
                   "writing MDIO %d register %d.%d with 0x%04x\n",
                    prtad, devad, addr, value);
  
 -      mutex_lock(&efx->mdio_lock);
 +      mutex_lock(&nic_data->mdio_lock);
  
        /* Check MDIO not currently being accessed */
        rc = falcon_gmii_wait(efx);
        }
  
  out:
 -      mutex_unlock(&efx->mdio_lock);
 +      mutex_unlock(&nic_data->mdio_lock);
        return rc;
  }
  
@@@ -770,11 -771,10 +770,11 @@@ static int falcon_mdio_read(struct net_
                            int prtad, int devad, u16 addr)
  {
        struct efx_nic *efx = netdev_priv(net_dev);
 +      struct falcon_nic_data *nic_data = efx->nic_data;
        efx_oword_t reg;
        int rc;
  
 -      mutex_lock(&efx->mdio_lock);
 +      mutex_lock(&nic_data->mdio_lock);
  
        /* Check MDIO not currently being accessed */
        rc = falcon_gmii_wait(efx);
        }
  
  out:
 -      mutex_unlock(&efx->mdio_lock);
 +      mutex_unlock(&nic_data->mdio_lock);
        return rc;
  }
  
@@@ -841,7 -841,6 +841,7 @@@ static int falcon_probe_port(struct efx
        }
  
        /* Fill out MDIO structure and loopback modes */
 +      mutex_init(&nic_data->mdio_lock);
        efx->mdio.mdio_read = falcon_mdio_read;
        efx->mdio.mdio_write = falcon_mdio_write;
        rc = efx->phy_op->probe(efx);
@@@ -881,41 -880,6 +881,41 @@@ static void falcon_remove_port(struct e
        efx_nic_free_buffer(efx, &efx->stats_buffer);
  }
  
 +/* Global events are basically PHY events */
 +static bool
 +falcon_handle_global_event(struct efx_channel *channel, efx_qword_t *event)
 +{
 +      struct efx_nic *efx = channel->efx;
 +      struct falcon_nic_data *nic_data = efx->nic_data;
 +
 +      if (EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_G_PHY0_INTR) ||
 +          EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_XG_PHY0_INTR) ||
 +          EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_XFP_PHY0_INTR))
 +              /* Ignored */
 +              return true;
 +
 +      if ((efx_nic_rev(efx) == EFX_REV_FALCON_B0) &&
 +          EFX_QWORD_FIELD(*event, FSF_BB_GLB_EV_XG_MGT_INTR)) {
 +              nic_data->xmac_poll_required = true;
 +              return true;
 +      }
 +
 +      if (efx_nic_rev(efx) <= EFX_REV_FALCON_A1 ?
 +          EFX_QWORD_FIELD(*event, FSF_AA_GLB_EV_RX_RECOVERY) :
 +          EFX_QWORD_FIELD(*event, FSF_BB_GLB_EV_RX_RECOVERY)) {
 +              netif_err(efx, rx_err, efx->net_dev,
 +                        "channel %d seen global RX_RESET event. Resetting.\n",
 +                        channel->channel);
 +
 +              atomic_inc(&efx->rx_reset);
 +              efx_schedule_reset(efx, EFX_WORKAROUND_6555(efx) ?
 +                                 RESET_TYPE_RX_RECOVERY : RESET_TYPE_DISABLE);
 +              return true;
 +      }
 +
 +      return false;
 +}
 +
  /**************************************************************************
   *
   * Falcon test code
  static int
  falcon_read_nvram(struct efx_nic *efx, struct falcon_nvconfig *nvconfig_out)
  {
 +      struct falcon_nic_data *nic_data = efx->nic_data;
        struct falcon_nvconfig *nvconfig;
        struct efx_spi_device *spi;
        void *region;
        __le16 *word, *limit;
        u32 csum;
  
 -      spi = efx->spi_flash ? efx->spi_flash : efx->spi_eeprom;
 -      if (!spi)
 +      if (efx_spi_present(&nic_data->spi_flash))
 +              spi = &nic_data->spi_flash;
 +      else if (efx_spi_present(&nic_data->spi_eeprom))
 +              spi = &nic_data->spi_eeprom;
 +      else
                return -EINVAL;
  
        region = kmalloc(FALCON_NVCONFIG_END, GFP_KERNEL);
                return -ENOMEM;
        nvconfig = region + FALCON_NVCONFIG_OFFSET;
  
 -      mutex_lock(&efx->spi_lock);
 +      mutex_lock(&nic_data->spi_lock);
        rc = falcon_spi_read(efx, spi, 0, FALCON_NVCONFIG_END, NULL, region);
 -      mutex_unlock(&efx->spi_lock);
 +      mutex_unlock(&nic_data->spi_lock);
        if (rc) {
                netif_err(efx, hw, efx->net_dev, "Failed to read %s\n",
 -                        efx->spi_flash ? "flash" : "EEPROM");
 +                        efx_spi_present(&nic_data->spi_flash) ?
 +                        "flash" : "EEPROM");
                rc = -EIO;
                goto out;
        }
@@@ -1053,7 -1012,7 +1053,7 @@@ static int falcon_b0_test_registers(str
  
  /* Resets NIC to known state.  This routine must be called in process
   * context and is allowed to sleep. */
 -static int falcon_reset_hw(struct efx_nic *efx, enum reset_type method)
 +static int __falcon_reset_hw(struct efx_nic *efx, enum reset_type method)
  {
        struct falcon_nic_data *nic_data = efx->nic_data;
        efx_oword_t glb_ctl_reg_ker;
  
        /* Restore PCI configuration if needed */
        if (method == RESET_TYPE_WORLD) {
-               if (efx_nic_is_dual_func(efx)) {
-                       rc = pci_restore_state(nic_data->pci_dev2);
-                       if (rc) {
-                               netif_err(efx, drv, efx->net_dev,
-                                         "failed to restore PCI config for "
-                                         "the secondary function\n");
-                               goto fail3;
-                       }
-               }
-               rc = pci_restore_state(efx->pci_dev);
-               if (rc) {
-                       netif_err(efx, drv, efx->net_dev,
-                                 "failed to restore PCI config for the "
-                                 "primary function\n");
-                       goto fail4;
-               }
+               if (efx_nic_is_dual_func(efx))
+                       pci_restore_state(nic_data->pci_dev2);
+               pci_restore_state(efx->pci_dev);
                netif_dbg(efx, drv, efx->net_dev,
                          "successfully restored PCI config\n");
        }
                rc = -ETIMEDOUT;
                netif_err(efx, hw, efx->net_dev,
                          "timed out waiting for hardware reset\n");
-               goto fail5;
+               goto fail3;
        }
        netif_dbg(efx, hw, efx->net_dev, "hardware reset complete\n");
  
  
        /* pci_save_state() and pci_restore_state() MUST be called in pairs */
  fail2:
- fail3:
        pci_restore_state(efx->pci_dev);
  fail1:
- fail4:
- fail5:
+ fail3:
        return rc;
  }
  
 +static int falcon_reset_hw(struct efx_nic *efx, enum reset_type method)
 +{
 +      struct falcon_nic_data *nic_data = efx->nic_data;
 +      int rc;
 +
 +      mutex_lock(&nic_data->spi_lock);
 +      rc = __falcon_reset_hw(efx, method);
 +      mutex_unlock(&nic_data->spi_lock);
 +
 +      return rc;
 +}
 +
  static void falcon_monitor(struct efx_nic *efx)
  {
        bool link_changed;
@@@ -1242,11 -1174,16 +1227,11 @@@ static int falcon_reset_sram(struct efx
        return -ETIMEDOUT;
  }
  
 -static int falcon_spi_device_init(struct efx_nic *efx,
 -                                struct efx_spi_device **spi_device_ret,
 +static void falcon_spi_device_init(struct efx_nic *efx,
 +                                struct efx_spi_device *spi_device,
                                  unsigned int device_id, u32 device_type)
  {
 -      struct efx_spi_device *spi_device;
 -
        if (device_type != 0) {
 -              spi_device = kzalloc(sizeof(*spi_device), GFP_KERNEL);
 -              if (!spi_device)
 -                      return -ENOMEM;
                spi_device->device_id = device_id;
                spi_device->size =
                        1 << SPI_DEV_TYPE_FIELD(device_type, SPI_DEV_TYPE_SIZE);
                        1 << SPI_DEV_TYPE_FIELD(device_type,
                                                SPI_DEV_TYPE_BLOCK_SIZE);
        } else {
 -              spi_device = NULL;
 +              spi_device->size = 0;
        }
 -
 -      kfree(*spi_device_ret);
 -      *spi_device_ret = spi_device;
 -      return 0;
 -}
 -
 -static void falcon_remove_spi_devices(struct efx_nic *efx)
 -{
 -      kfree(efx->spi_eeprom);
 -      efx->spi_eeprom = NULL;
 -      kfree(efx->spi_flash);
 -      efx->spi_flash = NULL;
  }
  
  /* Extract non-volatile configuration */
  static int falcon_probe_nvconfig(struct efx_nic *efx)
  {
 +      struct falcon_nic_data *nic_data = efx->nic_data;
        struct falcon_nvconfig *nvconfig;
 -      int board_rev;
        int rc;
  
        nvconfig = kmalloc(sizeof(*nvconfig), GFP_KERNEL);
                return -ENOMEM;
  
        rc = falcon_read_nvram(efx, nvconfig);
 -      if (rc == -EINVAL) {
 -              netif_err(efx, probe, efx->net_dev,
 -                        "NVRAM is invalid therefore using defaults\n");
 -              efx->phy_type = PHY_TYPE_NONE;
 -              efx->mdio.prtad = MDIO_PRTAD_NONE;
 -              board_rev = 0;
 -              rc = 0;
 -      } else if (rc) {
 -              goto fail1;
 -      } else {
 -              struct falcon_nvconfig_board_v2 *v2 = &nvconfig->board_v2;
 -              struct falcon_nvconfig_board_v3 *v3 = &nvconfig->board_v3;
 -
 -              efx->phy_type = v2->port0_phy_type;
 -              efx->mdio.prtad = v2->port0_phy_addr;
 -              board_rev = le16_to_cpu(v2->board_revision);
 -
 -              if (le16_to_cpu(nvconfig->board_struct_ver) >= 3) {
 -                      rc = falcon_spi_device_init(
 -                              efx, &efx->spi_flash, FFE_AB_SPI_DEVICE_FLASH,
 -                              le32_to_cpu(v3->spi_device_type
 -                                          [FFE_AB_SPI_DEVICE_FLASH]));
 -                      if (rc)
 -                              goto fail2;
 -                      rc = falcon_spi_device_init(
 -                              efx, &efx->spi_eeprom, FFE_AB_SPI_DEVICE_EEPROM,
 -                              le32_to_cpu(v3->spi_device_type
 -                                          [FFE_AB_SPI_DEVICE_EEPROM]));
 -                      if (rc)
 -                              goto fail2;
 -              }
 +      if (rc)
 +              goto out;
 +
 +      efx->phy_type = nvconfig->board_v2.port0_phy_type;
 +      efx->mdio.prtad = nvconfig->board_v2.port0_phy_addr;
 +
 +      if (le16_to_cpu(nvconfig->board_struct_ver) >= 3) {
 +              falcon_spi_device_init(
 +                      efx, &nic_data->spi_flash, FFE_AB_SPI_DEVICE_FLASH,
 +                      le32_to_cpu(nvconfig->board_v3
 +                                  .spi_device_type[FFE_AB_SPI_DEVICE_FLASH]));
 +              falcon_spi_device_init(
 +                      efx, &nic_data->spi_eeprom, FFE_AB_SPI_DEVICE_EEPROM,
 +                      le32_to_cpu(nvconfig->board_v3
 +                                  .spi_device_type[FFE_AB_SPI_DEVICE_EEPROM]));
        }
  
        /* Read the MAC addresses */
 -      memcpy(efx->mac_address, nvconfig->mac_address[0], ETH_ALEN);
 +      memcpy(efx->net_dev->perm_addr, nvconfig->mac_address[0], ETH_ALEN);
  
        netif_dbg(efx, probe, efx->net_dev, "PHY is %d phy_id %d\n",
                  efx->phy_type, efx->mdio.prtad);
  
 -      rc = falcon_probe_board(efx, board_rev);
 -      if (rc)
 -              goto fail2;
 -
 -      kfree(nvconfig);
 -      return 0;
 -
 - fail2:
 -      falcon_remove_spi_devices(efx);
 - fail1:
 +      rc = falcon_probe_board(efx,
 +                              le16_to_cpu(nvconfig->board_v2.board_revision));
 +out:
        kfree(nvconfig);
        return rc;
  }
  /* Probe all SPI devices on the NIC */
  static void falcon_probe_spi_devices(struct efx_nic *efx)
  {
 +      struct falcon_nic_data *nic_data = efx->nic_data;
        efx_oword_t nic_stat, gpio_ctl, ee_vpd_cfg;
        int boot_dev;
  
                efx_writeo(efx, &ee_vpd_cfg, FR_AB_EE_VPD_CFG0);
        }
  
 +      mutex_init(&nic_data->spi_lock);
 +
        if (boot_dev == FFE_AB_SPI_DEVICE_FLASH)
 -              falcon_spi_device_init(efx, &efx->spi_flash,
 +              falcon_spi_device_init(efx, &nic_data->spi_flash,
                                       FFE_AB_SPI_DEVICE_FLASH,
                                       default_flash_type);
        if (boot_dev == FFE_AB_SPI_DEVICE_EEPROM)
 -              falcon_spi_device_init(efx, &efx->spi_eeprom,
 +              falcon_spi_device_init(efx, &nic_data->spi_eeprom,
                                       FFE_AB_SPI_DEVICE_EEPROM,
                                       large_eeprom_type);
  }
@@@ -1413,7 -1382,7 +1398,7 @@@ static int falcon_probe_nic(struct efx_
        }
  
        /* Now we can reset the NIC */
 -      rc = falcon_reset_hw(efx, RESET_TYPE_ALL);
 +      rc = __falcon_reset_hw(efx, RESET_TYPE_ALL);
        if (rc) {
                netif_err(efx, probe, efx->net_dev, "failed to reset NIC\n");
                goto fail3;
  
        /* Read in the non-volatile configuration */
        rc = falcon_probe_nvconfig(efx);
 -      if (rc)
 +      if (rc) {
 +              if (rc == -EINVAL)
 +                      netif_err(efx, probe, efx->net_dev, "NVRAM is invalid\n");
                goto fail5;
 +      }
  
        /* Initialise I2C adapter */
        board = falcon_board(efx);
        BUG_ON(i2c_del_adapter(&board->i2c_adap));
        memset(&board->i2c_adap, 0, sizeof(board->i2c_adap));
   fail5:
 -      falcon_remove_spi_devices(efx);
        efx_nic_free_buffer(efx, &efx->irq_status);
   fail4:
   fail3:
@@@ -1624,9 -1591,10 +1609,9 @@@ static void falcon_remove_nic(struct ef
        BUG_ON(rc);
        memset(&board->i2c_adap, 0, sizeof(board->i2c_adap));
  
 -      falcon_remove_spi_devices(efx);
        efx_nic_free_buffer(efx, &efx->irq_status);
  
 -      falcon_reset_hw(efx, RESET_TYPE_ALL);
 +      __falcon_reset_hw(efx, RESET_TYPE_ALL);
  
        /* Release the second function after the reset */
        if (nic_data->pci_dev2) {
@@@ -1737,7 -1705,6 +1722,7 @@@ struct efx_nic_type falcon_a1_nic_type 
        .reset = falcon_reset_hw,
        .probe_port = falcon_probe_port,
        .remove_port = falcon_remove_port,
 +      .handle_global_event = falcon_handle_global_event,
        .prepare_flush = falcon_prepare_flush,
        .update_stats = falcon_update_nic_stats,
        .start_stats = falcon_start_nic_stats,
@@@ -1778,7 -1745,6 +1763,7 @@@ struct efx_nic_type falcon_b0_nic_type 
        .reset = falcon_reset_hw,
        .probe_port = falcon_probe_port,
        .remove_port = falcon_remove_port,
 +      .handle_global_event = falcon_handle_global_event,
        .prepare_flush = falcon_prepare_flush,
        .update_stats = falcon_update_nic_stats,
        .start_stats = falcon_start_nic_stats,
@@@ -82,13 -82,6 +82,13 @@@ void rt2x00pci_rxdone(struct rt2x00_de
                skbdesc->desc_len = entry->queue->desc_size;
  
                /*
 +               * DMA is already done, notify rt2x00lib that
 +               * it finished successfully.
 +               */
 +              rt2x00lib_dmastart(entry);
 +              rt2x00lib_dmadone(entry);
 +
 +              /*
                 * Send the frame to rt2x00lib for further processing.
                 */
                rt2x00lib_rxdone(entry);
@@@ -112,7 -105,7 +112,7 @@@ static int rt2x00pci_alloc_queue_dma(st
         */
        addr = dma_alloc_coherent(rt2x00dev->dev,
                                  queue->limit * queue->desc_size,
 -                                &dma, GFP_KERNEL | GFP_DMA);
 +                                &dma, GFP_KERNEL);
        if (!addr)
                return -ENOMEM;
  
@@@ -286,7 -279,7 +286,7 @@@ int rt2x00pci_probe(struct pci_dev *pci
        rt2x00dev->irq = pci_dev->irq;
        rt2x00dev->name = pci_name(pci_dev);
  
 -      if (pci_dev->is_pcie)
 +      if (pci_is_pcie(pci_dev))
                rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
        else
                rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
@@@ -363,12 -356,12 +363,12 @@@ int rt2x00pci_resume(struct pci_dev *pc
        struct rt2x00_dev *rt2x00dev = hw->priv;
  
        if (pci_set_power_state(pci_dev, PCI_D0) ||
-           pci_enable_device(pci_dev) ||
-           pci_restore_state(pci_dev)) {
+           pci_enable_device(pci_dev)) {
                ERROR(rt2x00dev, "Failed to resume device.\n");
                return -EIO;
        }
  
+       pci_restore_state(pci_dev);
        return rt2x00lib_resume(rt2x00dev);
  }
  EXPORT_SYMBOL_GPL(rt2x00pci_resume);
diff --combined drivers/scsi/ipr.c
@@@ -146,7 -146,7 +146,7 @@@ static const struct ipr_chip_cfg_t ipr_
                }
        },
        { /* CRoC */
 -              .mailbox = 0x00040,
 +              .mailbox = 0x00044,
                .cache_line_size = 0x20,
                {
                        .set_interrupt_mask_reg = 0x00010,
@@@ -1048,8 -1048,6 +1048,8 @@@ static void ipr_init_res_entry(struct i
                        sizeof(res->res_path));
  
                res->bus = 0;
 +              memcpy(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
 +                      sizeof(res->dev_lun.scsi_lun));
                res->lun = scsilun_to_int(&res->dev_lun);
  
                if (res->type == IPR_RES_TYPE_GENERIC_SCSI) {
                                                                  ioa_cfg->max_devs_supported);
                                set_bit(res->target, ioa_cfg->target_ids);
                        }
 -
 -                      memcpy(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
 -                              sizeof(res->dev_lun.scsi_lun));
                } else if (res->type == IPR_RES_TYPE_IOAFP) {
                        res->bus = IPR_IOAFP_VIRTUAL_BUS;
                        res->target = 0;
@@@ -1115,7 -1116,7 +1115,7 @@@ static int ipr_is_same_device(struct ip
        if (res->ioa_cfg->sis64) {
                if (!memcmp(&res->dev_id, &cfgtew->u.cfgte64->dev_id,
                                        sizeof(cfgtew->u.cfgte64->dev_id)) &&
 -                      !memcmp(&res->lun, &cfgtew->u.cfgte64->lun,
 +                      !memcmp(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
                                        sizeof(cfgtew->u.cfgte64->lun))) {
                        return 1;
                }
@@@ -2900,12 -2901,6 +2900,12 @@@ static void ipr_get_ioa_dump(struct ipr
                return;
        }
  
 +      if (ioa_cfg->sis64) {
 +              spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 +              ssleep(IPR_DUMP_DELAY_SECONDS);
 +              spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
 +      }
 +
        start_addr = readl(ioa_cfg->ioa_mailbox);
  
        if (!ioa_cfg->sis64 && !ipr_sdt_is_fmt2(start_addr)) {
@@@ -5748,7 -5743,7 +5748,7 @@@ static int ipr_queuecommand_lck(struct 
        }
  
        if (ipr_is_gata(res) && res->sata_port)
 -              return ata_sas_queuecmd(scsi_cmd, done, res->sata_port->ap);
 +              return ata_sas_queuecmd(scsi_cmd, res->sata_port->ap);
  
        ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
        ioarcb = &ipr_cmd->ioarcb;
@@@ -7478,29 -7473,6 +7478,29 @@@ static void ipr_get_unit_check_buffer(s
  }
  
  /**
 + * ipr_reset_get_unit_check_job - Call to get the unit check buffer.
 + * @ipr_cmd:  ipr command struct
 + *
 + * Description: This function will call to get the unit check buffer.
 + *
 + * Return value:
 + *    IPR_RC_JOB_RETURN
 + **/
 +static int ipr_reset_get_unit_check_job(struct ipr_cmnd *ipr_cmd)
 +{
 +      struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
 +
 +      ENTER;
 +      ioa_cfg->ioa_unit_checked = 0;
 +      ipr_get_unit_check_buffer(ioa_cfg);
 +      ipr_cmd->job_step = ipr_reset_alert;
 +      ipr_reset_start_timer(ipr_cmd, 0);
 +
 +      LEAVE;
 +      return IPR_RC_JOB_RETURN;
 +}
 +
 +/**
   * ipr_reset_restore_cfg_space - Restore PCI config space.
   * @ipr_cmd:  ipr command struct
   *
@@@ -7515,16 -7487,10 +7515,10 @@@ static int ipr_reset_restore_cfg_space(
  {
        struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
        volatile u32 int_reg;
-       int rc;
  
        ENTER;
        ioa_cfg->pdev->state_saved = true;
-       rc = pci_restore_state(ioa_cfg->pdev);
-       if (rc != PCIBIOS_SUCCESSFUL) {
-               ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
-               return IPR_RC_JOB_CONTINUE;
-       }
+       pci_restore_state(ioa_cfg->pdev);
  
        if (ipr_set_pcix_cmd_reg(ioa_cfg)) {
                ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
        }
  
        if (ioa_cfg->ioa_unit_checked) {
 -              ioa_cfg->ioa_unit_checked = 0;
 -              ipr_get_unit_check_buffer(ioa_cfg);
 -              ipr_cmd->job_step = ipr_reset_alert;
 -              ipr_reset_start_timer(ipr_cmd, 0);
 -              return IPR_RC_JOB_RETURN;
 +              if (ioa_cfg->sis64) {
 +                      ipr_cmd->job_step = ipr_reset_get_unit_check_job;
 +                      ipr_reset_start_timer(ipr_cmd, IPR_DUMP_DELAY_TIMEOUT);
 +                      return IPR_RC_JOB_RETURN;
 +              } else {
 +                      ioa_cfg->ioa_unit_checked = 0;
 +                      ipr_get_unit_check_buffer(ioa_cfg);
 +                      ipr_cmd->job_step = ipr_reset_alert;
 +                      ipr_reset_start_timer(ipr_cmd, 0);
 +                      return IPR_RC_JOB_RETURN;
 +              }
        }
  
        if (ioa_cfg->in_ioa_bringdown) {
@@@ -996,7 -996,7 +996,7 @@@ failed_free
  
  
  /* Jason (08/11/2009) PCI_DRV wrapper essential structs */
 -static const struct pci_device_id smtcfb_pci_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(smtcfb_pci_table) = {
        {0x126f, 0x710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {0x126f, 0x712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {0x126f, 0x720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
@@@ -1071,7 -1071,7 +1071,7 @@@ static int __maybe_unused smtcfb_resume
        /* when resuming, restore pci data and fb cursor */
        if (pdev->dev.power.power_state.event != PM_EVENT_FREEZE) {
                retv = pci_set_power_state(pdev, PCI_D0);
-               retv = pci_restore_state(pdev);
+               pci_restore_state(pdev);
                if (pci_enable_device(pdev))
                        return -1;
                pci_set_master(pdev);
diff --combined include/linux/pci_ids.h
  #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303
  #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304
  #define PCI_DEVICE_ID_AMD_15H_NB_MISC 0x1603
 +#define PCI_DEVICE_ID_AMD_CNB17H_F3   0x1703
  #define PCI_DEVICE_ID_AMD_LANCE               0x2000
  #define PCI_DEVICE_ID_AMD_LANCE_HOME  0x2001
  #define PCI_DEVICE_ID_AMD_SCSI                0x2020
  #define PCI_DEVICE_ID_O2_6836         0x6836
  #define PCI_DEVICE_ID_O2_6812         0x6872
  #define PCI_DEVICE_ID_O2_6933         0x6933
 +#define PCI_DEVICE_ID_O2_8120         0x8120
 +#define PCI_DEVICE_ID_O2_8220         0x8220
 +#define PCI_DEVICE_ID_O2_8221         0x8221
 +#define PCI_DEVICE_ID_O2_8320         0x8320
 +#define PCI_DEVICE_ID_O2_8321         0x8321
  
  #define PCI_VENDOR_ID_3DFX            0x121a
  #define PCI_DEVICE_ID_3DFX_VOODOO     0x0001
  #define PCI_DEVICE_ID_JMICRON_JMB38X_SD       0x2381
  #define PCI_DEVICE_ID_JMICRON_JMB38X_MMC 0x2382
  #define PCI_DEVICE_ID_JMICRON_JMB38X_MS       0x2383
 +#define PCI_DEVICE_ID_JMICRON_JMB385_MS       0x2388
 +#define PCI_DEVICE_ID_JMICRON_JMB388_SD       0x2391
 +#define PCI_DEVICE_ID_JMICRON_JMB388_ESD 0x2392
 +#define PCI_DEVICE_ID_JMICRON_JMB390_MS       0x2393
  
  #define PCI_VENDOR_ID_KORENIX         0x1982
  #define PCI_DEVICE_ID_KORENIX_JETCARDF0       0x1600
  #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN       0x1c41
  #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX       0x1c5f
  #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS    0x1d22
- #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC      0x1d40
+ #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0    0x1d40
+ #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1    0x1d41
  #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410
  #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411
  #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413