diff options
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r-- | drivers/net/s2io.h | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 89151cb52181..1cc24b56760e 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -652,6 +652,30 @@ typedef struct { | |||
652 | #define SMALL_BLK_CNT 30 | 652 | #define SMALL_BLK_CNT 30 |
653 | #define LARGE_BLK_CNT 100 | 653 | #define LARGE_BLK_CNT 100 |
654 | 654 | ||
655 | /* | ||
656 | * Structure to keep track of the MSI-X vectors and the corresponding | ||
657 | * argument registered against each vector | ||
658 | */ | ||
659 | #define MAX_REQUESTED_MSI_X 17 | ||
660 | struct s2io_msix_entry | ||
661 | { | ||
662 | u16 vector; | ||
663 | u16 entry; | ||
664 | void *arg; | ||
665 | |||
666 | u8 type; | ||
667 | #define MSIX_FIFO_TYPE 1 | ||
668 | #define MSIX_RING_TYPE 2 | ||
669 | |||
670 | u8 in_use; | ||
671 | #define MSIX_REGISTERED_SUCCESS 0xAA | ||
672 | }; | ||
673 | |||
674 | struct msix_info_st { | ||
675 | u64 addr; | ||
676 | u64 data; | ||
677 | }; | ||
678 | |||
655 | /* Structure representing one instance of the NIC */ | 679 | /* Structure representing one instance of the NIC */ |
656 | struct s2io_nic { | 680 | struct s2io_nic { |
657 | #ifdef CONFIG_S2IO_NAPI | 681 | #ifdef CONFIG_S2IO_NAPI |
@@ -719,13 +743,8 @@ struct s2io_nic { | |||
719 | * a schedule task that will set the correct Link state once the | 743 | * a schedule task that will set the correct Link state once the |
720 | * NIC's PHY has stabilized after a state change. | 744 | * NIC's PHY has stabilized after a state change. |
721 | */ | 745 | */ |
722 | #ifdef INIT_TQUEUE | ||
723 | struct tq_struct rst_timer_task; | ||
724 | struct tq_struct set_link_task; | ||
725 | #else | ||
726 | struct work_struct rst_timer_task; | 746 | struct work_struct rst_timer_task; |
727 | struct work_struct set_link_task; | 747 | struct work_struct set_link_task; |
728 | #endif | ||
729 | 748 | ||
730 | /* Flag that can be used to turn on or turn off the Rx checksum | 749 | /* Flag that can be used to turn on or turn off the Rx checksum |
731 | * offload feature. | 750 | * offload feature. |
@@ -748,10 +767,23 @@ struct s2io_nic { | |||
748 | atomic_t card_state; | 767 | atomic_t card_state; |
749 | volatile unsigned long link_state; | 768 | volatile unsigned long link_state; |
750 | struct vlan_group *vlgrp; | 769 | struct vlan_group *vlgrp; |
770 | #define MSIX_FLG 0xA5 | ||
771 | struct msix_entry *entries; | ||
772 | struct s2io_msix_entry *s2io_entries; | ||
773 | char desc1[35]; | ||
774 | char desc2[35]; | ||
775 | |||
776 | struct msix_info_st msix_info[0x3f]; | ||
777 | |||
751 | #define XFRAME_I_DEVICE 1 | 778 | #define XFRAME_I_DEVICE 1 |
752 | #define XFRAME_II_DEVICE 2 | 779 | #define XFRAME_II_DEVICE 2 |
753 | u8 device_type; | 780 | u8 device_type; |
754 | 781 | ||
782 | #define INTA 0 | ||
783 | #define MSI 1 | ||
784 | #define MSI_X 2 | ||
785 | u8 intr_type; | ||
786 | |||
755 | spinlock_t rx_lock; | 787 | spinlock_t rx_lock; |
756 | atomic_t isr_cnt; | 788 | atomic_t isr_cnt; |
757 | }; | 789 | }; |
@@ -886,6 +918,13 @@ static int s2io_poll(struct net_device *dev, int *budget); | |||
886 | static void s2io_init_pci(nic_t * sp); | 918 | static void s2io_init_pci(nic_t * sp); |
887 | int s2io_set_mac_addr(struct net_device *dev, u8 * addr); | 919 | int s2io_set_mac_addr(struct net_device *dev, u8 * addr); |
888 | static void s2io_alarm_handle(unsigned long data); | 920 | static void s2io_alarm_handle(unsigned long data); |
921 | static int s2io_enable_msi(nic_t *nic); | ||
922 | static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs); | ||
923 | static irqreturn_t | ||
924 | s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs); | ||
925 | static irqreturn_t | ||
926 | s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs); | ||
927 | int s2io_enable_msi_x(nic_t *nic); | ||
889 | static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); | 928 | static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); |
890 | static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag); | 929 | static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag); |
891 | static struct ethtool_ops netdev_ethtool_ops; | 930 | static struct ethtool_ops netdev_ethtool_ops; |
@@ -894,4 +933,5 @@ int s2io_set_swapper(nic_t * sp); | |||
894 | static void s2io_card_down(nic_t *nic); | 933 | static void s2io_card_down(nic_t *nic); |
895 | static int s2io_card_up(nic_t *nic); | 934 | static int s2io_card_up(nic_t *nic); |
896 | int get_xena_rev_id(struct pci_dev *pdev); | 935 | int get_xena_rev_id(struct pci_dev *pdev); |
936 | void restore_xmsi_data(nic_t *nic); | ||
897 | #endif /* _S2IO_H */ | 937 | #endif /* _S2IO_H */ |