]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: Support for EPSC_API_VERSION(2,5)
authorKnut Omang <knut.omang@oracle.com>
Sun, 3 Jul 2016 12:47:10 +0000 (14:47 +0200)
committerKnut Omang <knut.omang@oracle.com>
Sun, 3 Jul 2016 14:44:18 +0000 (16:44 +0200)
Up-to-date header files for protocol up to and including EPSC API v.2.5:
 * a new query, EPSC_QUERY_HW_REVISION to query HW revision through mailbox
   (from v2.5)
 * Enable Jumbo frame query support (from v2.4)
 * add DEGRADE_CAUSE_FLAG_MCAST_LACK_OF_CREDIT
   adding new cause for degraded mode (from v2.3)
 * adding external portinfo query:
   Adding a query for some portinfo attributes on the external port.
   Only a draft until PSIFFW implementation is done.
   (from v2.2)
 * API for mailbox for BER (BER = Bit Error Rate) support
   (from v2.1)

Signed-off-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/psif_api.h
drivers/infiniband/hw/sif/psif_hw_data.h
drivers/infiniband/hw/sif/psif_hw_data_be.h
drivers/infiniband/hw/sif/psif_hw_data_le.h
drivers/infiniband/hw/sif/psif_hw_print.c
drivers/infiniband/hw/sif/version.c
drivers/infiniband/hw/sif/versioninfo.h

index c803a8a55865604b39edb1b7396b6df85c1fd829..eb82f476828cb57ce6502e5eeed138d4c7add782 100644 (file)
@@ -43,7 +43,7 @@ typedef uint64_t __be64;
  * Update when new operations are added or otherwise
  * backward compatible changes are made
  */
-#define EPSC_MINOR_VERSION 1
+#define EPSC_MINOR_VERSION 5
 
 /*
  * Macros for EPSC API #if checking in code
index 2e29bbfac120ec8ec0601d48af5a9fc4c9447fca..8fa75845b15a9c5f679f9dd0718ed90d960c296a 100644 (file)
@@ -50,13 +50,13 @@ enum psif_enum_extent {
        PSIF_EVENT_EXTENT        = 0x13u,
        PSIF_TSU_ERROR_TYPES_EXTENT      = 0x8cu,
        PSIF_EPS_CORE_ID_EXTENT  = 0x5u,
-       PSIF_EPSC_QUERY_NUM_VFS_MODE_EXTENT      = 0x3u,
+       PSIF_EPSC_QUERY_PERSISTENT_EXTENT        = 0x3u,
+       PSIF_PORT_SPEED_EXTENT   = 0x21u,
        PSIF_EPSC_PORT_STATE_EXTENT      = 0x6u,
        PSIF_EPSC_PATH_MTU_EXTENT        = 0x8u,
-       PSIF_PORT_SPEED_EXTENT   = 0x21u,
        PSIF_EPSC_LOG_MODE_EXTENT        = 0x11u,
        PSIF_EPSC_LOG_LEVEL_EXTENT       = 0x8u,
-       PSIF_EPSC_DEGRADE_CAUSE_EXTENT   = 0x6u,
+       PSIF_EPSC_DEGRADE_CAUSE_EXTENT   = 0x7u,
        PSIF_EPSC_ATOMIC_CAP_EXTENT      = 0x3u,
        PSIF_EPSC_CSR_STATUS_EXTENT      = 0x100u,
        PSIF_EPSC_CSR_OPCODE_EXTENT      = 0x50u,
@@ -66,7 +66,7 @@ enum psif_enum_extent {
        PSIF_EPSC_CSR_MODIFY_PORT_FLAGS_EXTENT   = 0x11u,
        PSIF_EPSC_CSR_EPSA_COMMAND_EXTENT        = 0x4u,
        PSIF_EPSA_COMMAND_EXTENT         = 0xcu,
-       PSIF_EPSC_QUERY_OP_EXTENT        = 0x54u,
+       PSIF_EPSC_QUERY_OP_EXTENT        = 0x56u,
        PSIF_EPSC_CSR_UPDATE_OPCODE_EXTENT       = 0x8u,
        PSIF_EPSC_FLASH_SLOT_EXTENT      = 0x6u,
        PSIF_EPSC_UPDATE_SET_EXTENT      = 0x5u,
@@ -724,22 +724,36 @@ enum psif_eps_core_id {
 }; /* enum psif_eps_core_id [ 4 bits] */
 
 /**
- * \brief Discriminator for the PSIF_QUER sub-operation EPSC_QUERY_NUM_VFS
+ * \brief Discriminator for PSIF_QUERY of persistent values
  * \details
  * \par Width
  *      32 bit
  * \par Used in
- * the parameter for the PSIF_QUERY sub-operation EPSC_QUERY_NUM_VFS - set in the index field
+ * the parameter for the PSIF_QUERY sub-operation EPSC_QUERY_NUM_VFS and EPS_QUERY_JUMBO - set in the index field
  * \par Classification
  *      driver
  */
-enum psif_epsc_query_num_vfs_mode {
-       EPSC_QUERY_NUM_VFS_MODE_CURRENT,
-       EPSC_QUERY_NUM_VFS_MODE_PERSISTENT,
-       EPSC_QUERY_NUM_VFS_MODE_HW_CAP,
+enum psif_epsc_query_persistent {
+       EPSC_QUERY_PERSISTENT_STORED,
+       EPSC_QUERY_PERSISTENT_ACTIVE,
+       EPSC_QUERY_PERSISTENT_HW_CAP,
+       /* Padding out to required bits allocated */
+       PSIF_EPSC_QUERY_PERSISTENT_FIELD_MAX     = 0x7fffffffu
+}; /* enum psif_epsc_query_persistent [32 bits] */
+
+/*
+ * Should match definitions in ib_verbs.h
+ */
+enum psif_port_speed {
+       PSIF_SPEED_SDR   = 0x1u,
+       PSIF_SPEED_DDR   = 0x2u,
+       PSIF_SPEED_QDR   = 0x4u,
+       PSIF_SPEED_FDR10         = 0x8u,
+       PSIF_SPEED_FDR   = 0x10u,
+       PSIF_SPEED_EDR   = 0x20u,
        /* Padding out to required bits allocated */
-       PSIF_EPSC_QUERY_NUM_VFS_MODE_FIELD_MAX   = 0x7fffffffu
-}; /* enum psif_epsc_query_num_vfs_mode [32 bits] */
+       PSIF_PORT_SPEED_FIELD_MAX        = 0xffu
+}; /* enum psif_port_speed [ 8 bits] */
 
 /**
  * \brief Port state
@@ -815,20 +829,6 @@ enum psif_epsc_path_mtu {
        PSIF_EPSC_PATH_MTU_FIELD_MAX     = 0x7fffffffu
 }; /* enum psif_epsc_path_mtu [32 bits] */
 
-/*
- * Should match definitions in ib_verbs.h
- */
-enum psif_port_speed {
-       PSIF_SPEED_SDR   = 0x1u,
-       PSIF_SPEED_DDR   = 0x2u,
-       PSIF_SPEED_QDR   = 0x4u,
-       PSIF_SPEED_FDR10         = 0x8u,
-       PSIF_SPEED_FDR   = 0x10u,
-       PSIF_SPEED_EDR   = 0x20u,
-       /* Padding out to required bits allocated */
-       PSIF_PORT_SPEED_FIELD_MAX        = 0xffu
-}; /* enum psif_port_speed [ 8 bits] */
-
 
 enum psif_epsc_log_mode {
 /* Logging completely disabled */
@@ -890,6 +890,9 @@ enum psif_epsc_degrade_cause {
 /**< degrade cause: Virtualization mode reconfigured, reset needed */
 
        DEGRADE_CAUSE_FLAG_VIRTMODE_RECONF,
+/**< degrade cause: no credits for sending multicast packets */
+
+       DEGRADE_CAUSE_FLAG_MCAST_LACK_OF_CREDIT,
        /* Padding out to required bits allocated */
        PSIF_EPSC_DEGRADE_CAUSE_FIELD_MAX        = 0x1fu
 }; /* enum psif_epsc_degrade_cause [ 5 bits] */
@@ -1583,8 +1586,12 @@ enum psif_epsc_query_op {
        EPSC_QUERY_CREDIT_MODE   = 0x50u,
        /** Query version on onboard CPLD (Titan only Other platforms will return EPSC_ENODATA) */
        EPSC_QUERY_CPLD_VERSION  = 0x51u,
+       /** Query portinfo on exernal port (defined in psif_epsc_query_external_port_info_t) */
+       EPSC_QUERY_EXTERNAL_PORT_INFO    = 0x53u,
+       /* Query the HW revision of the board */
+       EPSC_QUERY_HW_REVISION   = 0x54u,
        /* EOF marker - must be last and highest in this enum type. */
-       EPSC_QUERY_LAST  = 0x53u,
+       EPSC_QUERY_LAST  = 0x55u,
        /* Padding out to required bits allocated */
        PSIF_EPSC_QUERY_OP_FIELD_MAX     = 0x7fffffffu
 }; /* enum psif_epsc_query_op [32 bits] */
index abcd1f37d781e57a882c9cee61c209d3d474497b..117a086c8225f3df63a3d0bdfc6e6dc935578c1c 100644 (file)
@@ -1848,6 +1848,52 @@ struct psif_eq_entry {
        u32     seq_num;
 } PSIF_PACKED_ALIGNED32; /* struct psif_eq_entry [64 byte] */
 
+/**
+ * \brief Definition of struct returned by EPSC_QUERY_EXTERNAL_PORT_INFO
+ * \details
+ * This struct is returning several attributes of the external IB port. The vHCA IB portnumber
+ * is set in the index field. Values returned maches description in PortInfo (See IB specification
+ * 1.3 vol1 chapter 14.2.5.6), except for active speed which will return values as defined in
+ * psif_port_speed.
+ * \par Width
+ *      64 bit
+ * \par Used in
+ * the parameter for the PSIF_QUERY sub-operation EPSC_QUERY_PORT_INFO - vHCA IB portnumber set in index field
+ * \par Classification
+ *      internal, development
+ */
+
+struct psif_epsc_query_external_port_info {
+       /**< LID of the IB device connected to the external port */
+
+       u16     lid;
+       /**< IB port number of external port (on the IB device above) */
+
+       u16     portnumber:8;
+       /**< IB port state of external port values will match psif_epsc_port_state_t */
+
+       u16     port_state:4;
+       /**< Physical port state of IB port */
+
+       u16     port_physical_state:4;
+       /**< IB LinkSpeedActive of external port */
+
+       enum psif_port_speed    active_speed:8;
+
+       /**< IB LinkWidthActive of external port */
+
+       u16     active_width:8;
+       /**< Active MTU of external port (values will match psif_epsc_path_mtu_t */
+
+       u16     active_mtu:4;
+       /**< Number of operational Data VLs */
+
+       u16     operational_vls:4;
+       /**< Reserved */
+
+       u16     noname:8;
+} PSIF_PACKED_ALIGNED; /* struct psif_epsc_query_external_port_info [ 8 byte] */
+
 /**
  * CSR Query port structure
  */
index be8960462e3c06ef2c4adb34615257e4ec1a08b6..ed818d2905cf59ccd1312539f3e4f607a2f43748 100644 (file)
@@ -1848,6 +1848,52 @@ struct psif_eq_entry {
        u32     noname:32;
 } PSIF_PACKED_ALIGNED32; /* struct psif_eq_entry [64 byte] */
 
+/**
+ * \brief Definition of struct returned by EPSC_QUERY_EXTERNAL_PORT_INFO
+ * \details
+ * This struct is returning several attributes of the external IB port. The vHCA IB portnumber
+ * is set in the index field. Values returned maches description in PortInfo (See IB specification
+ * 1.3 vol1 chapter 14.2.5.6), except for active speed which will return values as defined in
+ * psif_port_speed.
+ * \par Width
+ *      64 bit
+ * \par Used in
+ * the parameter for the PSIF_QUERY sub-operation EPSC_QUERY_PORT_INFO - vHCA IB portnumber set in index field
+ * \par Classification
+ *      internal, development
+ */
+
+struct psif_epsc_query_external_port_info {
+       /**< Reserved */
+
+       u16     noname:8;
+       /**< Number of operational Data VLs */
+
+       u16     operational_vls:4;
+       /**< Active MTU of external port (values will match psif_epsc_path_mtu_t */
+
+       u16     active_mtu:4;
+       /**< IB LinkWidthActive of external port */
+
+       u16     active_width:8;
+       /**< IB LinkSpeedActive of external port */
+
+       enum psif_port_speed    active_speed:8;
+
+       /**< Physical port state of IB port */
+
+       u16     port_physical_state:4;
+       /**< IB port state of external port values will match psif_epsc_port_state_t */
+
+       u16     port_state:4;
+       /**< IB port number of external port (on the IB device above) */
+
+       u16     portnumber:8;
+       /**< LID of the IB device connected to the external port */
+
+       u16     lid;
+} PSIF_PACKED_ALIGNED; /* struct psif_epsc_query_external_port_info [ 8 byte] */
+
 /**
  * CSR Query port structure
  */
index 181cc24c249c1f1c5526818f078e70a771981fd5..462dde6b5f7ab2f5bfdbd836437a9e2e6e770715 100644 (file)
@@ -1215,6 +1215,8 @@ const char *string_enum_psif_epsc_degrade_cause(enum psif_epsc_degrade_cause val
                return "DEGRADE_CAUSE_FLAG_MODIFY_QP_TIMEOUT";
        case DEGRADE_CAUSE_FLAG_VIRTMODE_RECONF:
                return "DEGRADE_CAUSE_FLAG_VIRTMODE_RECONF";
+       case DEGRADE_CAUSE_FLAG_MCAST_LACK_OF_CREDIT:
+               return "DEGRADE_CAUSE_FLAG_MCAST_LACK_OF_CREDIT";
        case PSIF_EPSC_DEGRADE_CAUSE_FIELD_MAX:
                return "PSIF_EPSC_DEGRADE_CAUSE_FIELD_MAX";
        default:
@@ -1788,6 +1790,10 @@ const char *string_enum_psif_epsc_query_op(enum psif_epsc_query_op val)
                return "EPSC_QUERY_CREDIT_MODE";
        case EPSC_QUERY_CPLD_VERSION:
                return "EPSC_QUERY_CPLD_VERSION";
+       case EPSC_QUERY_EXTERNAL_PORT_INFO:
+               return "EPSC_QUERY_EXTERNAL_PORT_INFO";
+       case EPSC_QUERY_HW_REVISION:
+               return "EPSC_QUERY_HW_REVISION";
        case EPSC_QUERY_LAST:
                return "EPSC_QUERY_LAST";
        case PSIF_EPSC_QUERY_OP_FIELD_MAX:
index af8a1cd4ea56a2f5b5c248154948c0452417af13..e855e75f3015fd2ca1786a2ca8f900ab82d58c4c 100644 (file)
@@ -1,15 +1,16 @@
-/* This file is automatically generated by /home/komang/build/master/install/bin/gitstatus.sh */
+/* Misc driver release info */
 
 #include "version.h"
 
 struct sif_version sif_version = {
-.git_repo = "sifdrv [non public commit]",
-.last_commit = "0.0.0.4-770-ga475650 tmp: more bugDB->Orabug",
-.git_status = "",
-.build_git_time = "Wed, 25 May 2016 08:45:49 +0000",
+.git_repo = "sifdrv [origin/master]",
+.last_commit = "titan_1.0.0.1 transform filters: Replace 'automatically generated'",
+.git_status = """?? drivers/\n"
+,
+.build_git_time = "Sun, 03 Jul 2016 12:44:15 +0000",
 .build_user = "komang",
 
 .git_psifapi_repo = "psifapi [origin/master]",
-.last_psifapi_commit = "epsapp-1.17 API for mailbox for BER report",
+.last_psifapi_commit = "titan_1.0.0.1 EPSC_API_VERSION(2,5) - EPSC_QUERY_HW_REVISION",
 .git_psifapi_status = "",
 };
index aa00c288335acc07dc25709f2659d7cc1b666f72..720b8cada2c9f3aaf67bdabfba0ca837fc188f69 100644 (file)
@@ -1,6 +1,6 @@
 /* Misc driver release info */
 
-#define BUILD_DATE "2016-06-28"
-#define BUILD_TIME "07:41:29"
-#define BUILD_EPOCH 1467099689
-#define TITAN_RELEASE "1.0.0.0+20"
+#define BUILD_DATE "2016-07-03"
+#define BUILD_TIME "12:44:15"
+#define BUILD_EPOCH 1467549855
+#define TITAN_RELEASE "1.0.0.1"