]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
myri10ge: make wc_fifo usage load-time tunable
authorBrice Goglin <brice@myri.com>
Tue, 9 Jan 2007 20:04:25 +0000 (21:04 +0100)
committerJeff Garzik <jeff@garzik.org>
Thu, 18 Jan 2007 17:02:41 +0000 (12:02 -0500)
Under some circumstances, using WC without the WC fifo is faster.
So we make it possible to tune wc_fifo with a module parameter.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/myri10ge/myri10ge.c

index 07cf574197e5762239427f27c4d58c61d6d5ed27..b06e0eba52f6a1b8c9c6a81f0cb49fd0049a2e82 100644 (file)
@@ -274,6 +274,10 @@ static int myri10ge_fill_thresh = 256;
 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 @@ static int myri10ge_open(struct net_device *dev)
                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;