]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/qlcnic/qlcnic.h
Merge branch 'master' into for-linus
[karo-tx-linux.git] / drivers / net / qlcnic / qlcnic.h
index 4727204a245084748f1b4cc877c9ed2f6b226d9d..26c37d3a5868ce2bf7e73ba98da5456006c02c53 100644 (file)
@@ -51,8 +51,8 @@
 
 #define _QLCNIC_LINUX_MAJOR 5
 #define _QLCNIC_LINUX_MINOR 0
-#define _QLCNIC_LINUX_SUBVERSION 8
-#define QLCNIC_LINUX_VERSIONID  "5.0.8"
+#define _QLCNIC_LINUX_SUBVERSION 11
+#define QLCNIC_LINUX_VERSIONID  "5.0.11"
 #define QLCNIC_DRV_IDC_VER  0x01
 #define QLCNIC_DRIVER_VERSION  ((_QLCNIC_LINUX_MAJOR << 16) |\
                 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
 #define FIRST_PAGE_GROUP_START 0
 #define FIRST_PAGE_GROUP_END   0x100000
 
-#define P3_MAX_MTU                     (9600)
+#define P3P_MAX_MTU                     (9600)
+#define P3P_MIN_MTU                     (68)
 #define QLCNIC_MAX_ETHERHDR                32 /* This contains some padding */
 
-#define QLCNIC_P3_RX_BUF_MAX_LEN         (QLCNIC_MAX_ETHERHDR + ETH_DATA_LEN)
-#define QLCNIC_P3_RX_JUMBO_BUF_MAX_LEN   (QLCNIC_MAX_ETHERHDR + P3_MAX_MTU)
+#define QLCNIC_P3P_RX_BUF_MAX_LEN         (QLCNIC_MAX_ETHERHDR + ETH_DATA_LEN)
+#define QLCNIC_P3P_RX_JUMBO_BUF_MAX_LEN   (QLCNIC_MAX_ETHERHDR + P3P_MAX_MTU)
 #define QLCNIC_CT_DEFAULT_RX_BUF_LEN   2048
 #define QLCNIC_LRO_BUFFER_EXTRA                2048
 
@@ -224,7 +225,8 @@ struct rcv_desc {
 #define QLCNIC_LRO_DESC        0x12
 
 /* for status field in status_desc */
-#define STATUS_CKSUM_OK                (2)
+#define STATUS_CKSUM_LOOP      0
+#define STATUS_CKSUM_OK                2
 
 /* owner bits of status_desc */
 #define STATUS_OWNER_HOST      (0x1ULL << 56)
@@ -305,20 +307,20 @@ struct uni_data_desc{
 /* Magic number to let user know flash is programmed */
 #define        QLCNIC_BDINFO_MAGIC 0x12345678
 
-#define QLCNIC_BRDTYPE_P3_REF_QG       0x0021
-#define QLCNIC_BRDTYPE_P3_HMEZ         0x0022
-#define QLCNIC_BRDTYPE_P3_10G_CX4_LP   0x0023
-#define QLCNIC_BRDTYPE_P3_4_GB         0x0024
-#define QLCNIC_BRDTYPE_P3_IMEZ         0x0025
-#define QLCNIC_BRDTYPE_P3_10G_SFP_PLUS 0x0026
-#define QLCNIC_BRDTYPE_P3_10000_BASE_T 0x0027
-#define QLCNIC_BRDTYPE_P3_XG_LOM       0x0028
-#define QLCNIC_BRDTYPE_P3_4_GB_MM      0x0029
-#define QLCNIC_BRDTYPE_P3_10G_SFP_CT   0x002a
-#define QLCNIC_BRDTYPE_P3_10G_SFP_QT   0x002b
-#define QLCNIC_BRDTYPE_P3_10G_CX4      0x0031
-#define QLCNIC_BRDTYPE_P3_10G_XFP      0x0032
-#define QLCNIC_BRDTYPE_P3_10G_TP       0x0080
+#define QLCNIC_BRDTYPE_P3P_REF_QG      0x0021
+#define QLCNIC_BRDTYPE_P3P_HMEZ                0x0022
+#define QLCNIC_BRDTYPE_P3P_10G_CX4_LP  0x0023
+#define QLCNIC_BRDTYPE_P3P_4_GB                0x0024
+#define QLCNIC_BRDTYPE_P3P_IMEZ                0x0025
+#define QLCNIC_BRDTYPE_P3P_10G_SFP_PLUS        0x0026
+#define QLCNIC_BRDTYPE_P3P_10000_BASE_T        0x0027
+#define QLCNIC_BRDTYPE_P3P_XG_LOM      0x0028
+#define QLCNIC_BRDTYPE_P3P_4_GB_MM     0x0029
+#define QLCNIC_BRDTYPE_P3P_10G_SFP_CT  0x002a
+#define QLCNIC_BRDTYPE_P3P_10G_SFP_QT  0x002b
+#define QLCNIC_BRDTYPE_P3P_10G_CX4     0x0031
+#define QLCNIC_BRDTYPE_P3P_10G_XFP     0x0032
+#define QLCNIC_BRDTYPE_P3P_10G_TP      0x0080
 
 #define QLCNIC_MSIX_TABLE_OFFSET       0x44
 
@@ -717,11 +719,13 @@ struct qlcnic_cardrsp_tx_ctx {
 
 /* MAC */
 
-#define MC_COUNT_P3    38
+#define MC_COUNT_P3P   38
 
 #define QLCNIC_MAC_NOOP        0
 #define QLCNIC_MAC_ADD 1
 #define QLCNIC_MAC_DEL 2
+#define QLCNIC_MAC_VLAN_ADD    3
+#define QLCNIC_MAC_VLAN_DEL    4
 
 struct qlcnic_mac_list_s {
        struct list_head list;
@@ -895,6 +899,16 @@ struct qlcnic_mac_req {
        u8 mac_addr[6];
 };
 
+struct qlcnic_vlan_req {
+       __le16 vlan_id;
+       __le16 rsvd[3];
+};
+
+struct qlcnic_ipaddr {
+       __be32 ipv4;
+       __be32 ipv6[4];
+};
+
 #define QLCNIC_MSI_ENABLED             0x02
 #define QLCNIC_MSIX_ENABLED            0x04
 #define QLCNIC_LRO_ENABLED             0x08
@@ -906,6 +920,7 @@ struct qlcnic_mac_req {
 #define QLCNIC_TAGGING_ENABLED         0x100
 #define QLCNIC_MACSPOOF                        0x200
 #define QLCNIC_MAC_OVERRIDE_DISABLED   0x400
+#define QLCNIC_PROMISC_DISABLED                0x800
 #define QLCNIC_IS_MSI_FAMILY(adapter) \
        ((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))
 
@@ -932,6 +947,7 @@ struct qlcnic_mac_req {
 struct qlcnic_filter {
        struct hlist_node fnode;
        u8 faddr[ETH_ALEN];
+       __le16 vlan_id;
        unsigned long ftime;
 };
 
@@ -1009,6 +1025,7 @@ struct qlcnic_adapter {
 
        u64 dev_rst_time;
 
+       struct vlan_group *vlgrp;
        struct qlcnic_npar_info *npars;
        struct qlcnic_eswitch *eswitch;
        struct qlcnic_nic_template *nic_ops;
@@ -1164,6 +1181,18 @@ struct qlcnic_esw_func_cfg {
 #define QLCNIC_STATS_ESWITCH           2
 #define QLCNIC_QUERY_RX_COUNTER                0
 #define QLCNIC_QUERY_TX_COUNTER                1
+#define QLCNIC_ESW_STATS_NOT_AVAIL     0xffffffffffffffffULL
+
+#define QLCNIC_ADD_ESW_STATS(VAL1, VAL2)\
+do {   \
+       if (((VAL1) == QLCNIC_ESW_STATS_NOT_AVAIL) && \
+           ((VAL2) != QLCNIC_ESW_STATS_NOT_AVAIL)) \
+               (VAL1) = (VAL2); \
+       else if (((VAL1) != QLCNIC_ESW_STATS_NOT_AVAIL) && \
+                ((VAL2) != QLCNIC_ESW_STATS_NOT_AVAIL)) \
+                       (VAL1) += (VAL2); \
+} while (0)
+
 struct __qlcnic_esw_statistics {
        __le16 context_id;
        __le16 version;
@@ -1269,7 +1298,7 @@ void qlcnic_free_mac_list(struct qlcnic_adapter *adapter);
 int qlcnic_nic_set_promisc(struct qlcnic_adapter *adapter, u32);
 int qlcnic_config_intr_coalesce(struct qlcnic_adapter *adapter);
 int qlcnic_config_rss(struct qlcnic_adapter *adapter, int enable);
-int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, u32 ip, int cmd);
+int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, __be32 ip, int cmd);
 int qlcnic_linkevent_request(struct qlcnic_adapter *adapter, int enable);
 void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup);
 
@@ -1285,6 +1314,8 @@ int qlcnic_set_ilb_mode(struct qlcnic_adapter *adapter);
 void qlcnic_fetch_mac(struct qlcnic_adapter *, u32, u32, u8, u8 *);
 
 /* Functions from qlcnic_main.c */
+int qlcnic_request_quiscent_mode(struct qlcnic_adapter *adapter);
+void qlcnic_clear_quiscent_mode(struct qlcnic_adapter *adapter);
 int qlcnic_reset_context(struct qlcnic_adapter *);
 u32 qlcnic_issue_cmd(struct qlcnic_adapter *adapter,
        u32 pci_fn, u32 version, u32 arg1, u32 arg2, u32 arg3, u32 cmd);
@@ -1295,19 +1326,12 @@ netdev_tx_t qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
 void qlcnic_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring);
 
 /* Management functions */
-int qlcnic_set_mac_address(struct qlcnic_adapter *, u8*);
 int qlcnic_get_mac_address(struct qlcnic_adapter *, u8*);
 int qlcnic_get_nic_info(struct qlcnic_adapter *, struct qlcnic_info *, u8);
 int qlcnic_set_nic_info(struct qlcnic_adapter *, struct qlcnic_info *);
 int qlcnic_get_pci_info(struct qlcnic_adapter *, struct qlcnic_pci_info*);
-int qlcnic_reset_partition(struct qlcnic_adapter *, u8);
 
 /*  eSwitch management functions */
-int qlcnic_get_eswitch_capabilities(struct qlcnic_adapter *, u8,
-                               struct qlcnic_eswitch *);
-int qlcnic_get_eswitch_status(struct qlcnic_adapter *, u8,
-                               struct qlcnic_eswitch *);
-int qlcnic_toggle_eswitch(struct qlcnic_adapter *, u8, u8);
 int qlcnic_config_switch_port(struct qlcnic_adapter *,
                                struct qlcnic_esw_func_cfg *);
 int qlcnic_get_eswitch_port_config(struct qlcnic_adapter *,
@@ -1347,7 +1371,7 @@ static const struct qlcnic_brdinfo qlcnic_boards[] = {
        {0x1077, 0x8020, 0x1077, 0x20f,
                "3200 Series Single Port 10Gb Intelligent Ethernet Adapter"},
        {0x1077, 0x8020, 0x103c, 0x3733,
-               "NC523SFP 10Gb 2-port Flex-10 Server Adapter"},
+               "NC523SFP 10Gb 2-port Server Adapter"},
        {0x1077, 0x8020, 0x0, 0x0, "cLOM8214 1/10GbE Controller"},
 };