From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Stefan Raspl <raspl@linux.vnet.ibm.com>
Subject: [patch 1/6] [PATCH] qeth: Fix retry logic in hardsetup
Date: Mon, 21 Jan 2013 13:30:18 +0100 [thread overview]
Message-ID: <20130121123037.207719724@de.ibm.com> (raw)
In-Reply-To: 20130121123017.240686588@de.ibm.com
[-- Attachment #1: 600-qeth-retry-logic.diff --]
[-- Type: text/plain, Size: 1188 bytes --]
From: Stefan Raspl <raspl@linux.vnet.ibm.com>
The previous code did never retry any idx setup unless retries were done
for device offline/online at the beginning of the function.
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 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -4765,14 +4765,14 @@ static struct ccw_driver qeth_ccw_driver
int qeth_core_hardsetup_card(struct qeth_card *card)
{
- int retries = 0;
+ int retries = 3;
int rc;
QETH_DBF_TEXT(SETUP, 2, "hrdsetup");
atomic_set(&card->force_alloc_skb, 0);
qeth_update_from_chp_desc(card);
retry:
- if (retries)
+ if (retries < 3)
QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n",
dev_name(&card->gdev->dev));
ccw_device_set_offline(CARD_DDEV(card));
@@ -4794,7 +4794,7 @@ retriable:
return rc;
} else if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
- if (++retries > 3)
+ if (--retries < 0)
goto out;
else
goto retry;
next prev parent reply other threads:[~2013-01-21 12:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 12:30 [patch 0/6] s390: network patches for net-next frank.blaschka
2013-01-21 12:30 ` frank.blaschka [this message]
2013-01-21 12:30 ` [patch 2/6] [PATCH] qeth: Remove unused exports frank.blaschka
2013-01-21 12:30 ` [patch 3/6] [PATCH] qeth: Support VEPA mode frank.blaschka
2013-01-21 12:30 ` [patch 4/6] [PATCH] qeth: Update Kconfig wording frank.blaschka
2013-01-21 12:30 ` [patch 5/6] [PATCH] qeth: Make s390dbf card entries persistent frank.blaschka
2013-01-21 12:30 ` [patch 6/6] [PATCH] qeth: Fix HiperSockets performance regression frank.blaschka
2013-01-21 18:52 ` [patch 0/6] s390: network patches for net-next David Miller
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=20130121123037.207719724@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.vnet.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).