diff options
author | Jeff Garzik <jeff@garzik.org> | 2008-04-29 01:54:31 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-29 01:54:31 -0400 |
commit | dd32f7effdd2f3f348ef91ca1649d78a0ab2b103 (patch) | |
tree | 059911292a94d78ba08e553d70035d89a4e7fdf5 | |
parent | 090bf62199d6079cc47c0b78ced9508391b24fa1 (diff) | |
parent | 21e197f231343201368338603cb0909a13961bac (diff) |
Merge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream
-rw-r--r-- | drivers/net/r8169.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 3acfeeabdee1..657242504621 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1617,6 +1617,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1617 | SET_NETDEV_DEV(dev, &pdev->dev); | 1617 | SET_NETDEV_DEV(dev, &pdev->dev); |
1618 | tp = netdev_priv(dev); | 1618 | tp = netdev_priv(dev); |
1619 | tp->dev = dev; | 1619 | tp->dev = dev; |
1620 | tp->pci_dev = pdev; | ||
1620 | tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT); | 1621 | tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT); |
1621 | 1622 | ||
1622 | /* enable device (incl. PCI PM wakeup and hotplug setup) */ | 1623 | /* enable device (incl. PCI PM wakeup and hotplug setup) */ |
@@ -1705,18 +1706,18 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1705 | 1706 | ||
1706 | rtl8169_print_mac_version(tp); | 1707 | rtl8169_print_mac_version(tp); |
1707 | 1708 | ||
1708 | for (i = ARRAY_SIZE(rtl_chip_info) - 1; i >= 0; i--) { | 1709 | for (i = 0; i < ARRAY_SIZE(rtl_chip_info); i++) { |
1709 | if (tp->mac_version == rtl_chip_info[i].mac_version) | 1710 | if (tp->mac_version == rtl_chip_info[i].mac_version) |
1710 | break; | 1711 | break; |
1711 | } | 1712 | } |
1712 | if (i < 0) { | 1713 | if (i == ARRAY_SIZE(rtl_chip_info)) { |
1713 | /* Unknown chip: assume array element #0, original RTL-8169 */ | 1714 | /* Unknown chip: assume array element #0, original RTL-8169 */ |
1714 | if (netif_msg_probe(tp)) { | 1715 | if (netif_msg_probe(tp)) { |
1715 | dev_printk(KERN_DEBUG, &pdev->dev, | 1716 | dev_printk(KERN_DEBUG, &pdev->dev, |
1716 | "unknown chip version, assuming %s\n", | 1717 | "unknown chip version, assuming %s\n", |
1717 | rtl_chip_info[0].name); | 1718 | rtl_chip_info[0].name); |
1718 | } | 1719 | } |
1719 | i++; | 1720 | i = 0; |
1720 | } | 1721 | } |
1721 | tp->chipset = i; | 1722 | tp->chipset = i; |
1722 | 1723 | ||
@@ -1777,7 +1778,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1777 | #endif | 1778 | #endif |
1778 | 1779 | ||
1779 | tp->intr_mask = 0xffff; | 1780 | tp->intr_mask = 0xffff; |
1780 | tp->pci_dev = pdev; | ||
1781 | tp->mmio_addr = ioaddr; | 1781 | tp->mmio_addr = ioaddr; |
1782 | tp->align = cfg->align; | 1782 | tp->align = cfg->align; |
1783 | tp->hw_start = cfg->hw_start; | 1783 | tp->hw_start = cfg->hw_start; |