diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-20 16:12:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-20 16:12:14 -0500 |
commit | 4dd61d92d7204788b93b064a679c9068fc5b8a5f (patch) | |
tree | 90dc522b71d06a336773f919def0fd99d59156c9 /drivers | |
parent | 95763dd52b4b9b3578d3428001ece1e11b016ffc (diff) | |
parent | 5ece6c2ddd6f7da9e95dc325c742c0f5afbcecbe (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: (23 commits)
net: fix tiny output corruption of /proc/net/snmp6
atl2: don't request irq on resume if netif running
ipv6: use seq_release_private for ip6mr.c /proc entries
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
smc911x: Fix printf format typo in smc911x driver.
asix: Fix asix-based cards connecting to 10/100Mbs LAN.
mv643xx_eth: fix recycle check bound
mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
sh: sh_eth: Update to change of mii_bus
TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
TPROXY: fill struct flowi->flags in udp_sendmsg()
net: ipg.c fix bracing on endian swapping
phylib: Fix auto-negotiation restart avoidance
net: jme.c rxdesc.flags is __le16, other missing endian swaps
phylib: fix phy name example in documentation
net: Do not fire linkwatch events until the device is registered.
phonet: fix compilation with gcc-3.4
ixgbe: fix compilation with gcc-3.4
pktgen: fix multiple queue warning
net: fix ip_mr_init() error path
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/atlx/atl2.c | 8 | ||||
-rw-r--r-- | drivers/net/ipg.c | 8 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 58 | ||||
-rw-r--r-- | drivers/net/jme.c | 21 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 5 | ||||
-rw-r--r-- | drivers/net/phy/phy_device.c | 34 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 4 | ||||
-rw-r--r-- | drivers/net/smc911x.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/asix.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas_tf/if_usb.c | 2 |
14 files changed, 102 insertions, 81 deletions
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index f5bdc92c1a65..8571e8c0bc67 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
@@ -1690,9 +1690,11 @@ static int atl2_resume(struct pci_dev *pdev) | |||
1690 | 1690 | ||
1691 | ATL2_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0); | 1691 | ATL2_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0); |
1692 | 1692 | ||
1693 | err = atl2_request_irq(adapter); | 1693 | if (netif_running(netdev)) { |
1694 | if (netif_running(netdev) && err) | 1694 | err = atl2_request_irq(adapter); |
1695 | return err; | 1695 | if (err) |
1696 | return err; | ||
1697 | } | ||
1696 | 1698 | ||
1697 | atl2_reset_hw(&adapter->hw); | 1699 | atl2_reset_hw(&adapter->hw); |
1698 | 1700 | ||
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c index 7373dafbb3f7..059369885be1 100644 --- a/drivers/net/ipg.c +++ b/drivers/net/ipg.c | |||
@@ -1112,7 +1112,7 @@ static void ipg_nic_rx_free_skb(struct net_device *dev) | |||
1112 | struct ipg_rx *rxfd = sp->rxd + entry; | 1112 | struct ipg_rx *rxfd = sp->rxd + entry; |
1113 | 1113 | ||
1114 | pci_unmap_single(sp->pdev, | 1114 | pci_unmap_single(sp->pdev, |
1115 | le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN), | 1115 | le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN, |
1116 | sp->rx_buf_sz, PCI_DMA_FROMDEVICE); | 1116 | sp->rx_buf_sz, PCI_DMA_FROMDEVICE); |
1117 | dev_kfree_skb_irq(sp->rx_buff[entry]); | 1117 | dev_kfree_skb_irq(sp->rx_buff[entry]); |
1118 | sp->rx_buff[entry] = NULL; | 1118 | sp->rx_buff[entry] = NULL; |
@@ -1179,7 +1179,7 @@ static int ipg_nic_rx_check_error(struct net_device *dev) | |||
1179 | */ | 1179 | */ |
1180 | if (sp->rx_buff[entry]) { | 1180 | if (sp->rx_buff[entry]) { |
1181 | pci_unmap_single(sp->pdev, | 1181 | pci_unmap_single(sp->pdev, |
1182 | le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN), | 1182 | le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN, |
1183 | sp->rx_buf_sz, PCI_DMA_FROMDEVICE); | 1183 | sp->rx_buf_sz, PCI_DMA_FROMDEVICE); |
1184 | 1184 | ||
1185 | dev_kfree_skb_irq(sp->rx_buff[entry]); | 1185 | dev_kfree_skb_irq(sp->rx_buff[entry]); |
@@ -1246,7 +1246,7 @@ static void ipg_nic_rx_with_start(struct net_device *dev, | |||
1246 | if (jumbo->found_start) | 1246 | if (jumbo->found_start) |
1247 | dev_kfree_skb_irq(jumbo->skb); | 1247 | dev_kfree_skb_irq(jumbo->skb); |
1248 | 1248 | ||
1249 | pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN), | 1249 | pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN, |
1250 | sp->rx_buf_sz, PCI_DMA_FROMDEVICE); | 1250 | sp->rx_buf_sz, PCI_DMA_FROMDEVICE); |
1251 | 1251 | ||
1252 | skb_put(skb, sp->rxfrag_size); | 1252 | skb_put(skb, sp->rxfrag_size); |
@@ -1349,7 +1349,7 @@ static int ipg_nic_rx_jumbo(struct net_device *dev) | |||
1349 | unsigned int entry = curr % IPG_RFDLIST_LENGTH; | 1349 | unsigned int entry = curr % IPG_RFDLIST_LENGTH; |
1350 | struct ipg_rx *rxfd = sp->rxd + entry; | 1350 | struct ipg_rx *rxfd = sp->rxd + entry; |
1351 | 1351 | ||
1352 | if (!(rxfd->rfs & le64_to_cpu(IPG_RFS_RFDDONE))) | 1352 | if (!(rxfd->rfs & cpu_to_le64(IPG_RFS_RFDDONE))) |
1353 | break; | 1353 | break; |
1354 | 1354 | ||
1355 | switch (ipg_nic_rx_check_frame_type(dev)) { | 1355 | switch (ipg_nic_rx_check_frame_type(dev)) { |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 7548fb7360d9..36f2bb666bf7 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1287,7 +1287,34 @@ static void ixgbe_set_itr(struct ixgbe_adapter *adapter) | |||
1287 | return; | 1287 | return; |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter); | 1290 | /** |
1291 | * ixgbe_irq_disable - Mask off interrupt generation on the NIC | ||
1292 | * @adapter: board private structure | ||
1293 | **/ | ||
1294 | static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter) | ||
1295 | { | ||
1296 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0); | ||
1297 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1298 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { | ||
1299 | int i; | ||
1300 | for (i = 0; i < adapter->num_msix_vectors; i++) | ||
1301 | synchronize_irq(adapter->msix_entries[i].vector); | ||
1302 | } else { | ||
1303 | synchronize_irq(adapter->pdev->irq); | ||
1304 | } | ||
1305 | } | ||
1306 | |||
1307 | /** | ||
1308 | * ixgbe_irq_enable - Enable default interrupt generation settings | ||
1309 | * @adapter: board private structure | ||
1310 | **/ | ||
1311 | static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter) | ||
1312 | { | ||
1313 | u32 mask; | ||
1314 | mask = IXGBE_EIMS_ENABLE_MASK; | ||
1315 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); | ||
1316 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1317 | } | ||
1291 | 1318 | ||
1292 | /** | 1319 | /** |
1293 | * ixgbe_intr - legacy mode Interrupt Handler | 1320 | * ixgbe_intr - legacy mode Interrupt Handler |
@@ -1394,35 +1421,6 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter) | |||
1394 | } | 1421 | } |
1395 | 1422 | ||
1396 | /** | 1423 | /** |
1397 | * ixgbe_irq_disable - Mask off interrupt generation on the NIC | ||
1398 | * @adapter: board private structure | ||
1399 | **/ | ||
1400 | static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter) | ||
1401 | { | ||
1402 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0); | ||
1403 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1404 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { | ||
1405 | int i; | ||
1406 | for (i = 0; i < adapter->num_msix_vectors; i++) | ||
1407 | synchronize_irq(adapter->msix_entries[i].vector); | ||
1408 | } else { | ||
1409 | synchronize_irq(adapter->pdev->irq); | ||
1410 | } | ||
1411 | } | ||
1412 | |||
1413 | /** | ||
1414 | * ixgbe_irq_enable - Enable default interrupt generation settings | ||
1415 | * @adapter: board private structure | ||
1416 | **/ | ||
1417 | static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter) | ||
1418 | { | ||
1419 | u32 mask; | ||
1420 | mask = IXGBE_EIMS_ENABLE_MASK; | ||
1421 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); | ||
1422 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1423 | } | ||
1424 | |||
1425 | /** | ||
1426 | * ixgbe_configure_msi_and_legacy - Initialize PIN (INTA...) and MSI interrupts | 1424 | * ixgbe_configure_msi_and_legacy - Initialize PIN (INTA...) and MSI interrupts |
1427 | * | 1425 | * |
1428 | **/ | 1426 | **/ |
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 81c6cdc3851f..665e70d620fc 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -912,23 +912,23 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx) | |||
912 | skb_put(skb, framesize); | 912 | skb_put(skb, framesize); |
913 | skb->protocol = eth_type_trans(skb, jme->dev); | 913 | skb->protocol = eth_type_trans(skb, jme->dev); |
914 | 914 | ||
915 | if (jme_rxsum_ok(jme, rxdesc->descwb.flags)) | 915 | if (jme_rxsum_ok(jme, le16_to_cpu(rxdesc->descwb.flags))) |
916 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 916 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
917 | else | 917 | else |
918 | skb->ip_summed = CHECKSUM_NONE; | 918 | skb->ip_summed = CHECKSUM_NONE; |
919 | 919 | ||
920 | if (rxdesc->descwb.flags & RXWBFLAG_TAGON) { | 920 | if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) { |
921 | if (jme->vlgrp) { | 921 | if (jme->vlgrp) { |
922 | jme->jme_vlan_rx(skb, jme->vlgrp, | 922 | jme->jme_vlan_rx(skb, jme->vlgrp, |
923 | le32_to_cpu(rxdesc->descwb.vlan)); | 923 | le16_to_cpu(rxdesc->descwb.vlan)); |
924 | NET_STAT(jme).rx_bytes += 4; | 924 | NET_STAT(jme).rx_bytes += 4; |
925 | } | 925 | } |
926 | } else { | 926 | } else { |
927 | jme->jme_rx(skb); | 927 | jme->jme_rx(skb); |
928 | } | 928 | } |
929 | 929 | ||
930 | if ((le16_to_cpu(rxdesc->descwb.flags) & RXWBFLAG_DEST) == | 930 | if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_DEST)) == |
931 | RXWBFLAG_DEST_MUL) | 931 | cpu_to_le16(RXWBFLAG_DEST_MUL)) |
932 | ++(NET_STAT(jme).multicast); | 932 | ++(NET_STAT(jme).multicast); |
933 | 933 | ||
934 | jme->dev->last_rx = jiffies; | 934 | jme->dev->last_rx = jiffies; |
@@ -961,7 +961,7 @@ jme_process_receive(struct jme_adapter *jme, int limit) | |||
961 | rxdesc = rxring->desc; | 961 | rxdesc = rxring->desc; |
962 | rxdesc += i; | 962 | rxdesc += i; |
963 | 963 | ||
964 | if ((rxdesc->descwb.flags & RXWBFLAG_OWN) || | 964 | if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) || |
965 | !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL)) | 965 | !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL)) |
966 | goto out; | 966 | goto out; |
967 | 967 | ||
@@ -1763,10 +1763,9 @@ jme_expand_header(struct jme_adapter *jme, struct sk_buff *skb) | |||
1763 | } | 1763 | } |
1764 | 1764 | ||
1765 | static int | 1765 | static int |
1766 | jme_tx_tso(struct sk_buff *skb, | 1766 | jme_tx_tso(struct sk_buff *skb, __le16 *mss, u8 *flags) |
1767 | u16 *mss, u8 *flags) | ||
1768 | { | 1767 | { |
1769 | *mss = skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT; | 1768 | *mss = cpu_to_le16(skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT); |
1770 | if (*mss) { | 1769 | if (*mss) { |
1771 | *flags |= TXFLAG_LSEN; | 1770 | *flags |= TXFLAG_LSEN; |
1772 | 1771 | ||
@@ -1826,11 +1825,11 @@ jme_tx_csum(struct jme_adapter *jme, struct sk_buff *skb, u8 *flags) | |||
1826 | } | 1825 | } |
1827 | 1826 | ||
1828 | static inline void | 1827 | static inline void |
1829 | jme_tx_vlan(struct sk_buff *skb, u16 *vlan, u8 *flags) | 1828 | jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags) |
1830 | { | 1829 | { |
1831 | if (vlan_tx_tag_present(skb)) { | 1830 | if (vlan_tx_tag_present(skb)) { |
1832 | *flags |= TXFLAG_TAGON; | 1831 | *flags |= TXFLAG_TAGON; |
1833 | *vlan = vlan_tx_tag_get(skb); | 1832 | *vlan = cpu_to_le16(vlan_tx_tag_get(skb)); |
1834 | } | 1833 | } |
1835 | } | 1834 | } |
1836 | 1835 | ||
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index b9dcdbd369f8..e513f76f2a9f 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -899,7 +899,8 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force) | |||
899 | if (skb != NULL) { | 899 | if (skb != NULL) { |
900 | if (skb_queue_len(&mp->rx_recycle) < | 900 | if (skb_queue_len(&mp->rx_recycle) < |
901 | mp->default_rx_ring_size && | 901 | mp->default_rx_ring_size && |
902 | skb_recycle_check(skb, mp->skb_size)) | 902 | skb_recycle_check(skb, mp->skb_size + |
903 | dma_get_cache_alignment() - 1)) | ||
903 | __skb_queue_head(&mp->rx_recycle, skb); | 904 | __skb_queue_head(&mp->rx_recycle, skb); |
904 | else | 905 | else |
905 | dev_kfree_skb(skb); | 906 | dev_kfree_skb(skb); |
@@ -2435,8 +2436,8 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev) | |||
2435 | struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data; | 2436 | struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data; |
2436 | 2437 | ||
2437 | if (pd == NULL || pd->shared_smi == NULL) { | 2438 | if (pd == NULL || pd->shared_smi == NULL) { |
2438 | mdiobus_free(msp->smi_bus); | ||
2439 | mdiobus_unregister(msp->smi_bus); | 2439 | mdiobus_unregister(msp->smi_bus); |
2440 | mdiobus_free(msp->smi_bus); | ||
2440 | } | 2441 | } |
2441 | if (msp->err_interrupt != NO_IRQ) | 2442 | if (msp->err_interrupt != NO_IRQ) |
2442 | free_irq(msp->err_interrupt, msp); | 2443 | free_irq(msp->err_interrupt, msp); |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 8fb1faca883a..55bc24b234e3 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -564,20 +564,32 @@ EXPORT_SYMBOL(genphy_restart_aneg); | |||
564 | */ | 564 | */ |
565 | int genphy_config_aneg(struct phy_device *phydev) | 565 | int genphy_config_aneg(struct phy_device *phydev) |
566 | { | 566 | { |
567 | int result = 0; | 567 | int result; |
568 | 568 | ||
569 | if (AUTONEG_ENABLE == phydev->autoneg) { | 569 | if (AUTONEG_ENABLE != phydev->autoneg) |
570 | int result = genphy_config_advert(phydev); | 570 | return genphy_setup_forced(phydev); |
571 | |||
572 | result = genphy_config_advert(phydev); | ||
573 | |||
574 | if (result < 0) /* error */ | ||
575 | return result; | ||
571 | 576 | ||
572 | if (result < 0) /* error */ | 577 | if (result == 0) { |
573 | return result; | 578 | /* Advertisment hasn't changed, but maybe aneg was never on to |
579 | * begin with? Or maybe phy was isolated? */ | ||
580 | int ctl = phy_read(phydev, MII_BMCR); | ||
581 | |||
582 | if (ctl < 0) | ||
583 | return ctl; | ||
584 | |||
585 | if (!(ctl & BMCR_ANENABLE) || (ctl & BMCR_ISOLATE)) | ||
586 | result = 1; /* do restart aneg */ | ||
587 | } | ||
574 | 588 | ||
575 | /* Only restart aneg if we are advertising something different | 589 | /* Only restart aneg if we are advertising something different |
576 | * than we were before. */ | 590 | * than we were before. */ |
577 | if (result > 0) | 591 | if (result > 0) |
578 | result = genphy_restart_aneg(phydev); | 592 | result = genphy_restart_aneg(phydev); |
579 | } else | ||
580 | result = genphy_setup_forced(phydev); | ||
581 | 593 | ||
582 | return result; | 594 | return result; |
583 | } | 595 | } |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index a24bb68887ab..59f242a67714 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -927,7 +927,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
927 | struct sh_eth_private *mdp = netdev_priv(ndev); | 927 | struct sh_eth_private *mdp = netdev_priv(ndev); |
928 | struct sh_eth_txdesc *txdesc; | 928 | struct sh_eth_txdesc *txdesc; |
929 | u32 entry; | 929 | u32 entry; |
930 | int flags; | 930 | unsigned long flags; |
931 | 931 | ||
932 | spin_lock_irqsave(&mdp->lock, flags); | 932 | spin_lock_irqsave(&mdp->lock, flags); |
933 | if ((mdp->cur_tx - mdp->dirty_tx) >= (TX_RING_SIZE - 4)) { | 933 | if ((mdp->cur_tx - mdp->dirty_tx) >= (TX_RING_SIZE - 4)) { |
@@ -1141,7 +1141,7 @@ static int sh_mdio_init(struct net_device *ndev, int id) | |||
1141 | /* Hook up MII support for ethtool */ | 1141 | /* Hook up MII support for ethtool */ |
1142 | mdp->mii_bus->name = "sh_mii"; | 1142 | mdp->mii_bus->name = "sh_mii"; |
1143 | mdp->mii_bus->parent = &ndev->dev; | 1143 | mdp->mii_bus->parent = &ndev->dev; |
1144 | mdp->mii_bus->id[0] = id; | 1144 | snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%x", id); |
1145 | 1145 | ||
1146 | /* PHY IRQ */ | 1146 | /* PHY IRQ */ |
1147 | mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); | 1147 | mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 1f26ab0e7986..b185cd12269c 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1813,7 +1813,7 @@ static int __init smc911x_probe(struct net_device *dev) | |||
1813 | val = SMC_GET_BYTE_TEST(lp); | 1813 | val = SMC_GET_BYTE_TEST(lp); |
1814 | DBG(SMC_DEBUG_MISC, "%s: endian probe returned 0x%04x\n", CARDNAME, val); | 1814 | DBG(SMC_DEBUG_MISC, "%s: endian probe returned 0x%04x\n", CARDNAME, val); |
1815 | if (val != 0x87654321) { | 1815 | if (val != 0x87654321) { |
1816 | printk(KERN_ERR "Invalid chip endian 0x08%x\n",val); | 1816 | printk(KERN_ERR "Invalid chip endian 0x%08x\n",val); |
1817 | retval = -ENODEV; | 1817 | retval = -ENODEV; |
1818 | goto err_out; | 1818 | goto err_out; |
1819 | } | 1819 | } |
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index e12cdb4543b4..de57490103fc 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1102,12 +1102,14 @@ static int ax88178_link_reset(struct usbnet *dev) | |||
1102 | mode = AX88178_MEDIUM_DEFAULT; | 1102 | mode = AX88178_MEDIUM_DEFAULT; |
1103 | 1103 | ||
1104 | if (ecmd.speed == SPEED_1000) | 1104 | if (ecmd.speed == SPEED_1000) |
1105 | mode |= AX_MEDIUM_GM | AX_MEDIUM_ENCK; | 1105 | mode |= AX_MEDIUM_GM; |
1106 | else if (ecmd.speed == SPEED_100) | 1106 | else if (ecmd.speed == SPEED_100) |
1107 | mode |= AX_MEDIUM_PS; | 1107 | mode |= AX_MEDIUM_PS; |
1108 | else | 1108 | else |
1109 | mode &= ~(AX_MEDIUM_PS | AX_MEDIUM_GM); | 1109 | mode &= ~(AX_MEDIUM_PS | AX_MEDIUM_GM); |
1110 | 1110 | ||
1111 | mode |= AX_MEDIUM_ENCK; | ||
1112 | |||
1111 | if (ecmd.duplex == DUPLEX_FULL) | 1113 | if (ecmd.duplex == DUPLEX_FULL) |
1112 | mode |= AX_MEDIUM_FD; | 1114 | mode |= AX_MEDIUM_FD; |
1113 | else | 1115 | else |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 8d690a0eb1a9..444c5cc05f03 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1384,7 +1384,7 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1384 | 1384 | ||
1385 | rxq->queue[i] = NULL; | 1385 | rxq->queue[i] = NULL; |
1386 | 1386 | ||
1387 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, | 1387 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr, |
1388 | priv->hw_params.rx_buf_size, | 1388 | priv->hw_params.rx_buf_size, |
1389 | PCI_DMA_FROMDEVICE); | 1389 | PCI_DMA_FROMDEVICE); |
1390 | pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1390 | pkt = (struct iwl_rx_packet *)rxb->skb->data; |
@@ -1436,8 +1436,8 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1436 | rxb->skb = NULL; | 1436 | rxb->skb = NULL; |
1437 | } | 1437 | } |
1438 | 1438 | ||
1439 | pci_unmap_single(priv->pci_dev, rxb->dma_addr, | 1439 | pci_unmap_single(priv->pci_dev, rxb->real_dma_addr, |
1440 | priv->hw_params.rx_buf_size, | 1440 | priv->hw_params.rx_buf_size + 256, |
1441 | PCI_DMA_FROMDEVICE); | 1441 | PCI_DMA_FROMDEVICE); |
1442 | spin_lock_irqsave(&rxq->lock, flags); | 1442 | spin_lock_irqsave(&rxq->lock, flags); |
1443 | list_add_tail(&rxb->list, &priv->rxq.rx_used); | 1443 | list_add_tail(&rxb->list, &priv->rxq.rx_used); |
@@ -2341,7 +2341,6 @@ static void iwl_bg_alive_start(struct work_struct *data) | |||
2341 | mutex_lock(&priv->mutex); | 2341 | mutex_lock(&priv->mutex); |
2342 | iwl_alive_start(priv); | 2342 | iwl_alive_start(priv); |
2343 | mutex_unlock(&priv->mutex); | 2343 | mutex_unlock(&priv->mutex); |
2344 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
2345 | } | 2344 | } |
2346 | 2345 | ||
2347 | static void iwl4965_bg_rf_kill(struct work_struct *work) | 2346 | static void iwl4965_bg_rf_kill(struct work_struct *work) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index c018121085e9..9966d4e384ce 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg; | |||
89 | #define DEFAULT_LONG_RETRY_LIMIT 4U | 89 | #define DEFAULT_LONG_RETRY_LIMIT 4U |
90 | 90 | ||
91 | struct iwl_rx_mem_buffer { | 91 | struct iwl_rx_mem_buffer { |
92 | dma_addr_t dma_addr; | 92 | dma_addr_t real_dma_addr; |
93 | dma_addr_t aligned_dma_addr; | ||
93 | struct sk_buff *skb; | 94 | struct sk_buff *skb; |
94 | struct list_head list; | 95 | struct list_head list; |
95 | }; | 96 | }; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 7cde9d76ff5d..0509c16dbe75 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv *priv) | |||
204 | list_del(element); | 204 | list_del(element); |
205 | 205 | ||
206 | /* Point to Rx buffer via next RBD in circular buffer */ | 206 | /* Point to Rx buffer via next RBD in circular buffer */ |
207 | rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->dma_addr); | 207 | rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->aligned_dma_addr); |
208 | rxq->queue[rxq->write] = rxb; | 208 | rxq->queue[rxq->write] = rxb; |
209 | rxq->write = (rxq->write + 1) & RX_QUEUE_MASK; | 209 | rxq->write = (rxq->write + 1) & RX_QUEUE_MASK; |
210 | rxq->free_count--; | 210 | rxq->free_count--; |
@@ -251,7 +251,7 @@ void iwl_rx_allocate(struct iwl_priv *priv) | |||
251 | rxb = list_entry(element, struct iwl_rx_mem_buffer, list); | 251 | rxb = list_entry(element, struct iwl_rx_mem_buffer, list); |
252 | 252 | ||
253 | /* Alloc a new receive buffer */ | 253 | /* Alloc a new receive buffer */ |
254 | rxb->skb = alloc_skb(priv->hw_params.rx_buf_size, | 254 | rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256, |
255 | __GFP_NOWARN | GFP_ATOMIC); | 255 | __GFP_NOWARN | GFP_ATOMIC); |
256 | if (!rxb->skb) { | 256 | if (!rxb->skb) { |
257 | if (net_ratelimit()) | 257 | if (net_ratelimit()) |
@@ -266,9 +266,17 @@ void iwl_rx_allocate(struct iwl_priv *priv) | |||
266 | list_del(element); | 266 | list_del(element); |
267 | 267 | ||
268 | /* Get physical address of RB/SKB */ | 268 | /* Get physical address of RB/SKB */ |
269 | rxb->dma_addr = | 269 | rxb->real_dma_addr = pci_map_single( |
270 | pci_map_single(priv->pci_dev, rxb->skb->data, | 270 | priv->pci_dev, |
271 | priv->hw_params.rx_buf_size, PCI_DMA_FROMDEVICE); | 271 | rxb->skb->data, |
272 | priv->hw_params.rx_buf_size + 256, | ||
273 | PCI_DMA_FROMDEVICE); | ||
274 | /* dma address must be no more than 36 bits */ | ||
275 | BUG_ON(rxb->real_dma_addr & ~DMA_BIT_MASK(36)); | ||
276 | /* and also 256 byte aligned! */ | ||
277 | rxb->aligned_dma_addr = ALIGN(rxb->real_dma_addr, 256); | ||
278 | skb_reserve(rxb->skb, rxb->aligned_dma_addr - rxb->real_dma_addr); | ||
279 | |||
272 | list_add_tail(&rxb->list, &rxq->rx_free); | 280 | list_add_tail(&rxb->list, &rxq->rx_free); |
273 | rxq->free_count++; | 281 | rxq->free_count++; |
274 | } | 282 | } |
@@ -300,8 +308,8 @@ void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
300 | for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { | 308 | for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { |
301 | if (rxq->pool[i].skb != NULL) { | 309 | if (rxq->pool[i].skb != NULL) { |
302 | pci_unmap_single(priv->pci_dev, | 310 | pci_unmap_single(priv->pci_dev, |
303 | rxq->pool[i].dma_addr, | 311 | rxq->pool[i].real_dma_addr, |
304 | priv->hw_params.rx_buf_size, | 312 | priv->hw_params.rx_buf_size + 256, |
305 | PCI_DMA_FROMDEVICE); | 313 | PCI_DMA_FROMDEVICE); |
306 | dev_kfree_skb(rxq->pool[i].skb); | 314 | dev_kfree_skb(rxq->pool[i].skb); |
307 | } | 315 | } |
@@ -354,8 +362,8 @@ void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
354 | * to an SKB, so we need to unmap and free potential storage */ | 362 | * to an SKB, so we need to unmap and free potential storage */ |
355 | if (rxq->pool[i].skb != NULL) { | 363 | if (rxq->pool[i].skb != NULL) { |
356 | pci_unmap_single(priv->pci_dev, | 364 | pci_unmap_single(priv->pci_dev, |
357 | rxq->pool[i].dma_addr, | 365 | rxq->pool[i].real_dma_addr, |
358 | priv->hw_params.rx_buf_size, | 366 | priv->hw_params.rx_buf_size + 256, |
359 | PCI_DMA_FROMDEVICE); | 367 | PCI_DMA_FROMDEVICE); |
360 | priv->alloc_rxb_skb--; | 368 | priv->alloc_rxb_skb--; |
361 | dev_kfree_skb(rxq->pool[i].skb); | 369 | dev_kfree_skb(rxq->pool[i].skb); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 285b53e7e261..45a6b0c35695 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6012,7 +6012,6 @@ static void iwl3945_bg_alive_start(struct work_struct *data) | |||
6012 | mutex_lock(&priv->mutex); | 6012 | mutex_lock(&priv->mutex); |
6013 | iwl3945_alive_start(priv); | 6013 | iwl3945_alive_start(priv); |
6014 | mutex_unlock(&priv->mutex); | 6014 | mutex_unlock(&priv->mutex); |
6015 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
6016 | } | 6015 | } |
6017 | 6016 | ||
6018 | static void iwl3945_bg_rf_kill(struct work_struct *work) | 6017 | static void iwl3945_bg_rf_kill(struct work_struct *work) |
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c index 1cc03a8dd67a..59634c33b1f9 100644 --- a/drivers/net/wireless/libertas_tf/if_usb.c +++ b/drivers/net/wireless/libertas_tf/if_usb.c | |||
@@ -331,7 +331,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp, | |||
331 | /* Fill the receive configuration URB and initialise the Rx call back */ | 331 | /* Fill the receive configuration URB and initialise the Rx call back */ |
332 | usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, | 332 | usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, |
333 | usb_rcvbulkpipe(cardp->udev, cardp->ep_in), | 333 | usb_rcvbulkpipe(cardp->udev, cardp->ep_in), |
334 | (void *) (skb->tail), | 334 | skb_tail_pointer(skb), |
335 | MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp); | 335 | MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp); |
336 | 336 | ||
337 | cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET; | 337 | cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET; |