summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_core_main.c
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2012-03-07 02:06:28 +0000
committerDavid S. Miller <davem@davemloft.net>2012-03-07 22:52:25 -0800
commite0a8114c034cf8012565c5d56dd90967023cc724 (patch)
tree3514956ac112db812fb9db1efa4d043e8f09dc19 /drivers/s390/net/qeth_core_main.c
parent205a8b649cf6c0a1e6e7512b65c72df480e2a883 (diff)
qeth: meaningful return code for set_mac_address
Setting an invalid mac-address for a qeth layer2 device returns with a strange error code: # ip link set hsi1 address 00:00:00:00:00:01 RTNETLINK answers: Unknown error 18446744073709486085 Problem is caused by wrong usage of the return_code field within structure qeth_ipa_cmd. With this patch the ip command above returns SIOCSIFHWADDR: Invalid argument 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/net/qeth_core_main.c')
-rw-r--r--drivers/s390/net/qeth_core_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index ef17d8366ce..120955c6641 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2945,8 +2945,8 @@ static int qeth_query_ipassists_cb(struct qeth_card *card,
card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled;
}
QETH_DBF_TEXT(SETUP, 2, "suppenbl");
- QETH_DBF_TEXT_(SETUP, 2, "%x", cmd->hdr.ipa_supported);
- QETH_DBF_TEXT_(SETUP, 2, "%x", cmd->hdr.ipa_enabled);
+ QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_supported);
+ QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_enabled);
return 0;
}
@@ -4322,7 +4322,7 @@ static int qeth_snmp_command_cb(struct qeth_card *card,
/* check if there is enough room in userspace */
if ((qinfo->udata_len - qinfo->udata_offset) < data_len) {
QETH_CARD_TEXT_(card, 4, "scer3%i", -ENOMEM);
- cmd->hdr.return_code = -ENOMEM;
+ cmd->hdr.return_code = IPA_RC_ENOMEM;
return 0;
}
QETH_CARD_TEXT_(card, 4, "snore%i",