Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 8 Feb 2007 03:23:44 +0000 (19:23 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 8 Feb 2007 03:23:44 +0000 (19:23 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (41 commits)
  Revert "PCI: remove duplicate device id from ata_piix"
  msi: Make MSI useable more architectures
  msi: Kill the msi_desc array.
  msi: Remove attach_msi_entry.
  msi: Fix msi_remove_pci_irq_vectors.
  msi: Remove msi_lock.
  msi: Kill msi_lookup_irq
  MSI: Combine pci_(save|restore)_msi/msix_state
  MSI: Remove pci_scan_msi_device()
  MSI: Replace pci_msi_quirk with calls to pci_no_msi()
  PCI: remove duplicate device id from ipr
  PCI: remove duplicate device id from ata_piix
  PCI: power management: remove noise on non-manageable hw
  PCI: cleanup MSI code
  PCI: make isa_bridge Alpha-only
  PCI: remove quirk_sis_96x_compatible()
  PCI: Speed up the Intel SMBus unhiding quirk
  PCI Quirk: 1k I/O space IOBL_ADR fix on P64H2
  shpchp: delete trailing whitespace
  shpchp: remove DBG_XXX_ROUTINE
  ...

1  2 
drivers/net/bnx2.c
drivers/net/e1000/e1000_main.c
drivers/net/ixgb/ixgb_main.c
drivers/pci/pci-driver.c
include/linux/pci.h

diff --combined drivers/net/bnx2.c
index c416c18007dac16751dcae11d993ce05de7c91e2,0420697c42939fb1472754759b0497baae322b88..5a96d7611af1f4dc0f573d6c12b07e5bc79787fc
  #include <linux/if_vlan.h>
  #define BCM_VLAN 1
  #endif
 -#ifdef NETIF_F_TSO
  #include <net/ip.h>
  #include <net/tcp.h>
  #include <net/checksum.h>
 -#define BCM_TSO 1
 -#endif
  #include <linux/workqueue.h>
  #include <linux/crc32.h>
  #include <linux/prefetch.h>
@@@ -1725,7 -1728,7 +1725,7 @@@ bnx2_tx_int(struct bnx2 *bp
  
                tx_buf = &bp->tx_buf_ring[sw_ring_cons];
                skb = tx_buf->skb;
 -#ifdef BCM_TSO
 +
                /* partial BD completions possible with TSO packets */
                if (skb_is_gso(skb)) {
                        u16 last_idx, last_ring_idx;
                                break;
                        }
                }
 -#endif
 +
                pci_unmap_single(bp->pdev, pci_unmap_addr(tx_buf, mapping),
                        skb_headlen(skb), PCI_DMA_TODEVICE);
  
@@@ -4511,6 -4514,7 +4511,6 @@@ bnx2_start_xmit(struct sk_buff *skb, st
                vlan_tag_flags |=
                        (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16));
        }
 -#ifdef BCM_TSO
        if ((mss = skb_shinfo(skb)->gso_size) &&
                (skb->len > (bp->dev->mtu + ETH_HLEN))) {
                u32 tcp_opt_len, ip_tcp_len;
                }
        }
        else
 -#endif
        {
                mss = 0;
        }
@@@ -5539,8 -5544,10 +5539,8 @@@ static const struct ethtool_ops bnx2_et
        .set_tx_csum            = ethtool_op_set_tx_csum,
        .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
 -#ifdef BCM_TSO
        .get_tso                = ethtool_op_get_tso,
        .set_tso                = bnx2_set_tso,
 -#endif
        .self_test_count        = bnx2_self_test_count,
        .self_test              = bnx2_self_test,
        .get_strings            = bnx2_get_strings,
@@@ -5947,8 -5954,7 +5947,7 @@@ bnx2_init_board(struct pci_dev *pdev, s
         * responding after a while.
         *
         * AMD believes this incompatibility is unique to the 5706, and
-        * prefers to locally disable MSI rather than globally disabling it
-        * using pci_msi_quirk.
+        * prefers to locally disable MSI rather than globally disabling it.
         */
        if (CHIP_NUM(bp) == CHIP_NUM_5706 && disable_msi == 0) {
                struct pci_dev *amd_8132 = NULL;
@@@ -6097,7 -6103,9 +6096,7 @@@ bnx2_init_one(struct pci_dev *pdev, con
  #ifdef BCM_VLAN
        dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
  #endif
 -#ifdef BCM_TSO
        dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN;
 -#endif
  
        netif_carrier_off(bp->dev);
  
index 222fcd2d10dee8a1231d22da091a3bacd0dd8aee,8424a8e4cbb01109db622cde41fde22108998a5b..619c89218b4bcb0cd113bfdadf11206c1bf7e027
@@@ -36,7 -36,7 +36,7 @@@ static char e1000_driver_string[] = "In
  #else
  #define DRIVERNAPI "-NAPI"
  #endif
 -#define DRV_VERSION "7.3.15-k2"DRIVERNAPI
 +#define DRV_VERSION "7.3.20-k2"DRIVERNAPI
  char e1000_driver_version[] = DRV_VERSION;
  static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
  
@@@ -990,12 -990,16 +990,12 @@@ e1000_probe(struct pci_dev *pdev
                        netdev->features &= ~NETIF_F_HW_VLAN_FILTER;
        }
  
 -#ifdef NETIF_F_TSO
        if ((adapter->hw.mac_type >= e1000_82544) &&
           (adapter->hw.mac_type != e1000_82547))
                netdev->features |= NETIF_F_TSO;
  
 -#ifdef NETIF_F_TSO6
        if (adapter->hw.mac_type > e1000_82547_rev_2)
                netdev->features |= NETIF_F_TSO6;
 -#endif
 -#endif
        if (pci_using_dac)
                netdev->features |= NETIF_F_HIGHDMA;
  
@@@ -2579,22 -2583,15 +2579,22 @@@ e1000_watchdog(unsigned long data
  
        if (link) {
                if (!netif_carrier_ok(netdev)) {
 +                      uint32_t ctrl;
                        boolean_t txb2b = 1;
                        e1000_get_speed_and_duplex(&adapter->hw,
                                                   &adapter->link_speed,
                                                   &adapter->link_duplex);
  
 -                      DPRINTK(LINK, INFO, "NIC Link is Up %d Mbps %s\n",
 -                             adapter->link_speed,
 -                             adapter->link_duplex == FULL_DUPLEX ?
 -                             "Full Duplex" : "Half Duplex");
 +                      ctrl = E1000_READ_REG(&adapter->hw, CTRL);
 +                      DPRINTK(LINK, INFO, "NIC Link is Up %d Mbps %s, "
 +                              "Flow Control: %s\n",
 +                              adapter->link_speed,
 +                              adapter->link_duplex == FULL_DUPLEX ?
 +                              "Full Duplex" : "Half Duplex",
 +                              ((ctrl & E1000_CTRL_TFCE) && (ctrl &
 +                              E1000_CTRL_RFCE)) ? "RX/TX" : ((ctrl &
 +                              E1000_CTRL_RFCE) ? "RX" : ((ctrl &
 +                              E1000_CTRL_TFCE) ? "TX" : "None" )));
  
                        /* tweak tx_queue_len according to speed/duplex
                         * and adjust the timeout factor */
                                E1000_WRITE_REG(&adapter->hw, TARC0, tarc0);
                        }
  
 -#ifdef NETIF_F_TSO
                        /* disable TSO for pcie and 10/100 speeds, to avoid
                         * some hardware issues */
                        if (!adapter->tso_force &&
                                        DPRINTK(PROBE,INFO,
                                        "10/100 speed: disabling TSO\n");
                                        netdev->features &= ~NETIF_F_TSO;
 -#ifdef NETIF_F_TSO6
                                        netdev->features &= ~NETIF_F_TSO6;
 -#endif
                                        break;
                                case SPEED_1000:
                                        netdev->features |= NETIF_F_TSO;
 -#ifdef NETIF_F_TSO6
                                        netdev->features |= NETIF_F_TSO6;
 -#endif
                                        break;
                                default:
                                        /* oops */
                                        break;
                                }
                        }
 -#endif
  
                        /* enable transmits in the hardware, need to do this
                         * after setting TARC0 */
@@@ -2872,6 -2875,7 +2872,6 @@@ static in
  e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
            struct sk_buff *skb)
  {
 -#ifdef NETIF_F_TSO
        struct e1000_context_desc *context_desc;
        struct e1000_buffer *buffer_info;
        unsigned int i;
                                                   0);
                        cmd_length = E1000_TXD_CMD_IP;
                        ipcse = skb->h.raw - skb->data - 1;
 -#ifdef NETIF_F_TSO6
                } else if (skb->protocol == htons(ETH_P_IPV6)) {
                        skb->nh.ipv6h->payload_len = 0;
                        skb->h.th->check =
                                                 IPPROTO_TCP,
                                                 0);
                        ipcse = 0;
 -#endif
                }
                ipcss = skb->nh.raw - skb->data;
                ipcso = (void *)&(skb->nh.iph->check) - (void *)skb->data;
  
                return TRUE;
        }
 -#endif
 -
        return FALSE;
  }
  
@@@ -2960,9 -2968,8 +2960,9 @@@ e1000_tx_csum(struct e1000_adapter *ada
                buffer_info = &tx_ring->buffer_info[i];
                context_desc = E1000_CONTEXT_DESC(*tx_ring, i);
  
 +              context_desc->lower_setup.ip_config = 0;
                context_desc->upper_setup.tcp_fields.tucss = css;
 -              context_desc->upper_setup.tcp_fields.tucso = css + skb->csum_offset;
 +              context_desc->upper_setup.tcp_fields.tucso = css + skb->csum;
                context_desc->upper_setup.tcp_fields.tucse = 0;
                context_desc->tcp_seg_setup.data = 0;
                context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT);
@@@ -2998,6 -3005,7 +2998,6 @@@ e1000_tx_map(struct e1000_adapter *adap
        while (len) {
                buffer_info = &tx_ring->buffer_info[i];
                size = min(len, max_per_txd);
 -#ifdef NETIF_F_TSO
                /* Workaround for Controller erratum --
                 * descriptor for non-tso packet in a linear SKB that follows a
                 * tso gets written back prematurely before the data is fully
                 * in TSO mode.  Append 4-byte sentinel desc */
                if (unlikely(mss && !nr_frags && size == len && size > 8))
                        size -= 4;
 -#endif
                /* work-around for errata 10 and it applies
                 * to all controllers in PCI-X mode
                 * The fix is to make sure that the first descriptor of a
                while (len) {
                        buffer_info = &tx_ring->buffer_info[i];
                        size = min(len, max_per_txd);
 -#ifdef NETIF_F_TSO
                        /* Workaround for premature desc write-backs
                         * in TSO mode.  Append 4-byte sentinel desc */
                        if (unlikely(mss && f == (nr_frags-1) && size == len && size > 8))
                                size -= 4;
 -#endif
                        /* Workaround for potential 82544 hang in PCI-X.
                         * Avoid terminating buffers within evenly-aligned
                         * dwords. */
@@@ -3281,6 -3292,7 +3281,6 @@@ e1000_xmit_frame(struct sk_buff *skb, s
        if (adapter->hw.mac_type >= e1000_82571)
                max_per_txd = 8192;
  
 -#ifdef NETIF_F_TSO
        mss = skb_shinfo(skb)->gso_size;
        /* The controller does a simple calculation to
         * make sure there is enough room in the FIFO before
        if ((mss) || (skb->ip_summed == CHECKSUM_PARTIAL))
                count++;
        count++;
 -#else
 -      if (skb->ip_summed == CHECKSUM_PARTIAL)
 -              count++;
 -#endif
  
 -#ifdef NETIF_F_TSO
        /* Controller Erratum workaround */
        if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb))
                count++;
 -#endif
  
        count += TXD_USE_COUNT(len, max_txd_pwr);
  
@@@ -3584,7 -3602,7 +3584,7 @@@ e1000_update_stats(struct e1000_adapte
         */
        if (adapter->link_speed == 0)
                return;
-       if (pdev->error_state && pdev->error_state != pci_channel_io_normal)
+       if (pci_channel_offline(pdev))
                return;
  
        spin_lock_irqsave(&adapter->stats_lock, flags);
   * @data: pointer to a network interface device structure
   **/
  
 -static
 -irqreturn_t e1000_intr_msi(int irq, void *data)
 +static irqreturn_t
 +e1000_intr_msi(int irq, void *data)
  {
        struct net_device *netdev = data;
        struct e1000_adapter *adapter = netdev_priv(netdev);
  #ifndef CONFIG_E1000_NAPI
        int i;
  #endif
 +      uint32_t icr = E1000_READ_REG(hw, ICR);
  
 -      /* this code avoids the read of ICR but has to get 1000 interrupts
 -       * at every link change event before it will notice the change */
 -      if (++adapter->detect_link >= 1000) {
 -              uint32_t icr = E1000_READ_REG(hw, ICR);
  #ifdef CONFIG_E1000_NAPI
 -              /* read ICR disables interrupts using IAM, so keep up with our
 -               * enable/disable accounting */
 -              atomic_inc(&adapter->irq_sem);
 +      /* read ICR disables interrupts using IAM, so keep up with our
 +       * enable/disable accounting */
 +      atomic_inc(&adapter->irq_sem);
  #endif
 -              adapter->detect_link = 0;
 -              if ((icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) &&
 -                  (icr & E1000_ICR_INT_ASSERTED)) {
 -                      hw->get_link_status = 1;
 -                      /* 80003ES2LAN workaround--
 -                      * For packet buffer work-around on link down event;
 -                      * disable receives here in the ISR and
 -                      * reset adapter in watchdog
 -                      */
 -                      if (netif_carrier_ok(netdev) &&
 -                          (adapter->hw.mac_type == e1000_80003es2lan)) {
 -                              /* disable receives */
 -                              uint32_t rctl = E1000_READ_REG(hw, RCTL);
 -                              E1000_WRITE_REG(hw, RCTL, rctl & ~E1000_RCTL_EN);
 -                      }
 -                      /* guard against interrupt when we're going down */
 -                      if (!test_bit(__E1000_DOWN, &adapter->flags))
 -                              mod_timer(&adapter->watchdog_timer,
 -                                        jiffies + 1);
 +      if (icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
 +              hw->get_link_status = 1;
 +              /* 80003ES2LAN workaround-- For packet buffer work-around on
 +               * link down event; disable receives here in the ISR and reset
 +               * adapter in watchdog */
 +              if (netif_carrier_ok(netdev) &&
 +                  (adapter->hw.mac_type == e1000_80003es2lan)) {
 +                      /* disable receives */
 +                      uint32_t rctl = E1000_READ_REG(hw, RCTL);
 +                      E1000_WRITE_REG(hw, RCTL, rctl & ~E1000_RCTL_EN);
                }
 -      } else {
 -              E1000_WRITE_REG(hw, ICR, (0xffffffff & ~(E1000_ICR_RXSEQ |
 -                                                       E1000_ICR_LSC)));
 -              /* bummer we have to flush here, but things break otherwise as
 -               * some event appears to be lost or delayed and throughput
 -               * drops.  In almost all tests this flush is un-necessary */
 -              E1000_WRITE_FLUSH(hw);
 -#ifdef CONFIG_E1000_NAPI
 -              /* Interrupt Auto-Mask (IAM)...upon writing ICR, interrupts are
 -               * masked.  No need for the IMC write, but it does mean we
 -               * should account for it ASAP. */
 -              atomic_inc(&adapter->irq_sem);
 -#endif
 +              /* guard against interrupt when we're going down */
 +              if (!test_bit(__E1000_DOWN, &adapter->flags))
 +                      mod_timer(&adapter->watchdog_timer, jiffies + 1);
        }
  
  #ifdef CONFIG_E1000_NAPI
  
        for (i = 0; i < E1000_MAX_INTR; i++)
                if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) &
 -                 !e1000_clean_tx_irq(adapter, adapter->tx_ring)))
 +                 e1000_clean_tx_irq(adapter, adapter->tx_ring)))
                        break;
  
        if (likely(adapter->itr_setting & 3))
@@@ -3899,7 -3939,7 +3899,7 @@@ e1000_intr(int irq, void *data
  
        for (i = 0; i < E1000_MAX_INTR; i++)
                if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) &
 -                 !e1000_clean_tx_irq(adapter, adapter->tx_ring)))
 +                 e1000_clean_tx_irq(adapter, adapter->tx_ring)))
                        break;
  
        if (likely(adapter->itr_setting & 3))
@@@ -3949,7 -3989,7 +3949,7 @@@ e1000_clean(struct net_device *poll_dev
        poll_dev->quota -= work_done;
  
        /* If no Tx and not enough Rx work done, exit the polling mode */
 -      if ((!tx_cleaned && (work_done == 0)) ||
 +      if ((tx_cleaned && (work_done < work_to_do)) ||
           !netif_running(poll_dev)) {
  quit_polling:
                if (likely(adapter->itr_setting & 3))
@@@ -3979,7 -4019,7 +3979,7 @@@ e1000_clean_tx_irq(struct e1000_adapte
  #ifdef CONFIG_E1000_NAPI
        unsigned int count = 0;
  #endif
 -      boolean_t cleaned = FALSE;
 +      boolean_t cleaned = TRUE;
        unsigned int total_tx_bytes=0, total_tx_packets=0;
  
        i = tx_ring->next_to_clean;
  
                        if (cleaned) {
                                struct sk_buff *skb = buffer_info->skb;
 -                              unsigned int segs = skb_shinfo(skb)->gso_segs;
 +                              unsigned int segs, bytecount;
 +                              segs = skb_shinfo(skb)->gso_segs ?: 1;
 +                              /* multiply data chunks by size of headers */
 +                              bytecount = ((segs - 1) * skb_headlen(skb)) +
 +                                          skb->len;
                                total_tx_packets += segs;
 -                              total_tx_packets++;
 -                              total_tx_bytes += skb->len;
 +                              total_tx_bytes += bytecount;
                        }
                        e1000_unmap_and_free_tx_resource(adapter, buffer_info);
                        tx_desc->upper.data = 0;
  #ifdef CONFIG_E1000_NAPI
  #define E1000_TX_WEIGHT 64
                /* weight of a sort for tx, to avoid endless transmit cleanup */
 -              if (count++ == E1000_TX_WEIGHT) break;
 +              if (count++ == E1000_TX_WEIGHT) {
 +                      cleaned = FALSE;
 +                      break;
 +              }
  #endif
        }
  
index 51bd7e8ff0d622a8825869288ea86bac0fb2bcc5,f2742179f12099fb31796f748a5e86cfb18c0584..0c36828893446dec2849c1f192081fc346b15871
@@@ -456,7 -456,9 +456,7 @@@ ixgb_probe(struct pci_dev *pdev
                           NETIF_F_HW_VLAN_TX |
                           NETIF_F_HW_VLAN_RX |
                           NETIF_F_HW_VLAN_FILTER;
 -#ifdef NETIF_F_TSO
        netdev->features |= NETIF_F_TSO;
 -#endif
  #ifdef NETIF_F_LLTX
        netdev->features |= NETIF_F_LLTX;
  #endif
@@@ -1174,6 -1176,7 +1174,6 @@@ ixgb_watchdog(unsigned long data
  static int
  ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb)
  {
 -#ifdef NETIF_F_TSO
        struct ixgb_context_desc *context_desc;
        unsigned int i;
        uint8_t ipcss, ipcso, tucss, tucso, hdr_len;
  
                return 1;
        }
 -#endif
  
        return 0;
  }
@@@ -1605,7 -1609,7 +1605,7 @@@ ixgb_update_stats(struct ixgb_adapter *
        struct pci_dev *pdev = adapter->pdev;
  
        /* Prevent stats update while adapter is being reset */
-       if (pdev->error_state && pdev->error_state != pci_channel_io_normal)
+       if (pci_channel_offline(pdev))
                return;
  
        if((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) ||
diff --combined drivers/pci/pci-driver.c
index 358766885260c43e1f9b00d75f9f3356cd306a6e,dd2da9b6b11950eff56604aace119d8216d6789d..4438ae1ede4fa5034ad8085c51819fec4252e7b9
@@@ -324,8 -324,7 +324,7 @@@ static int pci_default_resume(struct pc
        /* restore the PCI config space */
        pci_restore_state(pci_dev);
        /* if the device was enabled before suspend, reenable */
-       if (atomic_read(&pci_dev->enable_cnt))
-               retval = __pci_enable_device(pci_dev);
+       retval = __pci_reenable_device(pci_dev);
        /* if the device was busmaster before the suspend, make it busmaster again */
        if (pci_dev->is_busmaster)
                pci_set_master(pci_dev);
@@@ -422,8 -421,7 +421,8 @@@ static struct kobj_type pci_driver_kobj
   * If no error occurred, the driver remains registered even if 
   * no device was claimed during registration.
   */
 -int __pci_register_driver(struct pci_driver *drv, struct module *owner)
 +int __pci_register_driver(struct pci_driver *drv, struct module *owner,
 +                        const char *mod_name)
  {
        int error;
  
        drv->driver.name = drv->name;
        drv->driver.bus = &pci_bus_type;
        drv->driver.owner = owner;
 +      drv->driver.mod_name = mod_name;
        drv->driver.kobj.ktype = &pci_driver_kobj_type;
  
        if (pci_multithread_probe)
diff --combined include/linux/pci.h
index cb899eb95d31edb61f386bd3d62029b7f9e02c87,1507f8cc45fdb5ee1529ed9bc91cb54aa2c19e59..805412cc68751daadc82d5f8ced4482b7b1f586f
@@@ -174,6 -174,9 +174,9 @@@ struct pci_dev 
        struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
        int rom_attr_enabled;           /* has display of the rom attribute been enabled? */
        struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
+ #ifdef CONFIG_PCI_MSI
+       unsigned int first_msi_irq;
+ #endif
  };
  
  #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list)
  #define       to_pci_dev(n) container_of(n, struct pci_dev, dev)
  #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
  
+ static inline int pci_channel_offline(struct pci_dev *pdev)
+ {
+       return (pdev->error_state != pci_channel_io_normal);
+ }
  static inline struct pci_cap_saved_state *pci_find_saved_cap(
        struct pci_dev *pci_dev,char cap)
  {
@@@ -463,8 -471,7 +471,7 @@@ extern void pci_sort_breadthfirst(void)
  
  /* Generic PCI functions exported to card drivers */
  
- struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
- struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from);
+ struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
  struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
  int pci_find_capability (struct pci_dev *dev, int cap);
  int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
@@@ -533,6 -540,7 +540,7 @@@ void pci_update_resource(struct pci_de
  int __must_check pci_assign_resource(struct pci_dev *dev, int i);
  int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i);
  void pci_restore_bars(struct pci_dev *dev);
+ int pci_select_bars(struct pci_dev *dev, unsigned long flags);
  
  /* ROM control related routines */
  void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
@@@ -561,6 -569,8 +569,8 @@@ int __must_check pci_request_regions(st
  void pci_release_regions(struct pci_dev *);
  int __must_check pci_request_region(struct pci_dev *, int, const char *);
  void pci_release_region(struct pci_dev *, int);
+ int pci_request_selected_regions(struct pci_dev *, int, const char *);
+ void pci_release_selected_regions(struct pci_dev *, int);
  
  /* drivers/pci/bus.c */
  int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
  void pci_enable_bridges(struct pci_bus *bus);
  
  /* Proper probing supporting hot-pluggable devices */
 -int __must_check __pci_register_driver(struct pci_driver *, struct module *);
 +int __must_check __pci_register_driver(struct pci_driver *, struct module *,
 +                                     const char *mod_name);
  static inline int __must_check pci_register_driver(struct pci_driver *driver)
  {
 -      return __pci_register_driver(driver, THIS_MODULE);
 +      return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME);
  }
  
  void pci_unregister_driver(struct pci_driver *);
@@@ -612,10 -621,6 +622,6 @@@ enum pci_dma_burst_strategy 
                                   strategy_parameter byte boundaries */
  };
  
- #if defined(CONFIG_ISA) || defined(CONFIG_EISA)
- extern struct pci_dev *isa_bridge;
- #endif
  struct msix_entry {
        u16     vector; /* kernel uses to write allocated vector */
        u16     entry;  /* driver uses to specify entry, OS writes */
  
  
  #ifndef CONFIG_PCI_MSI
- static inline void pci_scan_msi_device(struct pci_dev *dev) {}
  static inline int pci_enable_msi(struct pci_dev *dev) {return -1;}
  static inline void pci_disable_msi(struct pci_dev *dev) {}
  static inline int pci_enable_msix(struct pci_dev* dev,
  static inline void pci_disable_msix(struct pci_dev *dev) {}
  static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
  #else
- extern void pci_scan_msi_device(struct pci_dev *dev);
  extern int pci_enable_msi(struct pci_dev *dev);
  extern void pci_disable_msi(struct pci_dev *dev);
  extern int pci_enable_msix(struct pci_dev* dev,
@@@ -723,8 -726,6 +727,6 @@@ static inline int pci_set_power_state(s
  static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; }
  static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; }
  
- #define       isa_bridge      ((struct pci_dev *)NULL)
  #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)
  
  static inline void pci_block_user_cfg_access(struct pci_dev *dev) { }