From 0f54761d167f98dd93cb19a16edbc47bb6574a28 Mon Sep 17 00:00:00 2001 From: Stefan Raspl Date: Mon, 21 Jan 2013 02:30:20 +0000 Subject: qeth: Support VEPA mode The existing port isolation mode 'forward' will now verify that the adjacent switch port supports the required reflective relay (RR) mode. This patch adds the required error handling for the cases where enabling port isolation mode 'forward' can now fail. Furthermore, once established, we never fall back from one of the port isolation modes to a non-isolated mode without further user-interaction. This includes cases where the isolation mode was enabled successfully, but ceases to work e.g. due to configuration changes at the switch port. Finally, configuring an isolation mode with the device being offline will make onlining the device fail permanently upon errors encountered until either errors are resolved or the isolation mode is changed by the user to a different mode. Signed-off-by: Stefan Raspl Signed-off-by: Frank Blaschka Reviewed-by: Ursula Braun Signed-off-by: David S. Miller --- drivers/s390/net/qeth_l3_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/s390/net/qeth_l3_main.c') diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 0749efe1c6d..091ca0efa1c 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -1449,7 +1449,8 @@ static int qeth_l3_start_ipassists(struct qeth_card *card) { QETH_CARD_TEXT(card, 3, "strtipas"); - qeth_set_access_ctrl_online(card); /* go on*/ + if (qeth_set_access_ctrl_online(card, 0)) + return -EIO; qeth_l3_start_ipa_arp_processing(card); /* go on*/ qeth_l3_start_ipa_ip_fragmentation(card); /* go on*/ qeth_l3_start_ipa_source_mac(card); /* go on*/ @@ -3388,8 +3389,10 @@ contin: QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); if (!card->options.sniffer) { rc = qeth_l3_start_ipassists(card); - if (rc) + if (rc) { QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc); + goto out_remove; + } rc = qeth_l3_setrouting_v4(card); if (rc) QETH_DBF_TEXT_(SETUP, 2, "4err%d", rc); @@ -3511,12 +3514,9 @@ static int qeth_l3_recover(void *ptr) dev_info(&card->gdev->dev, "Device successfully recovered!\n"); else { - if (rtnl_trylock()) { - dev_close(card->dev); - rtnl_unlock(); - dev_warn(&card->gdev->dev, "The qeth device driver " + qeth_close_dev(card); + dev_warn(&card->gdev->dev, "The qeth device driver " "failed to recover an error on the device\n"); - } } qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); -- cgit v1.2.3-70-g09d2