vserver 1.9.5.x5
[linux-2.6.git] / drivers / net / e1000 / e1000.h
index 067bb09..77db789 100644 (file)
 #include <linux/delay.h>
 #include <linux/timer.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 #include <linux/interrupt.h>
 #include <linux/string.h>
 #include <linux/pagemap.h>
 #include <linux/dma-mapping.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <linux/capability.h>
 #include <linux/mii.h>
 #include <linux/ethtool.h>
 #include <linux/if_vlan.h>
-#include <linux/moduleparam.h>
 
 #define BAR_0          0
 #define BAR_1          1
 #define BAR_5          5
 
+#define INTEL_E1000_ETHERNET_DEVICE(device_id) {\
+       PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
 
 struct e1000_adapter;
 
@@ -98,11 +100,12 @@ struct e1000_adapter;
 
 #define E1000_MAX_INTR 10
 
-/* How many descriptors for TX and RX ? */
+/* TX/RX descriptor defines */
 #define E1000_DEFAULT_TXD                  256
 #define E1000_MAX_TXD                      256
 #define E1000_MIN_TXD                       80
 #define E1000_MAX_82544_TXD               4096
+
 #define E1000_DEFAULT_RXD                  256
 #define E1000_MAX_RXD                      256
 #define E1000_MIN_RXD                       80
@@ -123,14 +126,11 @@ struct e1000_adapter;
 #define E1000_TX_HEAD_ADDR_SHIFT 7
 #define E1000_PBA_TX_MASK 0xFFFF0000
 
-/* Flow Control High-Watermark: 5688 bytes below Rx FIFO size */
-#define E1000_FC_HIGH_DIFF 0x1638
-
-/* Flow Control Low-Watermark: 5696 bytes below Rx FIFO size */
-#define E1000_FC_LOW_DIFF 0x1640
+/* Flow Control Watermarks */
+#define E1000_FC_HIGH_DIFF 0x1638  /* High: 5688 bytes below Rx FIFO size */
+#define E1000_FC_LOW_DIFF 0x1640   /* Low:  5696 bytes below Rx FIFO size */
 
-/* Flow Control Pause Time: 858 usec */
-#define E1000_FC_PAUSE_TIME 0x0680
+#define E1000_FC_PAUSE_TIME 0x0680 /* 858 usec */
 
 /* How many Tx Descriptors do we need to call netif_wake_queue ? */
 #define E1000_TX_QUEUE_WAKE    16
@@ -153,9 +153,9 @@ struct e1000_adapter;
 struct e1000_buffer {
        struct sk_buff *skb;
        uint64_t dma;
-       unsigned long length;
        unsigned long time_stamp;
-       unsigned int next_to_watch;
+       uint16_t length;
+       uint16_t next_to_watch;
 };
 
 struct e1000_desc_ring {
@@ -202,7 +202,7 @@ struct e1000_adapter {
        spinlock_t stats_lock;
        atomic_t irq_sem;
        struct work_struct tx_timeout_task;
-       uint8_t fc_autoneg;
+       uint8_t fc_autoneg;
 
        struct timer_list blink_timer;
        unsigned long led_status;
@@ -252,7 +252,6 @@ struct e1000_adapter {
        struct e1000_desc_ring test_rx_ring;
 
 
-       uint32_t pci_state[16];
        int msg_enable;
 };
 #endif /* _E1000_H_ */