summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorStefan Raspl <raspl@linux.vnet.ibm.com>2013-01-21 03:30:18 +0100
committerDavid S. Miller <davem@davemloft.net>2013-01-21 19:51:14 +0100
commit6ebb7f8d79d16e9e921bc1112171faa93a9102ed (patch)
treed0b962d7c0e1cfcf818f49cf1128a3010c8ba971 /drivers/s390
parentMerge branch 'ipv6_ndisc' (diff)
downloadlinux-6ebb7f8d79d16e9e921bc1112171faa93a9102ed.tar.xz
linux-6ebb7f8d79d16e9e921bc1112171faa93a9102ed.zip
qeth: Fix retry logic in hardsetup
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_core_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 029a7acf7b7a..1ea6b70d4855 100644
--- 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;