net/sfc/base: add APIs for PTP privilege configuration
[dpdk.git] / drivers / net / liquidio / base / lio_hw_defs.h
index 67eaa45..5e119c1 100644 (file)
@@ -1,34 +1,5 @@
-/*
- *   BSD LICENSE
- *
- *   Copyright(c) 2017 Cavium, Inc.. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Cavium, Inc. nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2017 Cavium, Inc
  */
 
 #ifndef _LIO_HW_DEFS_H_
 
 #define LIO_CN23XX_VF_VID      0x9712
 
+/* CN23xx subsystem device ids */
+#define PCI_SUBSYS_DEV_ID_CN2350_210           0x0004
+#define PCI_SUBSYS_DEV_ID_CN2360_210           0x0005
+#define PCI_SUBSYS_DEV_ID_CN2360_225           0x0006
+#define PCI_SUBSYS_DEV_ID_CN2350_225           0x0007
+#define PCI_SUBSYS_DEV_ID_CN2350_210SVPN3      0x0008
+#define PCI_SUBSYS_DEV_ID_CN2360_210SVPN3      0x0009
+#define PCI_SUBSYS_DEV_ID_CN2350_210SVPT       0x000a
+#define PCI_SUBSYS_DEV_ID_CN2360_210SVPT       0x000b
+
 /* --------------------------CONFIG VALUES------------------------ */
 
 /* CN23xx IQ configuration macros */
@@ -70,6 +51,9 @@
 /* Max IOQs per LIO Link */
 #define LIO_MAX_IOQS_PER_IF                    64
 
+/* Wait time in milliseconds for FLR */
+#define LIO_PCI_FLR_WAIT                       100
+
 enum lio_card_type {
        LIO_23XX /* 23xx */
 };
@@ -100,6 +84,9 @@ enum lio_card_type {
 
 #define LIO_FW_VERSION_LENGTH          32
 
+#define LIO_Q_RECONF_MIN_VERSION       "1.7.0"
+#define LIO_VF_TRUST_MIN_VERSION       "1.7.1"
+
 /** Tag types used by Octeon cores in its work. */
 enum octeon_tag_type {
        OCTEON_ORDERED_TAG      = 0,
@@ -131,6 +118,7 @@ enum octeon_tag_type {
 #define LIO_MAX_RX_PKTLEN              (64 * 1024)
 
 /* NIC Command types */
+#define LIO_CMD_CHANGE_MTU             0x1
 #define LIO_CMD_CHANGE_DEVFLAGS                0x3
 #define LIO_CMD_RX_CTL                 0x4
 #define LIO_CMD_CLEAR_STATS            0x6
@@ -140,6 +128,7 @@ enum octeon_tag_type {
 #define LIO_CMD_ADD_VLAN_FILTER                0x17
 #define LIO_CMD_DEL_VLAN_FILTER                0x18
 #define LIO_CMD_VXLAN_PORT_CONFIG      0x19
+#define LIO_CMD_QUEUE_COUNT_CTL                0x1f
 
 #define LIO_CMD_VXLAN_PORT_ADD         0x0
 #define LIO_CMD_VXLAN_PORT_DEL         0x1
@@ -178,6 +167,7 @@ enum octeon_tag_type {
 
 /* Interface flags communicated between host driver and core app. */
 enum lio_ifflags {
+       LIO_IFFLAG_PROMISC      = 0x01,
        LIO_IFFLAG_ALLMULTI     = 0x02,
        LIO_IFFLAG_UNICAST      = 0x10
 };