aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.h
diff options
context:
space:
mode:
authorSivakumar Subramani <Sivakumar.Subramani@neterion.com>2007-01-31 13:30:49 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-05 16:58:51 -0500
commit19a605220cf83a5ec5f8d9f9943e862ebf18f93f (patch)
tree013980ea3093db1f595a67636a52f9e4763a5e8f /drivers/net/s2io.h
parentdb874e65ae93861461f83658fdec08368252cd2e (diff)
S2IO: Fixes for reset and link handling.
1. Fix for reset and link handling. 2. Allow for promiscuos mode and multicast state be maintained through ifconfig up and down. 3. Support to print adapter serial number. Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r--drivers/net/s2io.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 577fa3ad214e..8114f4b80e8a 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -30,6 +30,8 @@
30#undef SUCCESS 30#undef SUCCESS
31#define SUCCESS 0 31#define SUCCESS 0
32#define FAILURE -1 32#define FAILURE -1
33#define S2IO_MINUS_ONE 0xFFFFFFFFFFFFFFFFULL
34#define S2IO_MAX_PCI_CONFIG_SPACE_REINIT 100
33 35
34#define CHECKBIT(value, nbit) (value & (1 << nbit)) 36#define CHECKBIT(value, nbit) (value & (1 << nbit))
35 37
@@ -537,9 +539,9 @@ typedef struct _RxD_block {
537 539
538#define SIZE_OF_BLOCK 4096 540#define SIZE_OF_BLOCK 4096
539 541
540#define RXD_MODE_1 0 542#define RXD_MODE_1 0 /* One Buffer mode */
541#define RXD_MODE_3A 1 543#define RXD_MODE_3A 1 /* Three Buffer mode */
542#define RXD_MODE_3B 2 544#define RXD_MODE_3B 2 /* Two Buffer mode */
543 545
544/* Structure to hold virtual addresses of Buf0 and Buf1 in 546/* Structure to hold virtual addresses of Buf0 and Buf1 in
545 * 2buf mode. */ 547 * 2buf mode. */
@@ -849,8 +851,9 @@ struct s2io_nic {
849 spinlock_t rx_lock; 851 spinlock_t rx_lock;
850 atomic_t isr_cnt; 852 atomic_t isr_cnt;
851 u64 *ufo_in_band_v; 853 u64 *ufo_in_band_v;
852#define VPD_PRODUCT_NAME_LEN 50 854#define VPD_STRING_LEN 80
853 u8 product_name[VPD_PRODUCT_NAME_LEN]; 855 u8 product_name[VPD_STRING_LEN];
856 u8 serial_num[VPD_STRING_LEN];
854}; 857};
855 858
856#define RESET_ERROR 1; 859#define RESET_ERROR 1;
@@ -974,11 +977,13 @@ static void tx_intr_handler(fifo_info_t *fifo_data);
974static void alarm_intr_handler(struct s2io_nic *sp); 977static void alarm_intr_handler(struct s2io_nic *sp);
975 978
976static int s2io_starter(void); 979static int s2io_starter(void);
980static void s2io_closer(void);
977static void s2io_tx_watchdog(struct net_device *dev); 981static void s2io_tx_watchdog(struct net_device *dev);
978static void s2io_tasklet(unsigned long dev_addr); 982static void s2io_tasklet(unsigned long dev_addr);
979static void s2io_set_multicast(struct net_device *dev); 983static void s2io_set_multicast(struct net_device *dev);
980static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp); 984static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp);
981static void s2io_link(nic_t * sp, int link); 985static void s2io_link(nic_t * sp, int link);
986static void s2io_reset(nic_t * sp);
982static int s2io_poll(struct net_device *dev, int *budget); 987static int s2io_poll(struct net_device *dev, int *budget);
983static void s2io_init_pci(nic_t * sp); 988static void s2io_init_pci(nic_t * sp);
984static int s2io_set_mac_addr(struct net_device *dev, u8 * addr); 989static int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
@@ -990,13 +995,17 @@ s2io_msix_ring_handle(int irq, void *dev_id);
990static irqreturn_t 995static irqreturn_t
991s2io_msix_fifo_handle(int irq, void *dev_id); 996s2io_msix_fifo_handle(int irq, void *dev_id);
992static irqreturn_t s2io_isr(int irq, void *dev_id); 997static irqreturn_t s2io_isr(int irq, void *dev_id);
993static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag); 998static int verify_xena_quiescence(nic_t *sp);
994static const struct ethtool_ops netdev_ethtool_ops; 999static const struct ethtool_ops netdev_ethtool_ops;
995static void s2io_set_link(struct work_struct *work); 1000static void s2io_set_link(struct work_struct *work);
996static int s2io_set_swapper(nic_t * sp); 1001static int s2io_set_swapper(nic_t * sp);
997static void s2io_card_down(nic_t *nic); 1002static void s2io_card_down(nic_t *nic);
998static int s2io_card_up(nic_t *nic); 1003static int s2io_card_up(nic_t *nic);
999static int get_xena_rev_id(struct pci_dev *pdev); 1004static int get_xena_rev_id(struct pci_dev *pdev);
1005static int wait_for_cmd_complete(void *addr, u64 busy_bit);
1006static int s2io_add_isr(nic_t * sp);
1007static void s2io_rem_isr(nic_t * sp);
1008
1000static void restore_xmsi_data(nic_t *nic); 1009static void restore_xmsi_data(nic_t *nic);
1001 1010
1002static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, lro_t **lro, RxD_t *rxdp, nic_t *sp); 1011static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, lro_t **lro, RxD_t *rxdp, nic_t *sp);