diff options
| -rw-r--r-- | drivers/net/3c59x.c | 28 | ||||
| -rw-r--r-- | drivers/net/mv643xx_eth.c | 10 | ||||
| -rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 42 | ||||
| -rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 5 | ||||
| -rw-r--r-- | drivers/net/r8169.c | 14 | ||||
| -rw-r--r-- | drivers/net/sky2.c | 24 | ||||
| -rw-r--r-- | drivers/net/tokenring/ibmtr.c | 25 | ||||
| -rw-r--r-- | drivers/net/via-rhine.c | 32 | ||||
| -rw-r--r-- | drivers/net/wan/z85230.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_phy.c | 10 | ||||
| -rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 10 |
12 files changed, 145 insertions, 63 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 72995777f809..b406ecfa7268 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
| @@ -858,19 +858,7 @@ static struct eisa_device_id vortex_eisa_ids[] = { | |||
| 858 | }; | 858 | }; |
| 859 | MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids); | 859 | MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids); |
| 860 | 860 | ||
| 861 | static int vortex_eisa_probe(struct device *device); | 861 | static int __init vortex_eisa_probe(struct device *device) |
| 862 | static int vortex_eisa_remove(struct device *device); | ||
| 863 | |||
| 864 | static struct eisa_driver vortex_eisa_driver = { | ||
| 865 | .id_table = vortex_eisa_ids, | ||
| 866 | .driver = { | ||
| 867 | .name = "3c59x", | ||
| 868 | .probe = vortex_eisa_probe, | ||
| 869 | .remove = vortex_eisa_remove | ||
| 870 | } | ||
| 871 | }; | ||
| 872 | |||
| 873 | static int vortex_eisa_probe(struct device *device) | ||
| 874 | { | 862 | { |
| 875 | void __iomem *ioaddr; | 863 | void __iomem *ioaddr; |
| 876 | struct eisa_device *edev; | 864 | struct eisa_device *edev; |
| @@ -893,7 +881,7 @@ static int vortex_eisa_probe(struct device *device) | |||
| 893 | return 0; | 881 | return 0; |
| 894 | } | 882 | } |
| 895 | 883 | ||
| 896 | static int vortex_eisa_remove(struct device *device) | 884 | static int __devexit vortex_eisa_remove(struct device *device) |
| 897 | { | 885 | { |
| 898 | struct eisa_device *edev; | 886 | struct eisa_device *edev; |
| 899 | struct net_device *dev; | 887 | struct net_device *dev; |
| @@ -918,7 +906,17 @@ static int vortex_eisa_remove(struct device *device) | |||
| 918 | free_netdev(dev); | 906 | free_netdev(dev); |
| 919 | return 0; | 907 | return 0; |
| 920 | } | 908 | } |
| 921 | #endif | 909 | |
| 910 | static struct eisa_driver vortex_eisa_driver = { | ||
| 911 | .id_table = vortex_eisa_ids, | ||
| 912 | .driver = { | ||
| 913 | .name = "3c59x", | ||
| 914 | .probe = vortex_eisa_probe, | ||
| 915 | .remove = __devexit_p(vortex_eisa_remove) | ||
| 916 | } | ||
| 917 | }; | ||
| 918 | |||
| 919 | #endif /* CONFIG_EISA */ | ||
| 922 | 920 | ||
| 923 | /* returns count found (>= 0), or negative on error */ | 921 | /* returns count found (>= 0), or negative on error */ |
| 924 | static int __init vortex_eisa_init(void) | 922 | static int __init vortex_eisa_init(void) |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 9ba21e0f27c5..1ee27c360a4b 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
| @@ -787,6 +787,12 @@ static int mv643xx_eth_open(struct net_device *dev) | |||
| 787 | unsigned int size; | 787 | unsigned int size; |
| 788 | int err; | 788 | int err; |
| 789 | 789 | ||
| 790 | /* Clear any pending ethernet port interrupts */ | ||
| 791 | mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0); | ||
| 792 | mv_write(MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0); | ||
| 793 | /* wait for previous write to complete */ | ||
| 794 | mv_read (MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num)); | ||
| 795 | |||
| 790 | err = request_irq(dev->irq, mv643xx_eth_int_handler, | 796 | err = request_irq(dev->irq, mv643xx_eth_int_handler, |
| 791 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); | 797 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); |
| 792 | if (err) { | 798 | if (err) { |
| @@ -875,10 +881,6 @@ static int mv643xx_eth_open(struct net_device *dev) | |||
| 875 | 881 | ||
| 876 | mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */ | 882 | mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */ |
| 877 | 883 | ||
| 878 | /* Clear any pending ethernet port interrupts */ | ||
| 879 | mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0); | ||
| 880 | mv_write(MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0); | ||
| 881 | |||
| 882 | eth_port_start(dev); | 884 | eth_port_start(dev); |
| 883 | 885 | ||
| 884 | /* Interrupt Coalescing */ | 886 | /* Interrupt Coalescing */ |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index b05dc6ed7fb7..ac02b3b60f92 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
| @@ -181,6 +181,7 @@ struct myri10ge_priv { | |||
| 181 | int intr_coal_delay; | 181 | int intr_coal_delay; |
| 182 | __be32 __iomem *intr_coal_delay_ptr; | 182 | __be32 __iomem *intr_coal_delay_ptr; |
| 183 | int mtrr; | 183 | int mtrr; |
| 184 | int wc_enabled; | ||
| 184 | int wake_queue; | 185 | int wake_queue; |
| 185 | int stop_queue; | 186 | int stop_queue; |
| 186 | int down_cnt; | 187 | int down_cnt; |
| @@ -717,6 +718,8 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
| 717 | int status; | 718 | int status; |
| 718 | size_t bytes; | 719 | size_t bytes; |
| 719 | u32 len; | 720 | u32 len; |
| 721 | struct page *dmatest_page; | ||
| 722 | dma_addr_t dmatest_bus; | ||
| 720 | 723 | ||
| 721 | /* try to send a reset command to the card to see if it | 724 | /* try to send a reset command to the card to see if it |
| 722 | * is alive */ | 725 | * is alive */ |
| @@ -726,6 +729,11 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
| 726 | dev_err(&mgp->pdev->dev, "failed reset\n"); | 729 | dev_err(&mgp->pdev->dev, "failed reset\n"); |
| 727 | return -ENXIO; | 730 | return -ENXIO; |
| 728 | } | 731 | } |
| 732 | dmatest_page = alloc_page(GFP_KERNEL); | ||
| 733 | if (!dmatest_page) | ||
| 734 | return -ENOMEM; | ||
| 735 | dmatest_bus = pci_map_page(mgp->pdev, dmatest_page, 0, PAGE_SIZE, | ||
| 736 | DMA_BIDIRECTIONAL); | ||
| 729 | 737 | ||
| 730 | /* Now exchange information about interrupts */ | 738 | /* Now exchange information about interrupts */ |
| 731 | 739 | ||
| @@ -764,8 +772,8 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
| 764 | 772 | ||
| 765 | len = mgp->tx.boundary; | 773 | len = mgp->tx.boundary; |
| 766 | 774 | ||
| 767 | cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->rx_done.bus); | 775 | cmd.data0 = MYRI10GE_LOWPART_TO_U32(dmatest_bus); |
| 768 | cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->rx_done.bus); | 776 | cmd.data1 = MYRI10GE_HIGHPART_TO_U32(dmatest_bus); |
| 769 | cmd.data2 = len * 0x10000; | 777 | cmd.data2 = len * 0x10000; |
| 770 | status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); | 778 | status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); |
| 771 | if (status == 0) | 779 | if (status == 0) |
| @@ -774,8 +782,8 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
| 774 | else | 782 | else |
| 775 | dev_warn(&mgp->pdev->dev, "DMA read benchmark failed: %d\n", | 783 | dev_warn(&mgp->pdev->dev, "DMA read benchmark failed: %d\n", |
| 776 | status); | 784 | status); |
| 777 | cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->rx_done.bus); | 785 | cmd.data0 = MYRI10GE_LOWPART_TO_U32(dmatest_bus); |
| 778 | cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->rx_done.bus); | 786 | cmd.data1 = MYRI10GE_HIGHPART_TO_U32(dmatest_bus); |
| 779 | cmd.data2 = len * 0x1; | 787 | cmd.data2 = len * 0x1; |
| 780 | status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); | 788 | status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); |
| 781 | if (status == 0) | 789 | if (status == 0) |
| @@ -785,8 +793,8 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
| 785 | dev_warn(&mgp->pdev->dev, "DMA write benchmark failed: %d\n", | 793 | dev_warn(&mgp->pdev->dev, "DMA write benchmark failed: %d\n", |
| 786 | status); | 794 | status); |
| 787 | 795 | ||
| 788 | cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->rx_done.bus); | 796 | cmd.data0 = MYRI10GE_LOWPART_TO_U32(dmatest_bus); |
| 789 | cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->rx_done.bus); | 797 | cmd.data1 = MYRI10GE_HIGHPART_TO_U32(dmatest_bus); |
| 790 | cmd.data2 = len * 0x10001; | 798 | cmd.data2 = len * 0x10001; |
| 791 | status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); | 799 | status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); |
| 792 | if (status == 0) | 800 | if (status == 0) |
| @@ -796,6 +804,9 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
| 796 | dev_warn(&mgp->pdev->dev, | 804 | dev_warn(&mgp->pdev->dev, |
| 797 | "DMA read/write benchmark failed: %d\n", status); | 805 | "DMA read/write benchmark failed: %d\n", status); |
| 798 | 806 | ||
| 807 | pci_unmap_page(mgp->pdev, dmatest_bus, PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
| 808 | put_page(dmatest_page); | ||
| 809 | |||
| 799 | memset(mgp->rx_done.entry, 0, bytes); | 810 | memset(mgp->rx_done.entry, 0, bytes); |
| 800 | 811 | ||
| 801 | /* reset mcp/driver shared state back to 0 */ | 812 | /* reset mcp/driver shared state back to 0 */ |
| @@ -1375,7 +1386,7 @@ myri10ge_get_ethtool_stats(struct net_device *netdev, | |||
| 1375 | data[i] = ((unsigned long *)&mgp->stats)[i]; | 1386 | data[i] = ((unsigned long *)&mgp->stats)[i]; |
| 1376 | 1387 | ||
| 1377 | data[i++] = (unsigned int)mgp->tx.boundary; | 1388 | data[i++] = (unsigned int)mgp->tx.boundary; |
| 1378 | data[i++] = (unsigned int)(mgp->mtrr >= 0); | 1389 | data[i++] = (unsigned int)mgp->wc_enabled; |
| 1379 | data[i++] = (unsigned int)mgp->pdev->irq; | 1390 | data[i++] = (unsigned int)mgp->pdev->irq; |
| 1380 | data[i++] = (unsigned int)mgp->msi_enabled; | 1391 | data[i++] = (unsigned int)mgp->msi_enabled; |
| 1381 | data[i++] = (unsigned int)mgp->read_dma; | 1392 | data[i++] = (unsigned int)mgp->read_dma; |
| @@ -1456,6 +1467,8 @@ static int myri10ge_allocate_rings(struct net_device *dev) | |||
| 1456 | status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SEND_RING_SIZE, &cmd, 0); | 1467 | status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SEND_RING_SIZE, &cmd, 0); |
| 1457 | tx_ring_size = cmd.data0; | 1468 | tx_ring_size = cmd.data0; |
| 1458 | status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_RX_RING_SIZE, &cmd, 0); | 1469 | status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_RX_RING_SIZE, &cmd, 0); |
| 1470 | if (status != 0) | ||
| 1471 | return status; | ||
| 1459 | rx_ring_size = cmd.data0; | 1472 | rx_ring_size = cmd.data0; |
| 1460 | 1473 | ||
| 1461 | tx_ring_entries = tx_ring_size / sizeof(struct mcp_kreq_ether_send); | 1474 | tx_ring_entries = tx_ring_size / sizeof(struct mcp_kreq_ether_send); |
| @@ -1463,6 +1476,8 @@ static int myri10ge_allocate_rings(struct net_device *dev) | |||
| 1463 | mgp->tx.mask = tx_ring_entries - 1; | 1476 | mgp->tx.mask = tx_ring_entries - 1; |
| 1464 | mgp->rx_small.mask = mgp->rx_big.mask = rx_ring_entries - 1; | 1477 | mgp->rx_small.mask = mgp->rx_big.mask = rx_ring_entries - 1; |
| 1465 | 1478 | ||
| 1479 | status = -ENOMEM; | ||
| 1480 | |||
| 1466 | /* allocate the host shadow rings */ | 1481 | /* allocate the host shadow rings */ |
| 1467 | 1482 | ||
| 1468 | bytes = 8 + (MYRI10GE_MAX_SEND_DESC_TSO + 4) | 1483 | bytes = 8 + (MYRI10GE_MAX_SEND_DESC_TSO + 4) |
| @@ -1735,7 +1750,7 @@ static int myri10ge_open(struct net_device *dev) | |||
| 1735 | goto abort_with_irq; | 1750 | goto abort_with_irq; |
| 1736 | } | 1751 | } |
| 1737 | 1752 | ||
| 1738 | if (myri10ge_wcfifo && mgp->mtrr >= 0) { | 1753 | if (myri10ge_wcfifo && mgp->wc_enabled) { |
| 1739 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; | 1754 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; |
| 1740 | mgp->rx_small.wc_fifo = | 1755 | mgp->rx_small.wc_fifo = |
| 1741 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; | 1756 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; |
| @@ -2510,6 +2525,12 @@ static void myri10ge_select_firmware(struct myri10ge_priv *mgp) | |||
| 2510 | bridge->vendor, bridge->device); | 2525 | bridge->vendor, bridge->device); |
| 2511 | mgp->tx.boundary = 4096; | 2526 | mgp->tx.boundary = 4096; |
| 2512 | mgp->fw_name = myri10ge_fw_aligned; | 2527 | mgp->fw_name = myri10ge_fw_aligned; |
| 2528 | } else if (bridge && | ||
| 2529 | bridge->vendor == PCI_VENDOR_ID_SGI && | ||
| 2530 | bridge->device == 0x4002 /* TIOCE pcie-port */ ) { | ||
| 2531 | /* this pcie bridge does not support 4K rdma request */ | ||
| 2532 | mgp->tx.boundary = 2048; | ||
| 2533 | mgp->fw_name = myri10ge_fw_aligned; | ||
| 2513 | } | 2534 | } |
| 2514 | } else { | 2535 | } else { |
| 2515 | if (myri10ge_force_firmware == 1) { | 2536 | if (myri10ge_force_firmware == 1) { |
| @@ -2830,9 +2851,12 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 2830 | mgp->board_span = pci_resource_len(pdev, 0); | 2851 | mgp->board_span = pci_resource_len(pdev, 0); |
| 2831 | mgp->iomem_base = pci_resource_start(pdev, 0); | 2852 | mgp->iomem_base = pci_resource_start(pdev, 0); |
| 2832 | mgp->mtrr = -1; | 2853 | mgp->mtrr = -1; |
| 2854 | mgp->wc_enabled = 0; | ||
| 2833 | #ifdef CONFIG_MTRR | 2855 | #ifdef CONFIG_MTRR |
| 2834 | mgp->mtrr = mtrr_add(mgp->iomem_base, mgp->board_span, | 2856 | mgp->mtrr = mtrr_add(mgp->iomem_base, mgp->board_span, |
| 2835 | MTRR_TYPE_WRCOMB, 1); | 2857 | MTRR_TYPE_WRCOMB, 1); |
| 2858 | if (mgp->mtrr >= 0) | ||
| 2859 | mgp->wc_enabled = 1; | ||
| 2836 | #endif | 2860 | #endif |
| 2837 | /* Hack. need to get rid of these magic numbers */ | 2861 | /* Hack. need to get rid of these magic numbers */ |
| 2838 | mgp->sram_size = | 2862 | mgp->sram_size = |
| @@ -2927,7 +2951,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 2927 | dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n", | 2951 | dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n", |
| 2928 | (mgp->msi_enabled ? "MSI" : "xPIC"), | 2952 | (mgp->msi_enabled ? "MSI" : "xPIC"), |
| 2929 | netdev->irq, mgp->tx.boundary, mgp->fw_name, | 2953 | netdev->irq, mgp->tx.boundary, mgp->fw_name, |
| 2930 | (mgp->mtrr >= 0 ? "Enabled" : "Disabled")); | 2954 | (mgp->wc_enabled ? "Enabled" : "Disabled")); |
| 2931 | 2955 | ||
| 2932 | return 0; | 2956 | return 0; |
| 2933 | 2957 | ||
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index a2877f33fa85..1be55702557d 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
| @@ -228,7 +228,7 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
| 228 | &adapter->ctx_desc_pdev); | 228 | &adapter->ctx_desc_pdev); |
| 229 | 229 | ||
| 230 | printk("ctx_desc_phys_addr: 0x%llx\n", | 230 | printk("ctx_desc_phys_addr: 0x%llx\n", |
| 231 | (u64) adapter->ctx_desc_phys_addr); | 231 | (unsigned long long) adapter->ctx_desc_phys_addr); |
| 232 | if (addr == NULL) { | 232 | if (addr == NULL) { |
| 233 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); | 233 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); |
| 234 | err = -ENOMEM; | 234 | err = -ENOMEM; |
| @@ -247,7 +247,8 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
| 247 | adapter->max_tx_desc_count, | 247 | adapter->max_tx_desc_count, |
| 248 | (dma_addr_t *) & hw->cmd_desc_phys_addr, | 248 | (dma_addr_t *) & hw->cmd_desc_phys_addr, |
| 249 | &adapter->ahw.cmd_desc_pdev); | 249 | &adapter->ahw.cmd_desc_pdev); |
| 250 | printk("cmd_desc_phys_addr: 0x%llx\n", (u64) hw->cmd_desc_phys_addr); | 250 | printk("cmd_desc_phys_addr: 0x%llx\n", |
| 251 | (unsigned long long) hw->cmd_desc_phys_addr); | ||
| 251 | 252 | ||
| 252 | if (addr == NULL) { | 253 | if (addr == NULL) { |
| 253 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); | 254 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 15d954e50cae..521b5f0618a4 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
| @@ -572,8 +572,8 @@ static void rtl8169_xmii_reset_enable(void __iomem *ioaddr) | |||
| 572 | { | 572 | { |
| 573 | unsigned int val; | 573 | unsigned int val; |
| 574 | 574 | ||
| 575 | mdio_write(ioaddr, MII_BMCR, BMCR_RESET); | 575 | val = mdio_read(ioaddr, MII_BMCR) | BMCR_RESET; |
| 576 | val = mdio_read(ioaddr, MII_BMCR); | 576 | mdio_write(ioaddr, MII_BMCR, val & 0xffff); |
| 577 | } | 577 | } |
| 578 | 578 | ||
| 579 | static void rtl8169_check_link_status(struct net_device *dev, | 579 | static void rtl8169_check_link_status(struct net_device *dev, |
| @@ -1368,11 +1368,7 @@ static inline void rtl8169_request_timer(struct net_device *dev) | |||
| 1368 | (tp->phy_version >= RTL_GIGA_PHY_VER_H)) | 1368 | (tp->phy_version >= RTL_GIGA_PHY_VER_H)) |
| 1369 | return; | 1369 | return; |
| 1370 | 1370 | ||
| 1371 | init_timer(timer); | 1371 | mod_timer(timer, jiffies + RTL8169_PHY_TIMEOUT); |
| 1372 | timer->expires = jiffies + RTL8169_PHY_TIMEOUT; | ||
| 1373 | timer->data = (unsigned long)(dev); | ||
| 1374 | timer->function = rtl8169_phy_timer; | ||
| 1375 | add_timer(timer); | ||
| 1376 | } | 1372 | } |
| 1377 | 1373 | ||
| 1378 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1374 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| @@ -1685,6 +1681,10 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1685 | tp->mmio_addr = ioaddr; | 1681 | tp->mmio_addr = ioaddr; |
| 1686 | tp->align = rtl_cfg_info[ent->driver_data].align; | 1682 | tp->align = rtl_cfg_info[ent->driver_data].align; |
| 1687 | 1683 | ||
| 1684 | init_timer(&tp->timer); | ||
| 1685 | tp->timer.data = (unsigned long) dev; | ||
| 1686 | tp->timer.function = rtl8169_phy_timer; | ||
| 1687 | |||
| 1688 | spin_lock_init(&tp->lock); | 1688 | spin_lock_init(&tp->lock); |
| 1689 | 1689 | ||
| 1690 | rc = register_netdev(dev); | 1690 | rc = register_netdev(dev); |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 53839979cfb8..ab0ab92583fe 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
| @@ -2165,9 +2165,27 @@ force_update: | |||
| 2165 | /* fall through */ | 2165 | /* fall through */ |
| 2166 | #endif | 2166 | #endif |
| 2167 | case OP_RXCHKS: | 2167 | case OP_RXCHKS: |
| 2168 | skb = sky2->rx_ring[sky2->rx_next].skb; | 2168 | if (!sky2->rx_csum) |
| 2169 | skb->ip_summed = CHECKSUM_COMPLETE; | 2169 | break; |
| 2170 | skb->csum = status & 0xffff; | 2170 | |
| 2171 | /* Both checksum counters are programmed to start at | ||
| 2172 | * the same offset, so unless there is a problem they | ||
| 2173 | * should match. This failure is an early indication that | ||
| 2174 | * hardware receive checksumming won't work. | ||
| 2175 | */ | ||
| 2176 | if (likely(status >> 16 == (status & 0xffff))) { | ||
| 2177 | skb = sky2->rx_ring[sky2->rx_next].skb; | ||
| 2178 | skb->ip_summed = CHECKSUM_COMPLETE; | ||
| 2179 | skb->csum = status & 0xffff; | ||
| 2180 | } else { | ||
| 2181 | printk(KERN_NOTICE PFX "%s: hardware receive " | ||
| 2182 | "checksum problem (status = %#x)\n", | ||
| 2183 | dev->name, status); | ||
| 2184 | sky2->rx_csum = 0; | ||
| 2185 | sky2_write32(sky2->hw, | ||
| 2186 | Q_ADDR(rxqaddr[le->link], Q_CSR), | ||
| 2187 | BMU_DIS_RX_CHKSUM); | ||
| 2188 | } | ||
| 2171 | break; | 2189 | break; |
| 2172 | 2190 | ||
| 2173 | case OP_TXINDEXLE: | 2191 | case OP_TXINDEXLE: |
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 0d97e10ccac5..36202e94ee91 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
| @@ -186,7 +186,6 @@ static char __devinit *adapter_def(char type) | |||
| 186 | #define TRC_INITV 0x02 /* verbose init trace points */ | 186 | #define TRC_INITV 0x02 /* verbose init trace points */ |
| 187 | static unsigned char ibmtr_debug_trace = 0; | 187 | static unsigned char ibmtr_debug_trace = 0; |
| 188 | 188 | ||
| 189 | static int ibmtr_probe(struct net_device *dev); | ||
| 190 | static int ibmtr_probe1(struct net_device *dev, int ioaddr); | 189 | static int ibmtr_probe1(struct net_device *dev, int ioaddr); |
| 191 | static unsigned char get_sram_size(struct tok_info *adapt_info); | 190 | static unsigned char get_sram_size(struct tok_info *adapt_info); |
| 192 | static int trdev_init(struct net_device *dev); | 191 | static int trdev_init(struct net_device *dev); |
| @@ -335,17 +334,6 @@ static void ibmtr_cleanup_card(struct net_device *dev) | |||
| 335 | #endif | 334 | #endif |
| 336 | } | 335 | } |
| 337 | 336 | ||
| 338 | int ibmtr_probe_card(struct net_device *dev) | ||
| 339 | { | ||
| 340 | int err = ibmtr_probe(dev); | ||
| 341 | if (!err) { | ||
| 342 | err = register_netdev(dev); | ||
| 343 | if (err) | ||
| 344 | ibmtr_cleanup_card(dev); | ||
| 345 | } | ||
| 346 | return err; | ||
| 347 | } | ||
| 348 | |||
| 349 | /**************************************************************************** | 337 | /**************************************************************************** |
| 350 | * ibmtr_probe(): Routine specified in the network device structure | 338 | * ibmtr_probe(): Routine specified in the network device structure |
| 351 | * to probe for an IBM Token Ring Adapter. Routine outline: | 339 | * to probe for an IBM Token Ring Adapter. Routine outline: |
| @@ -358,7 +346,7 @@ int ibmtr_probe_card(struct net_device *dev) | |||
| 358 | * which references it. | 346 | * which references it. |
| 359 | ****************************************************************************/ | 347 | ****************************************************************************/ |
| 360 | 348 | ||
| 361 | static int ibmtr_probe(struct net_device *dev) | 349 | static int __init ibmtr_probe(struct net_device *dev) |
| 362 | { | 350 | { |
| 363 | int i; | 351 | int i; |
| 364 | int base_addr = dev->base_addr; | 352 | int base_addr = dev->base_addr; |
| @@ -378,6 +366,17 @@ static int ibmtr_probe(struct net_device *dev) | |||
| 378 | return -ENODEV; | 366 | return -ENODEV; |
| 379 | } | 367 | } |
| 380 | 368 | ||
| 369 | int __init ibmtr_probe_card(struct net_device *dev) | ||
| 370 | { | ||
| 371 | int err = ibmtr_probe(dev); | ||
| 372 | if (!err) { | ||
| 373 | err = register_netdev(dev); | ||
| 374 | if (err) | ||
| 375 | ibmtr_cleanup_card(dev); | ||
| 376 | } | ||
| 377 | return err; | ||
| 378 | } | ||
| 379 | |||
| 381 | /*****************************************************************************/ | 380 | /*****************************************************************************/ |
| 382 | 381 | ||
| 383 | static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | 382 | static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index ebbda1d8f542..f3a972e74e9a 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
| @@ -30,8 +30,8 @@ | |||
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | #define DRV_NAME "via-rhine" | 32 | #define DRV_NAME "via-rhine" |
| 33 | #define DRV_VERSION "1.4.2" | 33 | #define DRV_VERSION "1.4.3" |
| 34 | #define DRV_RELDATE "Sept-11-2006" | 34 | #define DRV_RELDATE "2007-03-06" |
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | /* A few user-configurable values. | 37 | /* A few user-configurable values. |
| @@ -105,6 +105,7 @@ static const int multicast_filter_limit = 32; | |||
| 105 | #include <asm/io.h> | 105 | #include <asm/io.h> |
| 106 | #include <asm/irq.h> | 106 | #include <asm/irq.h> |
| 107 | #include <asm/uaccess.h> | 107 | #include <asm/uaccess.h> |
| 108 | #include <linux/dmi.h> | ||
| 108 | 109 | ||
| 109 | /* These identify the driver base version and may not be removed. */ | 110 | /* These identify the driver base version and may not be removed. */ |
| 110 | static char version[] __devinitdata = | 111 | static char version[] __devinitdata = |
| @@ -1995,6 +1996,23 @@ static struct pci_driver rhine_driver = { | |||
| 1995 | .shutdown = rhine_shutdown, | 1996 | .shutdown = rhine_shutdown, |
| 1996 | }; | 1997 | }; |
| 1997 | 1998 | ||
| 1999 | static struct dmi_system_id __initdata rhine_dmi_table[] = { | ||
| 2000 | { | ||
| 2001 | .ident = "EPIA-M", | ||
| 2002 | .matches = { | ||
| 2003 | DMI_MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."), | ||
| 2004 | DMI_MATCH(DMI_BIOS_VERSION, "6.00 PG"), | ||
| 2005 | }, | ||
| 2006 | }, | ||
| 2007 | { | ||
| 2008 | .ident = "KV7", | ||
| 2009 | .matches = { | ||
| 2010 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), | ||
| 2011 | DMI_MATCH(DMI_BIOS_VERSION, "6.00 PG"), | ||
| 2012 | }, | ||
| 2013 | }, | ||
| 2014 | { NULL } | ||
| 2015 | }; | ||
| 1998 | 2016 | ||
| 1999 | static int __init rhine_init(void) | 2017 | static int __init rhine_init(void) |
| 2000 | { | 2018 | { |
| @@ -2002,6 +2020,16 @@ static int __init rhine_init(void) | |||
| 2002 | #ifdef MODULE | 2020 | #ifdef MODULE |
| 2003 | printk(version); | 2021 | printk(version); |
| 2004 | #endif | 2022 | #endif |
| 2023 | if (dmi_check_system(rhine_dmi_table)) { | ||
| 2024 | /* these BIOSes fail at PXE boot if chip is in D3 */ | ||
| 2025 | avoid_D3 = 1; | ||
| 2026 | printk(KERN_WARNING "%s: Broken BIOS detected, avoid_D3 " | ||
| 2027 | "enabled.\n", | ||
| 2028 | DRV_NAME); | ||
| 2029 | } | ||
| 2030 | else if (avoid_D3) | ||
| 2031 | printk(KERN_INFO "%s: avoid_D3 set.\n", DRV_NAME); | ||
| 2032 | |||
| 2005 | return pci_register_driver(&rhine_driver); | 2033 | return pci_register_driver(&rhine_driver); |
| 2006 | } | 2034 | } |
| 2007 | 2035 | ||
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index 8dbcf83bb5f3..8b4540bfc1b0 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c | |||
| @@ -407,7 +407,7 @@ static void z8530_tx(struct z8530_channel *c) | |||
| 407 | while(c->txcount) { | 407 | while(c->txcount) { |
| 408 | /* FIFO full ? */ | 408 | /* FIFO full ? */ |
| 409 | if(!(read_zsreg(c, R0)&4)) | 409 | if(!(read_zsreg(c, R0)&4)) |
| 410 | break; | 410 | return; |
| 411 | c->txcount--; | 411 | c->txcount--; |
| 412 | /* | 412 | /* |
| 413 | * Shovel out the byte | 413 | * Shovel out the byte |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index e594af46ff05..80cb88eb98c6 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
| @@ -1858,9 +1858,6 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id) | |||
| 1858 | 1858 | ||
| 1859 | spin_lock(&bcm->irq_lock); | 1859 | spin_lock(&bcm->irq_lock); |
| 1860 | 1860 | ||
| 1861 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); | ||
| 1862 | assert(bcm->current_core->id == BCM43xx_COREID_80211); | ||
| 1863 | |||
| 1864 | reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); | 1861 | reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); |
| 1865 | if (reason == 0xffffffff) { | 1862 | if (reason == 0xffffffff) { |
| 1866 | /* irq not for us (shared irq) */ | 1863 | /* irq not for us (shared irq) */ |
| @@ -1871,6 +1868,9 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id) | |||
| 1871 | if (!reason) | 1868 | if (!reason) |
| 1872 | goto out; | 1869 | goto out; |
| 1873 | 1870 | ||
| 1871 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); | ||
| 1872 | assert(bcm->current_core->id == BCM43xx_COREID_80211); | ||
| 1873 | |||
| 1874 | bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON) | 1874 | bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON) |
| 1875 | & 0x0001DC00; | 1875 | & 0x0001DC00; |
| 1876 | bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON) | 1876 | bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON) |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index 3a5c9c2b2150..cae89258a640 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c | |||
| @@ -859,6 +859,11 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm) | |||
| 859 | bcm43xx_radio_write16(bcm, 0x005D, 0x0088); | 859 | bcm43xx_radio_write16(bcm, 0x005D, 0x0088); |
| 860 | bcm43xx_radio_write16(bcm, 0x005E, 0x0088); | 860 | bcm43xx_radio_write16(bcm, 0x005E, 0x0088); |
| 861 | bcm43xx_radio_write16(bcm, 0x007D, 0x0088); | 861 | bcm43xx_radio_write16(bcm, 0x007D, 0x0088); |
| 862 | bcm43xx_shm_write32(bcm, BCM43xx_SHM_SHARED, | ||
| 863 | BCM43xx_UCODEFLAGS_OFFSET, | ||
| 864 | (bcm43xx_shm_read32(bcm, BCM43xx_SHM_SHARED, | ||
| 865 | BCM43xx_UCODEFLAGS_OFFSET) | ||
| 866 | | 0x00000200)); | ||
| 862 | } | 867 | } |
| 863 | if (radio->revision == 8) { | 868 | if (radio->revision == 8) { |
| 864 | bcm43xx_radio_write16(bcm, 0x0051, 0x0000); | 869 | bcm43xx_radio_write16(bcm, 0x0051, 0x0000); |
| @@ -941,7 +946,8 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm) | |||
| 941 | bcm43xx_phy_write(bcm, 0x0038, 0x0668); | 946 | bcm43xx_phy_write(bcm, 0x0038, 0x0668); |
| 942 | bcm43xx_radio_set_txpower_bg(bcm, 0xFFFF, 0xFFFF, 0xFFFF); | 947 | bcm43xx_radio_set_txpower_bg(bcm, 0xFFFF, 0xFFFF, 0xFFFF); |
| 943 | if (radio->revision <= 5) | 948 | if (radio->revision <= 5) |
| 944 | bcm43xx_phy_write(bcm, 0x005D, bcm43xx_phy_read(bcm, 0x005D) | 0x0003); | 949 | bcm43xx_phy_write(bcm, 0x005D, (bcm43xx_phy_read(bcm, 0x005D) |
| 950 | & 0xFF80) | 0x0003); | ||
| 945 | if (radio->revision <= 2) | 951 | if (radio->revision <= 2) |
| 946 | bcm43xx_radio_write16(bcm, 0x005D, 0x000D); | 952 | bcm43xx_radio_write16(bcm, 0x005D, 0x000D); |
| 947 | 953 | ||
| @@ -958,7 +964,7 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm) | |||
| 958 | bcm43xx_phy_write(bcm, 0x0016, 0x0410); | 964 | bcm43xx_phy_write(bcm, 0x0016, 0x0410); |
| 959 | bcm43xx_phy_write(bcm, 0x0017, 0x0820); | 965 | bcm43xx_phy_write(bcm, 0x0017, 0x0820); |
| 960 | bcm43xx_phy_write(bcm, 0x0062, 0x0007); | 966 | bcm43xx_phy_write(bcm, 0x0062, 0x0007); |
| 961 | (void) bcm43xx_radio_calibrationvalue(bcm); | 967 | bcm43xx_radio_init2050(bcm); |
| 962 | bcm43xx_phy_lo_g_measure(bcm); | 968 | bcm43xx_phy_lo_g_measure(bcm); |
| 963 | if (bcm->sprom.boardflags & BCM43xx_BFL_RSSI) { | 969 | if (bcm->sprom.boardflags & BCM43xx_BFL_RSSI) { |
| 964 | bcm43xx_calc_nrssi_slope(bcm); | 970 | bcm43xx_calc_nrssi_slope(bcm); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index 7b665e2386a8..d6d9413d7f23 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c | |||
| @@ -105,18 +105,24 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev, | |||
| 105 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 105 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
| 106 | unsigned long flags; | 106 | unsigned long flags; |
| 107 | u8 channel; | 107 | u8 channel; |
| 108 | s8 expon; | ||
| 108 | int freq; | 109 | int freq; |
| 109 | int err = -EINVAL; | 110 | int err = -EINVAL; |
| 110 | 111 | ||
| 111 | mutex_lock(&bcm->mutex); | 112 | mutex_lock(&bcm->mutex); |
| 112 | spin_lock_irqsave(&bcm->irq_lock, flags); | 113 | spin_lock_irqsave(&bcm->irq_lock, flags); |
| 113 | 114 | ||
| 114 | if ((data->freq.m >= 0) && (data->freq.m <= 1000)) { | 115 | if ((data->freq.e == 0) && |
| 116 | (data->freq.m >= 0) && (data->freq.m <= 1000)) { | ||
| 115 | channel = data->freq.m; | 117 | channel = data->freq.m; |
| 116 | freq = bcm43xx_channel_to_freq(bcm, channel); | 118 | freq = bcm43xx_channel_to_freq(bcm, channel); |
| 117 | } else { | 119 | } else { |
| 118 | channel = bcm43xx_freq_to_channel(bcm, data->freq.m); | ||
| 119 | freq = data->freq.m; | 120 | freq = data->freq.m; |
| 121 | expon = 6 - data->freq.e; | ||
| 122 | while (--expon >= 0) /* scale down the frequency to MHz */ | ||
| 123 | freq /= 10; | ||
| 124 | assert(freq > 1000); | ||
| 125 | channel = bcm43xx_freq_to_channel(bcm, freq); | ||
| 120 | } | 126 | } |
| 121 | if (!ieee80211_is_valid_channel(bcm->ieee, channel)) | 127 | if (!ieee80211_is_valid_channel(bcm->ieee, channel)) |
| 122 | goto out_unlock; | 128 | goto out_unlock; |
