diff options
author | Olof Johansson <olof@lixom.net> | 2008-03-05 17:34:16 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2008-03-05 17:34:39 -0500 |
commit | 8d636d8bc5ffcdbf49c72aafcda9ddab7ccb2f41 (patch) | |
tree | 0f441b124752959ba723c87aa471df196f556013 /drivers/net/pasemi_mac.h | |
parent | dda56df08a28404004bca313d2a1ba1597acd755 (diff) |
pasemi_mac: jumbo frame support
First cut at jumbo frame support. To support large MTU, one or several
separate channels must be allocated to calculate the TCP/UDP checksum
separately, since the mac lacks enough buffers to hold a whole packet
while it's being calculated.
Furthermore, it seems that a single function channel is not quite
enough to feed one of the 10Gig links, so allocate two channels for
XAUI interfaces.
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/pasemi_mac.h')
-rw-r--r-- | drivers/net/pasemi_mac.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/pasemi_mac.h b/drivers/net/pasemi_mac.h index 99e7b9329a6f..90c51670a1e7 100644 --- a/drivers/net/pasemi_mac.h +++ b/drivers/net/pasemi_mac.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/phy.h> | 27 | #include <linux/phy.h> |
28 | 28 | ||
29 | #define MAX_LRO_DESCRIPTORS 8 | 29 | #define MAX_LRO_DESCRIPTORS 8 |
30 | #define MAX_CS 2 | ||
30 | 31 | ||
31 | struct pasemi_mac_txring { | 32 | struct pasemi_mac_txring { |
32 | struct pasemi_dmachan chan; /* Must be first */ | 33 | struct pasemi_dmachan chan; /* Must be first */ |
@@ -51,6 +52,15 @@ struct pasemi_mac_rxring { | |||
51 | struct pasemi_mac *mac; /* Needed in intr handler */ | 52 | struct pasemi_mac *mac; /* Needed in intr handler */ |
52 | }; | 53 | }; |
53 | 54 | ||
55 | struct pasemi_mac_csring { | ||
56 | struct pasemi_dmachan chan; | ||
57 | unsigned int size; | ||
58 | unsigned int next_to_fill; | ||
59 | int events[2]; | ||
60 | int last_event; | ||
61 | int fun; | ||
62 | }; | ||
63 | |||
54 | struct pasemi_mac { | 64 | struct pasemi_mac { |
55 | struct net_device *netdev; | 65 | struct net_device *netdev; |
56 | struct pci_dev *pdev; | 66 | struct pci_dev *pdev; |
@@ -60,10 +70,12 @@ struct pasemi_mac { | |||
60 | struct napi_struct napi; | 70 | struct napi_struct napi; |
61 | 71 | ||
62 | int bufsz; /* RX ring buffer size */ | 72 | int bufsz; /* RX ring buffer size */ |
73 | int last_cs; | ||
74 | int num_cs; | ||
75 | u32 dma_if; | ||
63 | u8 type; | 76 | u8 type; |
64 | #define MAC_TYPE_GMAC 1 | 77 | #define MAC_TYPE_GMAC 1 |
65 | #define MAC_TYPE_XAUI 2 | 78 | #define MAC_TYPE_XAUI 2 |
66 | u32 dma_if; | ||
67 | 79 | ||
68 | u8 mac_addr[6]; | 80 | u8 mac_addr[6]; |
69 | 81 | ||
@@ -74,6 +86,7 @@ struct pasemi_mac { | |||
74 | 86 | ||
75 | struct pasemi_mac_txring *tx; | 87 | struct pasemi_mac_txring *tx; |
76 | struct pasemi_mac_rxring *rx; | 88 | struct pasemi_mac_rxring *rx; |
89 | struct pasemi_mac_csring *cs[MAX_CS]; | ||
77 | char tx_irq_name[10]; /* "eth%d tx" */ | 90 | char tx_irq_name[10]; /* "eth%d tx" */ |
78 | char rx_irq_name[10]; /* "eth%d rx" */ | 91 | char rx_irq_name[10]; /* "eth%d rx" */ |
79 | int link; | 92 | int link; |