aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/atl1e/atl1e_hw.c4
-rw-r--r--drivers/net/atlx/atl1.c17
-rw-r--r--drivers/net/atlx/atl2.c8
-rw-r--r--drivers/net/bnx2.c9
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c4
-rw-r--r--drivers/net/cxgb3/t3_hw.c8
-rw-r--r--drivers/net/e100.c20
-rw-r--r--drivers/net/e1000/e1000_ethtool.c8
-rw-r--r--drivers/net/e1000/e1000_main.c1
-rw-r--r--drivers/net/e1000e/e1000.h5
-rw-r--r--drivers/net/e1000e/ethtool.c8
-rw-r--r--drivers/net/e1000e/netdev.c25
-rw-r--r--drivers/net/e1000e/param.c25
-rw-r--r--drivers/net/gianfar.c15
-rw-r--r--drivers/net/igb/igb_ethtool.c8
-rw-r--r--drivers/net/igb/igb_main.c8
-rw-r--r--drivers/net/ipg.c8
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c58
-rw-r--r--drivers/net/jme.c21
-rw-r--r--drivers/net/mlx4/en_netdev.c10
-rw-r--r--drivers/net/mlx4/en_params.c30
-rw-r--r--drivers/net/mlx4/mlx4.h9
-rw-r--r--drivers/net/mlx4/mlx4_en.h8
-rw-r--r--drivers/net/mv643xx_eth.c5
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/niu.c293
-rw-r--r--drivers/net/niu.h13
-rw-r--r--drivers/net/phy/marvell.c66
-rw-r--r--drivers/net/phy/mdio_bus.c2
-rw-r--r--drivers/net/phy/phy_device.c38
-rw-r--r--drivers/net/qla3xxx.c19
-rw-r--r--drivers/net/sfc/ethtool.c4
-rw-r--r--drivers/net/sh_eth.c4
-rw-r--r--drivers/net/smc911x.c6
-rw-r--r--drivers/net/ucc_geth_ethtool.c6
-rw-r--r--drivers/net/usb/asix.c8
-rw-r--r--drivers/net/usb/hso.c12
-rw-r--r--drivers/net/via-velocity.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_wlan.h5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c26
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c1
-rw-r--r--drivers/net/wireless/libertas_tf/if_usb.c2
-rw-r--r--drivers/net/wireless/rtl8187_dev.c3
45 files changed, 643 insertions, 203 deletions
diff --git a/drivers/net/atl1e/atl1e_hw.c b/drivers/net/atl1e/atl1e_hw.c
index 8cbc1b59bd62..4a7700620119 100644
--- a/drivers/net/atl1e/atl1e_hw.c
+++ b/drivers/net/atl1e/atl1e_hw.c
@@ -163,9 +163,6 @@ int atl1e_read_mac_addr(struct atl1e_hw *hw)
163 * atl1e_hash_mc_addr 163 * atl1e_hash_mc_addr
164 * purpose 164 * purpose
165 * set hash value for a multicast address 165 * set hash value for a multicast address
166 * hash calcu processing :
167 * 1. calcu 32bit CRC for multicast address
168 * 2. reverse crc with MSB to LSB
169 */ 166 */
170u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr) 167u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
171{ 168{
@@ -174,7 +171,6 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
174 int i; 171 int i;
175 172
176 crc32 = ether_crc_le(6, mc_addr); 173 crc32 = ether_crc_le(6, mc_addr);
177 crc32 = ~crc32;
178 for (i = 0; i < 32; i++) 174 for (i = 0; i < 32; i++)
179 value |= (((crc32 >> i) & 1) << (31 - i)); 175 value |= (((crc32 >> i) & 1) << (31 - i));
180 176
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 246d92b42636..aef403d299ee 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -3404,14 +3404,8 @@ static void atl1_get_wol(struct net_device *netdev,
3404{ 3404{
3405 struct atl1_adapter *adapter = netdev_priv(netdev); 3405 struct atl1_adapter *adapter = netdev_priv(netdev);
3406 3406
3407 wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC; 3407 wol->supported = WAKE_MAGIC;
3408 wol->wolopts = 0; 3408 wol->wolopts = 0;
3409 if (adapter->wol & ATLX_WUFC_EX)
3410 wol->wolopts |= WAKE_UCAST;
3411 if (adapter->wol & ATLX_WUFC_MC)
3412 wol->wolopts |= WAKE_MCAST;
3413 if (adapter->wol & ATLX_WUFC_BC)
3414 wol->wolopts |= WAKE_BCAST;
3415 if (adapter->wol & ATLX_WUFC_MAG) 3409 if (adapter->wol & ATLX_WUFC_MAG)
3416 wol->wolopts |= WAKE_MAGIC; 3410 wol->wolopts |= WAKE_MAGIC;
3417 return; 3411 return;
@@ -3422,15 +3416,10 @@ static int atl1_set_wol(struct net_device *netdev,
3422{ 3416{
3423 struct atl1_adapter *adapter = netdev_priv(netdev); 3417 struct atl1_adapter *adapter = netdev_priv(netdev);
3424 3418
3425 if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE)) 3419 if (wol->wolopts & (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST |
3420 WAKE_ARP | WAKE_MAGICSECURE))
3426 return -EOPNOTSUPP; 3421 return -EOPNOTSUPP;
3427 adapter->wol = 0; 3422 adapter->wol = 0;
3428 if (wol->wolopts & WAKE_UCAST)
3429 adapter->wol |= ATLX_WUFC_EX;
3430 if (wol->wolopts & WAKE_MCAST)
3431 adapter->wol |= ATLX_WUFC_MC;
3432 if (wol->wolopts & WAKE_BCAST)
3433 adapter->wol |= ATLX_WUFC_BC;
3434 if (wol->wolopts & WAKE_MAGIC) 3423 if (wol->wolopts & WAKE_MAGIC)
3435 adapter->wol |= ATLX_WUFC_MAG; 3424 adapter->wol |= ATLX_WUFC_MAG;
3436 return 0; 3425 return 0;
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/bnx2.c b/drivers/net/bnx2.c
index 430d430bce29..d07e3f148951 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7204,10 +7204,13 @@ static void
7204poll_bnx2(struct net_device *dev) 7204poll_bnx2(struct net_device *dev)
7205{ 7205{
7206 struct bnx2 *bp = netdev_priv(dev); 7206 struct bnx2 *bp = netdev_priv(dev);
7207 int i;
7207 7208
7208 disable_irq(bp->pdev->irq); 7209 for (i = 0; i < bp->irq_nvecs; i++) {
7209 bnx2_interrupt(bp->pdev->irq, dev); 7210 disable_irq(bp->irq_tbl[i].vector);
7210 enable_irq(bp->pdev->irq); 7211 bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]);
7212 enable_irq(bp->irq_tbl[i].vector);
7213 }
7211} 7214}
7212#endif 7215#endif
7213 7216
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 1ace41a13ac3..2c341f83d327 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -1307,8 +1307,10 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
1307 u32 fw_vers = 0; 1307 u32 fw_vers = 0;
1308 u32 tp_vers = 0; 1308 u32 tp_vers = 0;
1309 1309
1310 spin_lock(&adapter->stats_lock);
1310 t3_get_fw_version(adapter, &fw_vers); 1311 t3_get_fw_version(adapter, &fw_vers);
1311 t3_get_tp_version(adapter, &tp_vers); 1312 t3_get_tp_version(adapter, &tp_vers);
1313 spin_unlock(&adapter->stats_lock);
1312 1314
1313 strcpy(info->driver, DRV_NAME); 1315 strcpy(info->driver, DRV_NAME);
1314 strcpy(info->version, DRV_VERSION); 1316 strcpy(info->version, DRV_VERSION);
@@ -2699,7 +2701,7 @@ static void set_nqsets(struct adapter *adap)
2699 int hwports = adap->params.nports; 2701 int hwports = adap->params.nports;
2700 int nqsets = SGE_QSETS; 2702 int nqsets = SGE_QSETS;
2701 2703
2702 if (adap->params.rev > 0) { 2704 if (adap->params.rev > 0 && adap->flags & USING_MSIX) {
2703 if (hwports == 2 && 2705 if (hwports == 2 &&
2704 (hwports * nqsets > SGE_QSETS || 2706 (hwports * nqsets > SGE_QSETS ||
2705 num_cpus >= nqsets / hwports)) 2707 num_cpus >= nqsets / hwports))
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 968f64be3743..9a0898b0dbce 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -572,7 +572,7 @@ struct t3_vpd {
572 u32 pad; /* for multiple-of-4 sizing and alignment */ 572 u32 pad; /* for multiple-of-4 sizing and alignment */
573}; 573};
574 574
575#define EEPROM_MAX_POLL 4 575#define EEPROM_MAX_POLL 40
576#define EEPROM_STAT_ADDR 0x4000 576#define EEPROM_STAT_ADDR 0x4000
577#define VPD_BASE 0xc00 577#define VPD_BASE 0xc00
578 578
@@ -3690,6 +3690,12 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
3690 ; 3690 ;
3691 3691
3692 pti = &port_types[adapter->params.vpd.port_type[j]]; 3692 pti = &port_types[adapter->params.vpd.port_type[j]];
3693 if (!pti->phy_prep) {
3694 CH_ALERT(adapter, "Invalid port type index %d\n",
3695 adapter->params.vpd.port_type[j]);
3696 return -EINVAL;
3697 }
3698
3693 ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j, 3699 ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
3694 ai->mdio_ops); 3700 ai->mdio_ops);
3695 if (ret) 3701 if (ret)
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 3d69fae781cf..e8bfcce6b319 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -166,7 +166,7 @@
166 166
167#define DRV_NAME "e100" 167#define DRV_NAME "e100"
168#define DRV_EXT "-NAPI" 168#define DRV_EXT "-NAPI"
169#define DRV_VERSION "3.5.23-k4"DRV_EXT 169#define DRV_VERSION "3.5.23-k6"DRV_EXT
170#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" 170#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
171#define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation" 171#define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation"
172#define PFX DRV_NAME ": " 172#define PFX DRV_NAME ": "
@@ -1804,7 +1804,7 @@ static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
1804 struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data; 1804 struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data;
1805 put_unaligned_le32(rx->dma_addr, &prev_rfd->link); 1805 put_unaligned_le32(rx->dma_addr, &prev_rfd->link);
1806 pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr, 1806 pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr,
1807 sizeof(struct rfd), PCI_DMA_TODEVICE); 1807 sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
1808 } 1808 }
1809 1809
1810 return 0; 1810 return 0;
@@ -1823,7 +1823,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
1823 1823
1824 /* Need to sync before taking a peek at cb_complete bit */ 1824 /* Need to sync before taking a peek at cb_complete bit */
1825 pci_dma_sync_single_for_cpu(nic->pdev, rx->dma_addr, 1825 pci_dma_sync_single_for_cpu(nic->pdev, rx->dma_addr,
1826 sizeof(struct rfd), PCI_DMA_FROMDEVICE); 1826 sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
1827 rfd_status = le16_to_cpu(rfd->status); 1827 rfd_status = le16_to_cpu(rfd->status);
1828 1828
1829 DPRINTK(RX_STATUS, DEBUG, "status=0x%04X\n", rfd_status); 1829 DPRINTK(RX_STATUS, DEBUG, "status=0x%04X\n", rfd_status);
@@ -1850,7 +1850,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
1850 1850
1851 /* Get data */ 1851 /* Get data */
1852 pci_unmap_single(nic->pdev, rx->dma_addr, 1852 pci_unmap_single(nic->pdev, rx->dma_addr,
1853 RFD_BUF_LEN, PCI_DMA_FROMDEVICE); 1853 RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
1854 1854
1855 /* If this buffer has the el bit, but we think the receiver 1855 /* If this buffer has the el bit, but we think the receiver
1856 * is still running, check to see if it really stopped while 1856 * is still running, check to see if it really stopped while
@@ -1943,7 +1943,7 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done,
1943 new_before_last_rfd->command |= cpu_to_le16(cb_el); 1943 new_before_last_rfd->command |= cpu_to_le16(cb_el);
1944 pci_dma_sync_single_for_device(nic->pdev, 1944 pci_dma_sync_single_for_device(nic->pdev,
1945 new_before_last_rx->dma_addr, sizeof(struct rfd), 1945 new_before_last_rx->dma_addr, sizeof(struct rfd),
1946 PCI_DMA_TODEVICE); 1946 PCI_DMA_BIDIRECTIONAL);
1947 1947
1948 /* Now that we have a new stopping point, we can clear the old 1948 /* Now that we have a new stopping point, we can clear the old
1949 * stopping point. We must sync twice to get the proper 1949 * stopping point. We must sync twice to get the proper
@@ -1951,11 +1951,11 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done,
1951 old_before_last_rfd->command &= ~cpu_to_le16(cb_el); 1951 old_before_last_rfd->command &= ~cpu_to_le16(cb_el);
1952 pci_dma_sync_single_for_device(nic->pdev, 1952 pci_dma_sync_single_for_device(nic->pdev,
1953 old_before_last_rx->dma_addr, sizeof(struct rfd), 1953 old_before_last_rx->dma_addr, sizeof(struct rfd),
1954 PCI_DMA_TODEVICE); 1954 PCI_DMA_BIDIRECTIONAL);
1955 old_before_last_rfd->size = cpu_to_le16(VLAN_ETH_FRAME_LEN); 1955 old_before_last_rfd->size = cpu_to_le16(VLAN_ETH_FRAME_LEN);
1956 pci_dma_sync_single_for_device(nic->pdev, 1956 pci_dma_sync_single_for_device(nic->pdev,
1957 old_before_last_rx->dma_addr, sizeof(struct rfd), 1957 old_before_last_rx->dma_addr, sizeof(struct rfd),
1958 PCI_DMA_TODEVICE); 1958 PCI_DMA_BIDIRECTIONAL);
1959 } 1959 }
1960 1960
1961 if(restart_required) { 1961 if(restart_required) {
@@ -1978,7 +1978,7 @@ static void e100_rx_clean_list(struct nic *nic)
1978 for(rx = nic->rxs, i = 0; i < count; rx++, i++) { 1978 for(rx = nic->rxs, i = 0; i < count; rx++, i++) {
1979 if(rx->skb) { 1979 if(rx->skb) {
1980 pci_unmap_single(nic->pdev, rx->dma_addr, 1980 pci_unmap_single(nic->pdev, rx->dma_addr,
1981 RFD_BUF_LEN, PCI_DMA_FROMDEVICE); 1981 RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
1982 dev_kfree_skb(rx->skb); 1982 dev_kfree_skb(rx->skb);
1983 } 1983 }
1984 } 1984 }
@@ -2021,7 +2021,7 @@ static int e100_rx_alloc_list(struct nic *nic)
2021 before_last->command |= cpu_to_le16(cb_el); 2021 before_last->command |= cpu_to_le16(cb_el);
2022 before_last->size = 0; 2022 before_last->size = 0;
2023 pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr, 2023 pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
2024 sizeof(struct rfd), PCI_DMA_TODEVICE); 2024 sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
2025 2025
2026 nic->rx_to_use = nic->rx_to_clean = nic->rxs; 2026 nic->rx_to_use = nic->rx_to_clean = nic->rxs;
2027 nic->ru_running = RU_SUSPENDED; 2027 nic->ru_running = RU_SUSPENDED;
@@ -2222,7 +2222,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
2222 msleep(10); 2222 msleep(10);
2223 2223
2224 pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr, 2224 pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr,
2225 RFD_BUF_LEN, PCI_DMA_FROMDEVICE); 2225 RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
2226 2226
2227 if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), 2227 if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd),
2228 skb->data, ETH_DATA_LEN)) 2228 skb->data, ETH_DATA_LEN))
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 6a3893acfe04..c854c96f5ab3 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1774,7 +1774,8 @@ static void e1000_get_wol(struct net_device *netdev,
1774 1774
1775 /* this function will set ->supported = 0 and return 1 if wol is not 1775 /* this function will set ->supported = 0 and return 1 if wol is not
1776 * supported by this hardware */ 1776 * supported by this hardware */
1777 if (e1000_wol_exclusion(adapter, wol)) 1777 if (e1000_wol_exclusion(adapter, wol) ||
1778 !device_can_wakeup(&adapter->pdev->dev))
1778 return; 1779 return;
1779 1780
1780 /* apply any specific unsupported masks here */ 1781 /* apply any specific unsupported masks here */
@@ -1811,7 +1812,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1811 if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE)) 1812 if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
1812 return -EOPNOTSUPP; 1813 return -EOPNOTSUPP;
1813 1814
1814 if (e1000_wol_exclusion(adapter, wol)) 1815 if (e1000_wol_exclusion(adapter, wol) ||
1816 !device_can_wakeup(&adapter->pdev->dev))
1815 return wol->wolopts ? -EOPNOTSUPP : 0; 1817 return wol->wolopts ? -EOPNOTSUPP : 0;
1816 1818
1817 switch (hw->device_id) { 1819 switch (hw->device_id) {
@@ -1838,6 +1840,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1838 if (wol->wolopts & WAKE_MAGIC) 1840 if (wol->wolopts & WAKE_MAGIC)
1839 adapter->wol |= E1000_WUFC_MAG; 1841 adapter->wol |= E1000_WUFC_MAG;
1840 1842
1843 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
1844
1841 return 0; 1845 return 0;
1842} 1846}
1843 1847
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index fac82152e4c8..872799b746f5 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1179,6 +1179,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
1179 1179
1180 /* initialize the wol settings based on the eeprom settings */ 1180 /* initialize the wol settings based on the eeprom settings */
1181 adapter->wol = adapter->eeprom_wol; 1181 adapter->wol = adapter->eeprom_wol;
1182 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
1182 1183
1183 /* print bus type/speed/width info */ 1184 /* print bus type/speed/width info */
1184 DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ", 1185 DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h
index c55de1c027af..c55fd6fdb91c 100644
--- a/drivers/net/e1000e/e1000.h
+++ b/drivers/net/e1000e/e1000.h
@@ -299,6 +299,7 @@ struct e1000_adapter {
299 unsigned long led_status; 299 unsigned long led_status;
300 300
301 unsigned int flags; 301 unsigned int flags;
302 unsigned int flags2;
302 struct work_struct downshift_task; 303 struct work_struct downshift_task;
303 struct work_struct update_phy_task; 304 struct work_struct update_phy_task;
304}; 305};
@@ -306,6 +307,7 @@ struct e1000_adapter {
306struct e1000_info { 307struct e1000_info {
307 enum e1000_mac_type mac; 308 enum e1000_mac_type mac;
308 unsigned int flags; 309 unsigned int flags;
310 unsigned int flags2;
309 u32 pba; 311 u32 pba;
310 s32 (*get_variants)(struct e1000_adapter *); 312 s32 (*get_variants)(struct e1000_adapter *);
311 struct e1000_mac_operations *mac_ops; 313 struct e1000_mac_operations *mac_ops;
@@ -347,6 +349,9 @@ struct e1000_info {
347#define FLAG_RX_RESTART_NOW (1 << 30) 349#define FLAG_RX_RESTART_NOW (1 << 30)
348#define FLAG_MSI_TEST_FAILED (1 << 31) 350#define FLAG_MSI_TEST_FAILED (1 << 31)
349 351
352/* CRC Stripping defines */
353#define FLAG2_CRC_STRIPPING (1 << 0)
354
350#define E1000_RX_DESC_PS(R, i) \ 355#define E1000_RX_DESC_PS(R, i) \
351 (&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) 356 (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
352#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i])) 357#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 70c11c811a08..62421ce96311 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -1713,7 +1713,8 @@ static void e1000_get_wol(struct net_device *netdev,
1713 wol->supported = 0; 1713 wol->supported = 0;
1714 wol->wolopts = 0; 1714 wol->wolopts = 0;
1715 1715
1716 if (!(adapter->flags & FLAG_HAS_WOL)) 1716 if (!(adapter->flags & FLAG_HAS_WOL) ||
1717 !device_can_wakeup(&adapter->pdev->dev))
1717 return; 1718 return;
1718 1719
1719 wol->supported = WAKE_UCAST | WAKE_MCAST | 1720 wol->supported = WAKE_UCAST | WAKE_MCAST |
@@ -1751,7 +1752,8 @@ static int e1000_set_wol(struct net_device *netdev,
1751 if (wol->wolopts & WAKE_MAGICSECURE) 1752 if (wol->wolopts & WAKE_MAGICSECURE)
1752 return -EOPNOTSUPP; 1753 return -EOPNOTSUPP;
1753 1754
1754 if (!(adapter->flags & FLAG_HAS_WOL)) 1755 if (!(adapter->flags & FLAG_HAS_WOL) ||
1756 !device_can_wakeup(&adapter->pdev->dev))
1755 return wol->wolopts ? -EOPNOTSUPP : 0; 1757 return wol->wolopts ? -EOPNOTSUPP : 0;
1756 1758
1757 /* these settings will always override what we currently have */ 1759 /* these settings will always override what we currently have */
@@ -1770,6 +1772,8 @@ static int e1000_set_wol(struct net_device *netdev,
1770 if (wol->wolopts & WAKE_ARP) 1772 if (wol->wolopts & WAKE_ARP)
1771 adapter->wol |= E1000_WUFC_ARP; 1773 adapter->wol |= E1000_WUFC_ARP;
1772 1774
1775 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
1776
1773 return 0; 1777 return 0;
1774} 1778}
1775 1779
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index abd492b7336d..91795f78c3e4 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -499,6 +499,10 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
499 goto next_desc; 499 goto next_desc;
500 } 500 }
501 501
502 /* adjust length to remove Ethernet CRC */
503 if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
504 length -= 4;
505
502 total_rx_bytes += length; 506 total_rx_bytes += length;
503 total_rx_packets++; 507 total_rx_packets++;
504 508
@@ -804,6 +808,10 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
804 pci_dma_sync_single_for_device(pdev, ps_page->dma, 808 pci_dma_sync_single_for_device(pdev, ps_page->dma,
805 PAGE_SIZE, PCI_DMA_FROMDEVICE); 809 PAGE_SIZE, PCI_DMA_FROMDEVICE);
806 810
811 /* remove the CRC */
812 if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
813 l1 -= 4;
814
807 skb_put(skb, l1); 815 skb_put(skb, l1);
808 goto copydone; 816 goto copydone;
809 } /* if */ 817 } /* if */
@@ -825,6 +833,12 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
825 skb->truesize += length; 833 skb->truesize += length;
826 } 834 }
827 835
836 /* strip the ethernet crc, problem is we're using pages now so
837 * this whole operation can get a little cpu intensive
838 */
839 if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
840 pskb_trim(skb, skb->len - 4);
841
828copydone: 842copydone:
829 total_rx_bytes += skb->len; 843 total_rx_bytes += skb->len;
830 total_rx_packets++; 844 total_rx_packets++;
@@ -2301,8 +2315,12 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
2301 else 2315 else
2302 rctl |= E1000_RCTL_LPE; 2316 rctl |= E1000_RCTL_LPE;
2303 2317
2304 /* Enable hardware CRC frame stripping */ 2318 /* Some systems expect that the CRC is included in SMBUS traffic. The
2305 rctl |= E1000_RCTL_SECRC; 2319 * hardware strips the CRC before sending to both SMBUS (BMC) and to
2320 * host memory when this is enabled
2321 */
2322 if (adapter->flags2 & FLAG2_CRC_STRIPPING)
2323 rctl |= E1000_RCTL_SECRC;
2306 2324
2307 /* Setup buffer sizes */ 2325 /* Setup buffer sizes */
2308 rctl &= ~E1000_RCTL_SZ_4096; 2326 rctl &= ~E1000_RCTL_SZ_4096;
@@ -4766,6 +4784,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
4766 adapter->ei = ei; 4784 adapter->ei = ei;
4767 adapter->pba = ei->pba; 4785 adapter->pba = ei->pba;
4768 adapter->flags = ei->flags; 4786 adapter->flags = ei->flags;
4787 adapter->flags2 = ei->flags2;
4769 adapter->hw.adapter = adapter; 4788 adapter->hw.adapter = adapter;
4770 adapter->hw.mac.type = ei->mac; 4789 adapter->hw.mac.type = ei->mac;
4771 adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1; 4790 adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1;
@@ -4970,6 +4989,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
4970 4989
4971 /* initialize the wol settings based on the eeprom settings */ 4990 /* initialize the wol settings based on the eeprom settings */
4972 adapter->wol = adapter->eeprom_wol; 4991 adapter->wol = adapter->eeprom_wol;
4992 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
4973 4993
4974 /* reset the hardware with the new settings */ 4994 /* reset the hardware with the new settings */
4975 e1000e_reset(adapter); 4995 e1000e_reset(adapter);
@@ -5008,6 +5028,7 @@ err_hw_init:
5008err_sw_init: 5028err_sw_init:
5009 if (adapter->hw.flash_address) 5029 if (adapter->hw.flash_address)
5010 iounmap(adapter->hw.flash_address); 5030 iounmap(adapter->hw.flash_address);
5031 e1000e_reset_interrupt_capability(adapter);
5011err_flashmap: 5032err_flashmap:
5012 iounmap(adapter->hw.hw_addr); 5033 iounmap(adapter->hw.hw_addr);
5013err_ioremap: 5034err_ioremap:
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c
index 77a3d7207a5f..e909f96698e8 100644
--- a/drivers/net/e1000e/param.c
+++ b/drivers/net/e1000e/param.c
@@ -151,6 +151,16 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
151 */ 151 */
152E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]"); 152E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
153 153
154/*
155 * Enable CRC Stripping
156 *
157 * Valid Range: 0, 1
158 *
159 * Default Value: 1 (enabled)
160 */
161E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \
162 "the CRC");
163
154struct e1000_option { 164struct e1000_option {
155 enum { enable_option, range_option, list_option } type; 165 enum { enable_option, range_option, list_option } type;
156 const char *name; 166 const char *name;
@@ -404,6 +414,21 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
404 adapter->flags |= FLAG_SMART_POWER_DOWN; 414 adapter->flags |= FLAG_SMART_POWER_DOWN;
405 } 415 }
406 } 416 }
417 { /* CRC Stripping */
418 const struct e1000_option opt = {
419 .type = enable_option,
420 .name = "CRC Stripping",
421 .err = "defaulting to enabled",
422 .def = OPTION_ENABLED
423 };
424
425 if (num_CrcStripping > bd) {
426 unsigned int crc_stripping = CrcStripping[bd];
427 e1000_validate_option(&crc_stripping, &opt, adapter);
428 if (crc_stripping == OPTION_ENABLED)
429 adapter->flags2 |= FLAG2_CRC_STRIPPING;
430 }
431 }
407 { /* Kumeran Lock Loss Workaround */ 432 { /* Kumeran Lock Loss Workaround */
408 const struct e1000_option opt = { 433 const struct e1000_option opt = {
409 .type = enable_option, 434 .type = enable_option,
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 83a5cb6aa23b..c4af949bf860 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1407,6 +1407,10 @@ static int gfar_clean_tx_ring(struct net_device *dev)
1407 if (bdp->status & TXBD_DEF) 1407 if (bdp->status & TXBD_DEF)
1408 dev->stats.collisions++; 1408 dev->stats.collisions++;
1409 1409
1410 /* Unmap the DMA memory */
1411 dma_unmap_single(&priv->dev->dev, bdp->bufPtr,
1412 bdp->length, DMA_TO_DEVICE);
1413
1410 /* Free the sk buffer associated with this TxBD */ 1414 /* Free the sk buffer associated with this TxBD */
1411 dev_kfree_skb_irq(priv->tx_skbuff[priv->skb_dirtytx]); 1415 dev_kfree_skb_irq(priv->tx_skbuff[priv->skb_dirtytx]);
1412 1416
@@ -1666,6 +1670,9 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
1666 1670
1667 skb = priv->rx_skbuff[priv->skb_currx]; 1671 skb = priv->rx_skbuff[priv->skb_currx];
1668 1672
1673 dma_unmap_single(&priv->dev->dev, bdp->bufPtr,
1674 priv->rx_buffer_size, DMA_FROM_DEVICE);
1675
1669 /* We drop the frame if we failed to allocate a new buffer */ 1676 /* We drop the frame if we failed to allocate a new buffer */
1670 if (unlikely(!newskb || !(bdp->status & RXBD_LAST) || 1677 if (unlikely(!newskb || !(bdp->status & RXBD_LAST) ||
1671 bdp->status & RXBD_ERR)) { 1678 bdp->status & RXBD_ERR)) {
@@ -1674,14 +1681,8 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
1674 if (unlikely(!newskb)) 1681 if (unlikely(!newskb))
1675 newskb = skb; 1682 newskb = skb;
1676 1683
1677 if (skb) { 1684 if (skb)
1678 dma_unmap_single(&priv->dev->dev,
1679 bdp->bufPtr,
1680 priv->rx_buffer_size,
1681 DMA_FROM_DEVICE);
1682
1683 dev_kfree_skb_any(skb); 1685 dev_kfree_skb_any(skb);
1684 }
1685 } else { 1686 } else {
1686 /* Increment the number of packets */ 1687 /* Increment the number of packets */
1687 dev->stats.rx_packets++; 1688 dev->stats.rx_packets++;
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 58906c984be9..89964fa739a0 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -1776,7 +1776,8 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1776 1776
1777 /* this function will set ->supported = 0 and return 1 if wol is not 1777 /* this function will set ->supported = 0 and return 1 if wol is not
1778 * supported by this hardware */ 1778 * supported by this hardware */
1779 if (igb_wol_exclusion(adapter, wol)) 1779 if (igb_wol_exclusion(adapter, wol) ||
1780 !device_can_wakeup(&adapter->pdev->dev))
1780 return; 1781 return;
1781 1782
1782 /* apply any specific unsupported masks here */ 1783 /* apply any specific unsupported masks here */
@@ -1805,7 +1806,8 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1805 if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE)) 1806 if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
1806 return -EOPNOTSUPP; 1807 return -EOPNOTSUPP;
1807 1808
1808 if (igb_wol_exclusion(adapter, wol)) 1809 if (igb_wol_exclusion(adapter, wol) ||
1810 !device_can_wakeup(&adapter->pdev->dev))
1809 return wol->wolopts ? -EOPNOTSUPP : 0; 1811 return wol->wolopts ? -EOPNOTSUPP : 0;
1810 1812
1811 switch (hw->device_id) { 1813 switch (hw->device_id) {
@@ -1825,6 +1827,8 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1825 if (wol->wolopts & WAKE_MAGIC) 1827 if (wol->wolopts & WAKE_MAGIC)
1826 adapter->wol |= E1000_WUFC_MAG; 1828 adapter->wol |= E1000_WUFC_MAG;
1827 1829
1830 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
1831
1828 return 0; 1832 return 0;
1829} 1833}
1830 1834
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 1f397cd99414..1cbae85b1426 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1019,10 +1019,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1019 state &= ~PCIE_LINK_STATE_L0S; 1019 state &= ~PCIE_LINK_STATE_L0S;
1020 pci_write_config_word(us_dev, pos + PCI_EXP_LNKCTL, 1020 pci_write_config_word(us_dev, pos + PCI_EXP_LNKCTL,
1021 state); 1021 state);
1022 printk(KERN_INFO "Disabling ASPM L0s upstream switch " 1022 dev_info(&pdev->dev,
1023 "port %x:%x.%x\n", us_dev->bus->number, 1023 "Disabling ASPM L0s upstream switch port %s\n",
1024 PCI_SLOT(us_dev->devfn), 1024 pci_name(us_dev));
1025 PCI_FUNC(us_dev->devfn));
1026 } 1025 }
1027 default: 1026 default:
1028 break; 1027 break;
@@ -1244,6 +1243,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1244 1243
1245 /* initialize the wol settings based on the eeprom settings */ 1244 /* initialize the wol settings based on the eeprom settings */
1246 adapter->wol = adapter->eeprom_wol; 1245 adapter->wol = adapter->eeprom_wol;
1246 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
1247 1247
1248 /* reset the hardware with the new settings */ 1248 /* reset the hardware with the new settings */
1249 igb_reset(adapter); 1249 igb_reset(adapter);
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
1290static 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 **/
1294static 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 **/
1311static 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 **/
1400static 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 **/
1417static 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
1765static int 1765static int
1766jme_tx_tso(struct sk_buff *skb, 1766jme_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
1828static inline void 1827static inline void
1829jme_tx_vlan(struct sk_buff *skb, u16 *vlan, u8 *flags) 1828jme_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/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index a339afbeed38..96e709d6440a 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -656,10 +656,10 @@ static int mlx4_en_start_port(struct net_device *dev)
656 /* Configure port */ 656 /* Configure port */
657 err = mlx4_SET_PORT_general(mdev->dev, priv->port, 657 err = mlx4_SET_PORT_general(mdev->dev, priv->port,
658 priv->rx_skb_size + ETH_FCS_LEN, 658 priv->rx_skb_size + ETH_FCS_LEN,
659 mdev->profile.tx_pause, 659 priv->prof->tx_pause,
660 mdev->profile.tx_ppp, 660 priv->prof->tx_ppp,
661 mdev->profile.rx_pause, 661 priv->prof->rx_pause,
662 mdev->profile.rx_ppp); 662 priv->prof->rx_ppp);
663 if (err) { 663 if (err) {
664 mlx4_err(mdev, "Failed setting port general configurations" 664 mlx4_err(mdev, "Failed setting port general configurations"
665 " for port %d, with error %d\n", priv->port, err); 665 " for port %d, with error %d\n", priv->port, err);
@@ -706,7 +706,7 @@ tx_err:
706 mlx4_en_release_rss_steer(priv); 706 mlx4_en_release_rss_steer(priv);
707rx_err: 707rx_err:
708 for (i = 0; i < priv->rx_ring_num; i++) 708 for (i = 0; i < priv->rx_ring_num; i++)
709 mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[rx_index]); 709 mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[i]);
710cq_err: 710cq_err:
711 while (rx_index--) 711 while (rx_index--)
712 mlx4_en_deactivate_cq(priv, &priv->rx_cq[rx_index]); 712 mlx4_en_deactivate_cq(priv, &priv->rx_cq[rx_index]);
diff --git a/drivers/net/mlx4/en_params.c b/drivers/net/mlx4/en_params.c
index c2e69b1bcd0a..95706ee1c019 100644
--- a/drivers/net/mlx4/en_params.c
+++ b/drivers/net/mlx4/en_params.c
@@ -90,6 +90,7 @@ MLX4_EN_PARM_INT(rx_ring_size2, MLX4_EN_AUTO_CONF, "Rx ring size for port 2");
90int mlx4_en_get_profile(struct mlx4_en_dev *mdev) 90int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
91{ 91{
92 struct mlx4_en_profile *params = &mdev->profile; 92 struct mlx4_en_profile *params = &mdev->profile;
93 int i;
93 94
94 params->rx_moder_cnt = min_t(int, rx_moder_cnt, MLX4_EN_AUTO_CONF); 95 params->rx_moder_cnt = min_t(int, rx_moder_cnt, MLX4_EN_AUTO_CONF);
95 params->rx_moder_time = min_t(int, rx_moder_time, MLX4_EN_AUTO_CONF); 96 params->rx_moder_time = min_t(int, rx_moder_time, MLX4_EN_AUTO_CONF);
@@ -97,11 +98,13 @@ int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
97 params->rss_xor = (rss_xor != 0); 98 params->rss_xor = (rss_xor != 0);
98 params->rss_mask = rss_mask & 0x1f; 99 params->rss_mask = rss_mask & 0x1f;
99 params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS); 100 params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS);
100 params->rx_pause = pprx; 101 for (i = 1; i <= MLX4_MAX_PORTS; i++) {
101 params->rx_ppp = pfcrx; 102 params->prof[i].rx_pause = pprx;
102 params->tx_pause = pptx; 103 params->prof[i].rx_ppp = pfcrx;
103 params->tx_ppp = pfctx; 104 params->prof[i].tx_pause = pptx;
104 if (params->rx_ppp || params->tx_ppp) { 105 params->prof[i].tx_ppp = pfctx;
106 }
107 if (pfcrx || pfctx) {
105 params->prof[1].tx_ring_num = MLX4_EN_TX_RING_NUM; 108 params->prof[1].tx_ring_num = MLX4_EN_TX_RING_NUM;
106 params->prof[2].tx_ring_num = MLX4_EN_TX_RING_NUM; 109 params->prof[2].tx_ring_num = MLX4_EN_TX_RING_NUM;
107 } else { 110 } else {
@@ -407,14 +410,14 @@ static int mlx4_en_set_pauseparam(struct net_device *dev,
407 struct mlx4_en_dev *mdev = priv->mdev; 410 struct mlx4_en_dev *mdev = priv->mdev;
408 int err; 411 int err;
409 412
410 mdev->profile.tx_pause = pause->tx_pause != 0; 413 priv->prof->tx_pause = pause->tx_pause != 0;
411 mdev->profile.rx_pause = pause->rx_pause != 0; 414 priv->prof->rx_pause = pause->rx_pause != 0;
412 err = mlx4_SET_PORT_general(mdev->dev, priv->port, 415 err = mlx4_SET_PORT_general(mdev->dev, priv->port,
413 priv->rx_skb_size + ETH_FCS_LEN, 416 priv->rx_skb_size + ETH_FCS_LEN,
414 mdev->profile.tx_pause, 417 priv->prof->tx_pause,
415 mdev->profile.tx_ppp, 418 priv->prof->tx_ppp,
416 mdev->profile.rx_pause, 419 priv->prof->rx_pause,
417 mdev->profile.rx_ppp); 420 priv->prof->rx_ppp);
418 if (err) 421 if (err)
419 mlx4_err(mdev, "Failed setting pause params to\n"); 422 mlx4_err(mdev, "Failed setting pause params to\n");
420 423
@@ -425,10 +428,9 @@ static void mlx4_en_get_pauseparam(struct net_device *dev,
425 struct ethtool_pauseparam *pause) 428 struct ethtool_pauseparam *pause)
426{ 429{
427 struct mlx4_en_priv *priv = netdev_priv(dev); 430 struct mlx4_en_priv *priv = netdev_priv(dev);
428 struct mlx4_en_dev *mdev = priv->mdev;
429 431
430 pause->tx_pause = mdev->profile.tx_pause; 432 pause->tx_pause = priv->prof->tx_pause;
431 pause->rx_pause = mdev->profile.rx_pause; 433 pause->rx_pause = priv->prof->rx_pause;
432} 434}
433 435
434static void mlx4_en_get_ringparam(struct net_device *dev, 436static void mlx4_en_get_ringparam(struct net_device *dev,
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index fa431fad0eec..56a2e213fe62 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -87,6 +87,9 @@ enum {
87 87
88#ifdef CONFIG_MLX4_DEBUG 88#ifdef CONFIG_MLX4_DEBUG
89extern int mlx4_debug_level; 89extern int mlx4_debug_level;
90#else /* CONFIG_MLX4_DEBUG */
91#define mlx4_debug_level (0)
92#endif /* CONFIG_MLX4_DEBUG */
90 93
91#define mlx4_dbg(mdev, format, arg...) \ 94#define mlx4_dbg(mdev, format, arg...) \
92 do { \ 95 do { \
@@ -94,12 +97,6 @@ extern int mlx4_debug_level;
94 dev_printk(KERN_DEBUG, &mdev->pdev->dev, format, ## arg); \ 97 dev_printk(KERN_DEBUG, &mdev->pdev->dev, format, ## arg); \
95 } while (0) 98 } while (0)
96 99
97#else /* CONFIG_MLX4_DEBUG */
98
99#define mlx4_dbg(mdev, format, arg...) do { (void) mdev; } while (0)
100
101#endif /* CONFIG_MLX4_DEBUG */
102
103#define mlx4_err(mdev, format, arg...) \ 100#define mlx4_err(mdev, format, arg...) \
104 dev_err(&mdev->pdev->dev, format, ## arg) 101 dev_err(&mdev->pdev->dev, format, ## arg)
105#define mlx4_info(mdev, format, arg...) \ 102#define mlx4_info(mdev, format, arg...) \
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index 11fb17c6e97b..98ddc0811f93 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -322,6 +322,10 @@ struct mlx4_en_port_profile {
322 u32 rx_ring_num; 322 u32 rx_ring_num;
323 u32 tx_ring_size; 323 u32 tx_ring_size;
324 u32 rx_ring_size; 324 u32 rx_ring_size;
325 u8 rx_pause;
326 u8 rx_ppp;
327 u8 tx_pause;
328 u8 tx_ppp;
325}; 329};
326 330
327struct mlx4_en_profile { 331struct mlx4_en_profile {
@@ -333,10 +337,6 @@ struct mlx4_en_profile {
333 int rx_moder_cnt; 337 int rx_moder_cnt;
334 int rx_moder_time; 338 int rx_moder_time;
335 int auto_moder; 339 int auto_moder;
336 u8 rx_pause;
337 u8 rx_ppp;
338 u8 tx_pause;
339 u8 tx_ppp;
340 u8 no_reset; 340 u8 no_reset;
341 struct mlx4_en_port_profile prof[MLX4_MAX_PORTS + 1]; 341 struct mlx4_en_port_profile prof[MLX4_MAX_PORTS + 1];
342}; 342};
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/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index a5f428bcc0eb..b37867097308 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -75,7 +75,7 @@
75#include "myri10ge_mcp.h" 75#include "myri10ge_mcp.h"
76#include "myri10ge_mcp_gen_header.h" 76#include "myri10ge_mcp_gen_header.h"
77 77
78#define MYRI10GE_VERSION_STR "1.4.3-1.375" 78#define MYRI10GE_VERSION_STR "1.4.3-1.378"
79 79
80MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); 80MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
81MODULE_AUTHOR("Maintainer: help@myri.com"); 81MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1393,6 +1393,7 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
1393 if (tx->req == tx->done) { 1393 if (tx->req == tx->done) {
1394 tx->queue_active = 0; 1394 tx->queue_active = 0;
1395 put_be32(htonl(1), tx->send_stop); 1395 put_be32(htonl(1), tx->send_stop);
1396 mb();
1396 mmiowb(); 1397 mmiowb();
1397 } 1398 }
1398 __netif_tx_unlock(dev_queue); 1399 __netif_tx_unlock(dev_queue);
@@ -2865,6 +2866,7 @@ again:
2865 if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) { 2866 if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) {
2866 tx->queue_active = 1; 2867 tx->queue_active = 1;
2867 put_be32(htonl(1), tx->send_go); 2868 put_be32(htonl(1), tx->send_go);
2869 mb();
2868 mmiowb(); 2870 mmiowb();
2869 } 2871 }
2870 tx->pkt_start++; 2872 tx->pkt_start++;
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 9acb5d70a3ae..1b6f548c4411 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -33,8 +33,8 @@
33 33
34#define DRV_MODULE_NAME "niu" 34#define DRV_MODULE_NAME "niu"
35#define PFX DRV_MODULE_NAME ": " 35#define PFX DRV_MODULE_NAME ": "
36#define DRV_MODULE_VERSION "0.9" 36#define DRV_MODULE_VERSION "1.0"
37#define DRV_MODULE_RELDATE "May 4, 2008" 37#define DRV_MODULE_RELDATE "Nov 14, 2008"
38 38
39static char version[] __devinitdata = 39static char version[] __devinitdata =
40 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 40 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -51,8 +51,7 @@ MODULE_VERSION(DRV_MODULE_VERSION);
51#ifndef readq 51#ifndef readq
52static u64 readq(void __iomem *reg) 52static u64 readq(void __iomem *reg)
53{ 53{
54 return (((u64)readl(reg + 0x4UL) << 32) | 54 return ((u64) readl(reg)) | (((u64) readl(reg + 4UL)) << 32);
55 (u64)readl(reg));
56} 55}
57 56
58static void writeq(u64 val, void __iomem *reg) 57static void writeq(u64 val, void __iomem *reg)
@@ -407,7 +406,7 @@ static int esr2_set_rx_cfg(struct niu *np, unsigned long channel, u32 val)
407} 406}
408 407
409/* Mode is always 10G fiber. */ 408/* Mode is always 10G fiber. */
410static int serdes_init_niu(struct niu *np) 409static int serdes_init_niu_10g_fiber(struct niu *np)
411{ 410{
412 struct niu_link_config *lp = &np->link_config; 411 struct niu_link_config *lp = &np->link_config;
413 u32 tx_cfg, rx_cfg; 412 u32 tx_cfg, rx_cfg;
@@ -444,6 +443,223 @@ static int serdes_init_niu(struct niu *np)
444 return 0; 443 return 0;
445} 444}
446 445
446static int serdes_init_niu_1g_serdes(struct niu *np)
447{
448 struct niu_link_config *lp = &np->link_config;
449 u16 pll_cfg, pll_sts;
450 int max_retry = 100;
451 u64 sig, mask, val;
452 u32 tx_cfg, rx_cfg;
453 unsigned long i;
454 int err;
455
456 tx_cfg = (PLL_TX_CFG_ENTX | PLL_TX_CFG_SWING_1375MV |
457 PLL_TX_CFG_RATE_HALF);
458 rx_cfg = (PLL_RX_CFG_ENRX | PLL_RX_CFG_TERM_0P8VDDT |
459 PLL_RX_CFG_ALIGN_ENA | PLL_RX_CFG_LOS_LTHRESH |
460 PLL_RX_CFG_RATE_HALF);
461
462 if (np->port == 0)
463 rx_cfg |= PLL_RX_CFG_EQ_LP_ADAPTIVE;
464
465 if (lp->loopback_mode == LOOPBACK_PHY) {
466 u16 test_cfg = PLL_TEST_CFG_LOOPBACK_CML_DIS;
467
468 mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
469 ESR2_TI_PLL_TEST_CFG_L, test_cfg);
470
471 tx_cfg |= PLL_TX_CFG_ENTEST;
472 rx_cfg |= PLL_RX_CFG_ENTEST;
473 }
474
475 /* Initialize PLL for 1G */
476 pll_cfg = (PLL_CFG_ENPLL | PLL_CFG_MPY_8X);
477
478 err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
479 ESR2_TI_PLL_CFG_L, pll_cfg);
480 if (err) {
481 dev_err(np->device, PFX "NIU Port %d "
482 "serdes_init_niu_1g_serdes: "
483 "mdio write to ESR2_TI_PLL_CFG_L failed", np->port);
484 return err;
485 }
486
487 pll_sts = PLL_CFG_ENPLL;
488
489 err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
490 ESR2_TI_PLL_STS_L, pll_sts);
491 if (err) {
492 dev_err(np->device, PFX "NIU Port %d "
493 "serdes_init_niu_1g_serdes: "
494 "mdio write to ESR2_TI_PLL_STS_L failed", np->port);
495 return err;
496 }
497
498 udelay(200);
499
500 /* Initialize all 4 lanes of the SERDES. */
501 for (i = 0; i < 4; i++) {
502 err = esr2_set_tx_cfg(np, i, tx_cfg);
503 if (err)
504 return err;
505 }
506
507 for (i = 0; i < 4; i++) {
508 err = esr2_set_rx_cfg(np, i, rx_cfg);
509 if (err)
510 return err;
511 }
512
513 switch (np->port) {
514 case 0:
515 val = (ESR_INT_SRDY0_P0 | ESR_INT_DET0_P0);
516 mask = val;
517 break;
518
519 case 1:
520 val = (ESR_INT_SRDY0_P1 | ESR_INT_DET0_P1);
521 mask = val;
522 break;
523
524 default:
525 return -EINVAL;
526 }
527
528 while (max_retry--) {
529 sig = nr64(ESR_INT_SIGNALS);
530 if ((sig & mask) == val)
531 break;
532
533 mdelay(500);
534 }
535
536 if ((sig & mask) != val) {
537 dev_err(np->device, PFX "Port %u signal bits [%08x] are not "
538 "[%08x]\n", np->port, (int) (sig & mask), (int) val);
539 return -ENODEV;
540 }
541
542 return 0;
543}
544
545static int serdes_init_niu_10g_serdes(struct niu *np)
546{
547 struct niu_link_config *lp = &np->link_config;
548 u32 tx_cfg, rx_cfg, pll_cfg, pll_sts;
549 int max_retry = 100;
550 u64 sig, mask, val;
551 unsigned long i;
552 int err;
553
554 tx_cfg = (PLL_TX_CFG_ENTX | PLL_TX_CFG_SWING_1375MV);
555 rx_cfg = (PLL_RX_CFG_ENRX | PLL_RX_CFG_TERM_0P8VDDT |
556 PLL_RX_CFG_ALIGN_ENA | PLL_RX_CFG_LOS_LTHRESH |
557 PLL_RX_CFG_EQ_LP_ADAPTIVE);
558
559 if (lp->loopback_mode == LOOPBACK_PHY) {
560 u16 test_cfg = PLL_TEST_CFG_LOOPBACK_CML_DIS;
561
562 mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
563 ESR2_TI_PLL_TEST_CFG_L, test_cfg);
564
565 tx_cfg |= PLL_TX_CFG_ENTEST;
566 rx_cfg |= PLL_RX_CFG_ENTEST;
567 }
568
569 /* Initialize PLL for 10G */
570 pll_cfg = (PLL_CFG_ENPLL | PLL_CFG_MPY_10X);
571
572 err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
573 ESR2_TI_PLL_CFG_L, pll_cfg & 0xffff);
574 if (err) {
575 dev_err(np->device, PFX "NIU Port %d "
576 "serdes_init_niu_10g_serdes: "
577 "mdio write to ESR2_TI_PLL_CFG_L failed", np->port);
578 return err;
579 }
580
581 pll_sts = PLL_CFG_ENPLL;
582
583 err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
584 ESR2_TI_PLL_STS_L, pll_sts & 0xffff);
585 if (err) {
586 dev_err(np->device, PFX "NIU Port %d "
587 "serdes_init_niu_10g_serdes: "
588 "mdio write to ESR2_TI_PLL_STS_L failed", np->port);
589 return err;
590 }
591
592 udelay(200);
593
594 /* Initialize all 4 lanes of the SERDES. */
595 for (i = 0; i < 4; i++) {
596 err = esr2_set_tx_cfg(np, i, tx_cfg);
597 if (err)
598 return err;
599 }
600
601 for (i = 0; i < 4; i++) {
602 err = esr2_set_rx_cfg(np, i, rx_cfg);
603 if (err)
604 return err;
605 }
606
607 /* check if serdes is ready */
608
609 switch (np->port) {
610 case 0:
611 mask = ESR_INT_SIGNALS_P0_BITS;
612 val = (ESR_INT_SRDY0_P0 |
613 ESR_INT_DET0_P0 |
614 ESR_INT_XSRDY_P0 |
615 ESR_INT_XDP_P0_CH3 |
616 ESR_INT_XDP_P0_CH2 |
617 ESR_INT_XDP_P0_CH1 |
618 ESR_INT_XDP_P0_CH0);
619 break;
620
621 case 1:
622 mask = ESR_INT_SIGNALS_P1_BITS;
623 val = (ESR_INT_SRDY0_P1 |
624 ESR_INT_DET0_P1 |
625 ESR_INT_XSRDY_P1 |
626 ESR_INT_XDP_P1_CH3 |
627 ESR_INT_XDP_P1_CH2 |
628 ESR_INT_XDP_P1_CH1 |
629 ESR_INT_XDP_P1_CH0);
630 break;
631
632 default:
633 return -EINVAL;
634 }
635
636 while (max_retry--) {
637 sig = nr64(ESR_INT_SIGNALS);
638 if ((sig & mask) == val)
639 break;
640
641 mdelay(500);
642 }
643
644 if ((sig & mask) != val) {
645 pr_info(PFX "NIU Port %u signal bits [%08x] are not "
646 "[%08x] for 10G...trying 1G\n",
647 np->port, (int) (sig & mask), (int) val);
648
649 /* 10G failed, try initializing at 1G */
650 err = serdes_init_niu_1g_serdes(np);
651 if (!err) {
652 np->flags &= ~NIU_FLAGS_10G;
653 np->mac_xcvr = MAC_XCVR_PCS;
654 } else {
655 dev_err(np->device, PFX "Port %u 10G/1G SERDES "
656 "Link Failed \n", np->port);
657 return -ENODEV;
658 }
659 }
660 return 0;
661}
662
447static int esr_read_rxtx_ctrl(struct niu *np, unsigned long chan, u32 *val) 663static int esr_read_rxtx_ctrl(struct niu *np, unsigned long chan, u32 *val)
448{ 664{
449 int err; 665 int err;
@@ -1955,13 +2171,23 @@ static const struct niu_phy_ops phy_ops_10g_serdes = {
1955 .link_status = link_status_10g_serdes, 2171 .link_status = link_status_10g_serdes,
1956}; 2172};
1957 2173
2174static const struct niu_phy_ops phy_ops_10g_serdes_niu = {
2175 .serdes_init = serdes_init_niu_10g_serdes,
2176 .link_status = link_status_10g_serdes,
2177};
2178
2179static const struct niu_phy_ops phy_ops_1g_serdes_niu = {
2180 .serdes_init = serdes_init_niu_1g_serdes,
2181 .link_status = link_status_1g_serdes,
2182};
2183
1958static const struct niu_phy_ops phy_ops_1g_rgmii = { 2184static const struct niu_phy_ops phy_ops_1g_rgmii = {
1959 .xcvr_init = xcvr_init_1g_rgmii, 2185 .xcvr_init = xcvr_init_1g_rgmii,
1960 .link_status = link_status_1g_rgmii, 2186 .link_status = link_status_1g_rgmii,
1961}; 2187};
1962 2188
1963static const struct niu_phy_ops phy_ops_10g_fiber_niu = { 2189static const struct niu_phy_ops phy_ops_10g_fiber_niu = {
1964 .serdes_init = serdes_init_niu, 2190 .serdes_init = serdes_init_niu_10g_fiber,
1965 .xcvr_init = xcvr_init_10g, 2191 .xcvr_init = xcvr_init_10g,
1966 .link_status = link_status_10g, 2192 .link_status = link_status_10g,
1967}; 2193};
@@ -1999,11 +2225,21 @@ struct niu_phy_template {
1999 u32 phy_addr_base; 2225 u32 phy_addr_base;
2000}; 2226};
2001 2227
2002static const struct niu_phy_template phy_template_niu = { 2228static const struct niu_phy_template phy_template_niu_10g_fiber = {
2003 .ops = &phy_ops_10g_fiber_niu, 2229 .ops = &phy_ops_10g_fiber_niu,
2004 .phy_addr_base = 16, 2230 .phy_addr_base = 16,
2005}; 2231};
2006 2232
2233static const struct niu_phy_template phy_template_niu_10g_serdes = {
2234 .ops = &phy_ops_10g_serdes_niu,
2235 .phy_addr_base = 0,
2236};
2237
2238static const struct niu_phy_template phy_template_niu_1g_serdes = {
2239 .ops = &phy_ops_1g_serdes_niu,
2240 .phy_addr_base = 0,
2241};
2242
2007static const struct niu_phy_template phy_template_10g_fiber = { 2243static const struct niu_phy_template phy_template_10g_fiber = {
2008 .ops = &phy_ops_10g_fiber, 2244 .ops = &phy_ops_10g_fiber,
2009 .phy_addr_base = 8, 2245 .phy_addr_base = 8,
@@ -2183,8 +2419,25 @@ static int niu_determine_phy_disposition(struct niu *np)
2183 u32 phy_addr_off = 0; 2419 u32 phy_addr_off = 0;
2184 2420
2185 if (plat_type == PLAT_TYPE_NIU) { 2421 if (plat_type == PLAT_TYPE_NIU) {
2186 tp = &phy_template_niu; 2422 switch (np->flags &
2187 phy_addr_off += np->port; 2423 (NIU_FLAGS_10G |
2424 NIU_FLAGS_FIBER |
2425 NIU_FLAGS_XCVR_SERDES)) {
2426 case NIU_FLAGS_10G | NIU_FLAGS_XCVR_SERDES:
2427 /* 10G Serdes */
2428 tp = &phy_template_niu_10g_serdes;
2429 break;
2430 case NIU_FLAGS_XCVR_SERDES:
2431 /* 1G Serdes */
2432 tp = &phy_template_niu_1g_serdes;
2433 break;
2434 case NIU_FLAGS_10G | NIU_FLAGS_FIBER:
2435 /* 10G Fiber */
2436 default:
2437 tp = &phy_template_niu_10g_fiber;
2438 phy_addr_off += np->port;
2439 break;
2440 }
2188 } else { 2441 } else {
2189 switch (np->flags & 2442 switch (np->flags &
2190 (NIU_FLAGS_10G | 2443 (NIU_FLAGS_10G |
@@ -7214,6 +7467,12 @@ static int __devinit niu_phy_type_prop_decode(struct niu *np,
7214 np->flags |= NIU_FLAGS_10G; 7467 np->flags |= NIU_FLAGS_10G;
7215 np->flags &= ~NIU_FLAGS_FIBER; 7468 np->flags &= ~NIU_FLAGS_FIBER;
7216 np->mac_xcvr = MAC_XCVR_XPCS; 7469 np->mac_xcvr = MAC_XCVR_XPCS;
7470 } else if (!strcmp(phy_prop, "xgsd") || !strcmp(phy_prop, "gsd")) {
7471 /* 10G Serdes or 1G Serdes, default to 10G */
7472 np->flags |= NIU_FLAGS_10G;
7473 np->flags &= ~NIU_FLAGS_FIBER;
7474 np->flags |= NIU_FLAGS_XCVR_SERDES;
7475 np->mac_xcvr = MAC_XCVR_XPCS;
7217 } else { 7476 } else {
7218 return -EINVAL; 7477 return -EINVAL;
7219 } 7478 }
@@ -7742,6 +8001,8 @@ static int __devinit walk_phys(struct niu *np, struct niu_parent *parent)
7742 u32 val; 8001 u32 val;
7743 int err; 8002 int err;
7744 8003
8004 num_10g = num_1g = 0;
8005
7745 if (!strcmp(np->vpd.model, NIU_ALONSO_MDL_STR) || 8006 if (!strcmp(np->vpd.model, NIU_ALONSO_MDL_STR) ||
7746 !strcmp(np->vpd.model, NIU_KIMI_MDL_STR)) { 8007 !strcmp(np->vpd.model, NIU_KIMI_MDL_STR)) {
7747 num_10g = 0; 8008 num_10g = 0;
@@ -7758,6 +8019,16 @@ static int __devinit walk_phys(struct niu *np, struct niu_parent *parent)
7758 parent->num_ports = 2; 8019 parent->num_ports = 2;
7759 val = (phy_encode(PORT_TYPE_10G, 0) | 8020 val = (phy_encode(PORT_TYPE_10G, 0) |
7760 phy_encode(PORT_TYPE_10G, 1)); 8021 phy_encode(PORT_TYPE_10G, 1));
8022 } else if ((np->flags & NIU_FLAGS_XCVR_SERDES) &&
8023 (parent->plat_type == PLAT_TYPE_NIU)) {
8024 /* this is the Monza case */
8025 if (np->flags & NIU_FLAGS_10G) {
8026 val = (phy_encode(PORT_TYPE_10G, 0) |
8027 phy_encode(PORT_TYPE_10G, 1));
8028 } else {
8029 val = (phy_encode(PORT_TYPE_1G, 0) |
8030 phy_encode(PORT_TYPE_1G, 1));
8031 }
7761 } else { 8032 } else {
7762 err = fill_phy_probe_info(np, parent, info); 8033 err = fill_phy_probe_info(np, parent, info);
7763 if (err) 8034 if (err)
@@ -8657,7 +8928,9 @@ static void __devinit niu_device_announce(struct niu *np)
8657 dev->name, 8928 dev->name,
8658 (np->flags & NIU_FLAGS_XMAC ? "XMAC" : "BMAC"), 8929 (np->flags & NIU_FLAGS_XMAC ? "XMAC" : "BMAC"),
8659 (np->flags & NIU_FLAGS_10G ? "10G" : "1G"), 8930 (np->flags & NIU_FLAGS_10G ? "10G" : "1G"),
8660 (np->flags & NIU_FLAGS_FIBER ? "FIBER" : "COPPER"), 8931 (np->flags & NIU_FLAGS_FIBER ? "FIBER" :
8932 (np->flags & NIU_FLAGS_XCVR_SERDES ? "SERDES" :
8933 "COPPER")),
8661 (np->mac_xcvr == MAC_XCVR_MII ? "MII" : 8934 (np->mac_xcvr == MAC_XCVR_MII ? "MII" :
8662 (np->mac_xcvr == MAC_XCVR_PCS ? "PCS" : "XPCS")), 8935 (np->mac_xcvr == MAC_XCVR_PCS ? "PCS" : "XPCS")),
8663 np->vpd.phy_type); 8936 np->vpd.phy_type);
diff --git a/drivers/net/niu.h b/drivers/net/niu.h
index c6fa883daa22..180ca8ae93de 100644
--- a/drivers/net/niu.h
+++ b/drivers/net/niu.h
@@ -1048,6 +1048,13 @@
1048#define PLL_CFG_LD_SHIFT 8 1048#define PLL_CFG_LD_SHIFT 8
1049#define PLL_CFG_MPY 0x0000001e 1049#define PLL_CFG_MPY 0x0000001e
1050#define PLL_CFG_MPY_SHIFT 1 1050#define PLL_CFG_MPY_SHIFT 1
1051#define PLL_CFG_MPY_4X 0x0
1052#define PLL_CFG_MPY_5X 0x00000002
1053#define PLL_CFG_MPY_6X 0x00000004
1054#define PLL_CFG_MPY_8X 0x00000008
1055#define PLL_CFG_MPY_10X 0x0000000a
1056#define PLL_CFG_MPY_12X 0x0000000c
1057#define PLL_CFG_MPY_12P5X 0x0000000e
1051#define PLL_CFG_ENPLL 0x00000001 1058#define PLL_CFG_ENPLL 0x00000001
1052 1059
1053#define ESR2_TI_PLL_STS_L (ESR2_BASE + 0x002) 1060#define ESR2_TI_PLL_STS_L (ESR2_BASE + 0x002)
@@ -1093,6 +1100,9 @@
1093#define PLL_TX_CFG_INVPAIR 0x00000080 1100#define PLL_TX_CFG_INVPAIR 0x00000080
1094#define PLL_TX_CFG_RATE 0x00000060 1101#define PLL_TX_CFG_RATE 0x00000060
1095#define PLL_TX_CFG_RATE_SHIFT 5 1102#define PLL_TX_CFG_RATE_SHIFT 5
1103#define PLL_TX_CFG_RATE_FULL 0x0
1104#define PLL_TX_CFG_RATE_HALF 0x20
1105#define PLL_TX_CFG_RATE_QUAD 0x40
1096#define PLL_TX_CFG_BUSWIDTH 0x0000001c 1106#define PLL_TX_CFG_BUSWIDTH 0x0000001c
1097#define PLL_TX_CFG_BUSWIDTH_SHIFT 2 1107#define PLL_TX_CFG_BUSWIDTH_SHIFT 2
1098#define PLL_TX_CFG_ENTEST 0x00000002 1108#define PLL_TX_CFG_ENTEST 0x00000002
@@ -1132,6 +1142,9 @@
1132#define PLL_RX_CFG_INVPAIR 0x00000080 1142#define PLL_RX_CFG_INVPAIR 0x00000080
1133#define PLL_RX_CFG_RATE 0x00000060 1143#define PLL_RX_CFG_RATE 0x00000060
1134#define PLL_RX_CFG_RATE_SHIFT 5 1144#define PLL_RX_CFG_RATE_SHIFT 5
1145#define PLL_RX_CFG_RATE_FULL 0x0
1146#define PLL_RX_CFG_RATE_HALF 0x20
1147#define PLL_RX_CFG_RATE_QUAD 0x40
1135#define PLL_RX_CFG_BUSWIDTH 0x0000001c 1148#define PLL_RX_CFG_BUSWIDTH 0x0000001c
1136#define PLL_RX_CFG_BUSWIDTH_SHIFT 2 1149#define PLL_RX_CFG_BUSWIDTH_SHIFT 2
1137#define PLL_RX_CFG_ENTEST 0x00000002 1150#define PLL_RX_CFG_ENTEST 0x00000002
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 4aa547947040..eb6411c4694f 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -227,6 +227,59 @@ static int m88e1111_config_init(struct phy_device *phydev)
227 return 0; 227 return 0;
228} 228}
229 229
230static int m88e1118_config_aneg(struct phy_device *phydev)
231{
232 int err;
233
234 err = phy_write(phydev, MII_BMCR, BMCR_RESET);
235 if (err < 0)
236 return err;
237
238 err = phy_write(phydev, MII_M1011_PHY_SCR,
239 MII_M1011_PHY_SCR_AUTO_CROSS);
240 if (err < 0)
241 return err;
242
243 err = genphy_config_aneg(phydev);
244 return 0;
245}
246
247static int m88e1118_config_init(struct phy_device *phydev)
248{
249 int err;
250
251 /* Change address */
252 err = phy_write(phydev, 0x16, 0x0002);
253 if (err < 0)
254 return err;
255
256 /* Enable 1000 Mbit */
257 err = phy_write(phydev, 0x15, 0x1070);
258 if (err < 0)
259 return err;
260
261 /* Change address */
262 err = phy_write(phydev, 0x16, 0x0003);
263 if (err < 0)
264 return err;
265
266 /* Adjust LED Control */
267 err = phy_write(phydev, 0x10, 0x021e);
268 if (err < 0)
269 return err;
270
271 /* Reset address */
272 err = phy_write(phydev, 0x16, 0x0);
273 if (err < 0)
274 return err;
275
276 err = phy_write(phydev, MII_BMCR, BMCR_RESET);
277 if (err < 0)
278 return err;
279
280 return 0;
281}
282
230static int m88e1145_config_init(struct phy_device *phydev) 283static int m88e1145_config_init(struct phy_device *phydev)
231{ 284{
232 int err; 285 int err;
@@ -416,6 +469,19 @@ static struct phy_driver marvell_drivers[] = {
416 .driver = { .owner = THIS_MODULE }, 469 .driver = { .owner = THIS_MODULE },
417 }, 470 },
418 { 471 {
472 .phy_id = 0x01410e10,
473 .phy_id_mask = 0xfffffff0,
474 .name = "Marvell 88E1118",
475 .features = PHY_GBIT_FEATURES,
476 .flags = PHY_HAS_INTERRUPT,
477 .config_init = &m88e1118_config_init,
478 .config_aneg = &m88e1118_config_aneg,
479 .read_status = &genphy_read_status,
480 .ack_interrupt = &marvell_ack_interrupt,
481 .config_intr = &marvell_config_intr,
482 .driver = {.owner = THIS_MODULE,},
483 },
484 {
419 .phy_id = 0x01410cd0, 485 .phy_id = 0x01410cd0,
420 .phy_id_mask = 0xfffffff0, 486 .phy_id_mask = 0xfffffff0,
421 .name = "Marvell 88E1145", 487 .name = "Marvell 88E1145",
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index d0ed1ef284a8..536bda1f428b 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -136,7 +136,7 @@ void mdiobus_unregister(struct mii_bus *bus)
136 BUG_ON(bus->state != MDIOBUS_REGISTERED); 136 BUG_ON(bus->state != MDIOBUS_REGISTERED);
137 bus->state = MDIOBUS_UNREGISTERED; 137 bus->state = MDIOBUS_UNREGISTERED;
138 138
139 device_unregister(&bus->dev); 139 device_del(&bus->dev);
140 for (i = 0; i < PHY_MAX_ADDR; i++) { 140 for (i = 0; i < PHY_MAX_ADDR; i++) {
141 if (bus->phy_map[i]) 141 if (bus->phy_map[i])
142 device_unregister(&bus->phy_map[i]->dev); 142 device_unregister(&bus->phy_map[i]->dev);
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e11b03b2b25a..55bc24b234e3 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -227,8 +227,8 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr)
227 if (r) 227 if (r)
228 return ERR_PTR(r); 228 return ERR_PTR(r);
229 229
230 /* If the phy_id is all Fs, there is no device there */ 230 /* If the phy_id is all Fs or all 0s, there is no device there */
231 if (0xffffffff == phy_id) 231 if ((0xffff == phy_id) || (0x00 == phy_id))
232 return NULL; 232 return NULL;
233 233
234 dev = phy_device_create(bus, addr, phy_id); 234 dev = phy_device_create(bus, addr, phy_id);
@@ -564,20 +564,32 @@ EXPORT_SYMBOL(genphy_restart_aneg);
564 */ 564 */
565int genphy_config_aneg(struct phy_device *phydev) 565int 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/qla3xxx.c b/drivers/net/qla3xxx.c
index 3cdd07c45b6d..508452c02151 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -1515,9 +1515,6 @@ static u32 ql_get_link_state(struct ql3_adapter *qdev)
1515 linkState = LS_UP; 1515 linkState = LS_UP;
1516 } else { 1516 } else {
1517 linkState = LS_DOWN; 1517 linkState = LS_DOWN;
1518 if (netif_msg_link(qdev))
1519 printk(KERN_WARNING PFX
1520 "%s: Link is down.\n", qdev->ndev->name);
1521 } 1518 }
1522 return linkState; 1519 return linkState;
1523} 1520}
@@ -1581,10 +1578,6 @@ static int ql_finish_auto_neg(struct ql3_adapter *qdev)
1581 ql_mac_enable(qdev, 1); 1578 ql_mac_enable(qdev, 1);
1582 } 1579 }
1583 1580
1584 if (netif_msg_link(qdev))
1585 printk(KERN_DEBUG PFX
1586 "%s: Change port_link_state LS_DOWN to LS_UP.\n",
1587 qdev->ndev->name);
1588 qdev->port_link_state = LS_UP; 1581 qdev->port_link_state = LS_UP;
1589 netif_start_queue(qdev->ndev); 1582 netif_start_queue(qdev->ndev);
1590 netif_carrier_on(qdev->ndev); 1583 netif_carrier_on(qdev->ndev);
@@ -1655,14 +1648,9 @@ static void ql_link_state_machine_work(struct work_struct *work)
1655 /* Fall Through */ 1648 /* Fall Through */
1656 1649
1657 case LS_DOWN: 1650 case LS_DOWN:
1658 if (netif_msg_link(qdev))
1659 printk(KERN_DEBUG PFX
1660 "%s: port_link_state = LS_DOWN.\n",
1661 qdev->ndev->name);
1662 if (curr_link_state == LS_UP) { 1651 if (curr_link_state == LS_UP) {
1663 if (netif_msg_link(qdev)) 1652 if (netif_msg_link(qdev))
1664 printk(KERN_DEBUG PFX 1653 printk(KERN_INFO PFX "%s: Link is up.\n",
1665 "%s: curr_link_state = LS_UP.\n",
1666 qdev->ndev->name); 1654 qdev->ndev->name);
1667 if (ql_is_auto_neg_complete(qdev)) 1655 if (ql_is_auto_neg_complete(qdev))
1668 ql_finish_auto_neg(qdev); 1656 ql_finish_auto_neg(qdev);
@@ -1670,6 +1658,7 @@ static void ql_link_state_machine_work(struct work_struct *work)
1670 if (qdev->port_link_state == LS_UP) 1658 if (qdev->port_link_state == LS_UP)
1671 ql_link_down_detect_clear(qdev); 1659 ql_link_down_detect_clear(qdev);
1672 1660
1661 qdev->port_link_state = LS_UP;
1673 } 1662 }
1674 break; 1663 break;
1675 1664
@@ -1678,12 +1667,14 @@ static void ql_link_state_machine_work(struct work_struct *work)
1678 * See if the link is currently down or went down and came 1667 * See if the link is currently down or went down and came
1679 * back up 1668 * back up
1680 */ 1669 */
1681 if ((curr_link_state == LS_DOWN) || ql_link_down_detect(qdev)) { 1670 if (curr_link_state == LS_DOWN) {
1682 if (netif_msg_link(qdev)) 1671 if (netif_msg_link(qdev))
1683 printk(KERN_INFO PFX "%s: Link is down.\n", 1672 printk(KERN_INFO PFX "%s: Link is down.\n",
1684 qdev->ndev->name); 1673 qdev->ndev->name);
1685 qdev->port_link_state = LS_DOWN; 1674 qdev->port_link_state = LS_DOWN;
1686 } 1675 }
1676 if (ql_link_down_detect(qdev))
1677 qdev->port_link_state = LS_DOWN;
1687 break; 1678 break;
1688 } 1679 }
1689 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); 1680 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index fa98af58223e..cd0d0873d978 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -174,8 +174,8 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = {
174 174
175/* EEPROM range with gPXE configuration */ 175/* EEPROM range with gPXE configuration */
176#define EFX_ETHTOOL_EEPROM_MAGIC 0xEFAB 176#define EFX_ETHTOOL_EEPROM_MAGIC 0xEFAB
177#define EFX_ETHTOOL_EEPROM_MIN 0x100U 177#define EFX_ETHTOOL_EEPROM_MIN 0x800U
178#define EFX_ETHTOOL_EEPROM_MAX 0x400U 178#define EFX_ETHTOOL_EEPROM_MAX 0x1800U
179 179
180/************************************************************************** 180/**************************************************************************
181 * 181 *
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 5051554ff05b..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 }
@@ -2050,7 +2050,9 @@ err_out:
2050 */ 2050 */
2051static int smc911x_drv_probe(struct platform_device *pdev) 2051static int smc911x_drv_probe(struct platform_device *pdev)
2052{ 2052{
2053#ifdef SMC_DYNAMIC_BUS_CONFIG
2053 struct smc911x_platdata *pd = pdev->dev.platform_data; 2054 struct smc911x_platdata *pd = pdev->dev.platform_data;
2055#endif
2054 struct net_device *ndev; 2056 struct net_device *ndev;
2055 struct resource *res; 2057 struct resource *res;
2056 struct smc911x_local *lp; 2058 struct smc911x_local *lp;
@@ -2182,9 +2184,9 @@ static int smc911x_drv_resume(struct platform_device *dev)
2182 2184
2183 if (netif_running(ndev)) { 2185 if (netif_running(ndev)) {
2184 smc911x_reset(ndev); 2186 smc911x_reset(ndev);
2185 smc911x_enable(ndev);
2186 if (lp->phy_type != 0) 2187 if (lp->phy_type != 0)
2187 smc911x_phy_configure(&lp->phy_configure); 2188 smc911x_phy_configure(&lp->phy_configure);
2189 smc911x_enable(ndev);
2188 netif_device_attach(ndev); 2190 netif_device_attach(ndev);
2189 } 2191 }
2190 } 2192 }
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c
index 85f38a6b6a49..68a7f5414133 100644
--- a/drivers/net/ucc_geth_ethtool.c
+++ b/drivers/net/ucc_geth_ethtool.c
@@ -323,17 +323,17 @@ static void uec_get_ethtool_stats(struct net_device *netdev,
323 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE) { 323 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE) {
324 base = (u32 __iomem *)&ugeth->ug_regs->tx64; 324 base = (u32 __iomem *)&ugeth->ug_regs->tx64;
325 for (i = 0; i < UEC_HW_STATS_LEN; i++) 325 for (i = 0; i < UEC_HW_STATS_LEN; i++)
326 data[j++] = (u64)in_be32(&base[i]); 326 data[j++] = in_be32(&base[i]);
327 } 327 }
328 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX) { 328 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX) {
329 base = (u32 __iomem *)ugeth->p_tx_fw_statistics_pram; 329 base = (u32 __iomem *)ugeth->p_tx_fw_statistics_pram;
330 for (i = 0; i < UEC_TX_FW_STATS_LEN; i++) 330 for (i = 0; i < UEC_TX_FW_STATS_LEN; i++)
331 data[j++] = (u64)in_be32(&base[i]); 331 data[j++] = base ? in_be32(&base[i]) : 0;
332 } 332 }
333 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) { 333 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) {
334 base = (u32 __iomem *)ugeth->p_rx_fw_statistics_pram; 334 base = (u32 __iomem *)ugeth->p_rx_fw_statistics_pram;
335 for (i = 0; i < UEC_RX_FW_STATS_LEN; i++) 335 for (i = 0; i < UEC_RX_FW_STATS_LEN; i++)
336 data[j++] = (u64)in_be32(&base[i]); 336 data[j++] = base ? in_be32(&base[i]) : 0;
337 } 337 }
338} 338}
339 339
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 37ecf845edfe..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
@@ -1444,6 +1446,10 @@ static const struct usb_device_id products [] = {
1444 // Apple USB Ethernet Adapter 1446 // Apple USB Ethernet Adapter
1445 USB_DEVICE(0x05ac, 0x1402), 1447 USB_DEVICE(0x05ac, 0x1402),
1446 .driver_info = (unsigned long) &ax88772_info, 1448 .driver_info = (unsigned long) &ax88772_info,
1449}, {
1450 // Cables-to-Go USB Ethernet Adapter
1451 USB_DEVICE(0x0b95, 0x772a),
1452 .driver_info = (unsigned long) &ax88772_info,
1447}, 1453},
1448 { }, // END 1454 { }, // END
1449}; 1455};
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 1164c52e2c0a..8e90891f0e42 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2184,19 +2184,20 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
2184 struct usb_interface *interface) 2184 struct usb_interface *interface)
2185{ 2185{
2186 struct hso_net *hso_net = dev2net(hso_dev); 2186 struct hso_net *hso_net = dev2net(hso_dev);
2187 struct device *dev = hso_dev->dev; 2187 struct device *dev = &hso_net->net->dev;
2188 char *rfkn; 2188 char *rfkn;
2189 2189
2190 hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev, 2190 hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
2191 RFKILL_TYPE_WLAN); 2191 RFKILL_TYPE_WWAN);
2192 if (!hso_net->rfkill) { 2192 if (!hso_net->rfkill) {
2193 dev_err(dev, "%s - Out of memory", __func__); 2193 dev_err(dev, "%s - Out of memory\n", __func__);
2194 return; 2194 return;
2195 } 2195 }
2196 rfkn = kzalloc(20, GFP_KERNEL); 2196 rfkn = kzalloc(20, GFP_KERNEL);
2197 if (!rfkn) { 2197 if (!rfkn) {
2198 rfkill_free(hso_net->rfkill); 2198 rfkill_free(hso_net->rfkill);
2199 dev_err(dev, "%s - Out of memory", __func__); 2199 hso_net->rfkill = NULL;
2200 dev_err(dev, "%s - Out of memory\n", __func__);
2200 return; 2201 return;
2201 } 2202 }
2202 snprintf(rfkn, 20, "hso-%d", 2203 snprintf(rfkn, 20, "hso-%d",
@@ -2209,7 +2210,8 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
2209 kfree(rfkn); 2210 kfree(rfkn);
2210 hso_net->rfkill->name = NULL; 2211 hso_net->rfkill->name = NULL;
2211 rfkill_free(hso_net->rfkill); 2212 rfkill_free(hso_net->rfkill);
2212 dev_err(dev, "%s - Failed to register rfkill", __func__); 2213 hso_net->rfkill = NULL;
2214 dev_err(dev, "%s - Failed to register rfkill\n", __func__);
2213 return; 2215 return;
2214 } 2216 }
2215} 2217}
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 3590ea5a902d..11cb3e504e1c 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -2296,7 +2296,7 @@ static void velocity_set_multi(struct net_device *dev)
2296 } 2296 }
2297 2297
2298 mac_set_cam_mask(regs, vptr->mCAMmask); 2298 mac_set_cam_mask(regs, vptr->mCAMmask);
2299 rx_mode = (RCR_AM | RCR_AB); 2299 rx_mode = RCR_AM | RCR_AB | RCR_AP;
2300 } 2300 }
2301 if (dev->mtu > 1500) 2301 if (dev->mtu > 1500)
2302 rx_mode |= RCR_AL; 2302 rx_mode |= RCR_AL;
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
index ffdf4876121b..a68f97c39359 100644
--- a/drivers/net/wireless/hostap/hostap_wlan.h
+++ b/drivers/net/wireless/hostap/hostap_wlan.h
@@ -918,9 +918,12 @@ struct hostap_interface {
918 918
919/* 919/*
920 * TX meta data - stored in skb->cb buffer, so this must not be increased over 920 * TX meta data - stored in skb->cb buffer, so this must not be increased over
921 * the 40-byte limit 921 * the 48-byte limit.
922 * THE PADDING THIS STARTS WITH IS A HORRIBLE HACK THAT SHOULD NOT LIVE
923 * TO SEE THE DAY.
922 */ 924 */
923struct hostap_skb_tx_data { 925struct hostap_skb_tx_data {
926 unsigned int __padding_for_default_qdiscs;
924 u32 magic; /* HOSTAP_SKB_TX_DATA_MAGIC */ 927 u32 magic; /* HOSTAP_SKB_TX_DATA_MAGIC */
925 u8 rate; /* transmit rate */ 928 u8 rate; /* transmit rate */
926#define HOSTAP_TX_FLAGS_WDS BIT(0) 929#define HOSTAP_TX_FLAGS_WDS BIT(0)
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
2347static void iwl4965_bg_rf_kill(struct work_struct *work) 2346static 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
91struct iwl_rx_mem_buffer { 91struct 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
6018static void iwl3945_bg_rf_kill(struct work_struct *work) 6017static 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;
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index 431e3c78bf27..69eb0132593b 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -48,6 +48,9 @@ static struct usb_device_id rtl8187_table[] __devinitdata = {
48 {USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187}, 48 {USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187},
49 /* Sitecom */ 49 /* Sitecom */
50 {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, 50 {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187},
51 {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B},
52 /* Abocom */
53 {USB_DEVICE(0x13d1, 0xabe6), .driver_info = DEVICE_RTL8187},
51 {} 54 {}
52}; 55};
53 56