diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2009-05-19 17:38:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-20 20:36:50 -0400 |
commit | 0666eb06ab12b1f876719ff5b7d39cf3c609dec3 (patch) | |
tree | 3dd254e3acbe984d517a837cf44aff7b3b29f5cc /drivers/s390 | |
parent | 8ac6d452281b01b9c7ff382d640b547379e398cd (diff) |
qeth: support z/VM VSWITCH Port Isolation
z/VM Virtual Switch Port Isolation allows guests on a VLAN UNAWARE
virtual switch to be isolated from other guests on the VSWITCH.
(See z/VM Apars VM64281 and VM64463).
The Linux qeth driver is affected, because it has to handle new
error codes introduced with the z/VM VSWITCH Port Isolation support.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core_mpc.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_mpc.h | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 26 |
3 files changed, 29 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_core_mpc.c b/drivers/s390/net/qeth_core_mpc.c index 06f4de1f0507..ec24901c802c 100644 --- a/drivers/s390/net/qeth_core_mpc.c +++ b/drivers/s390/net/qeth_core_mpc.c | |||
@@ -181,6 +181,8 @@ static struct ipa_rc_msg qeth_ipa_rc_msg[] = { | |||
181 | {IPA_RC_L2_ADDR_TABLE_FULL, "Layer2 address table full"}, | 181 | {IPA_RC_L2_ADDR_TABLE_FULL, "Layer2 address table full"}, |
182 | {IPA_RC_L2_DUP_LAYER3_MAC, "Duplicate with layer 3 MAC"}, | 182 | {IPA_RC_L2_DUP_LAYER3_MAC, "Duplicate with layer 3 MAC"}, |
183 | {IPA_RC_L2_GMAC_NOT_FOUND, "GMAC not found"}, | 183 | {IPA_RC_L2_GMAC_NOT_FOUND, "GMAC not found"}, |
184 | {IPA_RC_L2_MAC_NOT_AUTH_BY_HYP, "L2 mac not authorized by hypervisor"}, | ||
185 | {IPA_RC_L2_MAC_NOT_AUTH_BY_ADP, "L2 mac not authorized by adapter"}, | ||
184 | {IPA_RC_L2_MAC_NOT_FOUND, "L2 mac address not found"}, | 186 | {IPA_RC_L2_MAC_NOT_FOUND, "L2 mac address not found"}, |
185 | {IPA_RC_L2_INVALID_VLAN_ID, "L2 invalid vlan id"}, | 187 | {IPA_RC_L2_INVALID_VLAN_ID, "L2 invalid vlan id"}, |
186 | {IPA_RC_L2_DUP_VLAN_ID, "L2 duplicate vlan id"}, | 188 | {IPA_RC_L2_DUP_VLAN_ID, "L2 duplicate vlan id"}, |
diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h index 18548822e37c..eecb2ee62e85 100644 --- a/drivers/s390/net/qeth_core_mpc.h +++ b/drivers/s390/net/qeth_core_mpc.h | |||
@@ -168,6 +168,8 @@ enum qeth_ipa_return_codes { | |||
168 | IPA_RC_L2_ADDR_TABLE_FULL = 0x2006, | 168 | IPA_RC_L2_ADDR_TABLE_FULL = 0x2006, |
169 | IPA_RC_L2_DUP_LAYER3_MAC = 0x200a, | 169 | IPA_RC_L2_DUP_LAYER3_MAC = 0x200a, |
170 | IPA_RC_L2_GMAC_NOT_FOUND = 0x200b, | 170 | IPA_RC_L2_GMAC_NOT_FOUND = 0x200b, |
171 | IPA_RC_L2_MAC_NOT_AUTH_BY_HYP = 0x200c, | ||
172 | IPA_RC_L2_MAC_NOT_AUTH_BY_ADP = 0x200d, | ||
171 | IPA_RC_L2_MAC_NOT_FOUND = 0x2010, | 173 | IPA_RC_L2_MAC_NOT_FOUND = 0x2010, |
172 | IPA_RC_L2_INVALID_VLAN_ID = 0x2015, | 174 | IPA_RC_L2_INVALID_VLAN_ID = 0x2015, |
173 | IPA_RC_L2_DUP_VLAN_ID = 0x2016, | 175 | IPA_RC_L2_DUP_VLAN_ID = 0x2016, |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 44c15685ab86..9ca6bab7c9ba 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -130,7 +130,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card, | |||
130 | cmd = (struct qeth_ipa_cmd *) data; | 130 | cmd = (struct qeth_ipa_cmd *) data; |
131 | mac = &cmd->data.setdelmac.mac[0]; | 131 | mac = &cmd->data.setdelmac.mac[0]; |
132 | /* MAC already registered, needed in couple/uncouple case */ | 132 | /* MAC already registered, needed in couple/uncouple case */ |
133 | if (cmd->hdr.return_code == 0x2005) { | 133 | if (cmd->hdr.return_code == IPA_RC_L2_DUP_MAC) { |
134 | QETH_DBF_MESSAGE(2, "Group MAC %pM already existing on %s \n", | 134 | QETH_DBF_MESSAGE(2, "Group MAC %pM already existing on %s \n", |
135 | mac, QETH_CARD_IFNAME(card)); | 135 | mac, QETH_CARD_IFNAME(card)); |
136 | cmd->hdr.return_code = 0; | 136 | cmd->hdr.return_code = 0; |
@@ -502,6 +502,30 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card, | |||
502 | if (cmd->hdr.return_code) { | 502 | if (cmd->hdr.return_code) { |
503 | QETH_DBF_TEXT_(TRACE, 2, "L2er%x", cmd->hdr.return_code); | 503 | QETH_DBF_TEXT_(TRACE, 2, "L2er%x", cmd->hdr.return_code); |
504 | card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; | 504 | card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; |
505 | switch (cmd->hdr.return_code) { | ||
506 | case IPA_RC_L2_DUP_MAC: | ||
507 | case IPA_RC_L2_DUP_LAYER3_MAC: | ||
508 | dev_warn(&card->gdev->dev, | ||
509 | "MAC address " | ||
510 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x " | ||
511 | "already exists\n", | ||
512 | card->dev->dev_addr[0], card->dev->dev_addr[1], | ||
513 | card->dev->dev_addr[2], card->dev->dev_addr[3], | ||
514 | card->dev->dev_addr[4], card->dev->dev_addr[5]); | ||
515 | break; | ||
516 | case IPA_RC_L2_MAC_NOT_AUTH_BY_HYP: | ||
517 | case IPA_RC_L2_MAC_NOT_AUTH_BY_ADP: | ||
518 | dev_warn(&card->gdev->dev, | ||
519 | "MAC address " | ||
520 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x " | ||
521 | "is not authorized\n", | ||
522 | card->dev->dev_addr[0], card->dev->dev_addr[1], | ||
523 | card->dev->dev_addr[2], card->dev->dev_addr[3], | ||
524 | card->dev->dev_addr[4], card->dev->dev_addr[5]); | ||
525 | break; | ||
526 | default: | ||
527 | break; | ||
528 | } | ||
505 | cmd->hdr.return_code = -EIO; | 529 | cmd->hdr.return_code = -EIO; |
506 | } else { | 530 | } else { |
507 | card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED; | 531 | card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED; |