aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorEugene Crosser <Eugene.Crosser@ru.ibm.com>2015-05-18 08:27:53 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-18 12:14:17 -0400
commitc88394e7ee5ecf425754f78d38b4968eb60ffba5 (patch)
tree634e58fa3eb067bdbd1244a32030f7c753b8b25c /drivers/s390
parentc7258d8637be2ac1e4cbf276ac5145da456303d0 (diff)
qeth: fix handling of IPA return codes
Function that executes IPA commands returns the result code from the IPA response block. If non-negative, it needs to be transformed into errno-compatible code before returning to the caller. Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_l2_main.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 0ea0869120cf..1cdefaea866c 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1808,10 +1808,9 @@ int qeth_bridgeport_query_ports(struct qeth_card *card,
1808 cmd->data.sbp.hdr.seq_no = 1; 1808 cmd->data.sbp.hdr.seq_no = 1;
1809 rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_query_ports_cb, 1809 rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_query_ports_cb,
1810 (void *)&cbctl); 1810 (void *)&cbctl);
1811 if (rc) 1811 if (rc < 0)
1812 return rc; 1812 return rc;
1813 rc = qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS); 1813 return qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS);
1814 return rc;
1815} 1814}
1816EXPORT_SYMBOL_GPL(qeth_bridgeport_query_ports); 1815EXPORT_SYMBOL_GPL(qeth_bridgeport_query_ports);
1817 1816
@@ -1874,10 +1873,9 @@ int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role)
1874 cmd->data.sbp.hdr.seq_no = 1; 1873 cmd->data.sbp.hdr.seq_no = 1;
1875 rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_set_cb, 1874 rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_set_cb,
1876 (void *)&cbctl); 1875 (void *)&cbctl);
1877 if (rc) 1876 if (rc < 0)
1878 return rc; 1877 return rc;
1879 rc = qeth_bridgeport_makerc(card, &cbctl, setcmd); 1878 return qeth_bridgeport_makerc(card, &cbctl, setcmd);
1880 return rc;
1881} 1879}
1882 1880
1883/** 1881/**