diff options
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 6dca3574e355..77220687b92a 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -53,8 +53,8 @@ | |||
53 | 53 | ||
54 | #define _NETXEN_NIC_LINUX_MAJOR 4 | 54 | #define _NETXEN_NIC_LINUX_MAJOR 4 |
55 | #define _NETXEN_NIC_LINUX_MINOR 0 | 55 | #define _NETXEN_NIC_LINUX_MINOR 0 |
56 | #define _NETXEN_NIC_LINUX_SUBVERSION 74 | 56 | #define _NETXEN_NIC_LINUX_SUBVERSION 75 |
57 | #define NETXEN_NIC_LINUX_VERSIONID "4.0.74" | 57 | #define NETXEN_NIC_LINUX_VERSIONID "4.0.75" |
58 | 58 | ||
59 | #define NETXEN_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c)) | 59 | #define NETXEN_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c)) |
60 | #define _major(v) (((v) >> 24) & 0xff) | 60 | #define _major(v) (((v) >> 24) & 0xff) |
@@ -174,8 +174,11 @@ | |||
174 | 174 | ||
175 | #define MAX_NUM_CARDS 4 | 175 | #define MAX_NUM_CARDS 4 |
176 | 176 | ||
177 | #define MAX_BUFFERS_PER_CMD 32 | 177 | #define NETXEN_MAX_FRAGS_PER_TX 14 |
178 | #define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + 4) | 178 | #define MAX_TSO_HEADER_DESC 2 |
179 | #define MGMT_CMD_DESC_RESV 4 | ||
180 | #define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \ | ||
181 | + MGMT_CMD_DESC_RESV) | ||
179 | #define NX_MAX_TX_TIMEOUTS 2 | 182 | #define NX_MAX_TX_TIMEOUTS 2 |
180 | 183 | ||
181 | /* | 184 | /* |
@@ -555,7 +558,7 @@ struct netxen_recv_crb { | |||
555 | */ | 558 | */ |
556 | struct netxen_cmd_buffer { | 559 | struct netxen_cmd_buffer { |
557 | struct sk_buff *skb; | 560 | struct sk_buff *skb; |
558 | struct netxen_skb_frag frag_array[MAX_BUFFERS_PER_CMD + 1]; | 561 | struct netxen_skb_frag frag_array[MAX_SKB_FRAGS + 1]; |
559 | u32 frag_count; | 562 | u32 frag_count; |
560 | }; | 563 | }; |
561 | 564 | ||
@@ -736,7 +739,8 @@ struct netxen_recv_context { | |||
736 | #define NX_CDRP_CMD_READ_PEXQ_PARAMETERS 0x0000001c | 739 | #define NX_CDRP_CMD_READ_PEXQ_PARAMETERS 0x0000001c |
737 | #define NX_CDRP_CMD_GET_LIC_CAPABILITIES 0x0000001d | 740 | #define NX_CDRP_CMD_GET_LIC_CAPABILITIES 0x0000001d |
738 | #define NX_CDRP_CMD_READ_MAX_LRO_PER_BOARD 0x0000001e | 741 | #define NX_CDRP_CMD_READ_MAX_LRO_PER_BOARD 0x0000001e |
739 | #define NX_CDRP_CMD_MAX 0x0000001f | 742 | #define NX_CDRP_CMD_CONFIG_GBE_PORT 0x0000001f |
743 | #define NX_CDRP_CMD_MAX 0x00000020 | ||
740 | 744 | ||
741 | #define NX_RCODE_SUCCESS 0 | 745 | #define NX_RCODE_SUCCESS 0 |
742 | #define NX_RCODE_NO_HOST_MEM 1 | 746 | #define NX_RCODE_NO_HOST_MEM 1 |
@@ -1051,6 +1055,7 @@ typedef struct { | |||
1051 | #define NX_FW_CAPABILITY_BDG (1 << 8) | 1055 | #define NX_FW_CAPABILITY_BDG (1 << 8) |
1052 | #define NX_FW_CAPABILITY_FVLANTX (1 << 9) | 1056 | #define NX_FW_CAPABILITY_FVLANTX (1 << 9) |
1053 | #define NX_FW_CAPABILITY_HW_LRO (1 << 10) | 1057 | #define NX_FW_CAPABILITY_HW_LRO (1 << 10) |
1058 | #define NX_FW_CAPABILITY_GBE_LINK_CFG (1 << 11) | ||
1054 | 1059 | ||
1055 | /* module types */ | 1060 | /* module types */ |
1056 | #define LINKEVENT_MODULE_NOT_PRESENT 1 | 1061 | #define LINKEVENT_MODULE_NOT_PRESENT 1 |
@@ -1129,6 +1134,7 @@ typedef struct { | |||
1129 | #define NETXEN_NIC_MSI_ENABLED 0x02 | 1134 | #define NETXEN_NIC_MSI_ENABLED 0x02 |
1130 | #define NETXEN_NIC_MSIX_ENABLED 0x04 | 1135 | #define NETXEN_NIC_MSIX_ENABLED 0x04 |
1131 | #define NETXEN_NIC_LRO_ENABLED 0x08 | 1136 | #define NETXEN_NIC_LRO_ENABLED 0x08 |
1137 | #define NETXEN_NIC_LRO_DISABLED 0x00 | ||
1132 | #define NETXEN_NIC_BRIDGE_ENABLED 0X10 | 1138 | #define NETXEN_NIC_BRIDGE_ENABLED 0X10 |
1133 | #define NETXEN_NIC_DIAG_ENABLED 0x20 | 1139 | #define NETXEN_NIC_DIAG_ENABLED 0x20 |
1134 | #define NETXEN_IS_MSI_FAMILY(adapter) \ | 1140 | #define NETXEN_IS_MSI_FAMILY(adapter) \ |
@@ -1171,7 +1177,7 @@ struct netxen_adapter { | |||
1171 | u8 max_sds_rings; | 1177 | u8 max_sds_rings; |
1172 | u8 driver_mismatch; | 1178 | u8 driver_mismatch; |
1173 | u8 msix_supported; | 1179 | u8 msix_supported; |
1174 | u8 rx_csum; | 1180 | u8 __pad; |
1175 | u8 pci_using_dac; | 1181 | u8 pci_using_dac; |
1176 | u8 portnum; | 1182 | u8 portnum; |
1177 | u8 physical_port; | 1183 | u8 physical_port; |
@@ -1253,19 +1259,9 @@ struct netxen_adapter { | |||
1253 | const struct firmware *fw; | 1259 | const struct firmware *fw; |
1254 | }; | 1260 | }; |
1255 | 1261 | ||
1256 | int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port); | ||
1257 | int netxen_niu_disable_xg_port(struct netxen_adapter *adapter); | ||
1258 | |||
1259 | int nx_fw_cmd_query_phy(struct netxen_adapter *adapter, u32 reg, u32 *val); | 1262 | int nx_fw_cmd_query_phy(struct netxen_adapter *adapter, u32 reg, u32 *val); |
1260 | int nx_fw_cmd_set_phy(struct netxen_adapter *adapter, u32 reg, u32 val); | 1263 | int nx_fw_cmd_set_phy(struct netxen_adapter *adapter, u32 reg, u32 val); |
1261 | 1264 | ||
1262 | /* Functions available from netxen_nic_hw.c */ | ||
1263 | int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu); | ||
1264 | int netxen_nic_set_mtu_gb(struct netxen_adapter *adapter, int new_mtu); | ||
1265 | |||
1266 | int netxen_p2_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr); | ||
1267 | int netxen_p3_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr); | ||
1268 | |||
1269 | #define NXRD32(adapter, off) \ | 1265 | #define NXRD32(adapter, off) \ |
1270 | (adapter->crb_read(adapter, off)) | 1266 | (adapter->crb_read(adapter, off)) |
1271 | #define NXWR32(adapter, off, val) \ | 1267 | #define NXWR32(adapter, off, val) \ |
@@ -1345,11 +1341,8 @@ void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, | |||
1345 | struct nx_host_rds_ring *rds_ring); | 1341 | struct nx_host_rds_ring *rds_ring); |
1346 | int netxen_process_cmd_ring(struct netxen_adapter *adapter); | 1342 | int netxen_process_cmd_ring(struct netxen_adapter *adapter); |
1347 | int netxen_process_rcv_ring(struct nx_host_sds_ring *sds_ring, int max); | 1343 | int netxen_process_rcv_ring(struct nx_host_sds_ring *sds_ring, int max); |
1348 | void netxen_p2_nic_set_multi(struct net_device *netdev); | 1344 | |
1349 | void netxen_p3_nic_set_multi(struct net_device *netdev); | ||
1350 | void netxen_p3_free_mac_list(struct netxen_adapter *adapter); | 1345 | void netxen_p3_free_mac_list(struct netxen_adapter *adapter); |
1351 | int netxen_p2_nic_set_promisc(struct netxen_adapter *adapter, u32 mode); | ||
1352 | int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32); | ||
1353 | int netxen_config_intr_coalesce(struct netxen_adapter *adapter); | 1346 | int netxen_config_intr_coalesce(struct netxen_adapter *adapter); |
1354 | int netxen_config_rss(struct netxen_adapter *adapter, int enable); | 1347 | int netxen_config_rss(struct netxen_adapter *adapter, int enable); |
1355 | int netxen_config_ipaddr(struct netxen_adapter *adapter, u32 ip, int cmd); | 1348 | int netxen_config_ipaddr(struct netxen_adapter *adapter, u32 ip, int cmd); |
@@ -1358,15 +1351,14 @@ void netxen_advert_link_change(struct netxen_adapter *adapter, int linkup); | |||
1358 | void netxen_pci_camqm_read_2M(struct netxen_adapter *, u64, u64 *); | 1351 | void netxen_pci_camqm_read_2M(struct netxen_adapter *, u64, u64 *); |
1359 | void netxen_pci_camqm_write_2M(struct netxen_adapter *, u64, u64); | 1352 | void netxen_pci_camqm_write_2M(struct netxen_adapter *, u64, u64); |
1360 | 1353 | ||
1354 | int nx_fw_cmd_set_gbe_port(struct netxen_adapter *adapter, | ||
1355 | u32 speed, u32 duplex, u32 autoneg); | ||
1361 | int nx_fw_cmd_set_mtu(struct netxen_adapter *adapter, int mtu); | 1356 | int nx_fw_cmd_set_mtu(struct netxen_adapter *adapter, int mtu); |
1362 | int netxen_nic_change_mtu(struct net_device *netdev, int new_mtu); | 1357 | int netxen_nic_change_mtu(struct net_device *netdev, int new_mtu); |
1363 | int netxen_config_hw_lro(struct netxen_adapter *adapter, int enable); | 1358 | int netxen_config_hw_lro(struct netxen_adapter *adapter, int enable); |
1364 | int netxen_config_bridged_mode(struct netxen_adapter *adapter, int enable); | 1359 | int netxen_config_bridged_mode(struct netxen_adapter *adapter, int enable); |
1365 | int netxen_send_lro_cleanup(struct netxen_adapter *adapter); | 1360 | int netxen_send_lro_cleanup(struct netxen_adapter *adapter); |
1366 | 1361 | ||
1367 | int netxen_nic_set_mac(struct net_device *netdev, void *p); | ||
1368 | struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev); | ||
1369 | |||
1370 | void netxen_nic_update_cmd_producer(struct netxen_adapter *adapter, | 1362 | void netxen_nic_update_cmd_producer(struct netxen_adapter *adapter, |
1371 | struct nx_host_tx_ring *tx_ring); | 1363 | struct nx_host_tx_ring *tx_ring); |
1372 | 1364 | ||