diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 07cf574197e5..61cbd4a60446 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -71,7 +71,7 @@ | |||
71 | #include "myri10ge_mcp.h" | 71 | #include "myri10ge_mcp.h" |
72 | #include "myri10ge_mcp_gen_header.h" | 72 | #include "myri10ge_mcp_gen_header.h" |
73 | 73 | ||
74 | #define MYRI10GE_VERSION_STR "1.1.0" | 74 | #define MYRI10GE_VERSION_STR "1.2.0" |
75 | 75 | ||
76 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); | 76 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); |
77 | MODULE_AUTHOR("Maintainer: help@myri.com"); | 77 | MODULE_AUTHOR("Maintainer: help@myri.com"); |
@@ -274,6 +274,10 @@ static int myri10ge_fill_thresh = 256; | |||
274 | module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR); | 274 | module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR); |
275 | MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n"); | 275 | MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n"); |
276 | 276 | ||
277 | static int myri10ge_wcfifo = 1; | ||
278 | module_param(myri10ge_wcfifo, int, S_IRUGO); | ||
279 | MODULE_PARM_DESC(myri10ge_wcfifo, "Enable WC Fifo when WC is enabled\n"); | ||
280 | |||
277 | #define MYRI10GE_FW_OFFSET 1024*1024 | 281 | #define MYRI10GE_FW_OFFSET 1024*1024 |
278 | #define MYRI10GE_HIGHPART_TO_U32(X) \ | 282 | #define MYRI10GE_HIGHPART_TO_U32(X) \ |
279 | (sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0) | 283 | (sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0) |
@@ -1714,7 +1718,7 @@ static int myri10ge_open(struct net_device *dev) | |||
1714 | goto abort_with_irq; | 1718 | goto abort_with_irq; |
1715 | } | 1719 | } |
1716 | 1720 | ||
1717 | if (mgp->mtrr >= 0) { | 1721 | if (myri10ge_wcfifo && mgp->mtrr >= 0) { |
1718 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; | 1722 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; |
1719 | mgp->rx_small.wc_fifo = | 1723 | mgp->rx_small.wc_fifo = |
1720 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; | 1724 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; |
@@ -2878,7 +2882,6 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2878 | netdev->hard_start_xmit = myri10ge_xmit; | 2882 | netdev->hard_start_xmit = myri10ge_xmit; |
2879 | netdev->get_stats = myri10ge_get_stats; | 2883 | netdev->get_stats = myri10ge_get_stats; |
2880 | netdev->base_addr = mgp->iomem_base; | 2884 | netdev->base_addr = mgp->iomem_base; |
2881 | netdev->irq = pdev->irq; | ||
2882 | netdev->change_mtu = myri10ge_change_mtu; | 2885 | netdev->change_mtu = myri10ge_change_mtu; |
2883 | netdev->set_multicast_list = myri10ge_set_multicast_list; | 2886 | netdev->set_multicast_list = myri10ge_set_multicast_list; |
2884 | netdev->set_mac_address = myri10ge_set_mac_address; | 2887 | netdev->set_mac_address = myri10ge_set_mac_address; |
@@ -2888,6 +2891,15 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2888 | netdev->poll = myri10ge_poll; | 2891 | netdev->poll = myri10ge_poll; |
2889 | netdev->weight = myri10ge_napi_weight; | 2892 | netdev->weight = myri10ge_napi_weight; |
2890 | 2893 | ||
2894 | /* make sure we can get an irq, and that MSI can be | ||
2895 | * setup (if available). Also ensure netdev->irq | ||
2896 | * is set to correct value if MSI is enabled */ | ||
2897 | status = myri10ge_request_irq(mgp); | ||
2898 | if (status != 0) | ||
2899 | goto abort_with_firmware; | ||
2900 | netdev->irq = pdev->irq; | ||
2901 | myri10ge_free_irq(mgp); | ||
2902 | |||
2891 | /* Save configuration space to be restored if the | 2903 | /* Save configuration space to be restored if the |
2892 | * nic resets due to a parity error */ | 2904 | * nic resets due to a parity error */ |
2893 | pci_save_state(pdev); | 2905 | pci_save_state(pdev); |
@@ -2903,8 +2915,9 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2903 | dev_err(&pdev->dev, "register_netdev failed: %d\n", status); | 2915 | dev_err(&pdev->dev, "register_netdev failed: %d\n", status); |
2904 | goto abort_with_state; | 2916 | goto abort_with_state; |
2905 | } | 2917 | } |
2906 | dev_info(dev, "%d, tx bndry %d, fw %s, WC %s\n", | 2918 | dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n", |
2907 | pdev->irq, mgp->tx.boundary, mgp->fw_name, | 2919 | (mgp->msi_enabled ? "MSI" : "xPIC"), |
2920 | netdev->irq, mgp->tx.boundary, mgp->fw_name, | ||
2908 | (mgp->mtrr >= 0 ? "Enabled" : "Disabled")); | 2921 | (mgp->mtrr >= 0 ? "Enabled" : "Disabled")); |
2909 | 2922 | ||
2910 | return 0; | 2923 | return 0; |