s390/qeth: allow manual recovery when device is SOFTSETUP
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 15 Feb 2019 18:22:25 +0000 (19:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Feb 2019 04:35:29 +0000 (20:35 -0800)
Once a qeth ccwgroup device is set online, it's also armed for internal
recovery. So allow for testing that code path via sysfs, regardless of
whether the interface is up or down.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_sys.c

index 30f61608fa22c909df76abc2374d1609b9998892..485a335669baed0b6344d3351967fd69a2a411e4 100644 (file)
@@ -316,7 +316,7 @@ static ssize_t qeth_dev_recover_store(struct device *dev,
        if (!card)
                return -EINVAL;
 
-       if (card->state != CARD_STATE_UP)
+       if (!qeth_card_hw_is_reachable(card))
                return -EPERM;
 
        i = simple_strtoul(buf, &tmp, 16);