[PATCH v2 8/9] platform/x86/intel/ifs: Add new error code

Jithu Joseph posted 9 patches 2 years, 2 months ago
There is a newer version of this series
[PATCH v2 8/9] platform/x86/intel/ifs: Add new error code
Posted by Jithu Joseph 2 years, 2 months ago
Make driver aware of a newly added error code so that it can provide a
more appropriate error message.

Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Tested-by: Pengfei Xu <pengfei.xu@intel.com>
---
 drivers/platform/x86/intel/ifs/runtest.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/platform/x86/intel/ifs/runtest.c b/drivers/platform/x86/intel/ifs/runtest.c
index 94d486e5d263..a29f7b8fa48e 100644
--- a/drivers/platform/x86/intel/ifs/runtest.c
+++ b/drivers/platform/x86/intel/ifs/runtest.c
@@ -40,6 +40,8 @@ enum ifs_status_err_code {
 	IFS_UNASSIGNED_ERROR_CODE		= 7,
 	IFS_EXCEED_NUMBER_OF_THREADS_CONCURRENT	= 8,
 	IFS_INTERRUPTED_DURING_EXECUTION	= 9,
+	IFS_UNASSIGNED_ERROR_CODE_0xA		= 0xA,
+	IFS_CORRUPTED_CHUNK		= 0xB,
 };
 
 static const char * const scan_test_status[] = {
@@ -55,6 +57,8 @@ static const char * const scan_test_status[] = {
 	[IFS_EXCEED_NUMBER_OF_THREADS_CONCURRENT] =
 	"Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurrently",
 	[IFS_INTERRUPTED_DURING_EXECUTION] = "Interrupt occurred prior to SCAN start",
+	[IFS_UNASSIGNED_ERROR_CODE_0xA] = "Unassigned error code 0xA",
+	[IFS_CORRUPTED_CHUNK] = "Scan operation aborted due to corrupted image. Try reloading",
 };
 
 static void message_not_tested(struct device *dev, int cpu, union ifs_status status)
@@ -123,6 +127,8 @@ static bool can_restart(union ifs_status status)
 	case IFS_MISMATCH_ARGUMENTS_BETWEEN_THREADS:
 	case IFS_CORE_NOT_CAPABLE_CURRENTLY:
 	case IFS_UNASSIGNED_ERROR_CODE:
+	case IFS_UNASSIGNED_ERROR_CODE_0xA:
+	case IFS_CORRUPTED_CHUNK:
 		break;
 	}
 	return false;
-- 
2.25.1
Re: [PATCH v2 8/9] platform/x86/intel/ifs: Add new error code
Posted by Ilpo Järvinen 2 years, 2 months ago
On Fri, 22 Sep 2023, Jithu Joseph wrote:

> Make driver aware of a newly added error code so that it can provide a
> more appropriate error message.
> 
> Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
> Tested-by: Pengfei Xu <pengfei.xu@intel.com>
> ---
>  drivers/platform/x86/intel/ifs/runtest.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/platform/x86/intel/ifs/runtest.c b/drivers/platform/x86/intel/ifs/runtest.c
> index 94d486e5d263..a29f7b8fa48e 100644
> --- a/drivers/platform/x86/intel/ifs/runtest.c
> +++ b/drivers/platform/x86/intel/ifs/runtest.c
> @@ -40,6 +40,8 @@ enum ifs_status_err_code {
>  	IFS_UNASSIGNED_ERROR_CODE		= 7,
>  	IFS_EXCEED_NUMBER_OF_THREADS_CONCURRENT	= 8,
>  	IFS_INTERRUPTED_DURING_EXECUTION	= 9,
> +	IFS_UNASSIGNED_ERROR_CODE_0xA		= 0xA,
> +	IFS_CORRUPTED_CHUNK		= 0xB,
>  };
>  
>  static const char * const scan_test_status[] = {
> @@ -55,6 +57,8 @@ static const char * const scan_test_status[] = {
>  	[IFS_EXCEED_NUMBER_OF_THREADS_CONCURRENT] =
>  	"Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurrently",
>  	[IFS_INTERRUPTED_DURING_EXECUTION] = "Interrupt occurred prior to SCAN start",
> +	[IFS_UNASSIGNED_ERROR_CODE_0xA] = "Unassigned error code 0xA",
> +	[IFS_CORRUPTED_CHUNK] = "Scan operation aborted due to corrupted image. Try reloading",
>  };
>  
>  static void message_not_tested(struct device *dev, int cpu, union ifs_status status)
> @@ -123,6 +127,8 @@ static bool can_restart(union ifs_status status)
>  	case IFS_MISMATCH_ARGUMENTS_BETWEEN_THREADS:
>  	case IFS_CORE_NOT_CAPABLE_CURRENTLY:
>  	case IFS_UNASSIGNED_ERROR_CODE:
> +	case IFS_UNASSIGNED_ERROR_CODE_0xA:
> +	case IFS_CORRUPTED_CHUNK:
>  		break;
>  	}
>  	return false;
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.