diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-04 10:52:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-04 10:52:21 -0500 |
commit | 25431e900dc47abb312c9ae8599e8c8ae038eb5a (patch) | |
tree | 3d67ac01e65668d673bfee18cfeb0ed8bc0027fa /drivers | |
parent | 0d7a063fa7b918d2a61cdd63232286d4131774de (diff) | |
parent | 55128bc23e9ab44e97f81f6cd349035230ee59a6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
sunrpc: fix rdma dependencies
e1000: Fix PCI enable to honor the need_ioport flag
sgi-xp: link XPNET's net_device_ops to its net_device structure
pcnet_cs: Fix misuse of the equality operator.
hso: add new device id's
dca: redesign locks to fix deadlocks
cassini/sungem: limit reaches -1, but 0 tested
net: variables reach -1, but 0 tested
qlge: bugfix: Add missing netif_napi_del call.
qlge: bugfix: Add flash offset for second port.
qlge: bugfix: Fix endian issue when reading flash.
udp: increments sk_drops in __udp_queue_rcv_skb()
net: Fix userland breakage wrt. linux/if_tunnel.h
net: packet socket packet_lookup_frame fix
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dca/dca-core.c | 51 | ||||
-rw-r--r-- | drivers/misc/sgi-xp/xpnet.c | 3 | ||||
-rw-r--r-- | drivers/net/cassini.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 2 | ||||
-rw-r--r-- | drivers/net/ibm_newemac/phy.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/qlge/qlge.h | 10 | ||||
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 25 | ||||
-rw-r--r-- | drivers/net/smc911x.c | 4 | ||||
-rw-r--r-- | drivers/net/smsc9420.c | 12 | ||||
-rw-r--r-- | drivers/net/sungem.c | 2 | ||||
-rw-r--r-- | drivers/net/sungem_phy.c | 2 | ||||
-rw-r--r-- | drivers/net/sunqe.c | 2 | ||||
-rw-r--r-- | drivers/net/tsi108_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/tulip/de2104x.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 4 |
16 files changed, 81 insertions, 50 deletions
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index 55433849bfa6..33bd75347518 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/device.h> | 28 | #include <linux/device.h> |
29 | #include <linux/dca.h> | 29 | #include <linux/dca.h> |
30 | 30 | ||
31 | #define DCA_VERSION "1.4" | 31 | #define DCA_VERSION "1.8" |
32 | 32 | ||
33 | MODULE_VERSION(DCA_VERSION); | 33 | MODULE_VERSION(DCA_VERSION); |
34 | MODULE_LICENSE("GPL"); | 34 | MODULE_LICENSE("GPL"); |
@@ -60,16 +60,17 @@ int dca_add_requester(struct device *dev) | |||
60 | { | 60 | { |
61 | struct dca_provider *dca; | 61 | struct dca_provider *dca; |
62 | int err, slot = -ENODEV; | 62 | int err, slot = -ENODEV; |
63 | unsigned long flags; | ||
63 | 64 | ||
64 | if (!dev) | 65 | if (!dev) |
65 | return -EFAULT; | 66 | return -EFAULT; |
66 | 67 | ||
67 | spin_lock(&dca_lock); | 68 | spin_lock_irqsave(&dca_lock, flags); |
68 | 69 | ||
69 | /* check if the requester has not been added already */ | 70 | /* check if the requester has not been added already */ |
70 | dca = dca_find_provider_by_dev(dev); | 71 | dca = dca_find_provider_by_dev(dev); |
71 | if (dca) { | 72 | if (dca) { |
72 | spin_unlock(&dca_lock); | 73 | spin_unlock_irqrestore(&dca_lock, flags); |
73 | return -EEXIST; | 74 | return -EEXIST; |
74 | } | 75 | } |
75 | 76 | ||
@@ -78,19 +79,21 @@ int dca_add_requester(struct device *dev) | |||
78 | if (slot >= 0) | 79 | if (slot >= 0) |
79 | break; | 80 | break; |
80 | } | 81 | } |
81 | if (slot < 0) { | 82 | |
82 | spin_unlock(&dca_lock); | 83 | spin_unlock_irqrestore(&dca_lock, flags); |
84 | |||
85 | if (slot < 0) | ||
83 | return slot; | 86 | return slot; |
84 | } | ||
85 | 87 | ||
86 | err = dca_sysfs_add_req(dca, dev, slot); | 88 | err = dca_sysfs_add_req(dca, dev, slot); |
87 | if (err) { | 89 | if (err) { |
88 | dca->ops->remove_requester(dca, dev); | 90 | spin_lock_irqsave(&dca_lock, flags); |
89 | spin_unlock(&dca_lock); | 91 | if (dca == dca_find_provider_by_dev(dev)) |
92 | dca->ops->remove_requester(dca, dev); | ||
93 | spin_unlock_irqrestore(&dca_lock, flags); | ||
90 | return err; | 94 | return err; |
91 | } | 95 | } |
92 | 96 | ||
93 | spin_unlock(&dca_lock); | ||
94 | return 0; | 97 | return 0; |
95 | } | 98 | } |
96 | EXPORT_SYMBOL_GPL(dca_add_requester); | 99 | EXPORT_SYMBOL_GPL(dca_add_requester); |
@@ -103,25 +106,25 @@ int dca_remove_requester(struct device *dev) | |||
103 | { | 106 | { |
104 | struct dca_provider *dca; | 107 | struct dca_provider *dca; |
105 | int slot; | 108 | int slot; |
109 | unsigned long flags; | ||
106 | 110 | ||
107 | if (!dev) | 111 | if (!dev) |
108 | return -EFAULT; | 112 | return -EFAULT; |
109 | 113 | ||
110 | spin_lock(&dca_lock); | 114 | spin_lock_irqsave(&dca_lock, flags); |
111 | dca = dca_find_provider_by_dev(dev); | 115 | dca = dca_find_provider_by_dev(dev); |
112 | if (!dca) { | 116 | if (!dca) { |
113 | spin_unlock(&dca_lock); | 117 | spin_unlock_irqrestore(&dca_lock, flags); |
114 | return -ENODEV; | 118 | return -ENODEV; |
115 | } | 119 | } |
116 | slot = dca->ops->remove_requester(dca, dev); | 120 | slot = dca->ops->remove_requester(dca, dev); |
117 | if (slot < 0) { | 121 | spin_unlock_irqrestore(&dca_lock, flags); |
118 | spin_unlock(&dca_lock); | 122 | |
123 | if (slot < 0) | ||
119 | return slot; | 124 | return slot; |
120 | } | ||
121 | 125 | ||
122 | dca_sysfs_remove_req(dca, slot); | 126 | dca_sysfs_remove_req(dca, slot); |
123 | 127 | ||
124 | spin_unlock(&dca_lock); | ||
125 | return 0; | 128 | return 0; |
126 | } | 129 | } |
127 | EXPORT_SYMBOL_GPL(dca_remove_requester); | 130 | EXPORT_SYMBOL_GPL(dca_remove_requester); |
@@ -135,17 +138,18 @@ u8 dca_common_get_tag(struct device *dev, int cpu) | |||
135 | { | 138 | { |
136 | struct dca_provider *dca; | 139 | struct dca_provider *dca; |
137 | u8 tag; | 140 | u8 tag; |
141 | unsigned long flags; | ||
138 | 142 | ||
139 | spin_lock(&dca_lock); | 143 | spin_lock_irqsave(&dca_lock, flags); |
140 | 144 | ||
141 | dca = dca_find_provider_by_dev(dev); | 145 | dca = dca_find_provider_by_dev(dev); |
142 | if (!dca) { | 146 | if (!dca) { |
143 | spin_unlock(&dca_lock); | 147 | spin_unlock_irqrestore(&dca_lock, flags); |
144 | return -ENODEV; | 148 | return -ENODEV; |
145 | } | 149 | } |
146 | tag = dca->ops->get_tag(dca, dev, cpu); | 150 | tag = dca->ops->get_tag(dca, dev, cpu); |
147 | 151 | ||
148 | spin_unlock(&dca_lock); | 152 | spin_unlock_irqrestore(&dca_lock, flags); |
149 | return tag; | 153 | return tag; |
150 | } | 154 | } |
151 | 155 | ||
@@ -217,11 +221,16 @@ static BLOCKING_NOTIFIER_HEAD(dca_provider_chain); | |||
217 | int register_dca_provider(struct dca_provider *dca, struct device *dev) | 221 | int register_dca_provider(struct dca_provider *dca, struct device *dev) |
218 | { | 222 | { |
219 | int err; | 223 | int err; |
224 | unsigned long flags; | ||
220 | 225 | ||
221 | err = dca_sysfs_add_provider(dca, dev); | 226 | err = dca_sysfs_add_provider(dca, dev); |
222 | if (err) | 227 | if (err) |
223 | return err; | 228 | return err; |
229 | |||
230 | spin_lock_irqsave(&dca_lock, flags); | ||
224 | list_add(&dca->node, &dca_providers); | 231 | list_add(&dca->node, &dca_providers); |
232 | spin_unlock_irqrestore(&dca_lock, flags); | ||
233 | |||
225 | blocking_notifier_call_chain(&dca_provider_chain, | 234 | blocking_notifier_call_chain(&dca_provider_chain, |
226 | DCA_PROVIDER_ADD, NULL); | 235 | DCA_PROVIDER_ADD, NULL); |
227 | return 0; | 236 | return 0; |
@@ -234,9 +243,15 @@ EXPORT_SYMBOL_GPL(register_dca_provider); | |||
234 | */ | 243 | */ |
235 | void unregister_dca_provider(struct dca_provider *dca) | 244 | void unregister_dca_provider(struct dca_provider *dca) |
236 | { | 245 | { |
246 | unsigned long flags; | ||
247 | |||
237 | blocking_notifier_call_chain(&dca_provider_chain, | 248 | blocking_notifier_call_chain(&dca_provider_chain, |
238 | DCA_PROVIDER_REMOVE, NULL); | 249 | DCA_PROVIDER_REMOVE, NULL); |
250 | |||
251 | spin_lock_irqsave(&dca_lock, flags); | ||
239 | list_del(&dca->node); | 252 | list_del(&dca->node); |
253 | spin_unlock_irqrestore(&dca_lock, flags); | ||
254 | |||
240 | dca_sysfs_remove_provider(dca); | 255 | dca_sysfs_remove_provider(dca); |
241 | } | 256 | } |
242 | EXPORT_SYMBOL_GPL(unregister_dca_provider); | 257 | EXPORT_SYMBOL_GPL(unregister_dca_provider); |
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 7957f525b2f4..6faefcffcb53 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1999-2008 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1999-2009 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* | 9 | /* |
@@ -551,6 +551,7 @@ xpnet_init(void) | |||
551 | 551 | ||
552 | netif_carrier_off(xpnet_device); | 552 | netif_carrier_off(xpnet_device); |
553 | 553 | ||
554 | xpnet_device->netdev_ops = &xpnet_netdev_ops; | ||
554 | xpnet_device->mtu = XPNET_DEF_MTU; | 555 | xpnet_device->mtu = XPNET_DEF_MTU; |
555 | 556 | ||
556 | /* | 557 | /* |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 840b3d1a22f5..bbbc3bb08aa5 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -806,7 +806,7 @@ static int cas_reset_mii_phy(struct cas *cp) | |||
806 | 806 | ||
807 | cas_phy_write(cp, MII_BMCR, BMCR_RESET); | 807 | cas_phy_write(cp, MII_BMCR, BMCR_RESET); |
808 | udelay(100); | 808 | udelay(100); |
809 | while (limit--) { | 809 | while (--limit) { |
810 | val = cas_phy_read(cp, MII_BMCR); | 810 | val = cas_phy_read(cp, MII_BMCR); |
811 | if ((val & BMCR_RESET) == 0) | 811 | if ((val & BMCR_RESET) == 0) |
812 | break; | 812 | break; |
@@ -979,7 +979,7 @@ static void cas_phy_init(struct cas *cp) | |||
979 | writel(val, cp->regs + REG_PCS_MII_CTRL); | 979 | writel(val, cp->regs + REG_PCS_MII_CTRL); |
980 | 980 | ||
981 | limit = STOP_TRIES; | 981 | limit = STOP_TRIES; |
982 | while (limit-- > 0) { | 982 | while (--limit > 0) { |
983 | udelay(10); | 983 | udelay(10); |
984 | if ((readl(cp->regs + REG_PCS_MII_CTRL) & | 984 | if ((readl(cp->regs + REG_PCS_MII_CTRL) & |
985 | PCS_MII_RESET) == 0) | 985 | PCS_MII_RESET) == 0) |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index c986978ce761..6bd63cc67b3e 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -940,7 +940,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
940 | err = pci_enable_device(pdev); | 940 | err = pci_enable_device(pdev); |
941 | } else { | 941 | } else { |
942 | bars = pci_select_bars(pdev, IORESOURCE_MEM); | 942 | bars = pci_select_bars(pdev, IORESOURCE_MEM); |
943 | err = pci_enable_device(pdev); | 943 | err = pci_enable_device_mem(pdev); |
944 | } | 944 | } |
945 | if (err) | 945 | if (err) |
946 | return err; | 946 | return err; |
diff --git a/drivers/net/ibm_newemac/phy.c b/drivers/net/ibm_newemac/phy.c index c40cd8df2212..ac9d964e59ec 100644 --- a/drivers/net/ibm_newemac/phy.c +++ b/drivers/net/ibm_newemac/phy.c | |||
@@ -60,7 +60,7 @@ int emac_mii_reset_phy(struct mii_phy *phy) | |||
60 | 60 | ||
61 | udelay(300); | 61 | udelay(300); |
62 | 62 | ||
63 | while (limit--) { | 63 | while (--limit) { |
64 | val = phy_read(phy, MII_BMCR); | 64 | val = phy_read(phy, MII_BMCR); |
65 | if (val >= 0 && (val & BMCR_RESET) == 0) | 65 | if (val >= 0 && (val & BMCR_RESET) == 0) |
66 | break; | 66 | break; |
@@ -84,7 +84,7 @@ int emac_mii_reset_gpcs(struct mii_phy *phy) | |||
84 | 84 | ||
85 | udelay(300); | 85 | udelay(300); |
86 | 86 | ||
87 | while (limit--) { | 87 | while (--limit) { |
88 | val = gpcs_phy_read(phy, MII_BMCR); | 88 | val = gpcs_phy_read(phy, MII_BMCR); |
89 | if (val >= 0 && (val & BMCR_RESET) == 0) | 89 | if (val >= 0 && (val & BMCR_RESET) == 0) |
90 | break; | 90 | break; |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index c38ed777f0a8..a6999403f37b 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -586,7 +586,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
586 | } | 586 | } |
587 | 587 | ||
588 | if ((link->conf.ConfigBase == 0x03c0) | 588 | if ((link->conf.ConfigBase == 0x03c0) |
589 | && (link->manf_id == 0x149) && (link->card_id = 0xc1ab)) { | 589 | && (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) { |
590 | printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n"); | 590 | printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n"); |
591 | printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n"); | 591 | printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n"); |
592 | goto failed; | 592 | goto failed; |
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index c1dadadfab18..e6fdce9206cc 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h | |||
@@ -787,12 +787,12 @@ struct mbox_params { | |||
787 | 787 | ||
788 | struct flash_params { | 788 | struct flash_params { |
789 | u8 dev_id_str[4]; | 789 | u8 dev_id_str[4]; |
790 | u16 size; | 790 | __le16 size; |
791 | u16 csum; | 791 | __le16 csum; |
792 | u16 ver; | 792 | __le16 ver; |
793 | u16 sub_dev_id; | 793 | __le16 sub_dev_id; |
794 | u8 mac_addr[6]; | 794 | u8 mac_addr[6]; |
795 | u16 res; | 795 | __le16 res; |
796 | }; | 796 | }; |
797 | 797 | ||
798 | 798 | ||
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 45421c8b6010..3d1d7b6e55aa 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -641,7 +641,7 @@ static void ql_enable_all_completion_interrupts(struct ql_adapter *qdev) | |||
641 | 641 | ||
642 | } | 642 | } |
643 | 643 | ||
644 | static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data) | 644 | static int ql_read_flash_word(struct ql_adapter *qdev, int offset, __le32 *data) |
645 | { | 645 | { |
646 | int status = 0; | 646 | int status = 0; |
647 | /* wait for reg to come ready */ | 647 | /* wait for reg to come ready */ |
@@ -656,8 +656,11 @@ static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data) | |||
656 | FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR); | 656 | FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR); |
657 | if (status) | 657 | if (status) |
658 | goto exit; | 658 | goto exit; |
659 | /* get the data */ | 659 | /* This data is stored on flash as an array of |
660 | *data = ql_read32(qdev, FLASH_DATA); | 660 | * __le32. Since ql_read32() returns cpu endian |
661 | * we need to swap it back. | ||
662 | */ | ||
663 | *data = cpu_to_le32(ql_read32(qdev, FLASH_DATA)); | ||
661 | exit: | 664 | exit: |
662 | return status; | 665 | return status; |
663 | } | 666 | } |
@@ -666,13 +669,20 @@ static int ql_get_flash_params(struct ql_adapter *qdev) | |||
666 | { | 669 | { |
667 | int i; | 670 | int i; |
668 | int status; | 671 | int status; |
669 | u32 *p = (u32 *)&qdev->flash; | 672 | __le32 *p = (__le32 *)&qdev->flash; |
673 | u32 offset = 0; | ||
674 | |||
675 | /* Second function's parameters follow the first | ||
676 | * function's. | ||
677 | */ | ||
678 | if (qdev->func) | ||
679 | offset = sizeof(qdev->flash) / sizeof(u32); | ||
670 | 680 | ||
671 | if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) | 681 | if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) |
672 | return -ETIMEDOUT; | 682 | return -ETIMEDOUT; |
673 | 683 | ||
674 | for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { | 684 | for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { |
675 | status = ql_read_flash_word(qdev, i, p); | 685 | status = ql_read_flash_word(qdev, i+offset, p); |
676 | if (status) { | 686 | if (status) { |
677 | QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); | 687 | QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); |
678 | goto exit; | 688 | goto exit; |
@@ -3826,7 +3836,7 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3826 | { | 3836 | { |
3827 | struct net_device *ndev = pci_get_drvdata(pdev); | 3837 | struct net_device *ndev = pci_get_drvdata(pdev); |
3828 | struct ql_adapter *qdev = netdev_priv(ndev); | 3838 | struct ql_adapter *qdev = netdev_priv(ndev); |
3829 | int err; | 3839 | int err, i; |
3830 | 3840 | ||
3831 | netif_device_detach(ndev); | 3841 | netif_device_detach(ndev); |
3832 | 3842 | ||
@@ -3836,6 +3846,9 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3836 | return err; | 3846 | return err; |
3837 | } | 3847 | } |
3838 | 3848 | ||
3849 | for (i = qdev->rss_ring_first_cq_id; i < qdev->rx_ring_count; i++) | ||
3850 | netif_napi_del(&qdev->rx_ring[i].napi); | ||
3851 | |||
3839 | err = pci_save_state(pdev); | 3852 | err = pci_save_state(pdev); |
3840 | if (err) | 3853 | if (err) |
3841 | return err; | 3854 | return err; |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index bf3aa2a1effe..223cde0d43be 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -220,9 +220,9 @@ static void smc911x_reset(struct net_device *dev) | |||
220 | 220 | ||
221 | /* make sure EEPROM has finished loading before setting GPIO_CFG */ | 221 | /* make sure EEPROM has finished loading before setting GPIO_CFG */ |
222 | timeout=1000; | 222 | timeout=1000; |
223 | while ( timeout-- && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) { | 223 | while (--timeout && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) |
224 | udelay(10); | 224 | udelay(10); |
225 | } | 225 | |
226 | if (timeout == 0){ | 226 | if (timeout == 0){ |
227 | PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name); | 227 | PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name); |
228 | return; | 228 | return; |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index d801900a5036..a1e4b3895b33 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
@@ -498,7 +498,7 @@ static void smsc9420_check_mac_address(struct net_device *dev) | |||
498 | static void smsc9420_stop_tx(struct smsc9420_pdata *pd) | 498 | static void smsc9420_stop_tx(struct smsc9420_pdata *pd) |
499 | { | 499 | { |
500 | u32 dmac_control, mac_cr, dma_intr_ena; | 500 | u32 dmac_control, mac_cr, dma_intr_ena; |
501 | int timeOut = 1000; | 501 | int timeout = 1000; |
502 | 502 | ||
503 | /* disable TX DMAC */ | 503 | /* disable TX DMAC */ |
504 | dmac_control = smsc9420_reg_read(pd, DMAC_CONTROL); | 504 | dmac_control = smsc9420_reg_read(pd, DMAC_CONTROL); |
@@ -506,13 +506,13 @@ static void smsc9420_stop_tx(struct smsc9420_pdata *pd) | |||
506 | smsc9420_reg_write(pd, DMAC_CONTROL, dmac_control); | 506 | smsc9420_reg_write(pd, DMAC_CONTROL, dmac_control); |
507 | 507 | ||
508 | /* Wait max 10ms for transmit process to stop */ | 508 | /* Wait max 10ms for transmit process to stop */ |
509 | while (timeOut--) { | 509 | while (--timeout) { |
510 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_TS_) | 510 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_TS_) |
511 | break; | 511 | break; |
512 | udelay(10); | 512 | udelay(10); |
513 | } | 513 | } |
514 | 514 | ||
515 | if (!timeOut) | 515 | if (!timeout) |
516 | smsc_warn(IFDOWN, "TX DMAC failed to stop"); | 516 | smsc_warn(IFDOWN, "TX DMAC failed to stop"); |
517 | 517 | ||
518 | /* ACK Tx DMAC stop bit */ | 518 | /* ACK Tx DMAC stop bit */ |
@@ -596,7 +596,7 @@ static void smsc9420_free_rx_ring(struct smsc9420_pdata *pd) | |||
596 | 596 | ||
597 | static void smsc9420_stop_rx(struct smsc9420_pdata *pd) | 597 | static void smsc9420_stop_rx(struct smsc9420_pdata *pd) |
598 | { | 598 | { |
599 | int timeOut = 1000; | 599 | int timeout = 1000; |
600 | u32 mac_cr, dmac_control, dma_intr_ena; | 600 | u32 mac_cr, dmac_control, dma_intr_ena; |
601 | 601 | ||
602 | /* mask RX DMAC interrupts */ | 602 | /* mask RX DMAC interrupts */ |
@@ -617,13 +617,13 @@ static void smsc9420_stop_rx(struct smsc9420_pdata *pd) | |||
617 | smsc9420_pci_flush_write(pd); | 617 | smsc9420_pci_flush_write(pd); |
618 | 618 | ||
619 | /* wait up to 10ms for receive to stop */ | 619 | /* wait up to 10ms for receive to stop */ |
620 | while (timeOut--) { | 620 | while (--timeout) { |
621 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_RS_) | 621 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_RS_) |
622 | break; | 622 | break; |
623 | udelay(10); | 623 | udelay(10); |
624 | } | 624 | } |
625 | 625 | ||
626 | if (!timeOut) | 626 | if (!timeout) |
627 | smsc_warn(IFDOWN, "RX DMAC did not stop! timeout."); | 627 | smsc_warn(IFDOWN, "RX DMAC did not stop! timeout."); |
628 | 628 | ||
629 | /* ACK the Rx DMAC stop bit */ | 629 | /* ACK the Rx DMAC stop bit */ |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 86c765d83de1..b17efa9cc530 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -148,7 +148,7 @@ static u16 __phy_read(struct gem *gp, int phy_addr, int reg) | |||
148 | cmd |= (MIF_FRAME_TAMSB); | 148 | cmd |= (MIF_FRAME_TAMSB); |
149 | writel(cmd, gp->regs + MIF_FRAME); | 149 | writel(cmd, gp->regs + MIF_FRAME); |
150 | 150 | ||
151 | while (limit--) { | 151 | while (--limit) { |
152 | cmd = readl(gp->regs + MIF_FRAME); | 152 | cmd = readl(gp->regs + MIF_FRAME); |
153 | if (cmd & MIF_FRAME_TALSB) | 153 | if (cmd & MIF_FRAME_TALSB) |
154 | break; | 154 | break; |
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 61843fd57525..78f8cee5fd74 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c | |||
@@ -79,7 +79,7 @@ static int reset_one_mii_phy(struct mii_phy* phy, int phy_id) | |||
79 | 79 | ||
80 | udelay(100); | 80 | udelay(100); |
81 | 81 | ||
82 | while (limit--) { | 82 | while (--limit) { |
83 | val = __phy_read(phy, phy_id, MII_BMCR); | 83 | val = __phy_read(phy, phy_id, MII_BMCR); |
84 | if ((val & BMCR_RESET) == 0) | 84 | if ((val & BMCR_RESET) == 0) |
85 | break; | 85 | break; |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 6e8f377355fe..fe0c3f244562 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -227,7 +227,7 @@ static int qe_init(struct sunqe *qep, int from_irq) | |||
227 | if (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) { | 227 | if (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) { |
228 | int tries = 50; | 228 | int tries = 50; |
229 | 229 | ||
230 | while (tries--) { | 230 | while (--tries) { |
231 | u8 tmp; | 231 | u8 tmp; |
232 | 232 | ||
233 | mdelay(5); | 233 | mdelay(5); |
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 75461dbd4876..a9fd2b2ccaf6 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c | |||
@@ -1237,7 +1237,7 @@ static void tsi108_init_phy(struct net_device *dev) | |||
1237 | spin_lock_irqsave(&phy_lock, flags); | 1237 | spin_lock_irqsave(&phy_lock, flags); |
1238 | 1238 | ||
1239 | tsi108_write_mii(data, MII_BMCR, BMCR_RESET); | 1239 | tsi108_write_mii(data, MII_BMCR, BMCR_RESET); |
1240 | while (i--){ | 1240 | while (--i) { |
1241 | if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET)) | 1241 | if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET)) |
1242 | break; | 1242 | break; |
1243 | udelay(10); | 1243 | udelay(10); |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index d5d53b633cf8..0bf2114738be 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -392,7 +392,7 @@ static void de_rx (struct de_private *de) | |||
392 | unsigned drop = 0; | 392 | unsigned drop = 0; |
393 | int rc; | 393 | int rc; |
394 | 394 | ||
395 | while (rx_work--) { | 395 | while (--rx_work) { |
396 | u32 status, len; | 396 | u32 status, len; |
397 | dma_addr_t mapping; | 397 | dma_addr_t mapping; |
398 | struct sk_buff *skb, *copy_skb; | 398 | struct sk_buff *skb, *copy_skb; |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 0d0fa91c0251..fe98acaead97 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -455,6 +455,7 @@ static const struct usb_device_id hso_ids[] = { | |||
455 | {icon321_port_device(0x0af0, 0xd033)}, /* Icon-322 */ | 455 | {icon321_port_device(0x0af0, 0xd033)}, /* Icon-322 */ |
456 | {USB_DEVICE(0x0af0, 0x7301)}, /* GE40x */ | 456 | {USB_DEVICE(0x0af0, 0x7301)}, /* GE40x */ |
457 | {USB_DEVICE(0x0af0, 0x7361)}, /* GE40x */ | 457 | {USB_DEVICE(0x0af0, 0x7361)}, /* GE40x */ |
458 | {USB_DEVICE(0x0af0, 0x7381)}, /* GE40x */ | ||
458 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ | 459 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ |
459 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ | 460 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ |
460 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ | 461 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ |
@@ -462,7 +463,8 @@ static const struct usb_device_id hso_ids[] = { | |||
462 | {USB_DEVICE(0x0af0, 0x7801)}, | 463 | {USB_DEVICE(0x0af0, 0x7801)}, |
463 | {USB_DEVICE(0x0af0, 0x7901)}, | 464 | {USB_DEVICE(0x0af0, 0x7901)}, |
464 | {USB_DEVICE(0x0af0, 0x7361)}, | 465 | {USB_DEVICE(0x0af0, 0x7361)}, |
465 | {icon321_port_device(0x0af0, 0xd051)}, | 466 | {USB_DEVICE(0x0af0, 0xd057)}, |
467 | {USB_DEVICE(0x0af0, 0xd055)}, | ||
466 | {} | 468 | {} |
467 | }; | 469 | }; |
468 | MODULE_DEVICE_TABLE(usb, hso_ids); | 470 | MODULE_DEVICE_TABLE(usb, hso_ids); |