]> Pileus Git - ~andy/linux/blobdiff - drivers/net/s2io.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[~andy/linux] / drivers / net / s2io.h
index 4d2fc7a40434fd01afd8b217a8720b2a881355d5..bc64d967f08094abc2a2145696d8b43be70aec85 100644 (file)
@@ -195,6 +195,68 @@ typedef struct stat_block {
        u32 rxd_rd_cnt;
        u32 rxf_wr_cnt;
        u32 txf_rd_cnt;
+
+/* Tx MAC statistics overflow counters. */
+       u32 tmac_data_octets_oflow;
+       u32 tmac_frms_oflow;
+       u32 tmac_bcst_frms_oflow;
+       u32 tmac_mcst_frms_oflow;
+       u32 tmac_ucst_frms_oflow;
+       u32 tmac_ttl_octets_oflow;
+       u32 tmac_any_err_frms_oflow;
+       u32 tmac_nucst_frms_oflow;
+       u64 tmac_vlan_frms;
+       u32 tmac_drop_ip_oflow;
+       u32 tmac_vld_ip_oflow;
+       u32 tmac_rst_tcp_oflow;
+       u32 tmac_icmp_oflow;
+       u32 tpa_unknown_protocol;
+       u32 tmac_udp_oflow;
+       u32 reserved_10;
+       u32 tpa_parse_failure;
+
+/* Rx MAC Statistics overflow counters. */
+       u32 rmac_data_octets_oflow;
+       u32 rmac_vld_frms_oflow;
+       u32 rmac_vld_bcst_frms_oflow;
+       u32 rmac_vld_mcst_frms_oflow;
+       u32 rmac_accepted_ucst_frms_oflow;
+       u32 rmac_ttl_octets_oflow;
+       u32 rmac_discarded_frms_oflow;
+       u32 rmac_accepted_nucst_frms_oflow;
+       u32 rmac_usized_frms_oflow;
+       u32 rmac_drop_events_oflow;
+       u32 rmac_frag_frms_oflow;
+       u32 rmac_osized_frms_oflow;
+       u32 rmac_ip_oflow;
+       u32 rmac_jabber_frms_oflow;
+       u32 rmac_icmp_oflow;
+       u32 rmac_drop_ip_oflow;
+       u32 rmac_err_drp_udp_oflow;
+       u32 rmac_udp_oflow;
+       u32 reserved_11;
+       u32 rmac_pause_cnt_oflow;
+       u64 rmac_ttl_1519_4095_frms;
+       u64 rmac_ttl_4096_8191_frms;
+       u64 rmac_ttl_8192_max_frms;
+       u64 rmac_ttl_gt_max_frms;
+       u64 rmac_osized_alt_frms;
+       u64 rmac_jabber_alt_frms;
+       u64 rmac_gt_max_alt_frms;
+       u64 rmac_vlan_frms;
+       u32 rmac_len_discard;
+       u32 rmac_fcs_discard;
+       u32 rmac_pf_discard;
+       u32 rmac_da_discard;
+       u32 rmac_red_discard;
+       u32 rmac_rts_discard;
+       u32 reserved_12;
+       u32 rmac_ingm_full_discard;
+       u32 reserved_13;
+       u32 rmac_accepted_ip_oflow;
+       u32 reserved_14;
+       u32 link_fault_cnt;
+       swStat_t sw_stat;
 } StatInfo_t;
 
 /*
@@ -280,6 +342,7 @@ struct config_param {
 #define MAX_RX_BLOCKS_PER_RING  150
 
        rx_ring_config_t rx_cfg[MAX_RX_RINGS];  /*Per-Rx Ring config */
+       u8 bimodal;             /*Flag for setting bimodal interrupts*/
 
 #define HEADER_ETHERNET_II_802_3_SIZE 14
 #define HEADER_802_2_SIZE              3
@@ -372,6 +435,10 @@ typedef struct _RxD_t {
 #define RXD_GET_L4_CKSUM(val)   ((u16)(val) & 0xFFFF)
 
        u64 Control_2;
+#define        THE_RXD_MARK            0x3
+#define        SET_RXD_MARKER          vBIT(THE_RXD_MARK, 0, 2)
+#define        GET_RXD_MARKER(ctrl)    ((ctrl & SET_RXD_MARKER) >> 62)
+
 #ifndef CONFIG_2BUFF_MODE
 #define MASK_BUFFER0_SIZE       vBIT(0x3FFF,2,14)
 #define SET_BUFFER0_SIZE(val)   vBIT(val,2,14)
@@ -612,6 +679,9 @@ struct s2io_nic {
        struct tasklet_struct task;
        volatile unsigned long tasklet_status;
 
+       /* Timer that handles I/O errors/exceptions */
+       struct timer_list alarm_timer;
+
        /* Space to back up the PCI config space */
        u32 config_space[256 / sizeof(u32)];
 
@@ -674,6 +744,13 @@ struct s2io_nic {
 #define CARD_UP 2
        atomic_t card_state;
        volatile unsigned long link_state;
+       struct vlan_group *vlgrp;
+#define XFRAME_I_DEVICE                1
+#define XFRAME_II_DEVICE       2
+       u8 device_type;
+
+       spinlock_t      rx_lock;
+       atomic_t        isr_cnt;
 };
 
 #define RESET_ERROR 1;
@@ -685,8 +762,8 @@ static inline u64 readq(void __iomem *addr)
 {
        u64 ret = 0;
        ret = readl(addr + 4);
-       (u64) ret <<= 32;
-       (u64) ret |= readl(addr);
+       ret <<= 32;
+       ret |= readl(addr);
 
        return ret;
 }
@@ -805,6 +882,7 @@ static int s2io_poll(struct net_device *dev, int *budget);
 #endif
 static void s2io_init_pci(nic_t * sp);
 int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
+static void s2io_alarm_handle(unsigned long data);
 static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs);
 static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag);
 static struct ethtool_ops netdev_ethtool_ops;