mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
361 lines
15 KiB
Diff
361 lines
15 KiB
Diff
--- a/quickassist/adf/accel_mgr/src/adf_cfg.c
|
|
+++ b/quickassist/adf/accel_mgr/src/adf_cfg.c
|
|
@@ -545,9 +545,10 @@ CpaStatus adf_cfgAddKeyValueParam(icp_ac
|
|
}
|
|
else if(ADF_HEX == type)
|
|
{
|
|
- value_addr = (Cpa64U *)val;
|
|
- snprintf(pKeyValue->val, ADF_CFG_MAX_VAL_LEN_IN_BYTES,
|
|
- "0x%p", value_addr);
|
|
+// value_addr = (Cpa64U *)val;
|
|
+// snprintf(pKeyValue->val, ADF_CFG_MAX_VAL_LEN_IN_BYTES,
|
|
+// "0x%p", value_addr);
|
|
+ snprintf(pKeyValue->val, ADF_CFG_MAX_VAL_LEN_IN_BYTES,"0x%lx", (uintptr_t)val);
|
|
}
|
|
else
|
|
{
|
|
--- a/quickassist/adf/accelengine/src/adf_ae.c
|
|
+++ b/quickassist/adf/accelengine/src/adf_ae.c
|
|
@@ -222,6 +222,7 @@ CpaStatus adf_aeFwLoad(icp_accel_dev_t *
|
|
/* Get the UoF FW and Map the memory to the AEs */
|
|
status = adf_aefwGetFirmware(pAccelDev, ADF_FW_UOF_TYPE, &addr, &size);
|
|
ICP_CHECK_STATUS(status);
|
|
+
|
|
/* load ucode for patching, ucode_map */
|
|
status = adf_aeUcodeMap(pAccelDev, addr, size);
|
|
if (CPA_STATUS_SUCCESS != status)
|
|
--- a/quickassist/adf/accelengine/src/adf_ae_fw.c
|
|
+++ b/quickassist/adf/accelengine/src/adf_ae_fw.c
|
|
@@ -147,7 +147,6 @@ CpaStatus adf_aefwLoadFirmware(icp_accel
|
|
return CPA_STATUS_FAIL;
|
|
}
|
|
ICP_MEMCPY(pUofFwAddr, pFwAddr, fwSize);
|
|
-
|
|
/*
|
|
* Add the local copies to the config table.
|
|
* When the memory address is needed again it can be queried from
|
|
@@ -356,14 +355,13 @@ CpaStatus adf_aefwGetFirmware(icp_accel_
|
|
status_addr = icp_adf_cfgGetParamValue(pAccelDev, INTERNAL_SEC,
|
|
ICP_CFG_UOF_ADDRESS_KEY, config_value);
|
|
*pAddr = (void *)ICP_STRTOUL(config_value, NULL, ADF_CFG_BASE_HEX);
|
|
- status_size = icp_adf_cfgGetParamValue(pAccelDev, INTERNAL_SEC,
|
|
+ status_size = icp_adf_cfgGetParamValue(pAccelDev, INTERNAL_SEC,
|
|
ICP_CFG_UOF_SIZE_BYTES_KEY, config_value);
|
|
*pSize = (Cpa32U)ICP_STRTOUL(config_value, NULL, ADF_CFG_BASE_DEC);
|
|
break;
|
|
case ADF_FW_MMP_TYPE:
|
|
status_addr = icp_adf_cfgGetParamValue(pAccelDev, INTERNAL_SEC,
|
|
ICP_CFG_MMP_ADDRESS_KEY, config_value);
|
|
- *pAddr = (void *)ICP_STRTOUL(config_value, NULL, ADF_CFG_BASE_HEX);
|
|
status_size = icp_adf_cfgGetParamValue(pAccelDev, INTERNAL_SEC,
|
|
ICP_CFG_MMP_SIZE_BYTES_KEY, config_value);
|
|
*pSize = (Cpa32U)ICP_STRTOUL(config_value, NULL, ADF_CFG_BASE_DEC);
|
|
--- a/quickassist/adf/drivers/ACCELDEV/linux/src/adf_acceldev_drv.c
|
|
+++ b/quickassist/adf/drivers/ACCELDEV/linux/src/adf_acceldev_drv.c
|
|
@@ -911,7 +911,7 @@ int adf_restore_dev(icp_accel_dev_t *acc
|
|
ADF_ERROR("Can not issue secondary bus reset\n");
|
|
ADF_ERROR("Trying FLR\n");
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
|
|
- ret = __pci_reset_function(pdev);
|
|
+ ret = pci_reset_function(pdev);
|
|
if (ret) {
|
|
ADF_ERROR("Could not reset device\n");
|
|
return ret;
|
|
--- a/quickassist/adf/drivers/ACCELDEV/linux/src/adf_acceldev_isr.c
|
|
+++ b/quickassist/adf/drivers/ACCELDEV/linux/src/adf_acceldev_isr.c
|
|
@@ -214,7 +214,7 @@ STATIC int adf_enable_msix(icp_accel_dev
|
|
(hw_data->msix.aeVectorStart - hw_data->msix.banksVectorNum);
|
|
}
|
|
|
|
- stat = pci_enable_msix(pci_dev_info->pDev,
|
|
+ stat = pci_enable_msix_exact(pci_dev_info->pDev,
|
|
pci_dev_info->msixEntries.value,
|
|
msix_num_entries);
|
|
if (SUCCESS != stat){
|
|
--- a/quickassist/adf/drivers/common/linux/src/adf_dev_csr.c
|
|
+++ b/quickassist/adf/drivers/common/linux/src/adf_dev_csr.c
|
|
@@ -80,6 +80,7 @@
|
|
#include "adf_dev_csr.h"
|
|
#include "adf_platform.h"
|
|
#include <linux/mutex.h>
|
|
+#include <linux/sched/signal.h>
|
|
|
|
#define ADF_DEV_CSR_NAME ("icp_dev_csr")
|
|
#define ADF_DEV_CSR_MAX_MINOR (255)
|
|
--- a/quickassist/adf/drivers/common/linux/src/adf_dev_ring.c
|
|
+++ b/quickassist/adf/drivers/common/linux/src/adf_dev_ring.c
|
|
@@ -87,6 +87,7 @@
|
|
#include "icp_adf_init.h"
|
|
#include "icp_adf_cfg.h"
|
|
#include "adf_proc_debug.h"
|
|
+#include <linux/sched/signal.h>
|
|
|
|
#define ADF_DEV_RING_NAME ("icp_dev_ring")
|
|
#define ADF_DEV_RING_MAX_MINOR (255)
|
|
--- a/quickassist/adf/drivers/common/linux/src/adf_gige_wd_drv.c
|
|
+++ b/quickassist/adf/drivers/common/linux/src/adf_gige_wd_drv.c
|
|
@@ -76,6 +76,8 @@
|
|
#include "adf_platform.h"
|
|
#include <linux/mutex.h>
|
|
#include <linux/completion.h>
|
|
+#include <linux/sched/signal.h>
|
|
+
|
|
/* Character Device Driver Name */
|
|
#define DEVICE_NAME "icp_adf_gige_wd"
|
|
#define COMPLETION_TIME 5000
|
|
--- a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
|
|
+++ b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
|
|
@@ -132,17 +132,13 @@ static int adf_debug_show(struct seq_fil
|
|
{
|
|
debug_file_info_t* file_info = sfile->private;
|
|
if (file_info && file_info->seq_read && file_info->page) {
|
|
- int ret = 0, old_offset = file_info->offset;
|
|
- file_info->offset =
|
|
- file_info->seq_read(file_info->private_data,
|
|
- file_info->page, PAGE_SIZE - 1,
|
|
- file_info->offset);
|
|
- ret = seq_puts(sfile, (char*)file_info->page);
|
|
- if (ret) {
|
|
- /* run out of space - need to reprint */
|
|
- file_info->offset = old_offset;
|
|
- }
|
|
+ file_info->offset =
|
|
+ file_info->seq_read(file_info->private_data,
|
|
+ file_info->page, PAGE_SIZE - 1,
|
|
+ file_info->offset);
|
|
+ seq_puts(sfile, (char*)file_info->page);
|
|
}
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
--- a/quickassist/adf/include/icp_adf_transport_dp.h
|
|
+++ b/quickassist/adf/include/icp_adf_transport_dp.h
|
|
@@ -79,7 +79,7 @@
|
|
* Data plain support function - returns the pointer to next message on the ring
|
|
* or NULL if there is not enough space.
|
|
*/
|
|
-inline void icp_adf_getQueueMemory(icp_comms_trans_handle trans_handle,
|
|
+void icp_adf_getQueueMemory(icp_comms_trans_handle trans_handle,
|
|
Cpa32U numberRequests,
|
|
void** pCurrentQatMsg);
|
|
/*
|
|
@@ -87,7 +87,7 @@ inline void icp_adf_getQueueMemory(icp_c
|
|
* Data plain support function - returns the pointer to next message on the ring
|
|
* or NULL if there is not enough space - it also updates the shadow tail copy.
|
|
*/
|
|
-inline void icp_adf_getSingleQueueAddr(icp_comms_trans_handle trans_handle,
|
|
+void icp_adf_getSingleQueueAddr(icp_comms_trans_handle trans_handle,
|
|
void** pCurrentQatMsg);
|
|
|
|
/*
|
|
@@ -95,26 +95,26 @@ inline void icp_adf_getSingleQueueAddr(i
|
|
* Data plain support function - increments the tail pointer and returns
|
|
* the pointer to next message on the ring.
|
|
*/
|
|
-inline void icp_adf_getQueueNext(icp_comms_trans_handle trans_handle,
|
|
+void icp_adf_getQueueNext(icp_comms_trans_handle trans_handle,
|
|
void** pCurrentQatMsg);
|
|
|
|
/*
|
|
* icp_adf_updateQueueTail
|
|
* Data plain support function - Writes the tail shadow copy to the device.
|
|
*/
|
|
-inline void icp_adf_updateQueueTail(icp_comms_trans_handle trans_handle);
|
|
+void icp_adf_updateQueueTail(icp_comms_trans_handle trans_handle);
|
|
|
|
/*
|
|
* icp_adf_isRingEmpty
|
|
* Data plain support function - check if the ring is empty
|
|
*/
|
|
-inline CpaBoolean icp_adf_isRingEmpty(icp_comms_trans_handle trans_handle);
|
|
+CpaBoolean icp_adf_isRingEmpty(icp_comms_trans_handle trans_handle);
|
|
|
|
/*
|
|
* icp_adf_pollQueue
|
|
* Data plain support function - Poll messages from the queue.
|
|
*/
|
|
-inline CpaStatus icp_adf_pollQueue(icp_comms_trans_handle trans_handle,
|
|
+CpaStatus icp_adf_pollQueue(icp_comms_trans_handle trans_handle,
|
|
Cpa32U response_quota);
|
|
|
|
/*
|
|
@@ -123,6 +123,6 @@ inline CpaStatus icp_adf_pollQueue(icp_c
|
|
* send. This should only be called on request rings. If the function returns
|
|
* true then it is ok to call icp_adf_updateQueueTail() function on this ring.
|
|
*/
|
|
-inline CpaBoolean icp_adf_queueDataToSend(icp_comms_trans_handle trans_hnd);
|
|
+CpaBoolean icp_adf_queueDataToSend(icp_comms_trans_handle trans_hnd);
|
|
|
|
#endif /* ICP_ADF_TRANSPORT_DP_H */
|
|
--- a/quickassist/adf/include/icp_platform_linux.h
|
|
+++ b/quickassist/adf/include/icp_platform_linux.h
|
|
@@ -90,7 +90,7 @@
|
|
|
|
#include <linux/fs.h>
|
|
#include <linux/cdev.h>
|
|
-#include <asm/uaccess.h>
|
|
+#include <linux/uaccess.h>
|
|
|
|
#include "Osal.h"
|
|
|
|
--- a/quickassist/adf/user/user_proxy/src/adf_user_ETring_mgr_dp.c
|
|
+++ b/quickassist/adf/user/user_proxy/src/adf_user_ETring_mgr_dp.c
|
|
@@ -84,7 +84,7 @@
|
|
* Data plain support function - returns the pointer to next message on the ring
|
|
* or NULL if there is not enough space.
|
|
*/
|
|
-inline void icp_adf_getQueueMemory(icp_comms_trans_handle trans_hnd,
|
|
+void icp_adf_getQueueMemory(icp_comms_trans_handle trans_hnd,
|
|
Cpa32U numberRequests,
|
|
void** pCurrentQatMsg)
|
|
{
|
|
@@ -114,7 +114,7 @@ inline void icp_adf_getQueueMemory(icp_c
|
|
* Data plane support function - returns the pointer to next message on the ring
|
|
* or NULL if there is not enough space - it also updates the shadow tail copy.
|
|
*/
|
|
-inline void icp_adf_getSingleQueueAddr(icp_comms_trans_handle trans_hnd,
|
|
+void icp_adf_getSingleQueueAddr(icp_comms_trans_handle trans_hnd,
|
|
void** pCurrentQatMsg)
|
|
{
|
|
adf_dev_ring_handle_t *pRingHandle = (adf_dev_ring_handle_t *)trans_hnd;
|
|
@@ -147,7 +147,7 @@ inline void icp_adf_getSingleQueueAddr(i
|
|
* Data plain support function - increments the tail pointer and returns
|
|
* the pointer to next message on the ring.
|
|
*/
|
|
-inline void icp_adf_getQueueNext(icp_comms_trans_handle trans_hnd,
|
|
+void icp_adf_getQueueNext(icp_comms_trans_handle trans_hnd,
|
|
void** pCurrentQatMsg)
|
|
{
|
|
adf_dev_ring_handle_t *pRingHandle = (adf_dev_ring_handle_t *)trans_hnd;
|
|
@@ -168,7 +168,7 @@ inline void icp_adf_getQueueNext(icp_com
|
|
* icp_adf_updateQueueTail
|
|
* Data plain support function - Writes the tail shadow copy to the device.
|
|
*/
|
|
-inline void icp_adf_updateQueueTail(icp_comms_trans_handle trans_hnd)
|
|
+void icp_adf_updateQueueTail(icp_comms_trans_handle trans_hnd)
|
|
{
|
|
adf_dev_ring_handle_t *pRingHandle = (adf_dev_ring_handle_t *)trans_hnd;
|
|
icp_accel_dev_t *accel_dev = (icp_accel_dev_t*) pRingHandle->accel_dev;
|
|
@@ -183,7 +183,7 @@ inline void icp_adf_updateQueueTail(icp_
|
|
* icp_adf_isRingEmpty
|
|
* Data plain support function - check if the ring is empty
|
|
*/
|
|
-inline CpaBoolean icp_adf_isRingEmpty(icp_comms_trans_handle trans_hnd)
|
|
+CpaBoolean icp_adf_isRingEmpty(icp_comms_trans_handle trans_hnd)
|
|
{
|
|
Cpa32U mask = 0;
|
|
adf_dev_ring_handle_t *pRingHandle = (adf_dev_ring_handle_t *)trans_hnd;
|
|
@@ -205,7 +205,7 @@ inline CpaBoolean icp_adf_isRingEmpty(ic
|
|
* * icp_adf_pollQueue
|
|
* * Data plain support function - Poll messages from the queue.
|
|
* */
|
|
-inline CpaStatus icp_adf_pollQueue(icp_comms_trans_handle trans_hnd,
|
|
+CpaStatus icp_adf_pollQueue(icp_comms_trans_handle trans_hnd,
|
|
Cpa32U response_quota)
|
|
{
|
|
adf_dev_ring_handle_t *pRingHandle = (adf_dev_ring_handle_t *)trans_hnd;
|
|
@@ -260,7 +260,7 @@ inline CpaStatus icp_adf_pollQueue(icp_c
|
|
* send. This should only be called on request rings. If the function returns
|
|
* true then it is ok to call icp_adf_updateQueueTail() function on this ring.
|
|
*/
|
|
-inline CpaBoolean icp_adf_queueDataToSend(icp_comms_trans_handle trans_hnd)
|
|
+CpaBoolean icp_adf_queueDataToSend(icp_comms_trans_handle trans_hnd)
|
|
{
|
|
adf_dev_ring_handle_t *ringData = (adf_dev_ring_handle_t *)trans_hnd;
|
|
icp_accel_dev_t *accel_dev = (icp_accel_dev_t*) ringData->accel_dev;
|
|
--- a/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk
|
|
+++ b/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk
|
|
@@ -73,15 +73,15 @@ endif
|
|
$(LIB_STATIC): dirs
|
|
@echo 'Creating static library ${LIB_STATIC}'; \
|
|
$(MAKE) -C $(KERNEL_SOURCE_ROOT)/ M=$(PWD) obj-m=""; \
|
|
- echo 'Copying outputs';\
|
|
+ echo 'Copying outputs $(OBJ)';\
|
|
+ test -f lib.a && (ar -t lib.a | xargs ar -rcsD $($(PROG_ACY)_FINAL_OUTPUT_DIR)/$(LIB_STATIC)); \
|
|
mv -f $(OBJ) $($(PROG_ACY)_FINAL_OUTPUT_DIR);\
|
|
test -f built-in.o && mv -f built-in.o $($(PROG_ACY)_FINAL_OUTPUT_DIR);\
|
|
- test -f lib.a && mv lib.a $($(PROG_ACY)_FINAL_OUTPUT_DIR)/$(LIB_STATIC);\
|
|
+ test -f $($(PROG_ACY)_FINAL_OUTPUT_DIR)/lib.a && mv $($(PROG_ACY)_FINAL_OUTPUT_DIR)/lib.a $($(PROG_ACY)_FINAL_OUTPUT_DIR)/$(LIB_STATIC);\
|
|
test -f $(OUTPUT_NAME).ko && mv -f $(OUTPUT_NAME).ko $($(PROG_ACY)_FINAL_OUTPUT_DIR);\
|
|
test -f $(OUTPUT_NAME).o && mv -f $(OUTPUT_NAME).o $($(PROG_ACY)_FINAL_OUTPUT_DIR);\
|
|
$(RM) -rf *.mod.* .*.cmd;
|
|
|
|
-
|
|
$(MODULENAME): dirs
|
|
@echo 'Creating kernel module'; \
|
|
$(MAKE) -C $(KERNEL_SOURCE_ROOT)/ M=$(PWD); \
|
|
--- a/quickassist/lookaside/access_layer/src/sample_code/fips/cpa_fips_sample.h
|
|
+++ b/quickassist/lookaside/access_layer/src/sample_code/fips/cpa_fips_sample.h
|
|
@@ -109,7 +109,7 @@ extern "C"
|
|
#include <linux/string.h>
|
|
#include <linux/ctype.h>
|
|
#include <linux/sched.h>
|
|
-#include <asm/uaccess.h>
|
|
+#include <linux/uaccess.h>
|
|
#else /*KERNEL_SPACE*/
|
|
#include <string.h>
|
|
#include <sched.h>
|
|
--- a/quickassist/lookaside/access_layer/src/sample_code/performance/qae/linux/kernel_space/qae_mem_drv.c
|
|
+++ b/quickassist/lookaside/access_layer/src/sample_code/performance/qae/linux/kernel_space/qae_mem_drv.c
|
|
@@ -85,7 +85,7 @@
|
|
#include <linux/slab.h>
|
|
|
|
|
|
-#include <asm/uaccess.h>
|
|
+#include <linux/uaccess.h>
|
|
#include <linux/string.h>
|
|
#include <asm/io.h>
|
|
|
|
--- a/quickassist/utilities/downloader/Target_CoreLibs/halAe/icp_firml_interface.c
|
|
+++ b/quickassist/utilities/downloader/Target_CoreLibs/halAe/icp_firml_interface.c
|
|
@@ -185,7 +185,7 @@ icp_FirmLoader_MapMofAddr(void *handle,
|
|
int status = ICP_FIRMLOADER_SUCCESS;
|
|
|
|
myHandle = (icp_firml_handle_t *)handle;
|
|
-
|
|
+
|
|
status = UcLo_MapMofAddr(myHandle, filePtr, fileSize,
|
|
uofName, (char **)uofPtr, uofSize);
|
|
|
|
--- a/quickassist/utilities/downloader/Target_CoreLibs/uclo/uclo_mof.c
|
|
+++ b/quickassist/utilities/downloader/Target_CoreLibs/uclo/uclo_mof.c
|
|
@@ -582,6 +582,7 @@ UcLo_MapMofAddr (icp_firml_handle_t *han
|
|
/* UOF_FID (0xc6c2) for uof object
|
|
* SUOF_FID for suof object
|
|
*/
|
|
+
|
|
if ((((uof_fileHdr_T *) mofPtr)->fileId == UOF_FID) ||
|
|
(((suof_fileHdr_T *) mofPtr)->fileId == SUOF_FID))
|
|
{
|
|
@@ -599,7 +600,6 @@ UcLo_MapMofAddr (icp_firml_handle_t *han
|
|
/* return BADOBJ if neither UOF/SUOF nor MOF */
|
|
else if (((mof_fileHdr_T *)mofPtr)->fileId != MOF_FID)
|
|
{
|
|
- PRINTF("unsupported file format\n");
|
|
return (UCLO_BADOBJ);
|
|
}
|
|
|
|
--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalUsrKrlProxy.c
|
|
+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalUsrKrlProxy.c
|
|
@@ -45,7 +45,7 @@
|
|
#include <linux/mm.h>
|
|
#include <linux/slab.h>
|
|
|
|
-#include <asm/uaccess.h>
|
|
+#include <linux/uaccess.h>
|
|
#include <linux/string.h>
|
|
#include <asm/io.h>
|
|
|
|
--- a/quickassist/utilities/osal/src/linux/user_space/OsalCryptoInterface.c
|
|
+++ b/quickassist/utilities/osal/src/linux/user_space/OsalCryptoInterface.c
|
|
@@ -78,7 +78,7 @@ OSAL_STATUS
|
|
osalHashSHA1(UINT8 *in, UINT8 *out)
|
|
{
|
|
SHA_CTX ctx;
|
|
- if(!SHA_Init(&ctx))
|
|
+ if(!SHA1_Init(&ctx))
|
|
{
|
|
return OSAL_FAIL;
|
|
}
|