All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Nelson <shannon.nelson@amd.com>
To: <netdev@vger.kernel.org>, <davem@davemloft.net>,
	<kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com>,
	<andrew+netdev@lunn.ch>, <jacob.e.keller@intel.com>
Cc: <brett.creeley@amd.com>, Shannon Nelson <shannon.nelson@amd.com>
Subject: [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP
Date: Tue, 10 Dec 2024 10:30:43 -0800	[thread overview]
Message-ID: <20241210183045.67878-4-shannon.nelson@amd.com> (raw)
In-Reply-To: <20241210183045.67878-1-shannon.nelson@amd.com>

From: Brett Creeley <brett.creeley@amd.com>

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>
---
 drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c
index 0f817c3f92d8..daf1e82cb76b 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_main.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c
@@ -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:
-- 
2.17.1


  parent reply	other threads:[~2024-12-10 18:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson
2024-12-10 18:30 ` [PATCH net-next 1/5] ionic: add asic codes to firmware interface file Shannon Nelson
2024-12-10 22:44   ` Jacob Keller
2024-12-11  3:36   ` Kalesh Anakkur Purayil
2024-12-10 18:30 ` [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible Shannon Nelson
2024-12-10 22:45   ` Jacob Keller
2024-12-11  3:32   ` Kalesh Anakkur Purayil
2024-12-10 18:30 ` Shannon Nelson [this message]
2024-12-10 22:45   ` [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP Jacob Keller
2024-12-11  3:31   ` Kalesh Anakkur Purayil
2024-12-10 18:30 ` [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G Shannon Nelson
2024-12-10 22:53   ` Jacob Keller
2024-12-10 23:21     ` Nelson, Shannon
2024-12-10 18:30 ` [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS Shannon Nelson
2024-12-10 22:53   ` Jacob Keller
2024-12-11  3:30   ` Kalesh Anakkur Purayil
2024-12-11 10:12   ` Ido Schimmel
2024-12-11 17:15     ` Nelson, Shannon
2024-12-12 11:20 ` [PATCH net-next 0/5] ionic: minor code updates patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241210183045.67878-4-shannon.nelson@amd.com \
    --to=shannon.nelson@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.