X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fixgb%2Fixgb.h;h=c83271b386215cefef859df73572f34bc535fa17;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=d6c008b26a0ac9d37122dd60a205c803b2b9e4d8;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index d6c008b26..c83271b38 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -46,11 +46,12 @@ #include #include #include +#include #include #include #include #include -#include +#include #include #include #include @@ -77,7 +78,7 @@ struct ixgb_adapter; #include "ixgb_ee.h" #include "ixgb_ids.h" -#if _DEBUG_DRIVER_ +#ifdef _DEBUG_DRIVER_ #define IXGB_DBG(args...) printk(KERN_DEBUG "ixgb: " args) #else #define IXGB_DBG(args...) @@ -85,6 +86,20 @@ struct ixgb_adapter; #define IXGB_ERR(args...) printk(KERN_ERR "ixgb: " args) +/* TX/RX descriptor defines */ +#define DEFAULT_TXD 256 +#define MAX_TXD 4096 +#define MIN_TXD 64 + +/* hardware cannot reliably support more than 512 descriptors owned by + * hardware descrioptor cache otherwise an unreliable ring under heavy + * recieve load may result */ +/* #define DEFAULT_RXD 1024 */ +/* #define MAX_RXD 4096 */ +#define DEFAULT_RXD 512 +#define MAX_RXD 512 +#define MIN_RXD 64 + /* Supported Rx Buffer Sizes */ #define IXGB_RXBUFFER_2048 2048 #define IXGB_RXBUFFER_4096 4096 @@ -95,7 +110,7 @@ struct ixgb_adapter; #define IXGB_TX_QUEUE_WAKE 16 /* How many Rx Buffers do we bundle into one write to the hardware ? */ -#define IXGB_RX_BUFFER_WRITE 16 /* Must be power of 2 */ +#define IXGB_RX_BUFFER_WRITE 4 /* Must be power of 2 */ /* only works for sizes that are powers of 2 */ #define IXGB_ROUNDUP(i, size) ((i) = (((i) + (size) - 1) & ~((size) - 1))) @@ -104,10 +119,10 @@ struct ixgb_adapter; * so a DMA handle can be stored along with the buffer */ struct ixgb_buffer { struct sk_buff *skb; - uint64_t dma; - unsigned long length; + dma_addr_t dma; unsigned long time_stamp; - unsigned int next_to_watch; + uint16_t length; + uint16_t next_to_watch; }; struct ixgb_desc_ring { @@ -161,13 +176,13 @@ struct ixgb_adapter { uint64_t hw_csum_tx_error; uint32_t tx_int_delay; boolean_t tx_int_delay_enable; + boolean_t detect_tx_hung; /* RX */ struct ixgb_desc_ring rx_ring; uint64_t hw_csum_rx_error; uint64_t hw_csum_rx_good; uint32_t rx_int_delay; - boolean_t raidc; boolean_t rx_csum; /* OS defined structs */ @@ -178,6 +193,8 @@ struct ixgb_adapter { /* structs defined in ixgb_hw.h */ struct ixgb_hw hw; struct ixgb_hw_stats stats; - uint32_t pci_state[16]; +#ifdef CONFIG_PCI_MSI + boolean_t have_msi; +#endif }; -#endif /* _IXGB_H_ */ +#endif /* _IXGB_H_ */