ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP
authorBrett Creeley <brett.creeley@amd.com>
Tue, 10 Dec 2024 18:30:43 +0000 (10:30 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 12 Dec 2024 11:06:33 +0000 (12:06 +0100)
Instead of reporting -EINVAL when IONIC_RC_ENOSUPP is returned use
the -EOPNOTSUPP value. This aligns better since the FW only returns
IONIC_RC_ENOSUPP when operations aren't supported not when invalid
values are used.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/pensando/ionic/ionic_main.c

index 0f817c3f92d820a0193a956b21ba6a2937de35b5..daf1e82cb76b34e5cc4ba40816f9072a9e5ff3fd 100644 (file)
@@ -81,8 +81,9 @@ static int ionic_error_to_errno(enum ionic_status_code code)
        case IONIC_RC_EQTYPE:
        case IONIC_RC_EQID:
        case IONIC_RC_EINVAL:
-       case IONIC_RC_ENOSUPP:
                return -EINVAL;
+       case IONIC_RC_ENOSUPP:
+               return -EOPNOTSUPP;
        case IONIC_RC_EPERM:
                return -EPERM;
        case IONIC_RC_ENOENT: