myri10ge minor updates for 2.6.20
Subsystems (2)
cover myri10ge minor updates for 2.6.20
Hi Jeff,
These should be the last 3 patches to finalize myri10ge version 1.2.0:
1. myri10ge: make wc_fifo usage load-time tunable
2. myri10ge: check that we can get an irq
3. myri10ge: update driver version to 1.2.0
Please apply to 2.6.20.
thanks,
Brice
PATCH 1/3 myri10ge: make wc_fifo usage load-time tunable
Under some circumstances, using WC without the WC fifo is faster. So we make it possible to tune wc_fifo with a module parameter.
--- drivers/net/myri10ge/myri10ge.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/myri10ge/myri10ge.c +5 -1
@@ -274,6 +274,10 @@module_param (myri10ge_fill_thresh, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (myri10ge_fill_thresh,"Number of empty rx slots allowed\n" ); +static int myri10ge_wcfifo =1 ; +module_param (myri10ge_wcfifo, int,S_IRUGO ); +MODULE_PARM_DESC (myri10ge_wcfifo,"Enable WC Fifo when WC is enabled\n" ); +#define MYRI10GE_FW_OFFSET 1024*1024#define MYRI10GE_HIGHPART_TO_U32 (X ) \ (sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0)
@@ -1714,7 +1718,7 @@ goto abort_with_irq; } -if (mgp->mtrr >=0 ) { +if (myri10ge_wcfifo && mgp->mtrr >=0 ) { mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram +MXGEFW_ETH_SEND_4 ; mgp->rx_small.wc_fifo = (u8 __iomem *) mgp->sram +MXGEFW_ETH_RECV_SMALL ;
Re: [PATCH 1/3] myri10ge: make wc_fifo usage load-time tunable
Quoted 7 lines · Brice Goglin
Under some circumstances, using WC without the WC fifo is faster. So we make it possible to tune
wc_fifowith a module parameter.Signed-off-by Brice Goglin <[email protected]>--- drivers/net/myri10ge/myri10ge.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
applied 1-3
PATCH 2/3 myri10ge: check that we can get an irq
In reply to Brice GoglinNow that IRQ allocation is done in myri10ge_open(), we want to still check when loading the driver that IRQ allocation could succeed later.
Additionaly, we fix the initialization and printing of netdev->irq.
--- drivers/net/myri10ge/myri10ge.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/net/myri10ge/myri10ge.c +12 -3
@@ -2882,7 +2882,6 @@ netdev->hard_start_xmit = myri10ge_xmit; netdev->get_stats = myri10ge_get_stats; netdev->base_addr = mgp->iomem_base; - netdev->irq = pdev->irq; netdev->change_mtu = myri10ge_change_mtu; netdev->set_multicast_list = myri10ge_set_multicast_list; netdev->set_mac_address = myri10ge_set_mac_address;
@@ -2892,6 +2891,15 @@ netdev->poll = myri10ge_poll; netdev->weight = myri10ge_napi_weight; +/* make sure we can get an irq, and that MSI can be +* setup (if available). Also ensure netdev->irq +* is set to correct value if MSI is enabled */ + status =myri10ge_request_irq (mgp); +if (status !=0 ) + goto abort_with_firmware; + netdev->irq = pdev->irq; +myri10ge_free_irq (mgp); +/* Save configuration space to be restored if the * nic resets due to a parity error */ pci_save_state (pdev);
@@ -2907,8 +2915,9 @@dev_err (&pdev->dev,"register_netdev failed: %d\n" , status); goto abort_with_state; } -dev_info (dev,"%d, tx bndry %d, fw %s, WC %s\n" , - pdev->irq, mgp->tx.boundary, mgp->fw_name, +dev_info (dev,"%s IRQ %d, tx bndry %d, fw %s, WC %s\n" , + (mgp->msi_enabled ?"MSI" :"xPIC" ), + netdev->irq, mgp->tx.boundary, mgp->fw_name, (mgp->mtrr >=0 ?"Enabled" :"Disabled" ));return 0 ;
PATCH 3/3 myri10ge: update driver version to 1.2.0
In reply to Brice GoglinDriver is now at version 1.2.0.
--- drivers/net/myri10ge/myri10ge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/myri10ge/myri10ge.c +1 -1
@@ -71,7 +71,7 @@#include "myri10ge_mcp.h" #include "myri10ge_mcp_gen_header.h" -#define MYRI10GE_VERSION_STR "1.1.0" +#define MYRI10GE_VERSION_STR "1.2.0"MODULE_DESCRIPTION ("Myricom 10G driver (10GbE)" );MODULE_AUTHOR ("Maintainer: [email protected]" );