提交 6ebb7f8d 编写于 作者: S Stefan Raspl 提交者: David S. Miller

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: NStefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: NFrank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: NUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9acefd17
...@@ -4765,14 +4765,14 @@ static struct ccw_driver qeth_ccw_driver = { ...@@ -4765,14 +4765,14 @@ static struct ccw_driver qeth_ccw_driver = {
int qeth_core_hardsetup_card(struct qeth_card *card) int qeth_core_hardsetup_card(struct qeth_card *card)
{ {
int retries = 0; int retries = 3;
int rc; int rc;
QETH_DBF_TEXT(SETUP, 2, "hrdsetup"); QETH_DBF_TEXT(SETUP, 2, "hrdsetup");
atomic_set(&card->force_alloc_skb, 0); atomic_set(&card->force_alloc_skb, 0);
qeth_update_from_chp_desc(card); qeth_update_from_chp_desc(card);
retry: retry:
if (retries) if (retries < 3)
QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n", QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n",
dev_name(&card->gdev->dev)); dev_name(&card->gdev->dev));
ccw_device_set_offline(CARD_DDEV(card)); ccw_device_set_offline(CARD_DDEV(card));
...@@ -4794,7 +4794,7 @@ int qeth_core_hardsetup_card(struct qeth_card *card) ...@@ -4794,7 +4794,7 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
return rc; return rc;
} else if (rc) { } else if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
if (++retries > 3) if (--retries < 0)
goto out; goto out;
else else
goto retry; goto retry;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册