diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-19 02:38:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-19 02:38:23 -0500 |
commit | 198d6ba4d7f48c94f990f4604f0b3d73925e0ded (patch) | |
tree | 56bbdf8ba2553c23c8099da9344a8f1d1aba97ab /drivers/net | |
parent | 9a57f7fabd383920585ed8b74eacd117c6551f2d (diff) | |
parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/isdn/i4l/isdn_net.c
fs/cifs/connect.c
Diffstat (limited to 'drivers/net')
32 files changed, 531 insertions, 114 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 | */ |
170 | u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr) | 167 | u32 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 09ed2fdd585b..611a86ebe164 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -3384,14 +3384,8 @@ static void atl1_get_wol(struct net_device *netdev, | |||
3384 | { | 3384 | { |
3385 | struct atl1_adapter *adapter = netdev_priv(netdev); | 3385 | struct atl1_adapter *adapter = netdev_priv(netdev); |
3386 | 3386 | ||
3387 | wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC; | 3387 | wol->supported = WAKE_MAGIC; |
3388 | wol->wolopts = 0; | 3388 | wol->wolopts = 0; |
3389 | if (adapter->wol & ATLX_WUFC_EX) | ||
3390 | wol->wolopts |= WAKE_UCAST; | ||
3391 | if (adapter->wol & ATLX_WUFC_MC) | ||
3392 | wol->wolopts |= WAKE_MCAST; | ||
3393 | if (adapter->wol & ATLX_WUFC_BC) | ||
3394 | wol->wolopts |= WAKE_BCAST; | ||
3395 | if (adapter->wol & ATLX_WUFC_MAG) | 3389 | if (adapter->wol & ATLX_WUFC_MAG) |
3396 | wol->wolopts |= WAKE_MAGIC; | 3390 | wol->wolopts |= WAKE_MAGIC; |
3397 | return; | 3391 | return; |
@@ -3402,15 +3396,10 @@ static int atl1_set_wol(struct net_device *netdev, | |||
3402 | { | 3396 | { |
3403 | struct atl1_adapter *adapter = netdev_priv(netdev); | 3397 | struct atl1_adapter *adapter = netdev_priv(netdev); |
3404 | 3398 | ||
3405 | if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE)) | 3399 | if (wol->wolopts & (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | |
3400 | WAKE_ARP | WAKE_MAGICSECURE)) | ||
3406 | return -EOPNOTSUPP; | 3401 | return -EOPNOTSUPP; |
3407 | adapter->wol = 0; | 3402 | adapter->wol = 0; |
3408 | if (wol->wolopts & WAKE_UCAST) | ||
3409 | adapter->wol |= ATLX_WUFC_EX; | ||
3410 | if (wol->wolopts & WAKE_MCAST) | ||
3411 | adapter->wol |= ATLX_WUFC_MC; | ||
3412 | if (wol->wolopts & WAKE_BCAST) | ||
3413 | adapter->wol |= ATLX_WUFC_BC; | ||
3414 | if (wol->wolopts & WAKE_MAGIC) | 3403 | if (wol->wolopts & WAKE_MAGIC) |
3415 | adapter->wol |= ATLX_WUFC_MAG; | 3404 | adapter->wol |= ATLX_WUFC_MAG; |
3416 | return 0; | 3405 | return 0; |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 0853b3c2fbfc..fe802215214f 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -7215,10 +7215,13 @@ static void | |||
7215 | poll_bnx2(struct net_device *dev) | 7215 | poll_bnx2(struct net_device *dev) |
7216 | { | 7216 | { |
7217 | struct bnx2 *bp = netdev_priv(dev); | 7217 | struct bnx2 *bp = netdev_priv(dev); |
7218 | int i; | ||
7218 | 7219 | ||
7219 | disable_irq(bp->pdev->irq); | 7220 | for (i = 0; i < bp->irq_nvecs; i++) { |
7220 | bnx2_interrupt(bp->pdev->irq, dev); | 7221 | disable_irq(bp->irq_tbl[i].vector); |
7221 | enable_irq(bp->pdev->irq); | 7222 | bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]); |
7223 | enable_irq(bp->irq_tbl[i].vector); | ||
7224 | } | ||
7222 | } | 7225 | } |
7223 | #endif | 7226 | #endif |
7224 | 7227 | ||
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index e1746eeb34a4..b6b2a46b7d0e 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -1336,8 +1336,10 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | |||
1336 | u32 fw_vers = 0; | 1336 | u32 fw_vers = 0; |
1337 | u32 tp_vers = 0; | 1337 | u32 tp_vers = 0; |
1338 | 1338 | ||
1339 | spin_lock(&adapter->stats_lock); | ||
1339 | t3_get_fw_version(adapter, &fw_vers); | 1340 | t3_get_fw_version(adapter, &fw_vers); |
1340 | t3_get_tp_version(adapter, &tp_vers); | 1341 | t3_get_tp_version(adapter, &tp_vers); |
1342 | spin_unlock(&adapter->stats_lock); | ||
1341 | 1343 | ||
1342 | strcpy(info->driver, DRV_NAME); | 1344 | strcpy(info->driver, DRV_NAME); |
1343 | strcpy(info->version, DRV_VERSION); | 1345 | strcpy(info->version, DRV_VERSION); |
@@ -2744,7 +2746,7 @@ static void set_nqsets(struct adapter *adap) | |||
2744 | int hwports = adap->params.nports; | 2746 | int hwports = adap->params.nports; |
2745 | int nqsets = SGE_QSETS; | 2747 | int nqsets = SGE_QSETS; |
2746 | 2748 | ||
2747 | if (adap->params.rev > 0) { | 2749 | if (adap->params.rev > 0 && adap->flags & USING_MSIX) { |
2748 | if (hwports == 2 && | 2750 | if (hwports == 2 && |
2749 | (hwports * nqsets > SGE_QSETS || | 2751 | (hwports * nqsets > SGE_QSETS || |
2750 | num_cpus >= nqsets / hwports)) | 2752 | 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 62cdefa2a4f0..c9c707980865 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 |
@@ -1942,7 +1942,7 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done, | |||
1942 | new_before_last_rfd->command |= cpu_to_le16(cb_el); | 1942 | new_before_last_rfd->command |= cpu_to_le16(cb_el); |
1943 | pci_dma_sync_single_for_device(nic->pdev, | 1943 | pci_dma_sync_single_for_device(nic->pdev, |
1944 | new_before_last_rx->dma_addr, sizeof(struct rfd), | 1944 | new_before_last_rx->dma_addr, sizeof(struct rfd), |
1945 | PCI_DMA_TODEVICE); | 1945 | PCI_DMA_BIDIRECTIONAL); |
1946 | 1946 | ||
1947 | /* Now that we have a new stopping point, we can clear the old | 1947 | /* Now that we have a new stopping point, we can clear the old |
1948 | * stopping point. We must sync twice to get the proper | 1948 | * stopping point. We must sync twice to get the proper |
@@ -1950,11 +1950,11 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done, | |||
1950 | old_before_last_rfd->command &= ~cpu_to_le16(cb_el); | 1950 | old_before_last_rfd->command &= ~cpu_to_le16(cb_el); |
1951 | pci_dma_sync_single_for_device(nic->pdev, | 1951 | pci_dma_sync_single_for_device(nic->pdev, |
1952 | old_before_last_rx->dma_addr, sizeof(struct rfd), | 1952 | old_before_last_rx->dma_addr, sizeof(struct rfd), |
1953 | PCI_DMA_TODEVICE); | 1953 | PCI_DMA_BIDIRECTIONAL); |
1954 | old_before_last_rfd->size = cpu_to_le16(VLAN_ETH_FRAME_LEN); | 1954 | old_before_last_rfd->size = cpu_to_le16(VLAN_ETH_FRAME_LEN); |
1955 | pci_dma_sync_single_for_device(nic->pdev, | 1955 | pci_dma_sync_single_for_device(nic->pdev, |
1956 | old_before_last_rx->dma_addr, sizeof(struct rfd), | 1956 | old_before_last_rx->dma_addr, sizeof(struct rfd), |
1957 | PCI_DMA_TODEVICE); | 1957 | PCI_DMA_BIDIRECTIONAL); |
1958 | } | 1958 | } |
1959 | 1959 | ||
1960 | if(restart_required) { | 1960 | if(restart_required) { |
@@ -1977,7 +1977,7 @@ static void e100_rx_clean_list(struct nic *nic) | |||
1977 | for(rx = nic->rxs, i = 0; i < count; rx++, i++) { | 1977 | for(rx = nic->rxs, i = 0; i < count; rx++, i++) { |
1978 | if(rx->skb) { | 1978 | if(rx->skb) { |
1979 | pci_unmap_single(nic->pdev, rx->dma_addr, | 1979 | pci_unmap_single(nic->pdev, rx->dma_addr, |
1980 | RFD_BUF_LEN, PCI_DMA_FROMDEVICE); | 1980 | RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL); |
1981 | dev_kfree_skb(rx->skb); | 1981 | dev_kfree_skb(rx->skb); |
1982 | } | 1982 | } |
1983 | } | 1983 | } |
@@ -2020,7 +2020,7 @@ static int e100_rx_alloc_list(struct nic *nic) | |||
2020 | before_last->command |= cpu_to_le16(cb_el); | 2020 | before_last->command |= cpu_to_le16(cb_el); |
2021 | before_last->size = 0; | 2021 | before_last->size = 0; |
2022 | pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr, | 2022 | pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr, |
2023 | sizeof(struct rfd), PCI_DMA_TODEVICE); | 2023 | sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL); |
2024 | 2024 | ||
2025 | nic->rx_to_use = nic->rx_to_clean = nic->rxs; | 2025 | nic->rx_to_use = nic->rx_to_clean = nic->rxs; |
2026 | nic->ru_running = RU_SUSPENDED; | 2026 | nic->ru_running = RU_SUSPENDED; |
@@ -2221,7 +2221,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) | |||
2221 | msleep(10); | 2221 | msleep(10); |
2222 | 2222 | ||
2223 | pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr, | 2223 | pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr, |
2224 | RFD_BUF_LEN, PCI_DMA_FROMDEVICE); | 2224 | RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL); |
2225 | 2225 | ||
2226 | if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), | 2226 | if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), |
2227 | skb->data, ETH_DATA_LEN)) | 2227 | 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 7dd4ded13d97..dd8343244378 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -1175,6 +1175,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
1175 | 1175 | ||
1176 | /* initialize the wol settings based on the eeprom settings */ | 1176 | /* initialize the wol settings based on the eeprom settings */ |
1177 | adapter->wol = adapter->eeprom_wol; | 1177 | adapter->wol = adapter->eeprom_wol; |
1178 | device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); | ||
1178 | 1179 | ||
1179 | /* print bus type/speed/width info */ | 1180 | /* print bus type/speed/width info */ |
1180 | DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ", | 1181 | 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 { | |||
306 | struct e1000_info { | 307 | struct 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 3eeae1cf994e..4f06641cd6d4 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -497,6 +497,10 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
497 | goto next_desc; | 497 | goto next_desc; |
498 | } | 498 | } |
499 | 499 | ||
500 | /* adjust length to remove Ethernet CRC */ | ||
501 | if (!(adapter->flags2 & FLAG2_CRC_STRIPPING)) | ||
502 | length -= 4; | ||
503 | |||
500 | total_rx_bytes += length; | 504 | total_rx_bytes += length; |
501 | total_rx_packets++; | 505 | total_rx_packets++; |
502 | 506 | ||
@@ -802,6 +806,10 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
802 | pci_dma_sync_single_for_device(pdev, ps_page->dma, | 806 | pci_dma_sync_single_for_device(pdev, ps_page->dma, |
803 | PAGE_SIZE, PCI_DMA_FROMDEVICE); | 807 | PAGE_SIZE, PCI_DMA_FROMDEVICE); |
804 | 808 | ||
809 | /* remove the CRC */ | ||
810 | if (!(adapter->flags2 & FLAG2_CRC_STRIPPING)) | ||
811 | l1 -= 4; | ||
812 | |||
805 | skb_put(skb, l1); | 813 | skb_put(skb, l1); |
806 | goto copydone; | 814 | goto copydone; |
807 | } /* if */ | 815 | } /* if */ |
@@ -823,6 +831,12 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
823 | skb->truesize += length; | 831 | skb->truesize += length; |
824 | } | 832 | } |
825 | 833 | ||
834 | /* strip the ethernet crc, problem is we're using pages now so | ||
835 | * this whole operation can get a little cpu intensive | ||
836 | */ | ||
837 | if (!(adapter->flags2 & FLAG2_CRC_STRIPPING)) | ||
838 | pskb_trim(skb, skb->len - 4); | ||
839 | |||
826 | copydone: | 840 | copydone: |
827 | total_rx_bytes += skb->len; | 841 | total_rx_bytes += skb->len; |
828 | total_rx_packets++; | 842 | total_rx_packets++; |
@@ -2298,8 +2312,12 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter) | |||
2298 | else | 2312 | else |
2299 | rctl |= E1000_RCTL_LPE; | 2313 | rctl |= E1000_RCTL_LPE; |
2300 | 2314 | ||
2301 | /* Enable hardware CRC frame stripping */ | 2315 | /* Some systems expect that the CRC is included in SMBUS traffic. The |
2302 | rctl |= E1000_RCTL_SECRC; | 2316 | * hardware strips the CRC before sending to both SMBUS (BMC) and to |
2317 | * host memory when this is enabled | ||
2318 | */ | ||
2319 | if (adapter->flags2 & FLAG2_CRC_STRIPPING) | ||
2320 | rctl |= E1000_RCTL_SECRC; | ||
2303 | 2321 | ||
2304 | /* Setup buffer sizes */ | 2322 | /* Setup buffer sizes */ |
2305 | rctl &= ~E1000_RCTL_SZ_4096; | 2323 | rctl &= ~E1000_RCTL_SZ_4096; |
@@ -4761,6 +4779,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
4761 | adapter->ei = ei; | 4779 | adapter->ei = ei; |
4762 | adapter->pba = ei->pba; | 4780 | adapter->pba = ei->pba; |
4763 | adapter->flags = ei->flags; | 4781 | adapter->flags = ei->flags; |
4782 | adapter->flags2 = ei->flags2; | ||
4764 | adapter->hw.adapter = adapter; | 4783 | adapter->hw.adapter = adapter; |
4765 | adapter->hw.mac.type = ei->mac; | 4784 | adapter->hw.mac.type = ei->mac; |
4766 | adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1; | 4785 | adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1; |
@@ -4962,6 +4981,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
4962 | 4981 | ||
4963 | /* initialize the wol settings based on the eeprom settings */ | 4982 | /* initialize the wol settings based on the eeprom settings */ |
4964 | adapter->wol = adapter->eeprom_wol; | 4983 | adapter->wol = adapter->eeprom_wol; |
4984 | device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); | ||
4965 | 4985 | ||
4966 | /* reset the hardware with the new settings */ | 4986 | /* reset the hardware with the new settings */ |
4967 | e1000e_reset(adapter); | 4987 | e1000e_reset(adapter); |
@@ -5000,6 +5020,7 @@ err_hw_init: | |||
5000 | err_sw_init: | 5020 | err_sw_init: |
5001 | if (adapter->hw.flash_address) | 5021 | if (adapter->hw.flash_address) |
5002 | iounmap(adapter->hw.flash_address); | 5022 | iounmap(adapter->hw.flash_address); |
5023 | e1000e_reset_interrupt_capability(adapter); | ||
5003 | err_flashmap: | 5024 | err_flashmap: |
5004 | iounmap(adapter->hw.hw_addr); | 5025 | iounmap(adapter->hw.hw_addr); |
5005 | err_ioremap: | 5026 | err_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 | */ |
152 | E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]"); | 152 | E1000_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 | */ | ||
161 | E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \ | ||
162 | "the CRC"); | ||
163 | |||
154 | struct e1000_option { | 164 | struct 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 451f6b8b6163..2635f5bed77f 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1405,6 +1405,10 @@ static int gfar_clean_tx_ring(struct net_device *dev) | |||
1405 | if (bdp->status & TXBD_DEF) | 1405 | if (bdp->status & TXBD_DEF) |
1406 | dev->stats.collisions++; | 1406 | dev->stats.collisions++; |
1407 | 1407 | ||
1408 | /* Unmap the DMA memory */ | ||
1409 | dma_unmap_single(&priv->dev->dev, bdp->bufPtr, | ||
1410 | bdp->length, DMA_TO_DEVICE); | ||
1411 | |||
1408 | /* Free the sk buffer associated with this TxBD */ | 1412 | /* Free the sk buffer associated with this TxBD */ |
1409 | dev_kfree_skb_irq(priv->tx_skbuff[priv->skb_dirtytx]); | 1413 | dev_kfree_skb_irq(priv->tx_skbuff[priv->skb_dirtytx]); |
1410 | 1414 | ||
@@ -1664,6 +1668,9 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) | |||
1664 | 1668 | ||
1665 | skb = priv->rx_skbuff[priv->skb_currx]; | 1669 | skb = priv->rx_skbuff[priv->skb_currx]; |
1666 | 1670 | ||
1671 | dma_unmap_single(&priv->dev->dev, bdp->bufPtr, | ||
1672 | priv->rx_buffer_size, DMA_FROM_DEVICE); | ||
1673 | |||
1667 | /* We drop the frame if we failed to allocate a new buffer */ | 1674 | /* We drop the frame if we failed to allocate a new buffer */ |
1668 | if (unlikely(!newskb || !(bdp->status & RXBD_LAST) || | 1675 | if (unlikely(!newskb || !(bdp->status & RXBD_LAST) || |
1669 | bdp->status & RXBD_ERR)) { | 1676 | bdp->status & RXBD_ERR)) { |
@@ -1672,14 +1679,8 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) | |||
1672 | if (unlikely(!newskb)) | 1679 | if (unlikely(!newskb)) |
1673 | newskb = skb; | 1680 | newskb = skb; |
1674 | 1681 | ||
1675 | if (skb) { | 1682 | if (skb) |
1676 | dma_unmap_single(&priv->dev->dev, | ||
1677 | bdp->bufPtr, | ||
1678 | priv->rx_buffer_size, | ||
1679 | DMA_FROM_DEVICE); | ||
1680 | |||
1681 | dev_kfree_skb_any(skb); | 1683 | dev_kfree_skb_any(skb); |
1682 | } | ||
1683 | } else { | 1684 | } else { |
1684 | /* Increment the number of packets */ | 1685 | /* Increment the number of packets */ |
1685 | dev->stats.rx_packets++; | 1686 | dev->stats.rx_packets++; |
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index f89fdc7bd774..9b9066c5b0e1 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 89ffc0757e01..5f954b01e21a 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/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index a3f732418c49..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); |
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"); | |||
90 | int mlx4_en_get_profile(struct mlx4_en_dev *mdev) | 90 | int 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 | ||
434 | static void mlx4_en_get_ringparam(struct net_device *dev, | 436 | static 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 |
89 | extern int mlx4_debug_level; | 89 | extern 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 cc022197e2a5..24f6d2585a6e 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 | ||
327 | struct mlx4_en_profile { | 331 | struct 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/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 72afe0aa6ca2..56c6f876042c 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 | ||
80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); | 80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); |
81 | MODULE_AUTHOR("Maintainer: help@myri.com"); | 81 | MODULE_AUTHOR("Maintainer: help@myri.com"); |
@@ -1392,6 +1392,7 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index) | |||
1392 | if (tx->req == tx->done) { | 1392 | if (tx->req == tx->done) { |
1393 | tx->queue_active = 0; | 1393 | tx->queue_active = 0; |
1394 | put_be32(htonl(1), tx->send_stop); | 1394 | put_be32(htonl(1), tx->send_stop); |
1395 | mb(); | ||
1395 | mmiowb(); | 1396 | mmiowb(); |
1396 | } | 1397 | } |
1397 | __netif_tx_unlock(dev_queue); | 1398 | __netif_tx_unlock(dev_queue); |
@@ -2864,6 +2865,7 @@ again: | |||
2864 | if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) { | 2865 | if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) { |
2865 | tx->queue_active = 1; | 2866 | tx->queue_active = 1; |
2866 | put_be32(htonl(1), tx->send_go); | 2867 | put_be32(htonl(1), tx->send_go); |
2868 | mb(); | ||
2867 | mmiowb(); | 2869 | mmiowb(); |
2868 | } | 2870 | } |
2869 | tx->pkt_start++; | 2871 | tx->pkt_start++; |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 2c3bb36cda17..5ddca4e3d27b 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 | ||
39 | static char version[] __devinitdata = | 39 | static 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 |
52 | static u64 readq(void __iomem *reg) | 52 | static 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 | ||
58 | static void writeq(u64 val, void __iomem *reg) | 57 | static 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. */ |
410 | static int serdes_init_niu(struct niu *np) | 409 | static 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 | ||
446 | static 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 | |||
545 | static 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 | |||
447 | static int esr_read_rxtx_ctrl(struct niu *np, unsigned long chan, u32 *val) | 663 | static 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 | ||
2174 | static 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 | |||
2179 | static 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 | |||
1958 | static const struct niu_phy_ops phy_ops_1g_rgmii = { | 2184 | static 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 | ||
1963 | static const struct niu_phy_ops phy_ops_10g_fiber_niu = { | 2189 | static 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 | ||
2002 | static const struct niu_phy_template phy_template_niu = { | 2228 | static 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 | ||
2233 | static const struct niu_phy_template phy_template_niu_10g_serdes = { | ||
2234 | .ops = &phy_ops_10g_serdes_niu, | ||
2235 | .phy_addr_base = 0, | ||
2236 | }; | ||
2237 | |||
2238 | static const struct niu_phy_template phy_template_niu_1g_serdes = { | ||
2239 | .ops = &phy_ops_1g_serdes_niu, | ||
2240 | .phy_addr_base = 0, | ||
2241 | }; | ||
2242 | |||
2007 | static const struct niu_phy_template phy_template_10g_fiber = { | 2243 | static 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 | |
@@ -7212,6 +7465,12 @@ static int __devinit niu_phy_type_prop_decode(struct niu *np, | |||
7212 | np->flags |= NIU_FLAGS_10G; | 7465 | np->flags |= NIU_FLAGS_10G; |
7213 | np->flags &= ~NIU_FLAGS_FIBER; | 7466 | np->flags &= ~NIU_FLAGS_FIBER; |
7214 | np->mac_xcvr = MAC_XCVR_XPCS; | 7467 | np->mac_xcvr = MAC_XCVR_XPCS; |
7468 | } else if (!strcmp(phy_prop, "xgsd") || !strcmp(phy_prop, "gsd")) { | ||
7469 | /* 10G Serdes or 1G Serdes, default to 10G */ | ||
7470 | np->flags |= NIU_FLAGS_10G; | ||
7471 | np->flags &= ~NIU_FLAGS_FIBER; | ||
7472 | np->flags |= NIU_FLAGS_XCVR_SERDES; | ||
7473 | np->mac_xcvr = MAC_XCVR_XPCS; | ||
7215 | } else { | 7474 | } else { |
7216 | return -EINVAL; | 7475 | return -EINVAL; |
7217 | } | 7476 | } |
@@ -7740,6 +7999,8 @@ static int __devinit walk_phys(struct niu *np, struct niu_parent *parent) | |||
7740 | u32 val; | 7999 | u32 val; |
7741 | int err; | 8000 | int err; |
7742 | 8001 | ||
8002 | num_10g = num_1g = 0; | ||
8003 | |||
7743 | if (!strcmp(np->vpd.model, NIU_ALONSO_MDL_STR) || | 8004 | if (!strcmp(np->vpd.model, NIU_ALONSO_MDL_STR) || |
7744 | !strcmp(np->vpd.model, NIU_KIMI_MDL_STR)) { | 8005 | !strcmp(np->vpd.model, NIU_KIMI_MDL_STR)) { |
7745 | num_10g = 0; | 8006 | num_10g = 0; |
@@ -7756,6 +8017,16 @@ static int __devinit walk_phys(struct niu *np, struct niu_parent *parent) | |||
7756 | parent->num_ports = 2; | 8017 | parent->num_ports = 2; |
7757 | val = (phy_encode(PORT_TYPE_10G, 0) | | 8018 | val = (phy_encode(PORT_TYPE_10G, 0) | |
7758 | phy_encode(PORT_TYPE_10G, 1)); | 8019 | phy_encode(PORT_TYPE_10G, 1)); |
8020 | } else if ((np->flags & NIU_FLAGS_XCVR_SERDES) && | ||
8021 | (parent->plat_type == PLAT_TYPE_NIU)) { | ||
8022 | /* this is the Monza case */ | ||
8023 | if (np->flags & NIU_FLAGS_10G) { | ||
8024 | val = (phy_encode(PORT_TYPE_10G, 0) | | ||
8025 | phy_encode(PORT_TYPE_10G, 1)); | ||
8026 | } else { | ||
8027 | val = (phy_encode(PORT_TYPE_1G, 0) | | ||
8028 | phy_encode(PORT_TYPE_1G, 1)); | ||
8029 | } | ||
7759 | } else { | 8030 | } else { |
7760 | err = fill_phy_probe_info(np, parent, info); | 8031 | err = fill_phy_probe_info(np, parent, info); |
7761 | if (err) | 8032 | if (err) |
@@ -8653,7 +8924,9 @@ static void __devinit niu_device_announce(struct niu *np) | |||
8653 | dev->name, | 8924 | dev->name, |
8654 | (np->flags & NIU_FLAGS_XMAC ? "XMAC" : "BMAC"), | 8925 | (np->flags & NIU_FLAGS_XMAC ? "XMAC" : "BMAC"), |
8655 | (np->flags & NIU_FLAGS_10G ? "10G" : "1G"), | 8926 | (np->flags & NIU_FLAGS_10G ? "10G" : "1G"), |
8656 | (np->flags & NIU_FLAGS_FIBER ? "FIBER" : "COPPER"), | 8927 | (np->flags & NIU_FLAGS_FIBER ? "FIBER" : |
8928 | (np->flags & NIU_FLAGS_XCVR_SERDES ? "SERDES" : | ||
8929 | "COPPER")), | ||
8657 | (np->mac_xcvr == MAC_XCVR_MII ? "MII" : | 8930 | (np->mac_xcvr == MAC_XCVR_MII ? "MII" : |
8658 | (np->mac_xcvr == MAC_XCVR_PCS ? "PCS" : "XPCS")), | 8931 | (np->mac_xcvr == MAC_XCVR_PCS ? "PCS" : "XPCS")), |
8659 | np->vpd.phy_type); | 8932 | 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 | ||
230 | static 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 | |||
247 | static 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 | |||
230 | static int m88e1145_config_init(struct phy_device *phydev) | 283 | static 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 6afd35f62d77..868812ff6de8 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 e976c1c60095..bce918bd3cdd 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); |
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 8b412426d61b..f188736028d7 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/smc911x.c b/drivers/net/smc911x.c index e0b972d36664..a91b7351150d 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -2048,7 +2048,9 @@ err_out: | |||
2048 | */ | 2048 | */ |
2049 | static int smc911x_drv_probe(struct platform_device *pdev) | 2049 | static int smc911x_drv_probe(struct platform_device *pdev) |
2050 | { | 2050 | { |
2051 | #ifdef SMC_DYNAMIC_BUS_CONFIG | ||
2051 | struct smc911x_platdata *pd = pdev->dev.platform_data; | 2052 | struct smc911x_platdata *pd = pdev->dev.platform_data; |
2053 | #endif | ||
2052 | struct net_device *ndev; | 2054 | struct net_device *ndev; |
2053 | struct resource *res; | 2055 | struct resource *res; |
2054 | struct smc911x_local *lp; | 2056 | struct smc911x_local *lp; |
@@ -2180,9 +2182,9 @@ static int smc911x_drv_resume(struct platform_device *dev) | |||
2180 | 2182 | ||
2181 | if (netif_running(ndev)) { | 2183 | if (netif_running(ndev)) { |
2182 | smc911x_reset(ndev); | 2184 | smc911x_reset(ndev); |
2183 | smc911x_enable(ndev); | ||
2184 | if (lp->phy_type != 0) | 2185 | if (lp->phy_type != 0) |
2185 | smc911x_phy_configure(&lp->phy_configure); | 2186 | smc911x_phy_configure(&lp->phy_configure); |
2187 | smc911x_enable(ndev); | ||
2186 | netif_device_attach(ndev); | 2188 | netif_device_attach(ndev); |
2187 | } | 2189 | } |
2188 | } | 2190 | } |
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..e12cdb4543b4 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1444,6 +1444,10 @@ static const struct usb_device_id products [] = { | |||
1444 | // Apple USB Ethernet Adapter | 1444 | // Apple USB Ethernet Adapter |
1445 | USB_DEVICE(0x05ac, 0x1402), | 1445 | USB_DEVICE(0x05ac, 0x1402), |
1446 | .driver_info = (unsigned long) &ax88772_info, | 1446 | .driver_info = (unsigned long) &ax88772_info, |
1447 | }, { | ||
1448 | // Cables-to-Go USB Ethernet Adapter | ||
1449 | USB_DEVICE(0x0b95, 0x772a), | ||
1450 | .driver_info = (unsigned long) &ax88772_info, | ||
1447 | }, | 1451 | }, |
1448 | { }, // END | 1452 | { }, // END |
1449 | }; | 1453 | }; |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 448772f6cb33..dcbc152306e2 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -2294,7 +2294,7 @@ static void velocity_set_multi(struct net_device *dev) | |||
2294 | } | 2294 | } |
2295 | 2295 | ||
2296 | mac_set_cam_mask(regs, vptr->mCAMmask); | 2296 | mac_set_cam_mask(regs, vptr->mCAMmask); |
2297 | rx_mode = (RCR_AM | RCR_AB); | 2297 | rx_mode = RCR_AM | RCR_AB | RCR_AP; |
2298 | } | 2298 | } |
2299 | if (dev->mtu > 1500) | 2299 | if (dev->mtu > 1500) |
2300 | rx_mode |= RCR_AL; | 2300 | rx_mode |= RCR_AL; |
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h index 8431030b0e11..d2c7a56b8b59 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 | */ |
923 | struct hostap_skb_tx_data { | 925 | struct 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/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index 66add5e77e00..e1399d0b55d3 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 | ||