aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorThomas Richter <tmricht@linux.vnet.ibm.com>2015-01-21 07:39:10 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-26 02:38:16 -0500
commit1aec42bcc07ef2b341aa4aa303fe325276db1178 (patch)
treed910df27549134b5728a030194bbbcb021afabf1 /drivers/s390
parentefbbc1d56774a18d9518b8500212629fb5809d1b (diff)
390/qeth: Fix locking warning during qeth device setup
Do not wait for channel command buffers in IPA commands. The potential wait could be done while holding a spin lock and causes in recent kernels such a bug if kernel lock debugging is enabled: kernel: BUG: sleeping function called from invalid context at drivers/s390/net/qeth_core_main.c: 794 kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 2031, name: NetworkManager kernel: 2 locks held by NetworkManager/2031: kernel: #0: (rtnl_mutex){+.+.+.}, at: [<00000000006e0d7a>] rtnetlink_rcv+0x32/0x50 kernel: #1: (_xmit_ETHER){+.....}, at: [<00000000006cfe90>] dev_set_rx_mode+0x30/0x50 kernel: CPU: 0 PID: 2031 Comm: NetworkManager Not tainted 3.18.0-rc5-next-20141124 #1 kernel: 00000000275fb1f0 00000000275fb280 0000000000000002 0000000000000000 00000000275fb320 00000000275fb298 00000000275fb298 00000000007e326a 0000000000000000 000000000099ce2c 00000000009b4988 000000000000000b 00000000275fb2e0 00000000275fb280 0000000000000000 0000000000000000 0000000000000000 00000000001129c8 00000000275fb280 00000000275fb2e0 kernel: Call Trace: kernel: ([<00000000001128b0>] show_trace+0xf8/0x158) kernel: [<000000000011297a>] show_stack+0x6a/0xe8 kernel: [<00000000007e995a>] dump_stack+0x82/0xb0 kernel: [<000000000017d668>] ___might_sleep+0x170/0x228 kernel: [<000003ff80026f0e>] qeth_wait_for_buffer+0x36/0xd0 [qeth] kernel: [<000003ff80026fe2>] qeth_get_ipacmd_buffer+0x3a/0xc0 [qeth] kernel: [<000003ff80105078>] qeth_l3_send_setdelmc+0x58/0xf8 [qeth_l3] kernel: [<000003ff8010b1fe>] qeth_l3_set_ip_addr_list+0x2c6/0x848 [qeth_l3] kernel: [<000003ff8010bbb4>] qeth_l3_set_multicast_list+0x434/0xc48 [qeth_l3] kernel: [<00000000006cfe9a>] dev_set_rx_mode+0x3a/0x50 kernel: [<00000000006cff90>] __dev_open+0xe0/0x140 kernel: [<00000000006d02a0>] __dev_change_flags+0xa0/0x178 kernel: [<00000000006d03a8>] dev_change_flags+0x30/0x70 kernel: [<00000000006e14ee>] do_setlink+0x346/0x9a0 ... The device driver has plenty of command buffers available per channel for channel command communication. In the extremely rare case when there is no command buffer available, return a NULL pointer and issue a warning in the kernel log. The caller handles the case when a NULL pointer is encountered and returns an error. In the case the wait for command buffer is possible (because no lock is held as in the OSN case), still wait until a channel command buffer is available. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_core_main.c81
-rw-r--r--drivers/s390/net/qeth_l2_main.c35
-rw-r--r--drivers/s390/net/qeth_l3_main.c50
3 files changed, 132 insertions, 34 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index e2fbfff53b50..642c77c76b84 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1784,6 +1784,8 @@ static int qeth_idx_activate_get_answer(struct qeth_channel *channel,
1784 QETH_DBF_TEXT(SETUP, 2, "idxanswr"); 1784 QETH_DBF_TEXT(SETUP, 2, "idxanswr");
1785 card = CARD_FROM_CDEV(channel->ccwdev); 1785 card = CARD_FROM_CDEV(channel->ccwdev);
1786 iob = qeth_get_buffer(channel); 1786 iob = qeth_get_buffer(channel);
1787 if (!iob)
1788 return -ENOMEM;
1787 iob->callback = idx_reply_cb; 1789 iob->callback = idx_reply_cb;
1788 memcpy(&channel->ccw, READ_CCW, sizeof(struct ccw1)); 1790 memcpy(&channel->ccw, READ_CCW, sizeof(struct ccw1));
1789 channel->ccw.count = QETH_BUFSIZE; 1791 channel->ccw.count = QETH_BUFSIZE;
@@ -1834,6 +1836,8 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1834 QETH_DBF_TEXT(SETUP, 2, "idxactch"); 1836 QETH_DBF_TEXT(SETUP, 2, "idxactch");
1835 1837
1836 iob = qeth_get_buffer(channel); 1838 iob = qeth_get_buffer(channel);
1839 if (!iob)
1840 return -ENOMEM;
1837 iob->callback = idx_reply_cb; 1841 iob->callback = idx_reply_cb;
1838 memcpy(&channel->ccw, WRITE_CCW, sizeof(struct ccw1)); 1842 memcpy(&channel->ccw, WRITE_CCW, sizeof(struct ccw1));
1839 channel->ccw.count = IDX_ACTIVATE_SIZE; 1843 channel->ccw.count = IDX_ACTIVATE_SIZE;
@@ -2940,9 +2944,16 @@ struct qeth_cmd_buffer *qeth_get_ipacmd_buffer(struct qeth_card *card,
2940 struct qeth_cmd_buffer *iob; 2944 struct qeth_cmd_buffer *iob;
2941 struct qeth_ipa_cmd *cmd; 2945 struct qeth_ipa_cmd *cmd;
2942 2946
2943 iob = qeth_wait_for_buffer(&card->write); 2947 iob = qeth_get_buffer(&card->write);
2944 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 2948 if (iob) {
2945 qeth_fill_ipacmd_header(card, cmd, ipacmd, prot); 2949 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
2950 qeth_fill_ipacmd_header(card, cmd, ipacmd, prot);
2951 } else {
2952 dev_warn(&card->gdev->dev,
2953 "The qeth driver ran out of channel command buffers\n");
2954 QETH_DBF_MESSAGE(1, "%s The qeth driver ran out of channel command buffers",
2955 dev_name(&card->gdev->dev));
2956 }
2946 2957
2947 return iob; 2958 return iob;
2948} 2959}
@@ -3000,6 +3011,8 @@ int qeth_send_startlan(struct qeth_card *card)
3000 QETH_DBF_TEXT(SETUP, 2, "strtlan"); 3011 QETH_DBF_TEXT(SETUP, 2, "strtlan");
3001 3012
3002 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_STARTLAN, 0); 3013 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_STARTLAN, 0);
3014 if (!iob)
3015 return -ENOMEM;
3003 rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); 3016 rc = qeth_send_ipa_cmd(card, iob, NULL, NULL);
3004 return rc; 3017 return rc;
3005} 3018}
@@ -3045,11 +3058,13 @@ static struct qeth_cmd_buffer *qeth_get_adapter_cmd(struct qeth_card *card,
3045 3058
3046 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETADAPTERPARMS, 3059 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETADAPTERPARMS,
3047 QETH_PROT_IPV4); 3060 QETH_PROT_IPV4);
3048 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 3061 if (iob) {
3049 cmd->data.setadapterparms.hdr.cmdlength = cmdlen; 3062 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
3050 cmd->data.setadapterparms.hdr.command_code = command; 3063 cmd->data.setadapterparms.hdr.cmdlength = cmdlen;
3051 cmd->data.setadapterparms.hdr.used_total = 1; 3064 cmd->data.setadapterparms.hdr.command_code = command;
3052 cmd->data.setadapterparms.hdr.seq_no = 1; 3065 cmd->data.setadapterparms.hdr.used_total = 1;
3066 cmd->data.setadapterparms.hdr.seq_no = 1;
3067 }
3053 3068
3054 return iob; 3069 return iob;
3055} 3070}
@@ -3062,6 +3077,8 @@ int qeth_query_setadapterparms(struct qeth_card *card)
3062 QETH_CARD_TEXT(card, 3, "queryadp"); 3077 QETH_CARD_TEXT(card, 3, "queryadp");
3063 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_COMMANDS_SUPPORTED, 3078 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_COMMANDS_SUPPORTED,
3064 sizeof(struct qeth_ipacmd_setadpparms)); 3079 sizeof(struct qeth_ipacmd_setadpparms));
3080 if (!iob)
3081 return -ENOMEM;
3065 rc = qeth_send_ipa_cmd(card, iob, qeth_query_setadapterparms_cb, NULL); 3082 rc = qeth_send_ipa_cmd(card, iob, qeth_query_setadapterparms_cb, NULL);
3066 return rc; 3083 return rc;
3067} 3084}
@@ -3112,6 +3129,8 @@ int qeth_query_ipassists(struct qeth_card *card, enum qeth_prot_versions prot)
3112 3129
3113 QETH_DBF_TEXT_(SETUP, 2, "qipassi%i", prot); 3130 QETH_DBF_TEXT_(SETUP, 2, "qipassi%i", prot);
3114 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_QIPASSIST, prot); 3131 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_QIPASSIST, prot);
3132 if (!iob)
3133 return -ENOMEM;
3115 rc = qeth_send_ipa_cmd(card, iob, qeth_query_ipassists_cb, NULL); 3134 rc = qeth_send_ipa_cmd(card, iob, qeth_query_ipassists_cb, NULL);
3116 return rc; 3135 return rc;
3117} 3136}
@@ -3151,6 +3170,8 @@ int qeth_query_switch_attributes(struct qeth_card *card,
3151 return -ENOMEDIUM; 3170 return -ENOMEDIUM;
3152 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_SWITCH_ATTRIBUTES, 3171 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_SWITCH_ATTRIBUTES,
3153 sizeof(struct qeth_ipacmd_setadpparms_hdr)); 3172 sizeof(struct qeth_ipacmd_setadpparms_hdr));
3173 if (!iob)
3174 return -ENOMEM;
3154 return qeth_send_ipa_cmd(card, iob, 3175 return qeth_send_ipa_cmd(card, iob,
3155 qeth_query_switch_attributes_cb, sw_info); 3176 qeth_query_switch_attributes_cb, sw_info);
3156} 3177}
@@ -3178,6 +3199,8 @@ static int qeth_query_setdiagass(struct qeth_card *card)
3178 3199
3179 QETH_DBF_TEXT(SETUP, 2, "qdiagass"); 3200 QETH_DBF_TEXT(SETUP, 2, "qdiagass");
3180 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SET_DIAG_ASS, 0); 3201 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SET_DIAG_ASS, 0);
3202 if (!iob)
3203 return -ENOMEM;
3181 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 3204 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
3182 cmd->data.diagass.subcmd_len = 16; 3205 cmd->data.diagass.subcmd_len = 16;
3183 cmd->data.diagass.subcmd = QETH_DIAGS_CMD_QUERY; 3206 cmd->data.diagass.subcmd = QETH_DIAGS_CMD_QUERY;
@@ -3229,6 +3252,8 @@ int qeth_hw_trap(struct qeth_card *card, enum qeth_diags_trap_action action)
3229 3252
3230 QETH_DBF_TEXT(SETUP, 2, "diagtrap"); 3253 QETH_DBF_TEXT(SETUP, 2, "diagtrap");
3231 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SET_DIAG_ASS, 0); 3254 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SET_DIAG_ASS, 0);
3255 if (!iob)
3256 return -ENOMEM;
3232 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 3257 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
3233 cmd->data.diagass.subcmd_len = 80; 3258 cmd->data.diagass.subcmd_len = 80;
3234 cmd->data.diagass.subcmd = QETH_DIAGS_CMD_TRAP; 3259 cmd->data.diagass.subcmd = QETH_DIAGS_CMD_TRAP;
@@ -4194,6 +4219,8 @@ void qeth_setadp_promisc_mode(struct qeth_card *card)
4194 4219
4195 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_PROMISC_MODE, 4220 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_PROMISC_MODE,
4196 sizeof(struct qeth_ipacmd_setadpparms)); 4221 sizeof(struct qeth_ipacmd_setadpparms));
4222 if (!iob)
4223 return;
4197 cmd = (struct qeth_ipa_cmd *)(iob->data + IPA_PDU_HEADER_SIZE); 4224 cmd = (struct qeth_ipa_cmd *)(iob->data + IPA_PDU_HEADER_SIZE);
4198 cmd->data.setadapterparms.data.mode = mode; 4225 cmd->data.setadapterparms.data.mode = mode;
4199 qeth_send_ipa_cmd(card, iob, qeth_setadp_promisc_mode_cb, NULL); 4226 qeth_send_ipa_cmd(card, iob, qeth_setadp_promisc_mode_cb, NULL);
@@ -4264,6 +4291,8 @@ int qeth_setadpparms_change_macaddr(struct qeth_card *card)
4264 4291
4265 iob = qeth_get_adapter_cmd(card, IPA_SETADP_ALTER_MAC_ADDRESS, 4292 iob = qeth_get_adapter_cmd(card, IPA_SETADP_ALTER_MAC_ADDRESS,
4266 sizeof(struct qeth_ipacmd_setadpparms)); 4293 sizeof(struct qeth_ipacmd_setadpparms));
4294 if (!iob)
4295 return -ENOMEM;
4267 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 4296 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
4268 cmd->data.setadapterparms.data.change_addr.cmd = CHANGE_ADDR_READ_MAC; 4297 cmd->data.setadapterparms.data.change_addr.cmd = CHANGE_ADDR_READ_MAC;
4269 cmd->data.setadapterparms.data.change_addr.addr_size = OSA_ADDR_LEN; 4298 cmd->data.setadapterparms.data.change_addr.addr_size = OSA_ADDR_LEN;
@@ -4377,6 +4406,8 @@ static int qeth_setadpparms_set_access_ctrl(struct qeth_card *card,
4377 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_ACCESS_CONTROL, 4406 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_ACCESS_CONTROL,
4378 sizeof(struct qeth_ipacmd_setadpparms_hdr) + 4407 sizeof(struct qeth_ipacmd_setadpparms_hdr) +
4379 sizeof(struct qeth_set_access_ctrl)); 4408 sizeof(struct qeth_set_access_ctrl));
4409 if (!iob)
4410 return -ENOMEM;
4380 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 4411 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
4381 access_ctrl_req = &cmd->data.setadapterparms.data.set_access_ctrl; 4412 access_ctrl_req = &cmd->data.setadapterparms.data.set_access_ctrl;
4382 access_ctrl_req->subcmd_code = isolation; 4413 access_ctrl_req->subcmd_code = isolation;
@@ -4620,6 +4651,10 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)
4620 4651
4621 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_SNMP_CONTROL, 4652 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_SNMP_CONTROL,
4622 QETH_SNMP_SETADP_CMDLENGTH + req_len); 4653 QETH_SNMP_SETADP_CMDLENGTH + req_len);
4654 if (!iob) {
4655 rc = -ENOMEM;
4656 goto out;
4657 }
4623 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 4658 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
4624 memcpy(&cmd->data.setadapterparms.data.snmp, &ureq->cmd, req_len); 4659 memcpy(&cmd->data.setadapterparms.data.snmp, &ureq->cmd, req_len);
4625 rc = qeth_send_ipa_snmp_cmd(card, iob, QETH_SETADP_BASE_LEN + req_len, 4660 rc = qeth_send_ipa_snmp_cmd(card, iob, QETH_SETADP_BASE_LEN + req_len,
@@ -4631,7 +4666,7 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)
4631 if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) 4666 if (copy_to_user(udata, qinfo.udata, qinfo.udata_len))
4632 rc = -EFAULT; 4667 rc = -EFAULT;
4633 } 4668 }
4634 4669out:
4635 kfree(ureq); 4670 kfree(ureq);
4636 kfree(qinfo.udata); 4671 kfree(qinfo.udata);
4637 return rc; 4672 return rc;
@@ -4702,6 +4737,10 @@ int qeth_query_oat_command(struct qeth_card *card, char __user *udata)
4702 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_OAT, 4737 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_OAT,
4703 sizeof(struct qeth_ipacmd_setadpparms_hdr) + 4738 sizeof(struct qeth_ipacmd_setadpparms_hdr) +
4704 sizeof(struct qeth_query_oat)); 4739 sizeof(struct qeth_query_oat));
4740 if (!iob) {
4741 rc = -ENOMEM;
4742 goto out_free;
4743 }
4705 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 4744 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
4706 oat_req = &cmd->data.setadapterparms.data.query_oat; 4745 oat_req = &cmd->data.setadapterparms.data.query_oat;
4707 oat_req->subcmd_code = oat_data.command; 4746 oat_req->subcmd_code = oat_data.command;
@@ -4767,6 +4806,8 @@ static int qeth_query_card_info(struct qeth_card *card,
4767 return -EOPNOTSUPP; 4806 return -EOPNOTSUPP;
4768 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_CARD_INFO, 4807 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_CARD_INFO,
4769 sizeof(struct qeth_ipacmd_setadpparms_hdr)); 4808 sizeof(struct qeth_ipacmd_setadpparms_hdr));
4809 if (!iob)
4810 return -ENOMEM;
4770 return qeth_send_ipa_cmd(card, iob, qeth_query_card_info_cb, 4811 return qeth_send_ipa_cmd(card, iob, qeth_query_card_info_cb,
4771 (void *)carrier_info); 4812 (void *)carrier_info);
4772} 4813}
@@ -5092,11 +5133,23 @@ retriable:
5092 card->options.adp.supported_funcs = 0; 5133 card->options.adp.supported_funcs = 0;
5093 card->options.sbp.supported_funcs = 0; 5134 card->options.sbp.supported_funcs = 0;
5094 card->info.diagass_support = 0; 5135 card->info.diagass_support = 0;
5095 qeth_query_ipassists(card, QETH_PROT_IPV4); 5136 rc = qeth_query_ipassists(card, QETH_PROT_IPV4);
5096 if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) 5137 if (rc == -ENOMEM)
5097 qeth_query_setadapterparms(card); 5138 goto out;
5098 if (qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) 5139 if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
5099 qeth_query_setdiagass(card); 5140 rc = qeth_query_setadapterparms(card);
5141 if (rc < 0) {
5142 QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
5143 goto out;
5144 }
5145 }
5146 if (qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) {
5147 rc = qeth_query_setdiagass(card);
5148 if (rc < 0) {
5149 QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
5150 goto out;
5151 }
5152 }
5100 return 0; 5153 return 0;
5101out: 5154out:
5102 dev_warn(&card->gdev->dev, "The qeth device driver failed to recover " 5155 dev_warn(&card->gdev->dev, "The qeth device driver failed to recover "
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index b7b9d5cbe4d5..ce87ae72edbd 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -132,7 +132,7 @@ static int qeth_setdel_makerc(struct qeth_card *card, int retcode)
132 int rc; 132 int rc;
133 133
134 if (retcode) 134 if (retcode)
135 QETH_CARD_TEXT_(card, 2, "err%d", retcode); 135 QETH_CARD_TEXT_(card, 2, "err%04x", retcode);
136 switch (retcode) { 136 switch (retcode) {
137 case IPA_RC_SUCCESS: 137 case IPA_RC_SUCCESS:
138 rc = 0; 138 rc = 0;
@@ -154,6 +154,9 @@ static int qeth_setdel_makerc(struct qeth_card *card, int retcode)
154 case IPA_RC_L2_MAC_NOT_FOUND: 154 case IPA_RC_L2_MAC_NOT_FOUND:
155 rc = -ENOENT; 155 rc = -ENOENT;
156 break; 156 break;
157 case -ENOMEM:
158 rc = -ENOMEM;
159 break;
157 default: 160 default:
158 rc = -EIO; 161 rc = -EIO;
159 break; 162 break;
@@ -301,6 +304,8 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i,
301 304
302 QETH_CARD_TEXT_(card, 4, "L2sdv%x", ipacmd); 305 QETH_CARD_TEXT_(card, 4, "L2sdv%x", ipacmd);
303 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); 306 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
307 if (!iob)
308 return -ENOMEM;
304 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 309 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
305 cmd->data.setdelvlan.vlan_id = i; 310 cmd->data.setdelvlan.vlan_id = i;
306 return qeth_send_ipa_cmd(card, iob, 311 return qeth_send_ipa_cmd(card, iob,
@@ -323,6 +328,7 @@ static int qeth_l2_vlan_rx_add_vid(struct net_device *dev,
323{ 328{
324 struct qeth_card *card = dev->ml_priv; 329 struct qeth_card *card = dev->ml_priv;
325 struct qeth_vlan_vid *id; 330 struct qeth_vlan_vid *id;
331 int rc;
326 332
327 QETH_CARD_TEXT_(card, 4, "aid:%d", vid); 333 QETH_CARD_TEXT_(card, 4, "aid:%d", vid);
328 if (!vid) 334 if (!vid)
@@ -338,7 +344,11 @@ static int qeth_l2_vlan_rx_add_vid(struct net_device *dev,
338 id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC); 344 id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC);
339 if (id) { 345 if (id) {
340 id->vid = vid; 346 id->vid = vid;
341 qeth_l2_send_setdelvlan(card, vid, IPA_CMD_SETVLAN); 347 rc = qeth_l2_send_setdelvlan(card, vid, IPA_CMD_SETVLAN);
348 if (rc) {
349 kfree(id);
350 return rc;
351 }
342 spin_lock_bh(&card->vlanlock); 352 spin_lock_bh(&card->vlanlock);
343 list_add_tail(&id->list, &card->vid_list); 353 list_add_tail(&id->list, &card->vid_list);
344 spin_unlock_bh(&card->vlanlock); 354 spin_unlock_bh(&card->vlanlock);
@@ -353,6 +363,7 @@ static int qeth_l2_vlan_rx_kill_vid(struct net_device *dev,
353{ 363{
354 struct qeth_vlan_vid *id, *tmpid = NULL; 364 struct qeth_vlan_vid *id, *tmpid = NULL;
355 struct qeth_card *card = dev->ml_priv; 365 struct qeth_card *card = dev->ml_priv;
366 int rc = 0;
356 367
357 QETH_CARD_TEXT_(card, 4, "kid:%d", vid); 368 QETH_CARD_TEXT_(card, 4, "kid:%d", vid);
358 if (card->info.type == QETH_CARD_TYPE_OSM) { 369 if (card->info.type == QETH_CARD_TYPE_OSM) {
@@ -373,11 +384,11 @@ static int qeth_l2_vlan_rx_kill_vid(struct net_device *dev,
373 } 384 }
374 spin_unlock_bh(&card->vlanlock); 385 spin_unlock_bh(&card->vlanlock);
375 if (tmpid) { 386 if (tmpid) {
376 qeth_l2_send_setdelvlan(card, vid, IPA_CMD_DELVLAN); 387 rc = qeth_l2_send_setdelvlan(card, vid, IPA_CMD_DELVLAN);
377 kfree(tmpid); 388 kfree(tmpid);
378 } 389 }
379 qeth_l2_set_multicast_list(card->dev); 390 qeth_l2_set_multicast_list(card->dev);
380 return 0; 391 return rc;
381} 392}
382 393
383static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) 394static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
@@ -556,6 +567,8 @@ static int qeth_l2_send_setdelmac(struct qeth_card *card, __u8 *mac,
556 567
557 QETH_CARD_TEXT(card, 2, "L2sdmac"); 568 QETH_CARD_TEXT(card, 2, "L2sdmac");
558 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); 569 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
570 if (!iob)
571 return -ENOMEM;
559 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 572 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
560 cmd->data.setdelmac.mac_length = OSA_ADDR_LEN; 573 cmd->data.setdelmac.mac_length = OSA_ADDR_LEN;
561 memcpy(&cmd->data.setdelmac.mac, mac, OSA_ADDR_LEN); 574 memcpy(&cmd->data.setdelmac.mac, mac, OSA_ADDR_LEN);
@@ -630,7 +643,7 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card)
630 if (rc) { 643 if (rc) {
631 QETH_DBF_MESSAGE(2, "couldn't get MAC address on " 644 QETH_DBF_MESSAGE(2, "couldn't get MAC address on "
632 "device %s: x%x\n", CARD_BUS_ID(card), rc); 645 "device %s: x%x\n", CARD_BUS_ID(card), rc);
633 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); 646 QETH_DBF_TEXT_(SETUP, 2, "1err%04x", rc);
634 return rc; 647 return rc;
635 } 648 }
636 QETH_DBF_HEX(SETUP, 2, card->dev->dev_addr, OSA_ADDR_LEN); 649 QETH_DBF_HEX(SETUP, 2, card->dev->dev_addr, OSA_ADDR_LEN);
@@ -975,7 +988,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
975 recover_flag = card->state; 988 recover_flag = card->state;
976 rc = qeth_core_hardsetup_card(card); 989 rc = qeth_core_hardsetup_card(card);
977 if (rc) { 990 if (rc) {
978 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); 991 QETH_DBF_TEXT_(SETUP, 2, "2err%04x", rc);
979 rc = -ENODEV; 992 rc = -ENODEV;
980 goto out_remove; 993 goto out_remove;
981 } 994 }
@@ -1709,6 +1722,8 @@ static void qeth_bridgeport_query_support(struct qeth_card *card)
1709 1722
1710 QETH_CARD_TEXT(card, 2, "brqsuppo"); 1723 QETH_CARD_TEXT(card, 2, "brqsuppo");
1711 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0); 1724 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0);
1725 if (!iob)
1726 return;
1712 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1727 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1713 cmd->data.sbp.hdr.cmdlength = 1728 cmd->data.sbp.hdr.cmdlength =
1714 sizeof(struct qeth_ipacmd_sbp_hdr) + 1729 sizeof(struct qeth_ipacmd_sbp_hdr) +
@@ -1784,6 +1799,8 @@ int qeth_bridgeport_query_ports(struct qeth_card *card,
1784 if (!(card->options.sbp.supported_funcs & IPA_SBP_QUERY_BRIDGE_PORTS)) 1799 if (!(card->options.sbp.supported_funcs & IPA_SBP_QUERY_BRIDGE_PORTS))
1785 return -EOPNOTSUPP; 1800 return -EOPNOTSUPP;
1786 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0); 1801 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0);
1802 if (!iob)
1803 return -ENOMEM;
1787 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1804 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1788 cmd->data.sbp.hdr.cmdlength = 1805 cmd->data.sbp.hdr.cmdlength =
1789 sizeof(struct qeth_ipacmd_sbp_hdr); 1806 sizeof(struct qeth_ipacmd_sbp_hdr);
@@ -1796,9 +1813,7 @@ int qeth_bridgeport_query_ports(struct qeth_card *card,
1796 if (rc) 1813 if (rc)
1797 return rc; 1814 return rc;
1798 rc = qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS); 1815 rc = qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS);
1799 if (rc) 1816 return rc;
1800 return rc;
1801 return 0;
1802} 1817}
1803EXPORT_SYMBOL_GPL(qeth_bridgeport_query_ports); 1818EXPORT_SYMBOL_GPL(qeth_bridgeport_query_ports);
1804 1819
@@ -1852,6 +1867,8 @@ int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role)
1852 if (!(card->options.sbp.supported_funcs & setcmd)) 1867 if (!(card->options.sbp.supported_funcs & setcmd))
1853 return -EOPNOTSUPP; 1868 return -EOPNOTSUPP;
1854 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0); 1869 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0);
1870 if (!iob)
1871 return -ENOMEM;
1855 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1872 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1856 cmd->data.sbp.hdr.cmdlength = cmdlength; 1873 cmd->data.sbp.hdr.cmdlength = cmdlength;
1857 cmd->data.sbp.hdr.command_code = setcmd; 1874 cmd->data.sbp.hdr.command_code = setcmd;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 625227ad16ee..e2a0ee845399 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -549,6 +549,8 @@ static int qeth_l3_send_setdelmc(struct qeth_card *card,
549 QETH_CARD_TEXT(card, 4, "setdelmc"); 549 QETH_CARD_TEXT(card, 4, "setdelmc");
550 550
551 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); 551 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto);
552 if (!iob)
553 return -ENOMEM;
552 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 554 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
553 memcpy(&cmd->data.setdelipm.mac, addr->mac, OSA_ADDR_LEN); 555 memcpy(&cmd->data.setdelipm.mac, addr->mac, OSA_ADDR_LEN);
554 if (addr->proto == QETH_PROT_IPV6) 556 if (addr->proto == QETH_PROT_IPV6)
@@ -588,6 +590,8 @@ static int qeth_l3_send_setdelip(struct qeth_card *card,
588 QETH_CARD_TEXT_(card, 4, "flags%02X", flags); 590 QETH_CARD_TEXT_(card, 4, "flags%02X", flags);
589 591
590 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); 592 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto);
593 if (!iob)
594 return -ENOMEM;
591 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 595 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
592 if (addr->proto == QETH_PROT_IPV6) { 596 if (addr->proto == QETH_PROT_IPV6) {
593 memcpy(cmd->data.setdelip6.ip_addr, &addr->u.a6.addr, 597 memcpy(cmd->data.setdelip6.ip_addr, &addr->u.a6.addr,
@@ -616,6 +620,8 @@ static int qeth_l3_send_setrouting(struct qeth_card *card,
616 620
617 QETH_CARD_TEXT(card, 4, "setroutg"); 621 QETH_CARD_TEXT(card, 4, "setroutg");
618 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETRTG, prot); 622 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETRTG, prot);
623 if (!iob)
624 return -ENOMEM;
619 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 625 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
620 cmd->data.setrtg.type = (type); 626 cmd->data.setrtg.type = (type);
621 rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); 627 rc = qeth_send_ipa_cmd(card, iob, NULL, NULL);
@@ -1049,12 +1055,14 @@ static struct qeth_cmd_buffer *qeth_l3_get_setassparms_cmd(
1049 QETH_CARD_TEXT(card, 4, "getasscm"); 1055 QETH_CARD_TEXT(card, 4, "getasscm");
1050 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot); 1056 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot);
1051 1057
1052 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1058 if (iob) {
1053 cmd->data.setassparms.hdr.assist_no = ipa_func; 1059 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1054 cmd->data.setassparms.hdr.length = 8 + len; 1060 cmd->data.setassparms.hdr.assist_no = ipa_func;
1055 cmd->data.setassparms.hdr.command_code = cmd_code; 1061 cmd->data.setassparms.hdr.length = 8 + len;
1056 cmd->data.setassparms.hdr.return_code = 0; 1062 cmd->data.setassparms.hdr.command_code = cmd_code;
1057 cmd->data.setassparms.hdr.seq_no = 0; 1063 cmd->data.setassparms.hdr.return_code = 0;
1064 cmd->data.setassparms.hdr.seq_no = 0;
1065 }
1058 1066
1059 return iob; 1067 return iob;
1060} 1068}
@@ -1090,6 +1098,8 @@ static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
1090 QETH_CARD_TEXT(card, 4, "simassp6"); 1098 QETH_CARD_TEXT(card, 4, "simassp6");
1091 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, 1099 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
1092 0, QETH_PROT_IPV6); 1100 0, QETH_PROT_IPV6);
1101 if (!iob)
1102 return -ENOMEM;
1093 rc = qeth_l3_send_setassparms(card, iob, 0, 0, 1103 rc = qeth_l3_send_setassparms(card, iob, 0, 0,
1094 qeth_l3_default_setassparms_cb, NULL); 1104 qeth_l3_default_setassparms_cb, NULL);
1095 return rc; 1105 return rc;
@@ -1108,6 +1118,8 @@ static int qeth_l3_send_simple_setassparms(struct qeth_card *card,
1108 length = sizeof(__u32); 1118 length = sizeof(__u32);
1109 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, 1119 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
1110 length, QETH_PROT_IPV4); 1120 length, QETH_PROT_IPV4);
1121 if (!iob)
1122 return -ENOMEM;
1111 rc = qeth_l3_send_setassparms(card, iob, length, data, 1123 rc = qeth_l3_send_setassparms(card, iob, length, data,
1112 qeth_l3_default_setassparms_cb, NULL); 1124 qeth_l3_default_setassparms_cb, NULL);
1113 return rc; 1125 return rc;
@@ -1494,6 +1506,8 @@ static int qeth_l3_iqd_read_initial_mac(struct qeth_card *card)
1494 1506
1495 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_CREATE_ADDR, 1507 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_CREATE_ADDR,
1496 QETH_PROT_IPV6); 1508 QETH_PROT_IPV6);
1509 if (!iob)
1510 return -ENOMEM;
1497 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1511 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1498 *((__u16 *) &cmd->data.create_destroy_addr.unique_id[6]) = 1512 *((__u16 *) &cmd->data.create_destroy_addr.unique_id[6]) =
1499 card->info.unique_id; 1513 card->info.unique_id;
@@ -1537,6 +1551,8 @@ static int qeth_l3_get_unique_id(struct qeth_card *card)
1537 1551
1538 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_CREATE_ADDR, 1552 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_CREATE_ADDR,
1539 QETH_PROT_IPV6); 1553 QETH_PROT_IPV6);
1554 if (!iob)
1555 return -ENOMEM;
1540 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1556 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1541 *((__u16 *) &cmd->data.create_destroy_addr.unique_id[6]) = 1557 *((__u16 *) &cmd->data.create_destroy_addr.unique_id[6]) =
1542 card->info.unique_id; 1558 card->info.unique_id;
@@ -1611,6 +1627,8 @@ qeth_diags_trace(struct qeth_card *card, enum qeth_diags_trace_cmds diags_cmd)
1611 QETH_DBF_TEXT(SETUP, 2, "diagtrac"); 1627 QETH_DBF_TEXT(SETUP, 2, "diagtrac");
1612 1628
1613 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SET_DIAG_ASS, 0); 1629 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SET_DIAG_ASS, 0);
1630 if (!iob)
1631 return -ENOMEM;
1614 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1632 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1615 cmd->data.diagass.subcmd_len = 16; 1633 cmd->data.diagass.subcmd_len = 16;
1616 cmd->data.diagass.subcmd = QETH_DIAGS_CMD_TRACE; 1634 cmd->data.diagass.subcmd = QETH_DIAGS_CMD_TRACE;
@@ -2442,6 +2460,8 @@ static int qeth_l3_query_arp_cache_info(struct qeth_card *card,
2442 IPA_CMD_ASS_ARP_QUERY_INFO, 2460 IPA_CMD_ASS_ARP_QUERY_INFO,
2443 sizeof(struct qeth_arp_query_data) - sizeof(char), 2461 sizeof(struct qeth_arp_query_data) - sizeof(char),
2444 prot); 2462 prot);
2463 if (!iob)
2464 return -ENOMEM;
2445 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 2465 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
2446 cmd->data.setassparms.data.query_arp.request_bits = 0x000F; 2466 cmd->data.setassparms.data.query_arp.request_bits = 0x000F;
2447 cmd->data.setassparms.data.query_arp.reply_bits = 0; 2467 cmd->data.setassparms.data.query_arp.reply_bits = 0;
@@ -2535,6 +2555,8 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card,
2535 IPA_CMD_ASS_ARP_ADD_ENTRY, 2555 IPA_CMD_ASS_ARP_ADD_ENTRY,
2536 sizeof(struct qeth_arp_cache_entry), 2556 sizeof(struct qeth_arp_cache_entry),
2537 QETH_PROT_IPV4); 2557 QETH_PROT_IPV4);
2558 if (!iob)
2559 return -ENOMEM;
2538 rc = qeth_l3_send_setassparms(card, iob, 2560 rc = qeth_l3_send_setassparms(card, iob,
2539 sizeof(struct qeth_arp_cache_entry), 2561 sizeof(struct qeth_arp_cache_entry),
2540 (unsigned long) entry, 2562 (unsigned long) entry,
@@ -2574,6 +2596,8 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card,
2574 IPA_CMD_ASS_ARP_REMOVE_ENTRY, 2596 IPA_CMD_ASS_ARP_REMOVE_ENTRY,
2575 12, 2597 12,
2576 QETH_PROT_IPV4); 2598 QETH_PROT_IPV4);
2599 if (!iob)
2600 return -ENOMEM;
2577 rc = qeth_l3_send_setassparms(card, iob, 2601 rc = qeth_l3_send_setassparms(card, iob,
2578 12, (unsigned long)buf, 2602 12, (unsigned long)buf,
2579 qeth_l3_default_setassparms_cb, NULL); 2603 qeth_l3_default_setassparms_cb, NULL);
@@ -3262,6 +3286,8 @@ static const struct net_device_ops qeth_l3_osa_netdev_ops = {
3262 3286
3263static int qeth_l3_setup_netdev(struct qeth_card *card) 3287static int qeth_l3_setup_netdev(struct qeth_card *card)
3264{ 3288{
3289 int rc;
3290
3265 if (card->info.type == QETH_CARD_TYPE_OSD || 3291 if (card->info.type == QETH_CARD_TYPE_OSD ||
3266 card->info.type == QETH_CARD_TYPE_OSX) { 3292 card->info.type == QETH_CARD_TYPE_OSX) {
3267 if ((card->info.link_type == QETH_LINK_TYPE_LANE_TR) || 3293 if ((card->info.link_type == QETH_LINK_TYPE_LANE_TR) ||
@@ -3293,7 +3319,9 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
3293 return -ENODEV; 3319 return -ENODEV;
3294 card->dev->flags |= IFF_NOARP; 3320 card->dev->flags |= IFF_NOARP;
3295 card->dev->netdev_ops = &qeth_l3_netdev_ops; 3321 card->dev->netdev_ops = &qeth_l3_netdev_ops;
3296 qeth_l3_iqd_read_initial_mac(card); 3322 rc = qeth_l3_iqd_read_initial_mac(card);
3323 if (rc)
3324 return rc;
3297 if (card->options.hsuid[0]) 3325 if (card->options.hsuid[0])
3298 memcpy(card->dev->perm_addr, card->options.hsuid, 9); 3326 memcpy(card->dev->perm_addr, card->options.hsuid, 9);
3299 } else 3327 } else
@@ -3360,7 +3388,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
3360 recover_flag = card->state; 3388 recover_flag = card->state;
3361 rc = qeth_core_hardsetup_card(card); 3389 rc = qeth_core_hardsetup_card(card);
3362 if (rc) { 3390 if (rc) {
3363 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); 3391 QETH_DBF_TEXT_(SETUP, 2, "2err%04x", rc);
3364 rc = -ENODEV; 3392 rc = -ENODEV;
3365 goto out_remove; 3393 goto out_remove;
3366 } 3394 }
@@ -3401,7 +3429,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
3401contin: 3429contin:
3402 rc = qeth_l3_setadapter_parms(card); 3430 rc = qeth_l3_setadapter_parms(card);
3403 if (rc) 3431 if (rc)
3404 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); 3432 QETH_DBF_TEXT_(SETUP, 2, "2err%04x", rc);
3405 if (!card->options.sniffer) { 3433 if (!card->options.sniffer) {
3406 rc = qeth_l3_start_ipassists(card); 3434 rc = qeth_l3_start_ipassists(card);
3407 if (rc) { 3435 if (rc) {
@@ -3410,10 +3438,10 @@ contin:
3410 } 3438 }
3411 rc = qeth_l3_setrouting_v4(card); 3439 rc = qeth_l3_setrouting_v4(card);
3412 if (rc) 3440 if (rc)
3413 QETH_DBF_TEXT_(SETUP, 2, "4err%d", rc); 3441 QETH_DBF_TEXT_(SETUP, 2, "4err%04x", rc);
3414 rc = qeth_l3_setrouting_v6(card); 3442 rc = qeth_l3_setrouting_v6(card);
3415 if (rc) 3443 if (rc)
3416 QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc); 3444 QETH_DBF_TEXT_(SETUP, 2, "5err%04x", rc);
3417 } 3445 }
3418 netif_tx_disable(card->dev); 3446 netif_tx_disable(card->dev);
3419 3447