aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-12-09 14:34:55 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-12 15:27:20 -0500
commitbdb5c58ebe4301f9c3470cc35adeff1ef7ee99eb (patch)
treed81a92afb5792af5c9195964cc7f48e16df1ef0e /drivers/net/sky2.c
parent6e23231b6509f17a251e6dfddb607d300680ac25 (diff)
[PATCH] sky2: copy threshold as module parameter
Make the copy threshold a module parameter for those who may want to turn it off. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 0f694a917fbd..f2f8f60a0911 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -76,7 +76,6 @@
76#define RX_LE_BYTES (RX_LE_SIZE*sizeof(struct sky2_rx_le)) 76#define RX_LE_BYTES (RX_LE_SIZE*sizeof(struct sky2_rx_le))
77#define RX_MAX_PENDING (RX_LE_SIZE/2 - 2) 77#define RX_MAX_PENDING (RX_LE_SIZE/2 - 2)
78#define RX_DEF_PENDING RX_MAX_PENDING 78#define RX_DEF_PENDING RX_MAX_PENDING
79#define RX_COPY_THRESHOLD 256
80 79
81#define TX_RING_SIZE 512 80#define TX_RING_SIZE 512
82#define TX_DEF_PENDING (TX_RING_SIZE - 1) 81#define TX_DEF_PENDING (TX_RING_SIZE - 1)
@@ -99,6 +98,10 @@ static int debug = -1; /* defaults above */
99module_param(debug, int, 0); 98module_param(debug, int, 0);
100MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); 99MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
101 100
101static int copybreak __read_mostly = 256;
102module_param(copybreak, int, 0);
103MODULE_PARM_DESC(copybreak, "Receive copy threshold");
104
102static const struct pci_device_id sky2_id_table[] = { 105static const struct pci_device_id sky2_id_table[] = {
103 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, 106 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) },
104 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, 107 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) },
@@ -1653,7 +1656,7 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2,
1653 if (!(status & GMR_FS_RX_OK)) 1656 if (!(status & GMR_FS_RX_OK))
1654 goto resubmit; 1657 goto resubmit;
1655 1658
1656 if (length < RX_COPY_THRESHOLD) { 1659 if (length < copybreak) {
1657 skb = alloc_skb(length + 2, GFP_ATOMIC); 1660 skb = alloc_skb(length + 2, GFP_ATOMIC);
1658 if (!skb) 1661 if (!skb)
1659 goto resubmit; 1662 goto resubmit;