netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/2] s390: network bug fixes for net
@ 2012-10-16  5:21 frank.blaschka
  2012-10-16 18:42 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: frank.blaschka @ 2012-10-16  5:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

Hi Dave,

here are some bug fixes for net.

shortlog:

Hendrik Brueckner (1)
smsgiucv: reestablish IUCV path after resume

Stefan Raspl (1)
qeth: fix deadlock between recovery and bonding driver

Thanks,
        Frank

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 0/2] s390: network bug fixes for net
  2012-10-16  5:21 frank.blaschka
@ 2012-10-16 18:42 ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2012-10-16 18:42 UTC (permalink / raw)
  To: frank.blaschka; +Cc: netdev, linux-s390

From: frank.blaschka@de.ibm.com
Date: Tue, 16 Oct 2012 07:21:16 +0200

> Hi Dave,
> 
> here are some bug fixes for net.
> 
> shortlog:
> 
> Hendrik Brueckner (1)
> smsgiucv: reestablish IUCV path after resume
> 
> Stefan Raspl (1)
> qeth: fix deadlock between recovery and bonding driver

Both applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 0/2] s390: network bug fixes for net
@ 2012-11-13  9:05 frank.blaschka
  2012-11-13  9:05 ` [patch 1/2] [PATCH] qeth: Fix IPA_CMD_QIPASSIST return code handling frank.blaschka
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: frank.blaschka @ 2012-11-13  9:05 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

Hi Dave,

here are 2 bug fixes for net.

shortlog:

Ursula Braun (1)
qeth: set new mac even if old mac is gone

Stefan Raspl (1)
qeth: Fix IPA_CMD_QIPASSIST return code handling

Thanks,
        Frank

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 1/2] [PATCH] qeth: Fix IPA_CMD_QIPASSIST return code handling
  2012-11-13  9:05 [patch 0/2] s390: network bug fixes for net frank.blaschka
@ 2012-11-13  9:05 ` frank.blaschka
  2012-11-13  9:05 ` [patch 2/2] [PATCH] qeth: set new mac even if old mac is gone frank.blaschka
  2012-11-13 19:31 ` [patch 0/2] s390: network bug fixes for net David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2012-11-13  9:05 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Stefan Raspl

[-- Attachment #1: 600-qeth-ip-qipassist-rc.diff --]
[-- Type: text/plain, Size: 3033 bytes --]

From: Stefan Raspl <raspl@linux.vnet.ibm.com>

Return codes of IPA_CMD_QIPASSIST are not checked, especially the ones which
indicate that the command is not supported. As a result, the device driver
would not enable all available features on older card generations.
This patch adds proper checking and sets the bare minimum in the supported
functions flags to avoid follow-on errors.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 24 ++++++++++++++++++++++--
 drivers/s390/net/qeth_l2_main.c   | 11 +++++++----
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 3e25d31..4d6ba00 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2942,13 +2942,33 @@ static int qeth_query_ipassists_cb(struct qeth_card *card,
 	QETH_DBF_TEXT(SETUP, 2, "qipasscb");
 
 	cmd = (struct qeth_ipa_cmd *) data;
+
+	switch (cmd->hdr.return_code) {
+	case IPA_RC_NOTSUPP:
+	case IPA_RC_L2_UNSUPPORTED_CMD:
+		QETH_DBF_TEXT(SETUP, 2, "ipaunsup");
+		card->options.ipa4.supported_funcs |= IPA_SETADAPTERPARMS;
+		card->options.ipa6.supported_funcs |= IPA_SETADAPTERPARMS;
+		return -0;
+	default:
+		if (cmd->hdr.return_code) {
+			QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Unhandled "
+						"rc=%d\n",
+						dev_name(&card->gdev->dev),
+						cmd->hdr.return_code);
+			return 0;
+		}
+	}
+
 	if (cmd->hdr.prot_version == QETH_PROT_IPV4) {
 		card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported;
 		card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled;
-	} else {
+	} else if (cmd->hdr.prot_version == QETH_PROT_IPV6) {
 		card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported;
 		card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled;
-	}
+	} else
+		QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Flawed LIC detected"
+					"\n", dev_name(&card->gdev->dev));
 	QETH_DBF_TEXT(SETUP, 2, "suppenbl");
 	QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_supported);
 	QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_enabled);
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index e67e025..84e8f1d 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -626,10 +626,13 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card)
 	QETH_DBF_TEXT(SETUP, 2, "doL2init");
 	QETH_DBF_TEXT_(SETUP, 2, "doL2%s", CARD_BUS_ID(card));
 
-	rc = qeth_query_setadapterparms(card);
-	if (rc) {
-		QETH_DBF_MESSAGE(2, "could not query adapter parameters on "
-			"device %s: x%x\n", CARD_BUS_ID(card), rc);
+	if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
+		rc = qeth_query_setadapterparms(card);
+		if (rc) {
+			QETH_DBF_MESSAGE(2, "could not query adapter "
+				"parameters on device %s: x%x\n",
+				CARD_BUS_ID(card), rc);
+		}
 	}
 
 	if (card->info.type == QETH_CARD_TYPE_IQD ||

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [patch 2/2] [PATCH] qeth: set new mac even if old mac is gone
  2012-11-13  9:05 [patch 0/2] s390: network bug fixes for net frank.blaschka
  2012-11-13  9:05 ` [patch 1/2] [PATCH] qeth: Fix IPA_CMD_QIPASSIST return code handling frank.blaschka
@ 2012-11-13  9:05 ` frank.blaschka
  2012-11-13 19:31 ` [patch 0/2] s390: network bug fixes for net David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2012-11-13  9:05 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun

[-- Attachment #1: 606-qeth-set-mac.diff --]
[-- Type: text/plain, Size: 1376 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

If the set_mac_address() function of qeth is invoked, qeth deletes
the old mac address first on OSA. Only if deletion returns
successfully the new mac address is set on OSA. Deletion may return
with a return value "MAC not found on OSA". In this case qeth
should continue setting the new mac address.

When the OSA cable is pulled, OSA forgets any set mac address. If
the OSA network interface acts as a slave to a bonding master
interface, bonding can invoke the set_mac_address function for
failover purposes and depends on successful setting of the new mac
address even though the old mac address could no longer be deleted.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/s390/net/qeth_l2_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 333f583..83849c2 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -679,7 +679,7 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p)
 		return -ERESTARTSYS;
 	}
 	rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]);
-	if (!rc)
+	if (!rc || (rc == IPA_RC_L2_MAC_NOT_FOUND))
 		rc = qeth_l2_send_setmac(card, addr->sa_data);
 	return rc ? -EINVAL : 0;
 }

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [patch 0/2] s390: network bug fixes for net
  2012-11-13  9:05 [patch 0/2] s390: network bug fixes for net frank.blaschka
  2012-11-13  9:05 ` [patch 1/2] [PATCH] qeth: Fix IPA_CMD_QIPASSIST return code handling frank.blaschka
  2012-11-13  9:05 ` [patch 2/2] [PATCH] qeth: set new mac even if old mac is gone frank.blaschka
@ 2012-11-13 19:31 ` David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2012-11-13 19:31 UTC (permalink / raw)
  To: frank.blaschka; +Cc: netdev, linux-s390

From: frank.blaschka@de.ibm.com
Date: Tue, 13 Nov 2012 10:05:15 +0100

> Hi Dave,
> 
> here are 2 bug fixes for net.
> 
> shortlog:
> 
> Ursula Braun (1)
> qeth: set new mac even if old mac is gone
> 
> Stefan Raspl (1)
> qeth: Fix IPA_CMD_QIPASSIST return code handling

All applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [patch 0/2] s390: network bug fixes for net
@ 2013-04-02 10:56 frank.blaschka
  0 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2013-04-02 10:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

Hi Dave,

here are 2 bug fixes for net.

shortlog:

Hendrik Brueckner (1)
af_iucv: recvmsg: use correct skb_pull() function

Stefan Raspl (1)
qeth: fix qeth_wait_for_threads() deadlock for OSN devices

Thanks,
        Frank

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-02 10:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13  9:05 [patch 0/2] s390: network bug fixes for net frank.blaschka
2012-11-13  9:05 ` [patch 1/2] [PATCH] qeth: Fix IPA_CMD_QIPASSIST return code handling frank.blaschka
2012-11-13  9:05 ` [patch 2/2] [PATCH] qeth: set new mac even if old mac is gone frank.blaschka
2012-11-13 19:31 ` [patch 0/2] s390: network bug fixes for net David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-04-02 10:56 frank.blaschka
2012-10-16  5:21 frank.blaschka
2012-10-16 18:42 ` David Miller

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).