Skip to content

Commit 6ebb7f8

Browse files
Stefan Raspldavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Frank Blaschka <[email protected]> Reviewed-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9acefd1 commit 6ebb7f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/s390/net/qeth_core_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4765,14 +4765,14 @@ static struct ccw_driver qeth_ccw_driver = {
47654765

47664766
int qeth_core_hardsetup_card(struct qeth_card *card)
47674767
{
4768-
int retries = 0;
4768+
int retries = 3;
47694769
int rc;
47704770

47714771
QETH_DBF_TEXT(SETUP, 2, "hrdsetup");
47724772
atomic_set(&card->force_alloc_skb, 0);
47734773
qeth_update_from_chp_desc(card);
47744774
retry:
4775-
if (retries)
4775+
if (retries < 3)
47764776
QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n",
47774777
dev_name(&card->gdev->dev));
47784778
ccw_device_set_offline(CARD_DDEV(card));
@@ -4794,7 +4794,7 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
47944794
return rc;
47954795
} else if (rc) {
47964796
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
4797-
if (++retries > 3)
4797+
if (--retries < 0)
47984798
goto out;
47994799
else
48004800
goto retry;

0 commit comments

Comments
 (0)