]> err.no Git - linux-2.6/blobdiff - drivers/net/s2io.h
S2io: Enable all the error and alarm indications
[linux-2.6] / drivers / net / s2io.h
index 58592780f5198b77cfb6517ada8b0db02450a7ce..b9654dfeb87734e3bd0e860cb32e3ba9a985b082 100644 (file)
@@ -74,6 +74,10 @@ static int debug_level = ERR_DBG;
 /* DEBUG message print. */
 #define DBG_PRINT(dbg_level, args...)  if(!(debug_level<dbg_level)) printk(args)
 
+#ifndef DMA_ERROR_CODE
+#define DMA_ERROR_CODE          (~(dma_addr_t)0x0)
+#endif
+
 /* Protocol assist features of the NIC */
 #define L3_CKSUM_OK 0xFFFF
 #define L4_CKSUM_OK 0xFFFF
@@ -97,6 +101,7 @@ struct swStat {
        unsigned long long num_aggregations;
        /* Other statistics */
        unsigned long long mem_alloc_fail_cnt;
+       unsigned long long pci_map_fail_cnt;
        unsigned long long watchdog_timer_cnt;
        unsigned long long mem_allocated;
        unsigned long long mem_freed;
@@ -407,6 +412,11 @@ struct config_param {
        struct tx_fifo_config tx_cfg[MAX_TX_FIFOS];     /*Per-Tx FIFO config */
        u32 max_txds;           /*Max no. of Tx buffer descriptor per TxDL */
        u64 tx_intr_type;
+#define INTA   0
+#define MSI_X  2
+       u8 intr_type;
+       u8 napi;
+
        /* Specifies if Tx Intr is UTILZ or PER_LIST type. */
 
 /* Rx Side */
@@ -575,8 +585,7 @@ struct RxD_block {
 #define SIZE_OF_BLOCK  4096
 
 #define RXD_MODE_1     0 /* One Buffer mode */
-#define RXD_MODE_3A    1 /* Three Buffer mode */
-#define RXD_MODE_3B    2 /* Two Buffer mode */
+#define RXD_MODE_3B    1 /* Two Buffer mode */
 
 /* Structure to hold virtual addresses of Buf0 and Buf1 in
  * 2buf mode. */
@@ -782,6 +791,7 @@ struct s2io_nic {
         */
        int pkts_to_process;
        struct net_device *dev;
+       struct napi_struct napi;
        struct mac_info mac_control;
        struct config_param config;
        struct pci_dev *pdev;
@@ -857,6 +867,8 @@ struct s2io_nic {
        struct vlan_group *vlgrp;
 #define MSIX_FLG                0xA5
        struct msix_entry *entries;
+       int msi_detected;
+       wait_queue_head_t msi_wait;
        struct s2io_msix_entry *s2io_entries;
        char desc[MAX_REQUESTED_MSI_X][25];
 
@@ -876,12 +888,12 @@ struct s2io_nic {
        u16             lro_max_aggr_per_sess;
 
 #define INTA   0
-#define MSI    1
 #define MSI_X  2
        u8 intr_type;
 
        spinlock_t      rx_lock;
        atomic_t        isr_cnt;
+       u64             general_int_mask;
        u64 *ufo_in_band_v;
 #define VPD_STRING_LEN 80
        u8  product_name[VPD_STRING_LEN];
@@ -1016,12 +1028,10 @@ static void s2io_set_multicast(struct net_device *dev);
 static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp);
 static void s2io_link(struct s2io_nic * sp, int link);
 static void s2io_reset(struct s2io_nic * sp);
-static int s2io_poll(struct net_device *dev, int *budget);
+static int s2io_poll(struct napi_struct *napi, int budget);
 static void s2io_init_pci(struct s2io_nic * sp);
 static int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
 static void s2io_alarm_handle(unsigned long data);
-static int s2io_enable_msi(struct s2io_nic *nic);
-static irqreturn_t s2io_msi_handle(int irq, void *dev_id);
 static irqreturn_t
 s2io_msix_ring_handle(int irq, void *dev_id);
 static irqreturn_t
@@ -1033,7 +1043,6 @@ static void s2io_set_link(struct work_struct *work);
 static int s2io_set_swapper(struct s2io_nic * sp);
 static void s2io_card_down(struct s2io_nic *nic);
 static int s2io_card_up(struct s2io_nic *nic);
-static int get_xena_rev_id(struct pci_dev *pdev);
 static int wait_for_cmd_complete(void __iomem *addr, u64 busy_bit,
                                        int bit_state);
 static int s2io_add_isr(struct s2io_nic * sp);