From ccf2af6c1f7e414290ca5486e7e9514514af6c7d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Aug 2016 16:14:12 +0200 Subject: [PATCH] sif: PSC_API_VERSION(2,9): add num_ufs to psif_epsc_csr_config The new member num_ufs can be used by the PF driver to request a number of UFs FW shall support. 0: use default value stored on card 1: PF (UF 0) only ... 33: fully virtualized >33: capped by FW to 33 i.e. fully virtualized -1: alternative PF only config not for official use Orabug: 24424521 Reviewed-by: Knut Omang Signed-off-by: Knut Omang --- drivers/infiniband/hw/sif/psif_api.h | 2 +- drivers/infiniband/hw/sif/psif_hw_data_be.h | 7 ++++++- drivers/infiniband/hw/sif/psif_hw_data_le.h | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/sif/psif_api.h b/drivers/infiniband/hw/sif/psif_api.h index f20e68ec46ac..425ededc1609 100644 --- a/drivers/infiniband/hw/sif/psif_api.h +++ b/drivers/infiniband/hw/sif/psif_api.h @@ -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 8 +#define EPSC_MINOR_VERSION 9 /* * Macros for EPSC API #if checking in code diff --git a/drivers/infiniband/hw/sif/psif_hw_data_be.h b/drivers/infiniband/hw/sif/psif_hw_data_be.h index e127caf92fbc..49dca085ec8e 100644 --- a/drivers/infiniband/hw/sif/psif_hw_data_be.h +++ b/drivers/infiniband/hw/sif/psif_hw_data_be.h @@ -2957,8 +2957,13 @@ struct psif_epsc_csr_config { u64 vlink_connect:1; /** Setup CMPL spin set mode to be fast - default is safe (PF only). */ u64 fast_spin:1; + /** Number of UFs (PF+VFs) to configure HW for + * 0 means to use default stored in HW (PF only) + * Though this is a signed value (values < 0 are used for special settings + * not available in official FW) the created bitfield is unsigned. */ + u64 num_ufs:16; /** Padded field. */ - u64 noname:55; + u64 noname:39; } PSIF_PACKED_ALIGNED; /* struct psif_epsc_csr_config [48 byte] */ /* This is the portion of the descriptor which is updated by software. */ diff --git a/drivers/infiniband/hw/sif/psif_hw_data_le.h b/drivers/infiniband/hw/sif/psif_hw_data_le.h index 0bb5253ad22f..c28eb5ca8b94 100644 --- a/drivers/infiniband/hw/sif/psif_hw_data_le.h +++ b/drivers/infiniband/hw/sif/psif_hw_data_le.h @@ -2941,7 +2941,12 @@ struct psif_epsc_csr_config { /** MMU context for mailbox. */ struct psif_mmu_cntx mmu_cntx; /** Padded field. */ - u64 noname:55; + u64 noname:39; + /** Number of UFs (PF+VFs) to configure HW for + * 0 means to use default stored in HW (PF only) + * Though this is a signed value (values < 0 are used for special settings + * not available in official FW) the created bitfield is unsigned. */ + u64 num_ufs:16; /** Setup CMPL spin set mode to be fast - default is safe (PF only). */ u64 fast_spin:1; /** Connect all vlinks to external port (PF only). */ -- 2.50.1