aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Richter <tmricht@linux.vnet.ibm.com>2016-09-15 08:39:27 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-16 04:29:14 -0400
commit732a59cb6e7faed7a40da6665a517945c95fc895 (patch)
treebe89253d289b616f1a146ecf11b5db3461784237
parent5722963a8e83309dad831cf6968c4c805aa342c0 (diff)
s390/qeth: fix setting VIPA address
commit 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") restructured the internal address handling. This work broke setting a virtual IP address. The command echo 10.1.1.1 > /sys/bus/ccwgroup/devices/<device>/vipa/add4 fails with file exist error even if the IP address has not been set before. It turned out that the search result for the IP address search is handled incorrectly in the VIPA case. This patch fixes the setting of an virtual IP address. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/s390/net/qeth_l3_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index c00f6db812ac..272d9e7419be 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -701,7 +701,7 @@ int qeth_l3_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto,
701 701
702 spin_lock_bh(&card->ip_lock); 702 spin_lock_bh(&card->ip_lock);
703 703
704 if (!qeth_l3_ip_from_hash(card, ipaddr)) 704 if (qeth_l3_ip_from_hash(card, ipaddr))
705 rc = -EEXIST; 705 rc = -EEXIST;
706 else 706 else
707 qeth_l3_add_ip(card, ipaddr); 707 qeth_l3_add_ip(card, ipaddr);
@@ -769,7 +769,7 @@ int qeth_l3_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto,
769 769
770 spin_lock_bh(&card->ip_lock); 770 spin_lock_bh(&card->ip_lock);
771 771
772 if (!qeth_l3_ip_from_hash(card, ipaddr)) 772 if (qeth_l3_ip_from_hash(card, ipaddr))
773 rc = -EEXIST; 773 rc = -EEXIST;
774 else 774 else
775 qeth_l3_add_ip(card, ipaddr); 775 qeth_l3_add_ip(card, ipaddr);