aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l2_main.c
diff options
context:
space:
mode:
authorStefan Raspl <raspl@linux.vnet.ibm.com>2013-01-20 21:30:20 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-21 13:51:14 -0500
commit0f54761d167f98dd93cb19a16edbc47bb6574a28 (patch)
tree8168f8df9a334bd636721f937d6a8c6fd959a7e8 /drivers/s390/net/qeth_l2_main.c
parenteb3fb0baa2369595fa5cbfadc16f87f99a71ce4b (diff)
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 <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/net/qeth_l2_main.c')
-rw-r--r--drivers/s390/net/qeth_l2_main.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 73195553f84b..d690166efeaf 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1025,9 +1025,14 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
1025 1025
1026contin: 1026contin:
1027 if ((card->info.type == QETH_CARD_TYPE_OSD) || 1027 if ((card->info.type == QETH_CARD_TYPE_OSD) ||
1028 (card->info.type == QETH_CARD_TYPE_OSX)) 1028 (card->info.type == QETH_CARD_TYPE_OSX)) {
1029 /* configure isolation level */ 1029 /* configure isolation level */
1030 qeth_set_access_ctrl_online(card); 1030 rc = qeth_set_access_ctrl_online(card, 0);
1031 if (rc) {
1032 rc = -ENODEV;
1033 goto out_remove;
1034 }
1035 }
1031 1036
1032 if (card->info.type != QETH_CARD_TYPE_OSN && 1037 if (card->info.type != QETH_CARD_TYPE_OSN &&
1033 card->info.type != QETH_CARD_TYPE_OSM) 1038 card->info.type != QETH_CARD_TYPE_OSM)
@@ -1144,12 +1149,9 @@ static int qeth_l2_recover(void *ptr)
1144 dev_info(&card->gdev->dev, 1149 dev_info(&card->gdev->dev,
1145 "Device successfully recovered!\n"); 1150 "Device successfully recovered!\n");
1146 else { 1151 else {
1147 if (rtnl_trylock()) { 1152 qeth_close_dev(card);
1148 dev_close(card->dev); 1153 dev_warn(&card->gdev->dev, "The qeth device driver "
1149 rtnl_unlock();
1150 dev_warn(&card->gdev->dev, "The qeth device driver "
1151 "failed to recover an error on the device\n"); 1154 "failed to recover an error on the device\n");
1152 }
1153 } 1155 }
1154 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); 1156 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
1155 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); 1157 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);