aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic.h
diff options
context:
space:
mode:
authorMithlesh Thukral <mithlesh@netxen.com>2007-04-20 10:55:26 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:01:06 -0400
commit6c80b18df3537d1221ab34555c150bccbfd90260 (patch)
treeb82c057feb8a4c5c4ba0171b268599ea357eb2a9 /drivers/net/netxen/netxen_nic.h
parent5d512f5594f9f4829b099c87f7bc6f683ef146ca (diff)
NetXen: Port swap feature for multi port cards
NetXen: Port Swap feature This patch will allow a port numbers on the card to be swapped in host driver. This feature is applicable to cards having more than 1 port. Signed-off by: Milan Bag <mbag@netxen.com> Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r--drivers/net/netxen/netxen_nic.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 923ae6c029d6..1e944d5eb45b 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -205,6 +205,7 @@ enum {
205 205
206#define MAX_CMD_DESCRIPTORS 1024 206#define MAX_CMD_DESCRIPTORS 1024
207#define MAX_RCV_DESCRIPTORS 16384 207#define MAX_RCV_DESCRIPTORS 16384
208#define MAX_CMD_DESCRIPTORS_HOST (MAX_CMD_DESCRIPTORS / 4)
208#define MAX_RCV_DESCRIPTORS_1G (MAX_RCV_DESCRIPTORS / 4) 209#define MAX_RCV_DESCRIPTORS_1G (MAX_RCV_DESCRIPTORS / 4)
209#define MAX_JUMBO_RCV_DESCRIPTORS 1024 210#define MAX_JUMBO_RCV_DESCRIPTORS 1024
210#define MAX_LRO_RCV_DESCRIPTORS 64 211#define MAX_LRO_RCV_DESCRIPTORS 64
@@ -303,6 +304,8 @@ struct netxen_ring_ctx {
303 304
304#define netxen_set_cmd_desc_port(cmd_desc, var) \ 305#define netxen_set_cmd_desc_port(cmd_desc, var) \
305 ((cmd_desc)->port_ctxid |= ((var) & 0x0F)) 306 ((cmd_desc)->port_ctxid |= ((var) & 0x0F))
307#define netxen_set_cmd_desc_ctxid(cmd_desc, var) \
308 ((cmd_desc)->port_ctxid |= ((var) & 0xF0))
306 309
307#define netxen_set_cmd_desc_flags(cmd_desc, val) \ 310#define netxen_set_cmd_desc_flags(cmd_desc, val) \
308 ((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x7f), \ 311 ((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x7f), \
@@ -445,7 +448,7 @@ struct status_desc {
445 /* Bit pattern: 0-6 lro_count indicates frag sequence, 448 /* Bit pattern: 0-6 lro_count indicates frag sequence,
446 7 last_frag indicates last frag */ 449 7 last_frag indicates last frag */
447 u8 lro; 450 u8 lro;
448} __attribute__ ((aligned(8))); 451} __attribute__ ((aligned(16)));
449 452
450enum { 453enum {
451 NETXEN_RCV_PEG_0 = 0, 454 NETXEN_RCV_PEG_0 = 0,
@@ -723,6 +726,18 @@ struct netxen_skb_frag {
723 u32 length; 726 u32 length;
724}; 727};
725 728
729#define _netxen_set_bits(config_word, start, bits, val) {\
730 unsigned long long __tmask = (((1ULL << (bits)) - 1) << (start));\
731 unsigned long long __tvalue = (val); \
732 (config_word) &= ~__tmask; \
733 (config_word) |= (((__tvalue) << (start)) & __tmask); \
734}
735
736#define _netxen_clear_bits(config_word, start, bits) {\
737 unsigned long long __tmask = (((1ULL << (bits)) - 1) << (start)); \
738 (config_word) &= ~__tmask; \
739}
740
726/* Following defines are for the state of the buffers */ 741/* Following defines are for the state of the buffers */
727#define NETXEN_BUFFER_FREE 0 742#define NETXEN_BUFFER_FREE 0
728#define NETXEN_BUFFER_BUSY 1 743#define NETXEN_BUFFER_BUSY 1
@@ -767,6 +782,8 @@ struct netxen_hardware_context {
767 void __iomem *pci_base0; 782 void __iomem *pci_base0;
768 void __iomem *pci_base1; 783 void __iomem *pci_base1;
769 void __iomem *pci_base2; 784 void __iomem *pci_base2;
785 unsigned long first_page_group_end;
786 unsigned long first_page_group_start;
770 void __iomem *db_base; 787 void __iomem *db_base;
771 unsigned long db_len; 788 unsigned long db_len;
772 789
@@ -862,6 +879,7 @@ struct netxen_adapter {
862 struct netxen_adapter *master; 879 struct netxen_adapter *master;
863 struct net_device *netdev; 880 struct net_device *netdev;
864 struct pci_dev *pdev; 881 struct pci_dev *pdev;
882 struct net_device_stats net_stats;
865 unsigned char mac_addr[ETH_ALEN]; 883 unsigned char mac_addr[ETH_ALEN];
866 int mtu; 884 int mtu;
867 int portnum; 885 int portnum;
@@ -1152,4 +1170,5 @@ extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr,
1152 1170
1153extern struct ethtool_ops netxen_nic_ethtool_ops; 1171extern struct ethtool_ops netxen_nic_ethtool_ops;
1154 1172
1173extern int physical_port[]; /* physical port # from virtual port.*/
1155#endif /* __NETXEN_NIC_H_ */ 1174#endif /* __NETXEN_NIC_H_ */