summaryrefslogtreecommitdiffstats
path: root/drivers/net/pasemi_mac.h
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2008-03-05 23:34:16 +0100
committerOlof Johansson <olof@lixom.net>2008-03-05 23:34:39 +0100
commit8d636d8bc5ffcdbf49c72aafcda9ddab7ccb2f41 (patch)
tree0f441b124752959ba723c87aa471df196f556013 /drivers/net/pasemi_mac.h
parent[POWERPC] pasemi: Add function engine management functions to dma_lib (diff)
downloadlinux-8d636d8bc5ffcdbf49c72aafcda9ddab7ccb2f41.tar.xz
linux-8d636d8bc5ffcdbf49c72aafcda9ddab7ccb2f41.zip
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.h15
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 @@
#include <linux/phy.h>
#define MAX_LRO_DESCRIPTORS 8
+#define MAX_CS 2
struct pasemi_mac_txring {
struct pasemi_dmachan chan; /* Must be first */
@@ -51,6 +52,15 @@ struct pasemi_mac_rxring {
struct pasemi_mac *mac; /* Needed in intr handler */
};
+struct pasemi_mac_csring {
+ struct pasemi_dmachan chan;
+ unsigned int size;
+ unsigned int next_to_fill;
+ int events[2];
+ int last_event;
+ int fun;
+};
+
struct pasemi_mac {
struct net_device *netdev;
struct pci_dev *pdev;
@@ -60,10 +70,12 @@ struct pasemi_mac {
struct napi_struct napi;
int bufsz; /* RX ring buffer size */
+ int last_cs;
+ int num_cs;
+ u32 dma_if;
u8 type;
#define MAC_TYPE_GMAC 1
#define MAC_TYPE_XAUI 2
- u32 dma_if;
u8 mac_addr[6];
@@ -74,6 +86,7 @@ struct pasemi_mac {
struct pasemi_mac_txring *tx;
struct pasemi_mac_rxring *rx;
+ struct pasemi_mac_csring *cs[MAX_CS];
char tx_irq_name[10]; /* "eth%d tx" */
char rx_irq_name[10]; /* "eth%d rx" */
int link;