diff options
author | Sivakumar Subramani <Sivakumar.Subramani@neterion.com> | 2007-01-31 13:30:49 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-05 16:58:51 -0500 |
commit | 19a605220cf83a5ec5f8d9f9943e862ebf18f93f (patch) | |
tree | 013980ea3093db1f595a67636a52f9e4763a5e8f /drivers/net/s2io.h | |
parent | db874e65ae93861461f83658fdec08368252cd2e (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.h | 21 |
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); | |||
974 | static void alarm_intr_handler(struct s2io_nic *sp); | 977 | static void alarm_intr_handler(struct s2io_nic *sp); |
975 | 978 | ||
976 | static int s2io_starter(void); | 979 | static int s2io_starter(void); |
980 | static void s2io_closer(void); | ||
977 | static void s2io_tx_watchdog(struct net_device *dev); | 981 | static void s2io_tx_watchdog(struct net_device *dev); |
978 | static void s2io_tasklet(unsigned long dev_addr); | 982 | static void s2io_tasklet(unsigned long dev_addr); |
979 | static void s2io_set_multicast(struct net_device *dev); | 983 | static void s2io_set_multicast(struct net_device *dev); |
980 | static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp); | 984 | static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp); |
981 | static void s2io_link(nic_t * sp, int link); | 985 | static void s2io_link(nic_t * sp, int link); |
986 | static void s2io_reset(nic_t * sp); | ||
982 | static int s2io_poll(struct net_device *dev, int *budget); | 987 | static int s2io_poll(struct net_device *dev, int *budget); |
983 | static void s2io_init_pci(nic_t * sp); | 988 | static void s2io_init_pci(nic_t * sp); |
984 | static int s2io_set_mac_addr(struct net_device *dev, u8 * addr); | 989 | static int s2io_set_mac_addr(struct net_device *dev, u8 * addr); |
@@ -990,13 +995,17 @@ s2io_msix_ring_handle(int irq, void *dev_id); | |||
990 | static irqreturn_t | 995 | static irqreturn_t |
991 | s2io_msix_fifo_handle(int irq, void *dev_id); | 996 | s2io_msix_fifo_handle(int irq, void *dev_id); |
992 | static irqreturn_t s2io_isr(int irq, void *dev_id); | 997 | static irqreturn_t s2io_isr(int irq, void *dev_id); |
993 | static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag); | 998 | static int verify_xena_quiescence(nic_t *sp); |
994 | static const struct ethtool_ops netdev_ethtool_ops; | 999 | static const struct ethtool_ops netdev_ethtool_ops; |
995 | static void s2io_set_link(struct work_struct *work); | 1000 | static void s2io_set_link(struct work_struct *work); |
996 | static int s2io_set_swapper(nic_t * sp); | 1001 | static int s2io_set_swapper(nic_t * sp); |
997 | static void s2io_card_down(nic_t *nic); | 1002 | static void s2io_card_down(nic_t *nic); |
998 | static int s2io_card_up(nic_t *nic); | 1003 | static int s2io_card_up(nic_t *nic); |
999 | static int get_xena_rev_id(struct pci_dev *pdev); | 1004 | static int get_xena_rev_id(struct pci_dev *pdev); |
1005 | static int wait_for_cmd_complete(void *addr, u64 busy_bit); | ||
1006 | static int s2io_add_isr(nic_t * sp); | ||
1007 | static void s2io_rem_isr(nic_t * sp); | ||
1008 | |||
1000 | static void restore_xmsi_data(nic_t *nic); | 1009 | static void restore_xmsi_data(nic_t *nic); |
1001 | 1010 | ||
1002 | static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, lro_t **lro, RxD_t *rxdp, nic_t *sp); | 1011 | static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, lro_t **lro, RxD_t *rxdp, nic_t *sp); |