diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:46:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:46:45 -0400 |
commit | 2ad20802b759cc2d16dc9470fa15874610d21714 (patch) | |
tree | f9a0d657a3162bb87ff31d0c580b7910938fd9d1 /drivers/net | |
parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) | |
parent | e1cc1c578055d20d36e084e324001fb5e0355a71 (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: (26 commits)
bonding: fix panic if initialization fails
IXP4xx: complete Ethernet netdev setup before calling register_netdev().
IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.
ipvs: Fix IPv4 FWMARK virtual services
ipv4: Make INET_LRO a bool instead of tristate.
net: remove stale reference to fastroute from Kconfig help text
net: update skb_recycle_check() for hardware timestamping changes
bnx2: Fix panic in bnx2_poll_work().
net-sched: fix bfifo default limit
igb: resolve panic on shutdown when SR-IOV is enabled
wimax: oops: wimax_dev_add() is the only one that can initialize the state
wimax: fix oops if netlink fails to add attribute
Bluetooth: Move dev_set_name() to a context that can sleep
netfilter: ctnetlink: fix wrong message type in user updates
netfilter: xt_cluster: fix use of cluster match with 32 nodes
netfilter: ip6t_ipv6header: fix match on packets ending with NEXTHDR_NONE
netfilter: add missing linux/types.h include to xt_LED.h
mac80211: pid, fix memory corruption
mac80211: minstrel, fix memory corruption
cfg80211: fix comment on regulatory hint processing
...
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/arm/ixp4xx_eth.c | 31 | ||||
-rw-r--r-- | drivers/net/bnx2.c | 6 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 8 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 12 | ||||
-rw-r--r-- | drivers/net/wan/ixp4xx_hss.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 1 |
7 files changed, 38 insertions, 45 deletions
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 448487e22fa3..a740053d3af3 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -338,12 +338,12 @@ static int ixp4xx_mdio_register(void) | |||
338 | if (cpu_is_ixp43x()) { | 338 | if (cpu_is_ixp43x()) { |
339 | /* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */ | 339 | /* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */ |
340 | if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEC_ETH)) | 340 | if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEC_ETH)) |
341 | return -ENOSYS; | 341 | return -ENODEV; |
342 | mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT; | 342 | mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT; |
343 | } else { | 343 | } else { |
344 | /* All MII PHY accesses use NPE-B Ethernet registers */ | 344 | /* All MII PHY accesses use NPE-B Ethernet registers */ |
345 | if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0)) | 345 | if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0)) |
346 | return -ENOSYS; | 346 | return -ENODEV; |
347 | mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT; | 347 | mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT; |
348 | } | 348 | } |
349 | 349 | ||
@@ -1174,7 +1174,7 @@ static int __devinit eth_init_one(struct platform_device *pdev) | |||
1174 | regs_phys = IXP4XX_EthC_BASE_PHYS; | 1174 | regs_phys = IXP4XX_EthC_BASE_PHYS; |
1175 | break; | 1175 | break; |
1176 | default: | 1176 | default: |
1177 | err = -ENOSYS; | 1177 | err = -ENODEV; |
1178 | goto err_free; | 1178 | goto err_free; |
1179 | } | 1179 | } |
1180 | 1180 | ||
@@ -1189,15 +1189,10 @@ static int __devinit eth_init_one(struct platform_device *pdev) | |||
1189 | goto err_free; | 1189 | goto err_free; |
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | if (register_netdev(dev)) { | ||
1193 | err = -EIO; | ||
1194 | goto err_npe_rel; | ||
1195 | } | ||
1196 | |||
1197 | port->mem_res = request_mem_region(regs_phys, REGS_SIZE, dev->name); | 1192 | port->mem_res = request_mem_region(regs_phys, REGS_SIZE, dev->name); |
1198 | if (!port->mem_res) { | 1193 | if (!port->mem_res) { |
1199 | err = -EBUSY; | 1194 | err = -EBUSY; |
1200 | goto err_unreg; | 1195 | goto err_npe_rel; |
1201 | } | 1196 | } |
1202 | 1197 | ||
1203 | port->plat = plat; | 1198 | port->plat = plat; |
@@ -1215,20 +1210,25 @@ static int __devinit eth_init_one(struct platform_device *pdev) | |||
1215 | snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, "0", plat->phy); | 1210 | snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, "0", plat->phy); |
1216 | port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0, | 1211 | port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0, |
1217 | PHY_INTERFACE_MODE_MII); | 1212 | PHY_INTERFACE_MODE_MII); |
1218 | if (IS_ERR(port->phydev)) { | 1213 | if ((err = IS_ERR(port->phydev))) |
1219 | printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); | 1214 | goto err_free_mem; |
1220 | return PTR_ERR(port->phydev); | ||
1221 | } | ||
1222 | 1215 | ||
1223 | port->phydev->irq = PHY_POLL; | 1216 | port->phydev->irq = PHY_POLL; |
1224 | 1217 | ||
1218 | if ((err = register_netdev(dev))) | ||
1219 | goto err_phy_dis; | ||
1220 | |||
1225 | printk(KERN_INFO "%s: MII PHY %i on %s\n", dev->name, plat->phy, | 1221 | printk(KERN_INFO "%s: MII PHY %i on %s\n", dev->name, plat->phy, |
1226 | npe_name(port->npe)); | 1222 | npe_name(port->npe)); |
1227 | 1223 | ||
1228 | return 0; | 1224 | return 0; |
1229 | 1225 | ||
1230 | err_unreg: | 1226 | err_phy_dis: |
1231 | unregister_netdev(dev); | 1227 | phy_disconnect(port->phydev); |
1228 | err_free_mem: | ||
1229 | npe_port_tab[NPE_ID(port->id)] = NULL; | ||
1230 | platform_set_drvdata(pdev, NULL); | ||
1231 | release_resource(port->mem_res); | ||
1232 | err_npe_rel: | 1232 | err_npe_rel: |
1233 | npe_release(port->npe); | 1233 | npe_release(port->npe); |
1234 | err_free: | 1234 | err_free: |
@@ -1242,6 +1242,7 @@ static int __devexit eth_remove_one(struct platform_device *pdev) | |||
1242 | struct port *port = netdev_priv(dev); | 1242 | struct port *port = netdev_priv(dev); |
1243 | 1243 | ||
1244 | unregister_netdev(dev); | 1244 | unregister_netdev(dev); |
1245 | phy_disconnect(port->phydev); | ||
1245 | npe_port_tab[NPE_ID(port->id)] = NULL; | 1246 | npe_port_tab[NPE_ID(port->id)] = NULL; |
1246 | platform_set_drvdata(pdev, NULL); | 1247 | platform_set_drvdata(pdev, NULL); |
1247 | npe_release(port->npe); | 1248 | npe_release(port->npe); |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index d47839184a06..b0cb29d4cc01 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -54,8 +54,8 @@ | |||
54 | 54 | ||
55 | #define DRV_MODULE_NAME "bnx2" | 55 | #define DRV_MODULE_NAME "bnx2" |
56 | #define PFX DRV_MODULE_NAME ": " | 56 | #define PFX DRV_MODULE_NAME ": " |
57 | #define DRV_MODULE_VERSION "2.0.0" | 57 | #define DRV_MODULE_VERSION "2.0.1" |
58 | #define DRV_MODULE_RELDATE "April 2, 2009" | 58 | #define DRV_MODULE_RELDATE "May 6, 2009" |
59 | #define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-4.6.16.fw" | 59 | #define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-4.6.16.fw" |
60 | #define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-4.6.16.fw" | 60 | #define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-4.6.16.fw" |
61 | #define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-4.6.17.fw" | 61 | #define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-4.6.17.fw" |
@@ -2600,6 +2600,7 @@ bnx2_get_hw_tx_cons(struct bnx2_napi *bnapi) | |||
2600 | /* Tell compiler that status block fields can change. */ | 2600 | /* Tell compiler that status block fields can change. */ |
2601 | barrier(); | 2601 | barrier(); |
2602 | cons = *bnapi->hw_tx_cons_ptr; | 2602 | cons = *bnapi->hw_tx_cons_ptr; |
2603 | barrier(); | ||
2603 | if (unlikely((cons & MAX_TX_DESC_CNT) == MAX_TX_DESC_CNT)) | 2604 | if (unlikely((cons & MAX_TX_DESC_CNT) == MAX_TX_DESC_CNT)) |
2604 | cons++; | 2605 | cons++; |
2605 | return cons; | 2606 | return cons; |
@@ -2879,6 +2880,7 @@ bnx2_get_hw_rx_cons(struct bnx2_napi *bnapi) | |||
2879 | /* Tell compiler that status block fields can change. */ | 2880 | /* Tell compiler that status block fields can change. */ |
2880 | barrier(); | 2881 | barrier(); |
2881 | cons = *bnapi->hw_rx_cons_ptr; | 2882 | cons = *bnapi->hw_rx_cons_ptr; |
2883 | barrier(); | ||
2882 | if (unlikely((cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT)) | 2884 | if (unlikely((cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT)) |
2883 | cons++; | 2885 | cons++; |
2884 | return cons; | 2886 | return cons; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 2188a96fc090..74824028f85c 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -5181,7 +5181,6 @@ static int __init bonding_init(void) | |||
5181 | { | 5181 | { |
5182 | int i; | 5182 | int i; |
5183 | int res; | 5183 | int res; |
5184 | struct bonding *bond; | ||
5185 | 5184 | ||
5186 | printk(KERN_INFO "%s", version); | 5185 | printk(KERN_INFO "%s", version); |
5187 | 5186 | ||
@@ -5212,13 +5211,6 @@ static int __init bonding_init(void) | |||
5212 | 5211 | ||
5213 | goto out; | 5212 | goto out; |
5214 | err: | 5213 | err: |
5215 | list_for_each_entry(bond, &bond_dev_list, bond_list) { | ||
5216 | bond_work_cancel_all(bond); | ||
5217 | destroy_workqueue(bond->wq); | ||
5218 | } | ||
5219 | |||
5220 | bond_destroy_sysfs(); | ||
5221 | |||
5222 | rtnl_lock(); | 5214 | rtnl_lock(); |
5223 | bond_free_all(); | 5215 | bond_free_all(); |
5224 | rtnl_unlock(); | 5216 | rtnl_unlock(); |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 08c801490c72..e25343588fc7 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2006,7 +2006,7 @@ static void igb_setup_rctl(struct igb_adapter *adapter) | |||
2006 | struct e1000_hw *hw = &adapter->hw; | 2006 | struct e1000_hw *hw = &adapter->hw; |
2007 | u32 rctl; | 2007 | u32 rctl; |
2008 | u32 srrctl = 0; | 2008 | u32 srrctl = 0; |
2009 | int i, j; | 2009 | int i; |
2010 | 2010 | ||
2011 | rctl = rd32(E1000_RCTL); | 2011 | rctl = rd32(E1000_RCTL); |
2012 | 2012 | ||
@@ -2071,8 +2071,6 @@ static void igb_setup_rctl(struct igb_adapter *adapter) | |||
2071 | if (adapter->vfs_allocated_count) { | 2071 | if (adapter->vfs_allocated_count) { |
2072 | u32 vmolr; | 2072 | u32 vmolr; |
2073 | 2073 | ||
2074 | j = adapter->rx_ring[0].reg_idx; | ||
2075 | |||
2076 | /* set all queue drop enable bits */ | 2074 | /* set all queue drop enable bits */ |
2077 | wr32(E1000_QDE, ALL_QUEUES); | 2075 | wr32(E1000_QDE, ALL_QUEUES); |
2078 | srrctl |= E1000_SRRCTL_DROP_EN; | 2076 | srrctl |= E1000_SRRCTL_DROP_EN; |
@@ -2080,16 +2078,16 @@ static void igb_setup_rctl(struct igb_adapter *adapter) | |||
2080 | /* disable queue 0 to prevent tail write w/o re-config */ | 2078 | /* disable queue 0 to prevent tail write w/o re-config */ |
2081 | wr32(E1000_RXDCTL(0), 0); | 2079 | wr32(E1000_RXDCTL(0), 0); |
2082 | 2080 | ||
2083 | vmolr = rd32(E1000_VMOLR(j)); | 2081 | vmolr = rd32(E1000_VMOLR(adapter->vfs_allocated_count)); |
2084 | if (rctl & E1000_RCTL_LPE) | 2082 | if (rctl & E1000_RCTL_LPE) |
2085 | vmolr |= E1000_VMOLR_LPE; | 2083 | vmolr |= E1000_VMOLR_LPE; |
2086 | if (adapter->num_rx_queues > 0) | 2084 | if (adapter->num_rx_queues > 1) |
2087 | vmolr |= E1000_VMOLR_RSSE; | 2085 | vmolr |= E1000_VMOLR_RSSE; |
2088 | wr32(E1000_VMOLR(j), vmolr); | 2086 | wr32(E1000_VMOLR(adapter->vfs_allocated_count), vmolr); |
2089 | } | 2087 | } |
2090 | 2088 | ||
2091 | for (i = 0; i < adapter->num_rx_queues; i++) { | 2089 | for (i = 0; i < adapter->num_rx_queues; i++) { |
2092 | j = adapter->rx_ring[i].reg_idx; | 2090 | int j = adapter->rx_ring[i].reg_idx; |
2093 | wr32(E1000_SRRCTL(j), srrctl); | 2091 | wr32(E1000_SRRCTL(j), srrctl); |
2094 | } | 2092 | } |
2095 | 2093 | ||
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index 3bf7d3f447db..765a7f5d6aa4 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
@@ -1249,7 +1249,7 @@ static int __devinit hss_init_one(struct platform_device *pdev) | |||
1249 | return -ENOMEM; | 1249 | return -ENOMEM; |
1250 | 1250 | ||
1251 | if ((port->npe = npe_request(0)) == NULL) { | 1251 | if ((port->npe = npe_request(0)) == NULL) { |
1252 | err = -ENOSYS; | 1252 | err = -ENODEV; |
1253 | goto err_free; | 1253 | goto err_free; |
1254 | } | 1254 | } |
1255 | 1255 | ||
@@ -1311,7 +1311,7 @@ static int __init hss_init_module(void) | |||
1311 | if ((ixp4xx_read_feature_bits() & | 1311 | if ((ixp4xx_read_feature_bits() & |
1312 | (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) != | 1312 | (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) != |
1313 | (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) | 1313 | (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) |
1314 | return -ENOSYS; | 1314 | return -ENODEV; |
1315 | 1315 | ||
1316 | spin_lock_init(&npe_lock); | 1316 | spin_lock_init(&npe_lock); |
1317 | 1317 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 5798fe49c771..44ab03a12e40 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -719,6 +719,14 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, | |||
719 | { | 719 | { |
720 | unsigned long flags; | 720 | unsigned long flags; |
721 | int ret = 0; | 721 | int ret = 0; |
722 | __le16 key_flags = 0; | ||
723 | |||
724 | key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); | ||
725 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); | ||
726 | key_flags &= ~STA_KEY_FLG_INVALID; | ||
727 | |||
728 | if (sta_id == priv->hw_params.bcast_sta_id) | ||
729 | key_flags |= STA_KEY_MULTICAST_MSK; | ||
722 | 730 | ||
723 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | 731 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; |
724 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; | 732 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; |
@@ -738,6 +746,9 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, | |||
738 | WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, | 746 | WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, |
739 | "no space for a new key"); | 747 | "no space for a new key"); |
740 | 748 | ||
749 | priv->stations[sta_id].sta.key.key_flags = key_flags; | ||
750 | |||
751 | |||
741 | /* This copy is acutally not needed: we get the key with each TX */ | 752 | /* This copy is acutally not needed: we get the key with each TX */ |
742 | memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16); | 753 | memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16); |
743 | 754 | ||
@@ -754,9 +765,7 @@ void iwl_update_tkip_key(struct iwl_priv *priv, | |||
754 | { | 765 | { |
755 | u8 sta_id = IWL_INVALID_STATION; | 766 | u8 sta_id = IWL_INVALID_STATION; |
756 | unsigned long flags; | 767 | unsigned long flags; |
757 | __le16 key_flags = 0; | ||
758 | int i; | 768 | int i; |
759 | DECLARE_MAC_BUF(mac); | ||
760 | 769 | ||
761 | sta_id = iwl_find_station(priv, addr); | 770 | sta_id = iwl_find_station(priv, addr); |
762 | if (sta_id == IWL_INVALID_STATION) { | 771 | if (sta_id == IWL_INVALID_STATION) { |
@@ -771,16 +780,8 @@ void iwl_update_tkip_key(struct iwl_priv *priv, | |||
771 | return; | 780 | return; |
772 | } | 781 | } |
773 | 782 | ||
774 | key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); | ||
775 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); | ||
776 | key_flags &= ~STA_KEY_FLG_INVALID; | ||
777 | |||
778 | if (sta_id == priv->hw_params.bcast_sta_id) | ||
779 | key_flags |= STA_KEY_MULTICAST_MSK; | ||
780 | |||
781 | spin_lock_irqsave(&priv->sta_lock, flags); | 783 | spin_lock_irqsave(&priv->sta_lock, flags); |
782 | 784 | ||
783 | priv->stations[sta_id].sta.key.key_flags = key_flags; | ||
784 | priv->stations[sta_id].sta.key.tkip_rx_tsc_byte2 = (u8) iv32; | 785 | priv->stations[sta_id].sta.key.tkip_rx_tsc_byte2 = (u8) iv32; |
785 | 786 | ||
786 | for (i = 0; i < 5; i++) | 787 | for (i = 0; i < 5; i++) |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 70a00c8ee42e..4cce66133500 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -1744,7 +1744,6 @@ static void iwl3945_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rx | |||
1744 | rxq->bd = NULL; | 1744 | rxq->bd = NULL; |
1745 | rxq->rb_stts = NULL; | 1745 | rxq->rb_stts = NULL; |
1746 | } | 1746 | } |
1747 | EXPORT_SYMBOL(iwl3945_rx_queue_free); | ||
1748 | 1747 | ||
1749 | 1748 | ||
1750 | /* Convert linear signal-to-noise ratio into dB */ | 1749 | /* Convert linear signal-to-noise ratio into dB */ |