aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r--drivers/net/s2io.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 0709ebae9139..1827b6686c98 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -75,10 +75,6 @@ static int debug_level = ERR_DBG;
75/* DEBUG message print. */ 75/* DEBUG message print. */
76#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) 76#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args)
77 77
78#ifndef DMA_ERROR_CODE
79#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
80#endif
81
82/* Protocol assist features of the NIC */ 78/* Protocol assist features of the NIC */
83#define L3_CKSUM_OK 0xFFFF 79#define L3_CKSUM_OK 0xFFFF
84#define L4_CKSUM_OK 0xFFFF 80#define L4_CKSUM_OK 0xFFFF
@@ -706,7 +702,7 @@ struct ring_info {
706 /* per-ring buffer counter */ 702 /* per-ring buffer counter */
707 u32 rx_bufs_left; 703 u32 rx_bufs_left;
708 704
709 #define MAX_LRO_SESSIONS 32 705#define MAX_LRO_SESSIONS 32
710 struct lro lro0_n[MAX_LRO_SESSIONS]; 706 struct lro lro0_n[MAX_LRO_SESSIONS];
711 u8 lro; 707 u8 lro;
712 708
@@ -725,6 +721,11 @@ struct ring_info {
725 /* copy of sp->pdev pointer */ 721 /* copy of sp->pdev pointer */
726 struct pci_dev *pdev; 722 struct pci_dev *pdev;
727 723
724 /* Per ring napi struct */
725 struct napi_struct napi;
726
727 unsigned long interrupt_count;
728
728 /* 729 /*
729 * Place holders for the virtual and physical addresses of 730 * Place holders for the virtual and physical addresses of
730 * all the Rx Blocks 731 * all the Rx Blocks
@@ -841,7 +842,7 @@ struct usr_addr {
841 * Structure to keep track of the MSI-X vectors and the corresponding 842 * Structure to keep track of the MSI-X vectors and the corresponding
842 * argument registered against each vector 843 * argument registered against each vector
843 */ 844 */
844#define MAX_REQUESTED_MSI_X 17 845#define MAX_REQUESTED_MSI_X 9
845struct s2io_msix_entry 846struct s2io_msix_entry
846{ 847{
847 u16 vector; 848 u16 vector;
@@ -849,8 +850,8 @@ struct s2io_msix_entry
849 void *arg; 850 void *arg;
850 851
851 u8 type; 852 u8 type;
852#define MSIX_FIFO_TYPE 1 853#define MSIX_ALARM_TYPE 1
853#define MSIX_RING_TYPE 2 854#define MSIX_RING_TYPE 2
854 855
855 u8 in_use; 856 u8 in_use;
856#define MSIX_REGISTERED_SUCCESS 0xAA 857#define MSIX_REGISTERED_SUCCESS 0xAA
@@ -877,7 +878,6 @@ struct s2io_nic {
877 */ 878 */
878 int pkts_to_process; 879 int pkts_to_process;
879 struct net_device *dev; 880 struct net_device *dev;
880 struct napi_struct napi;
881 struct mac_info mac_control; 881 struct mac_info mac_control;
882 struct config_param config; 882 struct config_param config;
883 struct pci_dev *pdev; 883 struct pci_dev *pdev;
@@ -948,6 +948,7 @@ struct s2io_nic {
948 */ 948 */
949 u8 other_fifo_idx; 949 u8 other_fifo_idx;
950 950
951 struct napi_struct napi;
951 /* after blink, the adapter must be restored with original 952 /* after blink, the adapter must be restored with original
952 * values. 953 * values.
953 */ 954 */
@@ -962,6 +963,7 @@ struct s2io_nic {
962 unsigned long long start_time; 963 unsigned long long start_time;
963 struct vlan_group *vlgrp; 964 struct vlan_group *vlgrp;
964#define MSIX_FLG 0xA5 965#define MSIX_FLG 0xA5
966 int num_entries;
965 struct msix_entry *entries; 967 struct msix_entry *entries;
966 int msi_detected; 968 int msi_detected;
967 wait_queue_head_t msi_wait; 969 wait_queue_head_t msi_wait;
@@ -982,6 +984,7 @@ struct s2io_nic {
982 u16 lro_max_aggr_per_sess; 984 u16 lro_max_aggr_per_sess;
983 volatile unsigned long state; 985 volatile unsigned long state;
984 u64 general_int_mask; 986 u64 general_int_mask;
987
985#define VPD_STRING_LEN 80 988#define VPD_STRING_LEN 80
986 u8 product_name[VPD_STRING_LEN]; 989 u8 product_name[VPD_STRING_LEN];
987 u8 serial_num[VPD_STRING_LEN]; 990 u8 serial_num[VPD_STRING_LEN];
@@ -1103,7 +1106,7 @@ static void __devexit s2io_rem_nic(struct pci_dev *pdev);
1103static int init_shared_mem(struct s2io_nic *sp); 1106static int init_shared_mem(struct s2io_nic *sp);
1104static void free_shared_mem(struct s2io_nic *sp); 1107static void free_shared_mem(struct s2io_nic *sp);
1105static int init_nic(struct s2io_nic *nic); 1108static int init_nic(struct s2io_nic *nic);
1106static void rx_intr_handler(struct ring_info *ring_data); 1109static int rx_intr_handler(struct ring_info *ring_data, int budget);
1107static void tx_intr_handler(struct fifo_info *fifo_data); 1110static void tx_intr_handler(struct fifo_info *fifo_data);
1108static void s2io_handle_errors(void * dev_id); 1111static void s2io_handle_errors(void * dev_id);
1109 1112
@@ -1114,7 +1117,8 @@ static void s2io_set_multicast(struct net_device *dev);
1114static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp); 1117static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp);
1115static void s2io_link(struct s2io_nic * sp, int link); 1118static void s2io_link(struct s2io_nic * sp, int link);
1116static void s2io_reset(struct s2io_nic * sp); 1119static void s2io_reset(struct s2io_nic * sp);
1117static int s2io_poll(struct napi_struct *napi, int budget); 1120static int s2io_poll_msix(struct napi_struct *napi, int budget);
1121static int s2io_poll_inta(struct napi_struct *napi, int budget);
1118static void s2io_init_pci(struct s2io_nic * sp); 1122static void s2io_init_pci(struct s2io_nic * sp);
1119static int do_s2io_prog_unicast(struct net_device *dev, u8 *addr); 1123static int do_s2io_prog_unicast(struct net_device *dev, u8 *addr);
1120static void s2io_alarm_handle(unsigned long data); 1124static void s2io_alarm_handle(unsigned long data);