diff options
Diffstat (limited to 'drivers/net/qlcnic/qlcnic.h')
-rw-r--r-- | drivers/net/qlcnic/qlcnic.h | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 0da94b208db1..896d40df9a13 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h | |||
@@ -51,8 +51,9 @@ | |||
51 | 51 | ||
52 | #define _QLCNIC_LINUX_MAJOR 5 | 52 | #define _QLCNIC_LINUX_MAJOR 5 |
53 | #define _QLCNIC_LINUX_MINOR 0 | 53 | #define _QLCNIC_LINUX_MINOR 0 |
54 | #define _QLCNIC_LINUX_SUBVERSION 0 | 54 | #define _QLCNIC_LINUX_SUBVERSION 2 |
55 | #define QLCNIC_LINUX_VERSIONID "5.0.0" | 55 | #define QLCNIC_LINUX_VERSIONID "5.0.2" |
56 | #define QLCNIC_DRV_IDC_VER 0x01 | ||
56 | 57 | ||
57 | #define QLCNIC_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c)) | 58 | #define QLCNIC_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c)) |
58 | #define _major(v) (((v) >> 24) & 0xff) | 59 | #define _major(v) (((v) >> 24) & 0xff) |
@@ -98,8 +99,6 @@ | |||
98 | #define QLCNIC_CT_DEFAULT_RX_BUF_LEN 2048 | 99 | #define QLCNIC_CT_DEFAULT_RX_BUF_LEN 2048 |
99 | #define QLCNIC_LRO_BUFFER_EXTRA 2048 | 100 | #define QLCNIC_LRO_BUFFER_EXTRA 2048 |
100 | 101 | ||
101 | #define QLCNIC_RX_LRO_BUFFER_LENGTH (8060) | ||
102 | |||
103 | /* Opcodes to be used with the commands */ | 102 | /* Opcodes to be used with the commands */ |
104 | #define TX_ETHER_PKT 0x01 | 103 | #define TX_ETHER_PKT 0x01 |
105 | #define TX_TCP_PKT 0x02 | 104 | #define TX_TCP_PKT 0x02 |
@@ -133,7 +132,6 @@ | |||
133 | 132 | ||
134 | #define RCV_RING_NORMAL 0 | 133 | #define RCV_RING_NORMAL 0 |
135 | #define RCV_RING_JUMBO 1 | 134 | #define RCV_RING_JUMBO 1 |
136 | #define RCV_RING_LRO 2 | ||
137 | 135 | ||
138 | #define MIN_CMD_DESCRIPTORS 64 | 136 | #define MIN_CMD_DESCRIPTORS 64 |
139 | #define MIN_RCV_DESCRIPTORS 64 | 137 | #define MIN_RCV_DESCRIPTORS 64 |
@@ -144,7 +142,6 @@ | |||
144 | #define MAX_RCV_DESCRIPTORS_10G 8192 | 142 | #define MAX_RCV_DESCRIPTORS_10G 8192 |
145 | #define MAX_JUMBO_RCV_DESCRIPTORS_1G 512 | 143 | #define MAX_JUMBO_RCV_DESCRIPTORS_1G 512 |
146 | #define MAX_JUMBO_RCV_DESCRIPTORS_10G 1024 | 144 | #define MAX_JUMBO_RCV_DESCRIPTORS_10G 1024 |
147 | #define MAX_LRO_RCV_DESCRIPTORS 8 | ||
148 | 145 | ||
149 | #define DEFAULT_RCV_DESCRIPTORS_1G 2048 | 146 | #define DEFAULT_RCV_DESCRIPTORS_1G 2048 |
150 | #define DEFAULT_RCV_DESCRIPTORS_10G 4096 | 147 | #define DEFAULT_RCV_DESCRIPTORS_10G 4096 |
@@ -152,8 +149,6 @@ | |||
152 | #define get_next_index(index, length) \ | 149 | #define get_next_index(index, length) \ |
153 | (((index) + 1) & ((length) - 1)) | 150 | (((index) + 1) & ((length) - 1)) |
154 | 151 | ||
155 | #define MPORT_MULTI_FUNCTION_MODE 0x2222 | ||
156 | |||
157 | /* | 152 | /* |
158 | * Following data structures describe the descriptors that will be used. | 153 | * Following data structures describe the descriptors that will be used. |
159 | * Added fileds of tcpHdrSize and ipHdrSize, The driver needs to do it only when | 154 | * Added fileds of tcpHdrSize and ipHdrSize, The driver needs to do it only when |
@@ -399,13 +394,9 @@ struct qlcnic_hardware_context { | |||
399 | 394 | ||
400 | unsigned long pci_len0; | 395 | unsigned long pci_len0; |
401 | 396 | ||
402 | u32 ocm_win; | ||
403 | u32 crb_win; | ||
404 | |||
405 | rwlock_t crb_lock; | 397 | rwlock_t crb_lock; |
406 | struct mutex mem_lock; | 398 | struct mutex mem_lock; |
407 | 399 | ||
408 | u8 cut_through; | ||
409 | u8 revision_id; | 400 | u8 revision_id; |
410 | u8 pci_func; | 401 | u8 pci_func; |
411 | u8 linkup; | 402 | u8 linkup; |
@@ -428,6 +419,10 @@ struct qlcnic_adapter_stats { | |||
428 | u64 xmit_on; | 419 | u64 xmit_on; |
429 | u64 xmit_off; | 420 | u64 xmit_off; |
430 | u64 skb_alloc_failure; | 421 | u64 skb_alloc_failure; |
422 | u64 null_skb; | ||
423 | u64 null_rxbuf; | ||
424 | u64 rx_dma_map_error; | ||
425 | u64 tx_dma_map_error; | ||
431 | }; | 426 | }; |
432 | 427 | ||
433 | /* | 428 | /* |
@@ -916,14 +911,12 @@ struct qlcnic_adapter { | |||
916 | u16 num_txd; | 911 | u16 num_txd; |
917 | u16 num_rxd; | 912 | u16 num_rxd; |
918 | u16 num_jumbo_rxd; | 913 | u16 num_jumbo_rxd; |
919 | u16 num_lro_rxd; | ||
920 | 914 | ||
921 | u8 max_rds_rings; | 915 | u8 max_rds_rings; |
922 | u8 max_sds_rings; | 916 | u8 max_sds_rings; |
923 | u8 driver_mismatch; | 917 | u8 driver_mismatch; |
924 | u8 msix_supported; | 918 | u8 msix_supported; |
925 | u8 rx_csum; | 919 | u8 rx_csum; |
926 | u8 pci_using_dac; | ||
927 | u8 portnum; | 920 | u8 portnum; |
928 | u8 physical_port; | 921 | u8 physical_port; |
929 | 922 | ||
@@ -958,11 +951,15 @@ struct qlcnic_adapter { | |||
958 | u8 dev_state; | 951 | u8 dev_state; |
959 | u8 diag_test; | 952 | u8 diag_test; |
960 | u8 diag_cnt; | 953 | u8 diag_cnt; |
954 | u8 reset_ack_timeo; | ||
955 | u8 dev_init_timeo; | ||
961 | u8 rsrd1; | 956 | u8 rsrd1; |
962 | u16 rsrd2; | 957 | u16 msg_enable; |
963 | 958 | ||
964 | u8 mac_addr[ETH_ALEN]; | 959 | u8 mac_addr[ETH_ALEN]; |
965 | 960 | ||
961 | u64 dev_rst_time; | ||
962 | |||
966 | struct qlcnic_adapter_stats stats; | 963 | struct qlcnic_adapter_stats stats; |
967 | 964 | ||
968 | struct qlcnic_recv_context recv_ctx; | 965 | struct qlcnic_recv_context recv_ctx; |
@@ -994,6 +991,11 @@ u32 qlcnic_hw_read_wx_2M(struct qlcnic_adapter *adapter, ulong off); | |||
994 | int qlcnic_hw_write_wx_2M(struct qlcnic_adapter *, ulong off, u32 data); | 991 | int qlcnic_hw_write_wx_2M(struct qlcnic_adapter *, ulong off, u32 data); |
995 | int qlcnic_pci_mem_write_2M(struct qlcnic_adapter *, u64 off, u64 data); | 992 | int qlcnic_pci_mem_write_2M(struct qlcnic_adapter *, u64 off, u64 data); |
996 | int qlcnic_pci_mem_read_2M(struct qlcnic_adapter *, u64 off, u64 *data); | 993 | int qlcnic_pci_mem_read_2M(struct qlcnic_adapter *, u64 off, u64 *data); |
994 | void qlcnic_pci_camqm_read_2M(struct qlcnic_adapter *, u64, u64 *); | ||
995 | void qlcnic_pci_camqm_write_2M(struct qlcnic_adapter *, u64, u64); | ||
996 | |||
997 | #define ADDR_IN_RANGE(addr, low, high) \ | ||
998 | (((addr) < (high)) && ((addr) >= (low))) | ||
997 | 999 | ||
998 | #define QLCRD32(adapter, off) \ | 1000 | #define QLCRD32(adapter, off) \ |
999 | (qlcnic_hw_read_wx_2M(adapter, off)) | 1001 | (qlcnic_hw_read_wx_2M(adapter, off)) |
@@ -1035,6 +1037,7 @@ int qlcnic_need_fw_reset(struct qlcnic_adapter *adapter); | |||
1035 | void qlcnic_request_firmware(struct qlcnic_adapter *adapter); | 1037 | void qlcnic_request_firmware(struct qlcnic_adapter *adapter); |
1036 | void qlcnic_release_firmware(struct qlcnic_adapter *adapter); | 1038 | void qlcnic_release_firmware(struct qlcnic_adapter *adapter); |
1037 | int qlcnic_pinit_from_rom(struct qlcnic_adapter *adapter); | 1039 | int qlcnic_pinit_from_rom(struct qlcnic_adapter *adapter); |
1040 | int qlcnic_setup_idc_param(struct qlcnic_adapter *adapter); | ||
1038 | 1041 | ||
1039 | int qlcnic_rom_fast_read(struct qlcnic_adapter *adapter, int addr, int *valp); | 1042 | int qlcnic_rom_fast_read(struct qlcnic_adapter *adapter, int addr, int *valp); |
1040 | int qlcnic_rom_fast_read_words(struct qlcnic_adapter *adapter, int addr, | 1043 | int qlcnic_rom_fast_read_words(struct qlcnic_adapter *adapter, int addr, |
@@ -1128,4 +1131,11 @@ static inline u32 qlcnic_tx_avail(struct qlcnic_host_tx_ring *tx_ring) | |||
1128 | 1131 | ||
1129 | extern const struct ethtool_ops qlcnic_ethtool_ops; | 1132 | extern const struct ethtool_ops qlcnic_ethtool_ops; |
1130 | 1133 | ||
1134 | #define QLCDB(adapter, lvl, _fmt, _args...) do { \ | ||
1135 | if (NETIF_MSG_##lvl & adapter->msg_enable) \ | ||
1136 | printk(KERN_INFO "%s: %s: " _fmt, \ | ||
1137 | dev_name(&adapter->pdev->dev), \ | ||
1138 | __func__, ##_args); \ | ||
1139 | } while (0) | ||
1140 | |||
1131 | #endif /* __QLCNIC_H_ */ | 1141 | #endif /* __QLCNIC_H_ */ |