From: Julian Wiedmann <jwi@linux.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Ursula Braun <ubraun@linux.ibm.com>,
Julian Wiedmann <jwi@linux.ibm.com>
Subject: [PATCH net-next 09/11] s390/qeth: fine-tune MAC Address-related errnos
Date: Tue, 24 Mar 2020 19:24:46 +0100 [thread overview]
Message-ID: <20200324182448.95362-10-jwi@linux.ibm.com> (raw)
In-Reply-To: <20200324182448.95362-1-jwi@linux.ibm.com>
Return the correct errnos when .ndo_set_mac_address fails to set a new
MAC address.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_l2_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 249b00d91d46..766ea0d07a24 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -52,11 +52,11 @@ static int qeth_l2_setdelmac_makerc(struct qeth_card *card, u16 retcode)
break;
case IPA_RC_L2_DUP_MAC:
case IPA_RC_L2_DUP_LAYER3_MAC:
- rc = -EEXIST;
+ rc = -EADDRINUSE;
break;
case IPA_RC_L2_MAC_NOT_AUTH_BY_HYP:
case IPA_RC_L2_MAC_NOT_AUTH_BY_ADP:
- rc = -EPERM;
+ rc = -EADDRNOTAVAIL;
break;
case IPA_RC_L2_MAC_NOT_FOUND:
rc = -ENOENT;
@@ -105,11 +105,11 @@ static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac)
"MAC address %pM successfully registered\n", mac);
} else {
switch (rc) {
- case -EEXIST:
+ case -EADDRINUSE:
dev_warn(&card->gdev->dev,
"MAC address %pM already exists\n", mac);
break;
- case -EPERM:
+ case -EADDRNOTAVAIL:
dev_warn(&card->gdev->dev,
"MAC address %pM is not authorized\n", mac);
break;
@@ -126,7 +126,7 @@ static int qeth_l2_write_mac(struct qeth_card *card, u8 *mac)
QETH_CARD_TEXT(card, 2, "L2Wmac");
rc = qeth_l2_send_setdelmac(card, mac, cmd);
- if (rc == -EEXIST)
+ if (rc == -EADDRINUSE)
QETH_DBF_MESSAGE(2, "MAC already registered on device %x\n",
CARD_DEVID(card));
else if (rc)
--
2.17.1
next prev parent reply other threads:[~2020-03-24 18:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 18:24 [PATCH net-next 00/11] s390/qeth: updates 2020-03-24 Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 01/11] s390/qeth: simplify RX buffer tracking Julian Wiedmann
2020-03-24 23:43 ` David Miller
2020-03-25 9:20 ` Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 02/11] s390/qeth: split out RX poll code Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 03/11] s390/qeth: remove redundant if-clause in " Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 04/11] s390/qdio: extend polling support to multiple queues Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 05/11] s390/qeth: simplify L3 dev_id logic Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 06/11] s390/qeth: clean up the mac_bits Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 07/11] s390/qeth: collect more TX statistics Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 08/11] s390/qeth: add TX IRQ coalescing support for IQD devices Julian Wiedmann
2020-03-24 18:24 ` Julian Wiedmann [this message]
2020-03-24 18:24 ` [PATCH net-next 10/11] s390/qeth: keep track of fixed prio-queue configuration Julian Wiedmann
2020-03-24 18:24 ` [PATCH net-next 11/11] s390/qeth: modernize two list helpers Julian Wiedmann
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=20200324182448.95362-10-jwi@linux.ibm.com \
--to=jwi@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ubraun@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).