diff options
author | David S. Miller <davem@davemloft.net> | 2015-09-21 19:03:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-21 19:03:05 -0400 |
commit | 21fe8af40024c49af37124bc7b19c5836d25695e (patch) | |
tree | f7a4f4801941ddbed1ae567b56121ec2db1492f4 | |
parent | 5dcd2461073a43b2aa48ab5cfc135ba182667794 (diff) | |
parent | 91e60eb60bdf078fc58b8d2fd1ac12f3c09bb893 (diff) |
Merge branch 's390-next'
Ursula Braun says:
====================
s390: qeth and iucv patches
here is version 2 of some s390 related qeth patches for net-next. The patch by
Thomas Richter adds a new feature to the qeth layer2 code; the remaining
patches are minor improvements.
Version 2 of patch 4 uses the desired indentation in function declarations
and definitions spanning multiple lines in almost all cases. Thomas run into a
conflict with the maximum number of columns once. Thus you will still see one
function definition using an earlier column before the opening paranthesis.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/s390/char/monreader.c | 4 | ||||
-rw-r--r-- | drivers/s390/char/vmlogrdr.c | 8 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 21 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core.h | 11 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 241 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_sys.c | 43 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 89 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_sys.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 158 | ||||
-rw-r--r-- | drivers/s390/net/smsgiucv.c | 5 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_iucv.c | 10 | ||||
-rw-r--r-- | include/net/iucv/iucv.h | 20 | ||||
-rw-r--r-- | net/iucv/af_iucv.c | 9 | ||||
-rw-r--r-- | net/iucv/iucv.c | 12 |
14 files changed, 341 insertions, 292 deletions
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index b7d60306b0bc..fc94bfdceb95 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c | |||
@@ -229,7 +229,7 @@ static struct mon_msg *mon_next_message(struct mon_private *monpriv) | |||
229 | /****************************************************************************** | 229 | /****************************************************************************** |
230 | * IUCV handler * | 230 | * IUCV handler * |
231 | *****************************************************************************/ | 231 | *****************************************************************************/ |
232 | static void mon_iucv_path_complete(struct iucv_path *path, u8 ipuser[16]) | 232 | static void mon_iucv_path_complete(struct iucv_path *path, u8 *ipuser) |
233 | { | 233 | { |
234 | struct mon_private *monpriv = path->private; | 234 | struct mon_private *monpriv = path->private; |
235 | 235 | ||
@@ -237,7 +237,7 @@ static void mon_iucv_path_complete(struct iucv_path *path, u8 ipuser[16]) | |||
237 | wake_up(&mon_conn_wait_queue); | 237 | wake_up(&mon_conn_wait_queue); |
238 | } | 238 | } |
239 | 239 | ||
240 | static void mon_iucv_path_severed(struct iucv_path *path, u8 ipuser[16]) | 240 | static void mon_iucv_path_severed(struct iucv_path *path, u8 *ipuser) |
241 | { | 241 | { |
242 | struct mon_private *monpriv = path->private; | 242 | struct mon_private *monpriv = path->private; |
243 | 243 | ||
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 9bb48d70957c..799c1524c779 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -99,8 +99,8 @@ static const struct file_operations vmlogrdr_fops = { | |||
99 | }; | 99 | }; |
100 | 100 | ||
101 | 101 | ||
102 | static void vmlogrdr_iucv_path_complete(struct iucv_path *, u8 ipuser[16]); | 102 | static void vmlogrdr_iucv_path_complete(struct iucv_path *, u8 *ipuser); |
103 | static void vmlogrdr_iucv_path_severed(struct iucv_path *, u8 ipuser[16]); | 103 | static void vmlogrdr_iucv_path_severed(struct iucv_path *, u8 *ipuser); |
104 | static void vmlogrdr_iucv_message_pending(struct iucv_path *, | 104 | static void vmlogrdr_iucv_message_pending(struct iucv_path *, |
105 | struct iucv_message *); | 105 | struct iucv_message *); |
106 | 106 | ||
@@ -160,7 +160,7 @@ static struct cdev *vmlogrdr_cdev = NULL; | |||
160 | static int recording_class_AB; | 160 | static int recording_class_AB; |
161 | 161 | ||
162 | 162 | ||
163 | static void vmlogrdr_iucv_path_complete(struct iucv_path *path, u8 ipuser[16]) | 163 | static void vmlogrdr_iucv_path_complete(struct iucv_path *path, u8 *ipuser) |
164 | { | 164 | { |
165 | struct vmlogrdr_priv_t * logptr = path->private; | 165 | struct vmlogrdr_priv_t * logptr = path->private; |
166 | 166 | ||
@@ -171,7 +171,7 @@ static void vmlogrdr_iucv_path_complete(struct iucv_path *path, u8 ipuser[16]) | |||
171 | } | 171 | } |
172 | 172 | ||
173 | 173 | ||
174 | static void vmlogrdr_iucv_path_severed(struct iucv_path *path, u8 ipuser[16]) | 174 | static void vmlogrdr_iucv_path_severed(struct iucv_path *path, u8 *ipuser) |
175 | { | 175 | { |
176 | struct vmlogrdr_priv_t * logptr = path->private; | 176 | struct vmlogrdr_priv_t * logptr = path->private; |
177 | u8 reason = (u8) ipuser[8]; | 177 | u8 reason = (u8) ipuser[8]; |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 33f7040d711d..0ba3a2f81750 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -149,12 +149,11 @@ static struct device_driver netiucv_driver = { | |||
149 | .pm = &netiucv_pm_ops, | 149 | .pm = &netiucv_pm_ops, |
150 | }; | 150 | }; |
151 | 151 | ||
152 | static int netiucv_callback_connreq(struct iucv_path *, | 152 | static int netiucv_callback_connreq(struct iucv_path *, u8 *, u8 *); |
153 | u8 ipvmid[8], u8 ipuser[16]); | 153 | static void netiucv_callback_connack(struct iucv_path *, u8 *); |
154 | static void netiucv_callback_connack(struct iucv_path *, u8 ipuser[16]); | 154 | static void netiucv_callback_connrej(struct iucv_path *, u8 *); |
155 | static void netiucv_callback_connrej(struct iucv_path *, u8 ipuser[16]); | 155 | static void netiucv_callback_connsusp(struct iucv_path *, u8 *); |
156 | static void netiucv_callback_connsusp(struct iucv_path *, u8 ipuser[16]); | 156 | static void netiucv_callback_connres(struct iucv_path *, u8 *); |
157 | static void netiucv_callback_connres(struct iucv_path *, u8 ipuser[16]); | ||
158 | static void netiucv_callback_rx(struct iucv_path *, struct iucv_message *); | 157 | static void netiucv_callback_rx(struct iucv_path *, struct iucv_message *); |
159 | static void netiucv_callback_txdone(struct iucv_path *, struct iucv_message *); | 158 | static void netiucv_callback_txdone(struct iucv_path *, struct iucv_message *); |
160 | 159 | ||
@@ -556,8 +555,8 @@ static void netiucv_callback_connack(struct iucv_path *path, u8 ipuser[16]) | |||
556 | fsm_event(conn->fsm, CONN_EVENT_CONN_ACK, conn); | 555 | fsm_event(conn->fsm, CONN_EVENT_CONN_ACK, conn); |
557 | } | 556 | } |
558 | 557 | ||
559 | static int netiucv_callback_connreq(struct iucv_path *path, | 558 | static int netiucv_callback_connreq(struct iucv_path *path, u8 *ipvmid, |
560 | u8 ipvmid[8], u8 ipuser[16]) | 559 | u8 *ipuser) |
561 | { | 560 | { |
562 | struct iucv_connection *conn = path->private; | 561 | struct iucv_connection *conn = path->private; |
563 | struct iucv_event ev; | 562 | struct iucv_event ev; |
@@ -587,21 +586,21 @@ static int netiucv_callback_connreq(struct iucv_path *path, | |||
587 | return rc; | 586 | return rc; |
588 | } | 587 | } |
589 | 588 | ||
590 | static void netiucv_callback_connrej(struct iucv_path *path, u8 ipuser[16]) | 589 | static void netiucv_callback_connrej(struct iucv_path *path, u8 *ipuser) |
591 | { | 590 | { |
592 | struct iucv_connection *conn = path->private; | 591 | struct iucv_connection *conn = path->private; |
593 | 592 | ||
594 | fsm_event(conn->fsm, CONN_EVENT_CONN_REJ, conn); | 593 | fsm_event(conn->fsm, CONN_EVENT_CONN_REJ, conn); |
595 | } | 594 | } |
596 | 595 | ||
597 | static void netiucv_callback_connsusp(struct iucv_path *path, u8 ipuser[16]) | 596 | static void netiucv_callback_connsusp(struct iucv_path *path, u8 *ipuser) |
598 | { | 597 | { |
599 | struct iucv_connection *conn = path->private; | 598 | struct iucv_connection *conn = path->private; |
600 | 599 | ||
601 | fsm_event(conn->fsm, CONN_EVENT_CONN_SUS, conn); | 600 | fsm_event(conn->fsm, CONN_EVENT_CONN_SUS, conn); |
602 | } | 601 | } |
603 | 602 | ||
604 | static void netiucv_callback_connres(struct iucv_path *path, u8 ipuser[16]) | 603 | static void netiucv_callback_connres(struct iucv_path *path, u8 *ipuser) |
605 | { | 604 | { |
606 | struct iucv_connection *conn = path->private; | 605 | struct iucv_connection *conn = path->private; |
607 | 606 | ||
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index ba974a2e409f..6719447d13f0 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -663,9 +663,7 @@ struct qeth_card_info { | |||
663 | char mcl_level[QETH_MCL_LENGTH + 1]; | 663 | char mcl_level[QETH_MCL_LENGTH + 1]; |
664 | int guestlan; | 664 | int guestlan; |
665 | int mac_bits; | 665 | int mac_bits; |
666 | int portname_required; | ||
667 | int portno; | 666 | int portno; |
668 | char portname[9]; | ||
669 | enum qeth_card_types type; | 667 | enum qeth_card_types type; |
670 | enum qeth_link_types link_type; | 668 | enum qeth_link_types link_type; |
671 | int is_multicast_different; | 669 | int is_multicast_different; |
@@ -969,6 +967,15 @@ int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action); | |||
969 | int qeth_query_ipassists(struct qeth_card *, enum qeth_prot_versions prot); | 967 | int qeth_query_ipassists(struct qeth_card *, enum qeth_prot_versions prot); |
970 | void qeth_trace_features(struct qeth_card *); | 968 | void qeth_trace_features(struct qeth_card *); |
971 | void qeth_close_dev(struct qeth_card *); | 969 | void qeth_close_dev(struct qeth_card *); |
970 | int qeth_send_simple_setassparms(struct qeth_card *, enum qeth_ipa_funcs, | ||
971 | __u16, long); | ||
972 | int qeth_send_setassparms(struct qeth_card *, struct qeth_cmd_buffer *, __u16, | ||
973 | long, | ||
974 | int (*reply_cb)(struct qeth_card *, | ||
975 | struct qeth_reply *, unsigned long), | ||
976 | void *); | ||
977 | int qeth_start_ipa_tx_checksum(struct qeth_card *); | ||
978 | int qeth_set_rx_csum(struct qeth_card *, int); | ||
972 | 979 | ||
973 | /* exports for OSN */ | 980 | /* exports for OSN */ |
974 | int qeth_osn_assist(struct net_device *, void *, int); | 981 | int qeth_osn_assist(struct net_device *, void *, int); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 5e20fba37bff..31ac53fa5cee 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -1982,14 +1982,6 @@ static void qeth_idx_read_cb(struct qeth_channel *channel, | |||
1982 | goto out; | 1982 | goto out; |
1983 | } | 1983 | } |
1984 | 1984 | ||
1985 | /** | ||
1986 | * * temporary fix for microcode bug | ||
1987 | * * to revert it,replace OR by AND | ||
1988 | * */ | ||
1989 | if ((!QETH_IDX_NO_PORTNAME_REQUIRED(iob->data)) || | ||
1990 | (card->info.type == QETH_CARD_TYPE_OSD)) | ||
1991 | card->info.portname_required = 1; | ||
1992 | |||
1993 | memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); | 1985 | memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); |
1994 | if (temp != qeth_peer_func_level(card->info.func_level)) { | 1986 | if (temp != qeth_peer_func_level(card->info.func_level)) { |
1995 | QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel: function " | 1987 | QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel: function " |
@@ -2360,8 +2352,6 @@ static int qeth_ulp_enable(struct qeth_card *card) | |||
2360 | &card->token.cm_connection_r, QETH_MPC_TOKEN_LENGTH); | 2352 | &card->token.cm_connection_r, QETH_MPC_TOKEN_LENGTH); |
2361 | memcpy(QETH_ULP_ENABLE_FILTER_TOKEN(iob->data), | 2353 | memcpy(QETH_ULP_ENABLE_FILTER_TOKEN(iob->data), |
2362 | &card->token.ulp_filter_w, QETH_MPC_TOKEN_LENGTH); | 2354 | &card->token.ulp_filter_w, QETH_MPC_TOKEN_LENGTH); |
2363 | memcpy(QETH_ULP_ENABLE_PORTNAME_AND_LL(iob->data), | ||
2364 | card->info.portname, 9); | ||
2365 | rc = qeth_send_control_data(card, ULP_ENABLE_SIZE, iob, | 2355 | rc = qeth_send_control_data(card, ULP_ENABLE_SIZE, iob, |
2366 | qeth_ulp_enable_cb, NULL); | 2356 | qeth_ulp_enable_cb, NULL); |
2367 | return rc; | 2357 | return rc; |
@@ -2680,48 +2670,6 @@ out_qdio: | |||
2680 | return rc; | 2670 | return rc; |
2681 | } | 2671 | } |
2682 | 2672 | ||
2683 | static void qeth_print_status_with_portname(struct qeth_card *card) | ||
2684 | { | ||
2685 | char dbf_text[15]; | ||
2686 | int i; | ||
2687 | |||
2688 | sprintf(dbf_text, "%s", card->info.portname + 1); | ||
2689 | for (i = 0; i < 8; i++) | ||
2690 | dbf_text[i] = | ||
2691 | (char) _ebcasc[(__u8) dbf_text[i]]; | ||
2692 | dbf_text[8] = 0; | ||
2693 | dev_info(&card->gdev->dev, "Device is a%s card%s%s%s\n" | ||
2694 | "with link type %s (portname: %s)\n", | ||
2695 | qeth_get_cardname(card), | ||
2696 | (card->info.mcl_level[0]) ? " (level: " : "", | ||
2697 | (card->info.mcl_level[0]) ? card->info.mcl_level : "", | ||
2698 | (card->info.mcl_level[0]) ? ")" : "", | ||
2699 | qeth_get_cardname_short(card), | ||
2700 | dbf_text); | ||
2701 | |||
2702 | } | ||
2703 | |||
2704 | static void qeth_print_status_no_portname(struct qeth_card *card) | ||
2705 | { | ||
2706 | if (card->info.portname[0]) | ||
2707 | dev_info(&card->gdev->dev, "Device is a%s " | ||
2708 | "card%s%s%s\nwith link type %s " | ||
2709 | "(no portname needed by interface).\n", | ||
2710 | qeth_get_cardname(card), | ||
2711 | (card->info.mcl_level[0]) ? " (level: " : "", | ||
2712 | (card->info.mcl_level[0]) ? card->info.mcl_level : "", | ||
2713 | (card->info.mcl_level[0]) ? ")" : "", | ||
2714 | qeth_get_cardname_short(card)); | ||
2715 | else | ||
2716 | dev_info(&card->gdev->dev, "Device is a%s " | ||
2717 | "card%s%s%s\nwith link type %s.\n", | ||
2718 | qeth_get_cardname(card), | ||
2719 | (card->info.mcl_level[0]) ? " (level: " : "", | ||
2720 | (card->info.mcl_level[0]) ? card->info.mcl_level : "", | ||
2721 | (card->info.mcl_level[0]) ? ")" : "", | ||
2722 | qeth_get_cardname_short(card)); | ||
2723 | } | ||
2724 | |||
2725 | void qeth_print_status_message(struct qeth_card *card) | 2673 | void qeth_print_status_message(struct qeth_card *card) |
2726 | { | 2674 | { |
2727 | switch (card->info.type) { | 2675 | switch (card->info.type) { |
@@ -2758,10 +2706,13 @@ void qeth_print_status_message(struct qeth_card *card) | |||
2758 | default: | 2706 | default: |
2759 | memset(&card->info.mcl_level[0], 0, QETH_MCL_LENGTH + 1); | 2707 | memset(&card->info.mcl_level[0], 0, QETH_MCL_LENGTH + 1); |
2760 | } | 2708 | } |
2761 | if (card->info.portname_required) | 2709 | dev_info(&card->gdev->dev, |
2762 | qeth_print_status_with_portname(card); | 2710 | "Device is a%s card%s%s%s\nwith link type %s.\n", |
2763 | else | 2711 | qeth_get_cardname(card), |
2764 | qeth_print_status_no_portname(card); | 2712 | (card->info.mcl_level[0]) ? " (level: " : "", |
2713 | (card->info.mcl_level[0]) ? card->info.mcl_level : "", | ||
2714 | (card->info.mcl_level[0]) ? ")" : "", | ||
2715 | qeth_get_cardname_short(card)); | ||
2765 | } | 2716 | } |
2766 | EXPORT_SYMBOL_GPL(qeth_print_status_message); | 2717 | EXPORT_SYMBOL_GPL(qeth_print_status_message); |
2767 | 2718 | ||
@@ -5027,13 +4978,11 @@ static void qeth_core_free_card(struct qeth_card *card) | |||
5027 | void qeth_trace_features(struct qeth_card *card) | 4978 | void qeth_trace_features(struct qeth_card *card) |
5028 | { | 4979 | { |
5029 | QETH_CARD_TEXT(card, 2, "features"); | 4980 | QETH_CARD_TEXT(card, 2, "features"); |
5030 | QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa4.supported_funcs); | 4981 | QETH_CARD_HEX(card, 2, &card->options.ipa4, sizeof(card->options.ipa4)); |
5031 | QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa4.enabled_funcs); | 4982 | QETH_CARD_HEX(card, 2, &card->options.ipa6, sizeof(card->options.ipa6)); |
5032 | QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa6.supported_funcs); | 4983 | QETH_CARD_HEX(card, 2, &card->options.adp, sizeof(card->options.adp)); |
5033 | QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa6.enabled_funcs); | 4984 | QETH_CARD_HEX(card, 2, &card->info.diagass_support, |
5034 | QETH_CARD_TEXT_(card, 2, "%x", card->options.adp.supported_funcs); | 4985 | sizeof(card->info.diagass_support)); |
5035 | QETH_CARD_TEXT_(card, 2, "%x", card->options.adp.enabled_funcs); | ||
5036 | QETH_CARD_TEXT_(card, 2, "%x", card->info.diagass_support); | ||
5037 | } | 4986 | } |
5038 | EXPORT_SYMBOL_GPL(qeth_trace_features); | 4987 | EXPORT_SYMBOL_GPL(qeth_trace_features); |
5039 | 4988 | ||
@@ -5132,6 +5081,7 @@ retriable: | |||
5132 | } | 5081 | } |
5133 | 5082 | ||
5134 | card->options.ipa4.supported_funcs = 0; | 5083 | card->options.ipa4.supported_funcs = 0; |
5084 | card->options.ipa6.supported_funcs = 0; | ||
5135 | card->options.adp.supported_funcs = 0; | 5085 | card->options.adp.supported_funcs = 0; |
5136 | card->options.sbp.supported_funcs = 0; | 5086 | card->options.sbp.supported_funcs = 0; |
5137 | card->info.diagass_support = 0; | 5087 | card->info.diagass_support = 0; |
@@ -5317,6 +5267,102 @@ no_mem: | |||
5317 | } | 5267 | } |
5318 | EXPORT_SYMBOL_GPL(qeth_core_get_next_skb); | 5268 | EXPORT_SYMBOL_GPL(qeth_core_get_next_skb); |
5319 | 5269 | ||
5270 | static int qeth_setassparms_cb(struct qeth_card *card, | ||
5271 | struct qeth_reply *reply, unsigned long data) | ||
5272 | { | ||
5273 | struct qeth_ipa_cmd *cmd; | ||
5274 | |||
5275 | QETH_CARD_TEXT(card, 4, "defadpcb"); | ||
5276 | |||
5277 | cmd = (struct qeth_ipa_cmd *) data; | ||
5278 | if (cmd->hdr.return_code == 0) { | ||
5279 | cmd->hdr.return_code = cmd->data.setassparms.hdr.return_code; | ||
5280 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) | ||
5281 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; | ||
5282 | if (cmd->hdr.prot_version == QETH_PROT_IPV6) | ||
5283 | card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled; | ||
5284 | } | ||
5285 | if (cmd->data.setassparms.hdr.assist_no == IPA_INBOUND_CHECKSUM && | ||
5286 | cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) { | ||
5287 | card->info.csum_mask = cmd->data.setassparms.data.flags_32bit; | ||
5288 | QETH_CARD_TEXT_(card, 3, "csum:%d", card->info.csum_mask); | ||
5289 | } | ||
5290 | if (cmd->data.setassparms.hdr.assist_no == IPA_OUTBOUND_CHECKSUM && | ||
5291 | cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) { | ||
5292 | card->info.tx_csum_mask = | ||
5293 | cmd->data.setassparms.data.flags_32bit; | ||
5294 | QETH_CARD_TEXT_(card, 3, "tcsu:%d", card->info.tx_csum_mask); | ||
5295 | } | ||
5296 | |||
5297 | return 0; | ||
5298 | } | ||
5299 | |||
5300 | static struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card, | ||
5301 | enum qeth_ipa_funcs ipa_func, | ||
5302 | __u16 cmd_code, __u16 len, | ||
5303 | enum qeth_prot_versions prot) | ||
5304 | { | ||
5305 | struct qeth_cmd_buffer *iob; | ||
5306 | struct qeth_ipa_cmd *cmd; | ||
5307 | |||
5308 | QETH_CARD_TEXT(card, 4, "getasscm"); | ||
5309 | iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot); | ||
5310 | |||
5311 | if (iob) { | ||
5312 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | ||
5313 | cmd->data.setassparms.hdr.assist_no = ipa_func; | ||
5314 | cmd->data.setassparms.hdr.length = 8 + len; | ||
5315 | cmd->data.setassparms.hdr.command_code = cmd_code; | ||
5316 | cmd->data.setassparms.hdr.return_code = 0; | ||
5317 | cmd->data.setassparms.hdr.seq_no = 0; | ||
5318 | } | ||
5319 | |||
5320 | return iob; | ||
5321 | } | ||
5322 | |||
5323 | int qeth_send_setassparms(struct qeth_card *card, | ||
5324 | struct qeth_cmd_buffer *iob, __u16 len, long data, | ||
5325 | int (*reply_cb)(struct qeth_card *, | ||
5326 | struct qeth_reply *, unsigned long), | ||
5327 | void *reply_param) | ||
5328 | { | ||
5329 | int rc; | ||
5330 | struct qeth_ipa_cmd *cmd; | ||
5331 | |||
5332 | QETH_CARD_TEXT(card, 4, "sendassp"); | ||
5333 | |||
5334 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | ||
5335 | if (len <= sizeof(__u32)) | ||
5336 | cmd->data.setassparms.data.flags_32bit = (__u32) data; | ||
5337 | else /* (len > sizeof(__u32)) */ | ||
5338 | memcpy(&cmd->data.setassparms.data, (void *) data, len); | ||
5339 | |||
5340 | rc = qeth_send_ipa_cmd(card, iob, reply_cb, reply_param); | ||
5341 | return rc; | ||
5342 | } | ||
5343 | EXPORT_SYMBOL_GPL(qeth_send_setassparms); | ||
5344 | |||
5345 | int qeth_send_simple_setassparms(struct qeth_card *card, | ||
5346 | enum qeth_ipa_funcs ipa_func, | ||
5347 | __u16 cmd_code, long data) | ||
5348 | { | ||
5349 | int rc; | ||
5350 | int length = 0; | ||
5351 | struct qeth_cmd_buffer *iob; | ||
5352 | |||
5353 | QETH_CARD_TEXT(card, 4, "simassp4"); | ||
5354 | if (data) | ||
5355 | length = sizeof(__u32); | ||
5356 | iob = qeth_get_setassparms_cmd(card, ipa_func, cmd_code, | ||
5357 | length, QETH_PROT_IPV4); | ||
5358 | if (!iob) | ||
5359 | return -ENOMEM; | ||
5360 | rc = qeth_send_setassparms(card, iob, length, data, | ||
5361 | qeth_setassparms_cb, NULL); | ||
5362 | return rc; | ||
5363 | } | ||
5364 | EXPORT_SYMBOL_GPL(qeth_send_simple_setassparms); | ||
5365 | |||
5320 | static void qeth_unregister_dbf_views(void) | 5366 | static void qeth_unregister_dbf_views(void) |
5321 | { | 5367 | { |
5322 | int x; | 5368 | int x; |
@@ -6003,6 +6049,75 @@ int qeth_core_ethtool_get_settings(struct net_device *netdev, | |||
6003 | } | 6049 | } |
6004 | EXPORT_SYMBOL_GPL(qeth_core_ethtool_get_settings); | 6050 | EXPORT_SYMBOL_GPL(qeth_core_ethtool_get_settings); |
6005 | 6051 | ||
6052 | static int qeth_send_checksum_command(struct qeth_card *card) | ||
6053 | { | ||
6054 | int rc; | ||
6055 | |||
6056 | rc = qeth_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM, | ||
6057 | IPA_CMD_ASS_START, 0); | ||
6058 | if (rc) { | ||
6059 | dev_warn(&card->gdev->dev, "Starting HW checksumming for %s " | ||
6060 | "failed, using SW checksumming\n", | ||
6061 | QETH_CARD_IFNAME(card)); | ||
6062 | return rc; | ||
6063 | } | ||
6064 | rc = qeth_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM, | ||
6065 | IPA_CMD_ASS_ENABLE, | ||
6066 | card->info.csum_mask); | ||
6067 | if (rc) { | ||
6068 | dev_warn(&card->gdev->dev, "Enabling HW checksumming for %s " | ||
6069 | "failed, using SW checksumming\n", | ||
6070 | QETH_CARD_IFNAME(card)); | ||
6071 | return rc; | ||
6072 | } | ||
6073 | return 0; | ||
6074 | } | ||
6075 | |||
6076 | int qeth_set_rx_csum(struct qeth_card *card, int on) | ||
6077 | { | ||
6078 | int rc; | ||
6079 | |||
6080 | if (on) { | ||
6081 | rc = qeth_send_checksum_command(card); | ||
6082 | if (rc) | ||
6083 | return -EIO; | ||
6084 | dev_info(&card->gdev->dev, | ||
6085 | "HW Checksumming (inbound) enabled\n"); | ||
6086 | } else { | ||
6087 | rc = qeth_send_simple_setassparms(card, | ||
6088 | IPA_INBOUND_CHECKSUM, IPA_CMD_ASS_STOP, 0); | ||
6089 | if (rc) | ||
6090 | return -EIO; | ||
6091 | } | ||
6092 | return 0; | ||
6093 | } | ||
6094 | EXPORT_SYMBOL_GPL(qeth_set_rx_csum); | ||
6095 | |||
6096 | int qeth_start_ipa_tx_checksum(struct qeth_card *card) | ||
6097 | { | ||
6098 | int rc = 0; | ||
6099 | |||
6100 | if (!qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) | ||
6101 | return rc; | ||
6102 | rc = qeth_send_simple_setassparms(card, IPA_OUTBOUND_CHECKSUM, | ||
6103 | IPA_CMD_ASS_START, 0); | ||
6104 | if (rc) | ||
6105 | goto err_out; | ||
6106 | rc = qeth_send_simple_setassparms(card, IPA_OUTBOUND_CHECKSUM, | ||
6107 | IPA_CMD_ASS_ENABLE, | ||
6108 | card->info.tx_csum_mask); | ||
6109 | if (rc) | ||
6110 | goto err_out; | ||
6111 | |||
6112 | dev_info(&card->gdev->dev, "HW TX Checksumming enabled\n"); | ||
6113 | return rc; | ||
6114 | err_out: | ||
6115 | dev_warn(&card->gdev->dev, "Enabling HW TX checksumming for %s " | ||
6116 | "failed, using SW TX checksumming\n", QETH_CARD_IFNAME(card)); | ||
6117 | return rc; | ||
6118 | } | ||
6119 | EXPORT_SYMBOL_GPL(qeth_start_ipa_tx_checksum); | ||
6120 | |||
6006 | static int __init qeth_core_init(void) | 6121 | static int __init qeth_core_init(void) |
6007 | { | 6122 | { |
6008 | int rc; | 6123 | int rc; |
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 423bec56cffa..e6e5b9671bf2 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c | |||
@@ -153,52 +153,17 @@ static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store); | |||
153 | static ssize_t qeth_dev_portname_show(struct device *dev, | 153 | static ssize_t qeth_dev_portname_show(struct device *dev, |
154 | struct device_attribute *attr, char *buf) | 154 | struct device_attribute *attr, char *buf) |
155 | { | 155 | { |
156 | struct qeth_card *card = dev_get_drvdata(dev); | 156 | return sprintf(buf, "no portname required\n"); |
157 | char portname[9] = {0, }; | ||
158 | |||
159 | if (!card) | ||
160 | return -EINVAL; | ||
161 | |||
162 | if (card->info.portname_required) { | ||
163 | memcpy(portname, card->info.portname + 1, 8); | ||
164 | EBCASC(portname, 8); | ||
165 | return sprintf(buf, "%s\n", portname); | ||
166 | } else | ||
167 | return sprintf(buf, "no portname required\n"); | ||
168 | } | 157 | } |
169 | 158 | ||
170 | static ssize_t qeth_dev_portname_store(struct device *dev, | 159 | static ssize_t qeth_dev_portname_store(struct device *dev, |
171 | struct device_attribute *attr, const char *buf, size_t count) | 160 | struct device_attribute *attr, const char *buf, size_t count) |
172 | { | 161 | { |
173 | struct qeth_card *card = dev_get_drvdata(dev); | 162 | struct qeth_card *card = dev_get_drvdata(dev); |
174 | char *tmp; | ||
175 | int i, rc = 0; | ||
176 | |||
177 | if (!card) | ||
178 | return -EINVAL; | ||
179 | |||
180 | mutex_lock(&card->conf_mutex); | ||
181 | if ((card->state != CARD_STATE_DOWN) && | ||
182 | (card->state != CARD_STATE_RECOVER)) { | ||
183 | rc = -EPERM; | ||
184 | goto out; | ||
185 | } | ||
186 | 163 | ||
187 | tmp = strsep((char **) &buf, "\n"); | 164 | dev_warn_once(&card->gdev->dev, |
188 | if ((strlen(tmp) > 8) || (strlen(tmp) == 0)) { | 165 | "portname is deprecated and is ignored\n"); |
189 | rc = -EINVAL; | 166 | return count; |
190 | goto out; | ||
191 | } | ||
192 | |||
193 | card->info.portname[0] = strlen(tmp); | ||
194 | /* for beauty reasons */ | ||
195 | for (i = 1; i < 9; i++) | ||
196 | card->info.portname[i] = ' '; | ||
197 | strcpy(card->info.portname + 1, tmp); | ||
198 | ASCEBC(card->info.portname + 1, 8); | ||
199 | out: | ||
200 | mutex_unlock(&card->conf_mutex); | ||
201 | return rc ? rc : count; | ||
202 | } | 167 | } |
203 | 168 | ||
204 | static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show, | 169 | static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show, |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index a8556692f632..dc905b37aa12 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -252,6 +252,23 @@ static inline int qeth_l2_get_cast_type(struct qeth_card *card, | |||
252 | return RTN_UNSPEC; | 252 | return RTN_UNSPEC; |
253 | } | 253 | } |
254 | 254 | ||
255 | static inline void qeth_l2_hdr_csum(struct qeth_card *card, | ||
256 | struct qeth_hdr *hdr, struct sk_buff *skb) | ||
257 | { | ||
258 | struct iphdr *iph = ip_hdr(skb); | ||
259 | |||
260 | /* tcph->check contains already the pseudo hdr checksum | ||
261 | * so just set the header flags | ||
262 | */ | ||
263 | if (iph->protocol == IPPROTO_UDP) | ||
264 | hdr->hdr.l2.flags[1] |= QETH_HDR_EXT_UDP; | ||
265 | hdr->hdr.l2.flags[1] |= QETH_HDR_EXT_CSUM_TRANSP_REQ | | ||
266 | QETH_HDR_EXT_CSUM_HDR_REQ; | ||
267 | iph->check = 0; | ||
268 | if (card->options.performance_stats) | ||
269 | card->perf_stats.tx_csum++; | ||
270 | } | ||
271 | |||
255 | static void qeth_l2_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | 272 | static void qeth_l2_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, |
256 | struct sk_buff *skb, int cast_type) | 273 | struct sk_buff *skb, int cast_type) |
257 | { | 274 | { |
@@ -390,6 +407,38 @@ static int qeth_l2_vlan_rx_kill_vid(struct net_device *dev, | |||
390 | return rc; | 407 | return rc; |
391 | } | 408 | } |
392 | 409 | ||
410 | static netdev_features_t qeth_l2_fix_features(struct net_device *dev, | ||
411 | netdev_features_t features) | ||
412 | { | ||
413 | struct qeth_card *card = dev->ml_priv; | ||
414 | |||
415 | QETH_DBF_TEXT(SETUP, 2, "fixfeat"); | ||
416 | if (!qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) | ||
417 | features &= ~NETIF_F_IP_CSUM; | ||
418 | if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) | ||
419 | features &= ~NETIF_F_RXCSUM; | ||
420 | QETH_DBF_HEX(SETUP, 2, &features, sizeof(features)); | ||
421 | return features; | ||
422 | } | ||
423 | |||
424 | static int qeth_l2_set_features(struct net_device *dev, | ||
425 | netdev_features_t features) | ||
426 | { | ||
427 | struct qeth_card *card = dev->ml_priv; | ||
428 | netdev_features_t changed = dev->features ^ features; | ||
429 | |||
430 | QETH_DBF_TEXT(SETUP, 2, "setfeat"); | ||
431 | QETH_DBF_HEX(SETUP, 2, &features, sizeof(features)); | ||
432 | |||
433 | if (card->state == CARD_STATE_DOWN || | ||
434 | card->state == CARD_STATE_RECOVER) | ||
435 | return 0; | ||
436 | |||
437 | if (!(changed & NETIF_F_RXCSUM)) | ||
438 | return 0; | ||
439 | return qeth_set_rx_csum(card, features & NETIF_F_RXCSUM ? 1 : 0); | ||
440 | } | ||
441 | |||
393 | static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) | 442 | static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) |
394 | { | 443 | { |
395 | QETH_DBF_TEXT(SETUP , 2, "stopcard"); | 444 | QETH_DBF_TEXT(SETUP , 2, "stopcard"); |
@@ -450,7 +499,15 @@ static int qeth_l2_process_inbound_buffer(struct qeth_card *card, | |||
450 | case QETH_HEADER_TYPE_LAYER2: | 499 | case QETH_HEADER_TYPE_LAYER2: |
451 | skb->pkt_type = PACKET_HOST; | 500 | skb->pkt_type = PACKET_HOST; |
452 | skb->protocol = eth_type_trans(skb, skb->dev); | 501 | skb->protocol = eth_type_trans(skb, skb->dev); |
453 | skb->ip_summed = CHECKSUM_NONE; | 502 | if ((card->dev->features & NETIF_F_RXCSUM) |
503 | && ((hdr->hdr.l2.flags[1] & | ||
504 | (QETH_HDR_EXT_CSUM_HDR_REQ | | ||
505 | QETH_HDR_EXT_CSUM_TRANSP_REQ)) == | ||
506 | (QETH_HDR_EXT_CSUM_HDR_REQ | | ||
507 | QETH_HDR_EXT_CSUM_TRANSP_REQ))) | ||
508 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
509 | else | ||
510 | skb->ip_summed = CHECKSUM_NONE; | ||
454 | if (skb->protocol == htons(ETH_P_802_2)) | 511 | if (skb->protocol == htons(ETH_P_802_2)) |
455 | *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; | 512 | *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; |
456 | len = skb->len; | 513 | len = skb->len; |
@@ -803,6 +860,8 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
803 | sizeof(struct qeth_hdr)); | 860 | sizeof(struct qeth_hdr)); |
804 | skb_set_mac_header(new_skb, sizeof(struct qeth_hdr)); | 861 | skb_set_mac_header(new_skb, sizeof(struct qeth_hdr)); |
805 | qeth_l2_fill_header(card, hdr, new_skb, cast_type); | 862 | qeth_l2_fill_header(card, hdr, new_skb, cast_type); |
863 | if (new_skb->ip_summed == CHECKSUM_PARTIAL) | ||
864 | qeth_l2_hdr_csum(card, hdr, new_skb); | ||
806 | } | 865 | } |
807 | } | 866 | } |
808 | 867 | ||
@@ -968,6 +1027,8 @@ static const struct net_device_ops qeth_l2_netdev_ops = { | |||
968 | .ndo_vlan_rx_add_vid = qeth_l2_vlan_rx_add_vid, | 1027 | .ndo_vlan_rx_add_vid = qeth_l2_vlan_rx_add_vid, |
969 | .ndo_vlan_rx_kill_vid = qeth_l2_vlan_rx_kill_vid, | 1028 | .ndo_vlan_rx_kill_vid = qeth_l2_vlan_rx_kill_vid, |
970 | .ndo_tx_timeout = qeth_tx_timeout, | 1029 | .ndo_tx_timeout = qeth_tx_timeout, |
1030 | .ndo_fix_features = qeth_l2_fix_features, | ||
1031 | .ndo_set_features = qeth_l2_set_features | ||
971 | }; | 1032 | }; |
972 | 1033 | ||
973 | static int qeth_l2_setup_netdev(struct qeth_card *card) | 1034 | static int qeth_l2_setup_netdev(struct qeth_card *card) |
@@ -997,6 +1058,11 @@ static int qeth_l2_setup_netdev(struct qeth_card *card) | |||
997 | (card->info.type != QETH_CARD_TYPE_OSN) ? | 1058 | (card->info.type != QETH_CARD_TYPE_OSN) ? |
998 | &qeth_l2_ethtool_ops : &qeth_l2_osn_ops; | 1059 | &qeth_l2_ethtool_ops : &qeth_l2_osn_ops; |
999 | card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; | 1060 | card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; |
1061 | if (card->info.type == QETH_CARD_TYPE_OSD && !card->info.guestlan) { | ||
1062 | card->dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM; | ||
1063 | /* Turn on RX offloading per default */ | ||
1064 | card->dev->features |= NETIF_F_RXCSUM; | ||
1065 | } | ||
1000 | card->info.broadcast_capable = 1; | 1066 | card->info.broadcast_capable = 1; |
1001 | qeth_l2_request_initial_mac(card); | 1067 | qeth_l2_request_initial_mac(card); |
1002 | SET_NETDEV_DEV(card->dev, &card->gdev->dev); | 1068 | SET_NETDEV_DEV(card->dev, &card->gdev->dev); |
@@ -1004,6 +1070,17 @@ static int qeth_l2_setup_netdev(struct qeth_card *card) | |||
1004 | return register_netdev(card->dev); | 1070 | return register_netdev(card->dev); |
1005 | } | 1071 | } |
1006 | 1072 | ||
1073 | static int qeth_l2_start_ipassists(struct qeth_card *card) | ||
1074 | { | ||
1075 | /* configure isolation level */ | ||
1076 | if (qeth_set_access_ctrl_online(card, 0)) | ||
1077 | return -ENODEV; | ||
1078 | if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) | ||
1079 | qeth_set_rx_csum(card, 1); | ||
1080 | qeth_start_ipa_tx_checksum(card); | ||
1081 | return 0; | ||
1082 | } | ||
1083 | |||
1007 | static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | 1084 | static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) |
1008 | { | 1085 | { |
1009 | struct qeth_card *card = dev_get_drvdata(&gdev->dev); | 1086 | struct qeth_card *card = dev_get_drvdata(&gdev->dev); |
@@ -1069,12 +1146,8 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
1069 | contin: | 1146 | contin: |
1070 | if ((card->info.type == QETH_CARD_TYPE_OSD) || | 1147 | if ((card->info.type == QETH_CARD_TYPE_OSD) || |
1071 | (card->info.type == QETH_CARD_TYPE_OSX)) { | 1148 | (card->info.type == QETH_CARD_TYPE_OSX)) { |
1072 | /* configure isolation level */ | 1149 | if (qeth_l2_start_ipassists(card)) |
1073 | rc = qeth_set_access_ctrl_online(card, 0); | ||
1074 | if (rc) { | ||
1075 | rc = -ENODEV; | ||
1076 | goto out_remove; | 1150 | goto out_remove; |
1077 | } | ||
1078 | } | 1151 | } |
1079 | 1152 | ||
1080 | if (card->info.type != QETH_CARD_TYPE_OSN && | 1153 | if (card->info.type != QETH_CARD_TYPE_OSN && |
@@ -1452,8 +1525,8 @@ static void qeth_bridge_emit_host_event(struct qeth_card *card, | |||
1452 | env[i] = str[i]; i++; | 1525 | env[i] = str[i]; i++; |
1453 | } | 1526 | } |
1454 | if (code & IPA_ADDR_CHANGE_CODE_MACADDR) { | 1527 | if (code & IPA_ADDR_CHANGE_CODE_MACADDR) { |
1455 | snprintf(str[i], sizeof(str[i]), "MAC=%pM6", | 1528 | snprintf(str[i], sizeof(str[i]), "MAC=%pM", |
1456 | &addr_lnid->mac); | 1529 | addr_lnid->mac); |
1457 | env[i] = str[i]; i++; | 1530 | env[i] = str[i]; i++; |
1458 | } | 1531 | } |
1459 | snprintf(str[i], sizeof(str[i]), "NTOK_BUSID=%x.%x.%04x", | 1532 | snprintf(str[i], sizeof(str[i]), "NTOK_BUSID=%x.%x.%04x", |
diff --git a/drivers/s390/net/qeth_l2_sys.c b/drivers/s390/net/qeth_l2_sys.c index 52673cd1db99..692db49e3d2a 100644 --- a/drivers/s390/net/qeth_l2_sys.c +++ b/drivers/s390/net/qeth_l2_sys.c | |||
@@ -109,7 +109,7 @@ static ssize_t qeth_bridge_port_state_show(struct device *dev, | |||
109 | return qeth_bridge_port_role_state_show(dev, attr, buf, 1); | 109 | return qeth_bridge_port_role_state_show(dev, attr, buf, 1); |
110 | } | 110 | } |
111 | 111 | ||
112 | static DEVICE_ATTR(bridge_state, 0644, qeth_bridge_port_state_show, | 112 | static DEVICE_ATTR(bridge_state, 0444, qeth_bridge_port_state_show, |
113 | NULL); | 113 | NULL); |
114 | 114 | ||
115 | static ssize_t qeth_bridgeport_hostnotification_show(struct device *dev, | 115 | static ssize_t qeth_bridgeport_hostnotification_show(struct device *dev, |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index a1aaa36e9ebb..543960e96b42 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1065,27 +1065,6 @@ static struct qeth_cmd_buffer *qeth_l3_get_setassparms_cmd( | |||
1065 | return iob; | 1065 | return iob; |
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | static int qeth_l3_send_setassparms(struct qeth_card *card, | ||
1069 | struct qeth_cmd_buffer *iob, __u16 len, long data, | ||
1070 | int (*reply_cb)(struct qeth_card *, struct qeth_reply *, | ||
1071 | unsigned long), | ||
1072 | void *reply_param) | ||
1073 | { | ||
1074 | int rc; | ||
1075 | struct qeth_ipa_cmd *cmd; | ||
1076 | |||
1077 | QETH_CARD_TEXT(card, 4, "sendassp"); | ||
1078 | |||
1079 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | ||
1080 | if (len <= sizeof(__u32)) | ||
1081 | cmd->data.setassparms.data.flags_32bit = (__u32) data; | ||
1082 | else /* (len > sizeof(__u32)) */ | ||
1083 | memcpy(&cmd->data.setassparms.data, (void *) data, len); | ||
1084 | |||
1085 | rc = qeth_send_ipa_cmd(card, iob, reply_cb, reply_param); | ||
1086 | return rc; | ||
1087 | } | ||
1088 | |||
1089 | #ifdef CONFIG_QETH_IPV6 | 1068 | #ifdef CONFIG_QETH_IPV6 |
1090 | static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card, | 1069 | static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card, |
1091 | enum qeth_ipa_funcs ipa_func, __u16 cmd_code) | 1070 | enum qeth_ipa_funcs ipa_func, __u16 cmd_code) |
@@ -1098,31 +1077,12 @@ static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card, | |||
1098 | 0, QETH_PROT_IPV6); | 1077 | 0, QETH_PROT_IPV6); |
1099 | if (!iob) | 1078 | if (!iob) |
1100 | return -ENOMEM; | 1079 | return -ENOMEM; |
1101 | rc = qeth_l3_send_setassparms(card, iob, 0, 0, | 1080 | rc = qeth_send_setassparms(card, iob, 0, 0, |
1102 | qeth_l3_default_setassparms_cb, NULL); | 1081 | qeth_l3_default_setassparms_cb, NULL); |
1103 | return rc; | 1082 | return rc; |
1104 | } | 1083 | } |
1105 | #endif | 1084 | #endif |
1106 | 1085 | ||
1107 | static int qeth_l3_send_simple_setassparms(struct qeth_card *card, | ||
1108 | enum qeth_ipa_funcs ipa_func, __u16 cmd_code, long data) | ||
1109 | { | ||
1110 | int rc; | ||
1111 | int length = 0; | ||
1112 | struct qeth_cmd_buffer *iob; | ||
1113 | |||
1114 | QETH_CARD_TEXT(card, 4, "simassp4"); | ||
1115 | if (data) | ||
1116 | length = sizeof(__u32); | ||
1117 | iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, | ||
1118 | length, QETH_PROT_IPV4); | ||
1119 | if (!iob) | ||
1120 | return -ENOMEM; | ||
1121 | rc = qeth_l3_send_setassparms(card, iob, length, data, | ||
1122 | qeth_l3_default_setassparms_cb, NULL); | ||
1123 | return rc; | ||
1124 | } | ||
1125 | |||
1126 | static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card) | 1086 | static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card) |
1127 | { | 1087 | { |
1128 | int rc; | 1088 | int rc; |
@@ -1135,8 +1095,8 @@ static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card) | |||
1135 | QETH_CARD_IFNAME(card)); | 1095 | QETH_CARD_IFNAME(card)); |
1136 | return 0; | 1096 | return 0; |
1137 | } | 1097 | } |
1138 | rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, | 1098 | rc = qeth_send_simple_setassparms(card, IPA_ARP_PROCESSING, |
1139 | IPA_CMD_ASS_START, 0); | 1099 | IPA_CMD_ASS_START, 0); |
1140 | if (rc) { | 1100 | if (rc) { |
1141 | dev_warn(&card->gdev->dev, | 1101 | dev_warn(&card->gdev->dev, |
1142 | "Starting ARP processing support for %s failed\n", | 1102 | "Starting ARP processing support for %s failed\n", |
@@ -1158,7 +1118,7 @@ static int qeth_l3_start_ipa_ip_fragmentation(struct qeth_card *card) | |||
1158 | return -EOPNOTSUPP; | 1118 | return -EOPNOTSUPP; |
1159 | } | 1119 | } |
1160 | 1120 | ||
1161 | rc = qeth_l3_send_simple_setassparms(card, IPA_IP_FRAGMENTATION, | 1121 | rc = qeth_send_simple_setassparms(card, IPA_IP_FRAGMENTATION, |
1162 | IPA_CMD_ASS_START, 0); | 1122 | IPA_CMD_ASS_START, 0); |
1163 | if (rc) { | 1123 | if (rc) { |
1164 | dev_warn(&card->gdev->dev, | 1124 | dev_warn(&card->gdev->dev, |
@@ -1183,7 +1143,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) | |||
1183 | return -EOPNOTSUPP; | 1143 | return -EOPNOTSUPP; |
1184 | } | 1144 | } |
1185 | 1145 | ||
1186 | rc = qeth_l3_send_simple_setassparms(card, IPA_SOURCE_MAC, | 1146 | rc = qeth_send_simple_setassparms(card, IPA_SOURCE_MAC, |
1187 | IPA_CMD_ASS_START, 0); | 1147 | IPA_CMD_ASS_START, 0); |
1188 | if (rc) | 1148 | if (rc) |
1189 | dev_warn(&card->gdev->dev, | 1149 | dev_warn(&card->gdev->dev, |
@@ -1204,7 +1164,7 @@ static int qeth_l3_start_ipa_vlan(struct qeth_card *card) | |||
1204 | return -EOPNOTSUPP; | 1164 | return -EOPNOTSUPP; |
1205 | } | 1165 | } |
1206 | 1166 | ||
1207 | rc = qeth_l3_send_simple_setassparms(card, IPA_VLAN_PRIO, | 1167 | rc = qeth_send_simple_setassparms(card, IPA_VLAN_PRIO, |
1208 | IPA_CMD_ASS_START, 0); | 1168 | IPA_CMD_ASS_START, 0); |
1209 | if (rc) { | 1169 | if (rc) { |
1210 | dev_warn(&card->gdev->dev, | 1170 | dev_warn(&card->gdev->dev, |
@@ -1229,7 +1189,7 @@ static int qeth_l3_start_ipa_multicast(struct qeth_card *card) | |||
1229 | return -EOPNOTSUPP; | 1189 | return -EOPNOTSUPP; |
1230 | } | 1190 | } |
1231 | 1191 | ||
1232 | rc = qeth_l3_send_simple_setassparms(card, IPA_MULTICASTING, | 1192 | rc = qeth_send_simple_setassparms(card, IPA_MULTICASTING, |
1233 | IPA_CMD_ASS_START, 0); | 1193 | IPA_CMD_ASS_START, 0); |
1234 | if (rc) { | 1194 | if (rc) { |
1235 | dev_warn(&card->gdev->dev, | 1195 | dev_warn(&card->gdev->dev, |
@@ -1259,7 +1219,7 @@ static int qeth_l3_softsetup_ipv6(struct qeth_card *card) | |||
1259 | QETH_CARD_IFNAME(card)); | 1219 | QETH_CARD_IFNAME(card)); |
1260 | return rc; | 1220 | return rc; |
1261 | } | 1221 | } |
1262 | rc = qeth_l3_send_simple_setassparms(card, IPA_IPV6, | 1222 | rc = qeth_send_simple_setassparms(card, IPA_IPV6, |
1263 | IPA_CMD_ASS_START, 3); | 1223 | IPA_CMD_ASS_START, 3); |
1264 | if (rc) { | 1224 | if (rc) { |
1265 | dev_err(&card->gdev->dev, | 1225 | dev_err(&card->gdev->dev, |
@@ -1319,7 +1279,7 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card) | |||
1319 | rc = -EOPNOTSUPP; | 1279 | rc = -EOPNOTSUPP; |
1320 | goto out; | 1280 | goto out; |
1321 | } | 1281 | } |
1322 | rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING, | 1282 | rc = qeth_send_simple_setassparms(card, IPA_FILTERING, |
1323 | IPA_CMD_ASS_START, 0); | 1283 | IPA_CMD_ASS_START, 0); |
1324 | if (rc) { | 1284 | if (rc) { |
1325 | dev_warn(&card->gdev->dev, "Enabling broadcast filtering for " | 1285 | dev_warn(&card->gdev->dev, "Enabling broadcast filtering for " |
@@ -1327,7 +1287,7 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card) | |||
1327 | goto out; | 1287 | goto out; |
1328 | } | 1288 | } |
1329 | 1289 | ||
1330 | rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING, | 1290 | rc = qeth_send_simple_setassparms(card, IPA_FILTERING, |
1331 | IPA_CMD_ASS_CONFIGURE, 1); | 1291 | IPA_CMD_ASS_CONFIGURE, 1); |
1332 | if (rc) { | 1292 | if (rc) { |
1333 | dev_warn(&card->gdev->dev, | 1293 | dev_warn(&card->gdev->dev, |
@@ -1337,7 +1297,7 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card) | |||
1337 | } | 1297 | } |
1338 | card->info.broadcast_capable = QETH_BROADCAST_WITH_ECHO; | 1298 | card->info.broadcast_capable = QETH_BROADCAST_WITH_ECHO; |
1339 | dev_info(&card->gdev->dev, "Broadcast enabled\n"); | 1299 | dev_info(&card->gdev->dev, "Broadcast enabled\n"); |
1340 | rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING, | 1300 | rc = qeth_send_simple_setassparms(card, IPA_FILTERING, |
1341 | IPA_CMD_ASS_ENABLE, 1); | 1301 | IPA_CMD_ASS_ENABLE, 1); |
1342 | if (rc) { | 1302 | if (rc) { |
1343 | dev_warn(&card->gdev->dev, "Setting up broadcast echo " | 1303 | dev_warn(&card->gdev->dev, "Setting up broadcast echo " |
@@ -1353,84 +1313,18 @@ out: | |||
1353 | return rc; | 1313 | return rc; |
1354 | } | 1314 | } |
1355 | 1315 | ||
1356 | static int qeth_l3_send_checksum_command(struct qeth_card *card) | 1316 | static void qeth_l3_start_ipa_checksum(struct qeth_card *card) |
1357 | { | ||
1358 | int rc; | ||
1359 | |||
1360 | rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM, | ||
1361 | IPA_CMD_ASS_START, 0); | ||
1362 | if (rc) { | ||
1363 | dev_warn(&card->gdev->dev, "Starting HW checksumming for %s " | ||
1364 | "failed, using SW checksumming\n", | ||
1365 | QETH_CARD_IFNAME(card)); | ||
1366 | return rc; | ||
1367 | } | ||
1368 | rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM, | ||
1369 | IPA_CMD_ASS_ENABLE, | ||
1370 | card->info.csum_mask); | ||
1371 | if (rc) { | ||
1372 | dev_warn(&card->gdev->dev, "Enabling HW checksumming for %s " | ||
1373 | "failed, using SW checksumming\n", | ||
1374 | QETH_CARD_IFNAME(card)); | ||
1375 | return rc; | ||
1376 | } | ||
1377 | return 0; | ||
1378 | } | ||
1379 | |||
1380 | static int qeth_l3_set_rx_csum(struct qeth_card *card, int on) | ||
1381 | { | ||
1382 | int rc = 0; | ||
1383 | |||
1384 | if (on) { | ||
1385 | rc = qeth_l3_send_checksum_command(card); | ||
1386 | if (rc) | ||
1387 | return -EIO; | ||
1388 | dev_info(&card->gdev->dev, | ||
1389 | "HW Checksumming (inbound) enabled\n"); | ||
1390 | } else { | ||
1391 | rc = qeth_l3_send_simple_setassparms(card, | ||
1392 | IPA_INBOUND_CHECKSUM, IPA_CMD_ASS_STOP, 0); | ||
1393 | if (rc) | ||
1394 | return -EIO; | ||
1395 | } | ||
1396 | |||
1397 | return 0; | ||
1398 | } | ||
1399 | |||
1400 | static int qeth_l3_start_ipa_checksum(struct qeth_card *card) | ||
1401 | { | 1317 | { |
1402 | QETH_CARD_TEXT(card, 3, "strtcsum"); | 1318 | QETH_CARD_TEXT(card, 3, "strtcsum"); |
1403 | 1319 | if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM) | |
1404 | if (card->dev->features & NETIF_F_RXCSUM) { | 1320 | && (card->dev->features & NETIF_F_RXCSUM)) |
1405 | rtnl_lock(); | 1321 | qeth_set_rx_csum(card, 1); |
1406 | /* force set_features call */ | ||
1407 | card->dev->features &= ~NETIF_F_RXCSUM; | ||
1408 | netdev_update_features(card->dev); | ||
1409 | rtnl_unlock(); | ||
1410 | } | ||
1411 | return 0; | ||
1412 | } | 1322 | } |
1413 | 1323 | ||
1414 | static int qeth_l3_start_ipa_tx_checksum(struct qeth_card *card) | 1324 | static void qeth_l3_start_ipa_tx_checksum(struct qeth_card *card) |
1415 | { | 1325 | { |
1416 | int rc = 0; | 1326 | QETH_CARD_TEXT(card, 3, "strttxcs"); |
1417 | 1327 | qeth_start_ipa_tx_checksum(card); | |
1418 | if (!qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) | ||
1419 | return rc; | ||
1420 | rc = qeth_l3_send_simple_setassparms(card, IPA_OUTBOUND_CHECKSUM, | ||
1421 | IPA_CMD_ASS_START, 0); | ||
1422 | if (rc) | ||
1423 | goto err_out; | ||
1424 | rc = qeth_l3_send_simple_setassparms(card, IPA_OUTBOUND_CHECKSUM, | ||
1425 | IPA_CMD_ASS_ENABLE, card->info.tx_csum_mask); | ||
1426 | if (rc) | ||
1427 | goto err_out; | ||
1428 | dev_info(&card->gdev->dev, "HW TX Checksumming enabled\n"); | ||
1429 | return rc; | ||
1430 | err_out: | ||
1431 | dev_warn(&card->gdev->dev, "Enabling HW TX checksumming for %s " | ||
1432 | "failed, using SW TX checksumming\n", QETH_CARD_IFNAME(card)); | ||
1433 | return rc; | ||
1434 | } | 1328 | } |
1435 | 1329 | ||
1436 | static int qeth_l3_start_ipa_tso(struct qeth_card *card) | 1330 | static int qeth_l3_start_ipa_tso(struct qeth_card *card) |
@@ -1445,8 +1339,8 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card) | |||
1445 | QETH_CARD_IFNAME(card)); | 1339 | QETH_CARD_IFNAME(card)); |
1446 | rc = -EOPNOTSUPP; | 1340 | rc = -EOPNOTSUPP; |
1447 | } else { | 1341 | } else { |
1448 | rc = qeth_l3_send_simple_setassparms(card, IPA_OUTBOUND_TSO, | 1342 | rc = qeth_send_simple_setassparms(card, IPA_OUTBOUND_TSO, |
1449 | IPA_CMD_ASS_START, 0); | 1343 | IPA_CMD_ASS_START, 0); |
1450 | if (rc) | 1344 | if (rc) |
1451 | dev_warn(&card->gdev->dev, "Starting outbound TCP " | 1345 | dev_warn(&card->gdev->dev, "Starting outbound TCP " |
1452 | "segmentation offload for %s failed\n", | 1346 | "segmentation offload for %s failed\n", |
@@ -1950,7 +1844,6 @@ static inline int qeth_l3_rebuild_skb(struct qeth_card *card, | |||
1950 | skb->ip_summed = CHECKSUM_NONE; | 1844 | skb->ip_summed = CHECKSUM_NONE; |
1951 | } else | 1845 | } else |
1952 | skb->ip_summed = CHECKSUM_NONE; | 1846 | skb->ip_summed = CHECKSUM_NONE; |
1953 | |||
1954 | return is_vlan; | 1847 | return is_vlan; |
1955 | } | 1848 | } |
1956 | 1849 | ||
@@ -2287,7 +2180,7 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries) | |||
2287 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { | 2180 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { |
2288 | return -EOPNOTSUPP; | 2181 | return -EOPNOTSUPP; |
2289 | } | 2182 | } |
2290 | rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, | 2183 | rc = qeth_send_simple_setassparms(card, IPA_ARP_PROCESSING, |
2291 | IPA_CMD_ASS_ARP_SET_NO_ENTRIES, | 2184 | IPA_CMD_ASS_ARP_SET_NO_ENTRIES, |
2292 | no_entries); | 2185 | no_entries); |
2293 | if (rc) { | 2186 | if (rc) { |
@@ -2552,7 +2445,7 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card, | |||
2552 | QETH_PROT_IPV4); | 2445 | QETH_PROT_IPV4); |
2553 | if (!iob) | 2446 | if (!iob) |
2554 | return -ENOMEM; | 2447 | return -ENOMEM; |
2555 | rc = qeth_l3_send_setassparms(card, iob, | 2448 | rc = qeth_send_setassparms(card, iob, |
2556 | sizeof(struct qeth_arp_cache_entry), | 2449 | sizeof(struct qeth_arp_cache_entry), |
2557 | (unsigned long) entry, | 2450 | (unsigned long) entry, |
2558 | qeth_l3_default_setassparms_cb, NULL); | 2451 | qeth_l3_default_setassparms_cb, NULL); |
@@ -2593,7 +2486,7 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card, | |||
2593 | QETH_PROT_IPV4); | 2486 | QETH_PROT_IPV4); |
2594 | if (!iob) | 2487 | if (!iob) |
2595 | return -ENOMEM; | 2488 | return -ENOMEM; |
2596 | rc = qeth_l3_send_setassparms(card, iob, | 2489 | rc = qeth_send_setassparms(card, iob, |
2597 | 12, (unsigned long)buf, | 2490 | 12, (unsigned long)buf, |
2598 | qeth_l3_default_setassparms_cb, NULL); | 2491 | qeth_l3_default_setassparms_cb, NULL); |
2599 | if (rc) { | 2492 | if (rc) { |
@@ -2624,7 +2517,7 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card) | |||
2624 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { | 2517 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { |
2625 | return -EOPNOTSUPP; | 2518 | return -EOPNOTSUPP; |
2626 | } | 2519 | } |
2627 | rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, | 2520 | rc = qeth_send_simple_setassparms(card, IPA_ARP_PROCESSING, |
2628 | IPA_CMD_ASS_ARP_FLUSH_CACHE, 0); | 2521 | IPA_CMD_ASS_ARP_FLUSH_CACHE, 0); |
2629 | if (rc) { | 2522 | if (rc) { |
2630 | tmp = rc; | 2523 | tmp = rc; |
@@ -3187,7 +3080,6 @@ static netdev_features_t qeth_l3_fix_features(struct net_device *dev, | |||
3187 | features &= ~NETIF_F_TSO; | 3080 | features &= ~NETIF_F_TSO; |
3188 | if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) | 3081 | if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) |
3189 | features &= ~NETIF_F_RXCSUM; | 3082 | features &= ~NETIF_F_RXCSUM; |
3190 | |||
3191 | return features; | 3083 | return features; |
3192 | } | 3084 | } |
3193 | 3085 | ||
@@ -3204,7 +3096,7 @@ static int qeth_l3_set_features(struct net_device *dev, | |||
3204 | card->state == CARD_STATE_RECOVER) | 3096 | card->state == CARD_STATE_RECOVER) |
3205 | return 0; | 3097 | return 0; |
3206 | 3098 | ||
3207 | return qeth_l3_set_rx_csum(card, features & NETIF_F_RXCSUM ? 1 : 0); | 3099 | return qeth_set_rx_csum(card, features & NETIF_F_RXCSUM ? 1 : 0); |
3208 | } | 3100 | } |
3209 | 3101 | ||
3210 | static const struct ethtool_ops qeth_l3_ethtool_ops = { | 3102 | static const struct ethtool_ops qeth_l3_ethtool_ops = { |
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index d8f990b6b332..a851d34c642b 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -49,7 +49,7 @@ static DEFINE_SPINLOCK(smsg_list_lock); | |||
49 | static LIST_HEAD(smsg_list); | 49 | static LIST_HEAD(smsg_list); |
50 | static int iucv_path_connected; | 50 | static int iucv_path_connected; |
51 | 51 | ||
52 | static int smsg_path_pending(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); | 52 | static int smsg_path_pending(struct iucv_path *, u8 *, u8 *); |
53 | static void smsg_message_pending(struct iucv_path *, struct iucv_message *); | 53 | static void smsg_message_pending(struct iucv_path *, struct iucv_message *); |
54 | 54 | ||
55 | static struct iucv_handler smsg_handler = { | 55 | static struct iucv_handler smsg_handler = { |
@@ -57,8 +57,7 @@ static struct iucv_handler smsg_handler = { | |||
57 | .message_pending = smsg_message_pending, | 57 | .message_pending = smsg_message_pending, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8], | 60 | static int smsg_path_pending(struct iucv_path *path, u8 *ipvmid, u8 *ipuser) |
61 | u8 ipuser[16]) | ||
62 | { | 61 | { |
63 | if (strncmp(ipvmid, "*MSG ", 8) != 0) | 62 | if (strncmp(ipvmid, "*MSG ", 8) != 0) |
64 | return -EINVAL; | 63 | return -EINVAL; |
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c index bb809cf36617..8b70a1627356 100644 --- a/drivers/tty/hvc/hvc_iucv.c +++ b/drivers/tty/hvc/hvc_iucv.c | |||
@@ -88,8 +88,8 @@ struct iucv_tty_buffer { | |||
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* IUCV callback handler */ | 90 | /* IUCV callback handler */ |
91 | static int hvc_iucv_path_pending(struct iucv_path *, u8[8], u8[16]); | 91 | static int hvc_iucv_path_pending(struct iucv_path *, u8 *, u8 *); |
92 | static void hvc_iucv_path_severed(struct iucv_path *, u8[16]); | 92 | static void hvc_iucv_path_severed(struct iucv_path *, u8 *); |
93 | static void hvc_iucv_msg_pending(struct iucv_path *, struct iucv_message *); | 93 | static void hvc_iucv_msg_pending(struct iucv_path *, struct iucv_message *); |
94 | static void hvc_iucv_msg_complete(struct iucv_path *, struct iucv_message *); | 94 | static void hvc_iucv_msg_complete(struct iucv_path *, struct iucv_message *); |
95 | 95 | ||
@@ -782,8 +782,8 @@ static int hvc_iucv_filter_connreq(u8 ipvmid[8]) | |||
782 | * | 782 | * |
783 | * Locking: struct hvc_iucv_private->lock | 783 | * Locking: struct hvc_iucv_private->lock |
784 | */ | 784 | */ |
785 | static int hvc_iucv_path_pending(struct iucv_path *path, | 785 | static int hvc_iucv_path_pending(struct iucv_path *path, u8 *ipvmid, |
786 | u8 ipvmid[8], u8 ipuser[16]) | 786 | u8 *ipuser) |
787 | { | 787 | { |
788 | struct hvc_iucv_private *priv, *tmp; | 788 | struct hvc_iucv_private *priv, *tmp; |
789 | u8 wildcard[9] = "lnxhvc "; | 789 | u8 wildcard[9] = "lnxhvc "; |
@@ -881,7 +881,7 @@ out_path_handled: | |||
881 | * | 881 | * |
882 | * Locking: struct hvc_iucv_private->lock | 882 | * Locking: struct hvc_iucv_private->lock |
883 | */ | 883 | */ |
884 | static void hvc_iucv_path_severed(struct iucv_path *path, u8 ipuser[16]) | 884 | static void hvc_iucv_path_severed(struct iucv_path *path, u8 *ipuser) |
885 | { | 885 | { |
886 | struct hvc_iucv_private *priv = path->private; | 886 | struct hvc_iucv_private *priv = path->private; |
887 | 887 | ||
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 0894ced31957..b867b0cf79e8 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
@@ -141,14 +141,14 @@ struct iucv_handler { | |||
141 | * called is the order of the registration of the iucv handlers | 141 | * called is the order of the registration of the iucv handlers |
142 | * to the base code. | 142 | * to the base code. |
143 | */ | 143 | */ |
144 | int (*path_pending)(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); | 144 | int (*path_pending)(struct iucv_path *, u8 *ipvmid, u8 *ipuser); |
145 | /* | 145 | /* |
146 | * The path_complete function is called after an iucv interrupt | 146 | * The path_complete function is called after an iucv interrupt |
147 | * type 0x02 has been received for a path that has been established | 147 | * type 0x02 has been received for a path that has been established |
148 | * for this handler with iucv_path_connect and got accepted by the | 148 | * for this handler with iucv_path_connect and got accepted by the |
149 | * peer with iucv_path_accept. | 149 | * peer with iucv_path_accept. |
150 | */ | 150 | */ |
151 | void (*path_complete)(struct iucv_path *, u8 ipuser[16]); | 151 | void (*path_complete)(struct iucv_path *, u8 *ipuser); |
152 | /* | 152 | /* |
153 | * The path_severed function is called after an iucv interrupt | 153 | * The path_severed function is called after an iucv interrupt |
154 | * type 0x03 has been received. The communication peer shutdown | 154 | * type 0x03 has been received. The communication peer shutdown |
@@ -156,20 +156,20 @@ struct iucv_handler { | |||
156 | * remaining messages can be received until a iucv_path_sever | 156 | * remaining messages can be received until a iucv_path_sever |
157 | * shuts down the other end of the path as well. | 157 | * shuts down the other end of the path as well. |
158 | */ | 158 | */ |
159 | void (*path_severed)(struct iucv_path *, u8 ipuser[16]); | 159 | void (*path_severed)(struct iucv_path *, u8 *ipuser); |
160 | /* | 160 | /* |
161 | * The path_quiesced function is called after an icuv interrupt | 161 | * The path_quiesced function is called after an icuv interrupt |
162 | * type 0x04 has been received. The communication peer has quiesced | 162 | * type 0x04 has been received. The communication peer has quiesced |
163 | * the path. Delivery of messages is stopped until iucv_path_resume | 163 | * the path. Delivery of messages is stopped until iucv_path_resume |
164 | * has been called. | 164 | * has been called. |
165 | */ | 165 | */ |
166 | void (*path_quiesced)(struct iucv_path *, u8 ipuser[16]); | 166 | void (*path_quiesced)(struct iucv_path *, u8 *ipuser); |
167 | /* | 167 | /* |
168 | * The path_resumed function is called after an icuv interrupt | 168 | * The path_resumed function is called after an icuv interrupt |
169 | * type 0x05 has been received. The communication peer has resumed | 169 | * type 0x05 has been received. The communication peer has resumed |
170 | * the path. | 170 | * the path. |
171 | */ | 171 | */ |
172 | void (*path_resumed)(struct iucv_path *, u8 ipuser[16]); | 172 | void (*path_resumed)(struct iucv_path *, u8 *ipuser); |
173 | /* | 173 | /* |
174 | * The message_pending function is called after an icuv interrupt | 174 | * The message_pending function is called after an icuv interrupt |
175 | * type 0x06 or type 0x07 has been received. A new message is | 175 | * type 0x06 or type 0x07 has been received. A new message is |
@@ -256,7 +256,7 @@ static inline void iucv_path_free(struct iucv_path *path) | |||
256 | * Returns the result of the CP IUCV call. | 256 | * Returns the result of the CP IUCV call. |
257 | */ | 257 | */ |
258 | int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, | 258 | int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, |
259 | u8 userdata[16], void *private); | 259 | u8 *userdata, void *private); |
260 | 260 | ||
261 | /** | 261 | /** |
262 | * iucv_path_connect | 262 | * iucv_path_connect |
@@ -274,7 +274,7 @@ int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, | |||
274 | * Returns the result of the CP IUCV call. | 274 | * Returns the result of the CP IUCV call. |
275 | */ | 275 | */ |
276 | int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, | 276 | int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, |
277 | u8 userid[8], u8 system[8], u8 userdata[16], | 277 | u8 *userid, u8 *system, u8 *userdata, |
278 | void *private); | 278 | void *private); |
279 | 279 | ||
280 | /** | 280 | /** |
@@ -287,7 +287,7 @@ int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, | |||
287 | * | 287 | * |
288 | * Returns the result from the CP IUCV call. | 288 | * Returns the result from the CP IUCV call. |
289 | */ | 289 | */ |
290 | int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]); | 290 | int iucv_path_quiesce(struct iucv_path *path, u8 *userdata); |
291 | 291 | ||
292 | /** | 292 | /** |
293 | * iucv_path_resume: | 293 | * iucv_path_resume: |
@@ -299,7 +299,7 @@ int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]); | |||
299 | * | 299 | * |
300 | * Returns the result from the CP IUCV call. | 300 | * Returns the result from the CP IUCV call. |
301 | */ | 301 | */ |
302 | int iucv_path_resume(struct iucv_path *path, u8 userdata[16]); | 302 | int iucv_path_resume(struct iucv_path *path, u8 *userdata); |
303 | 303 | ||
304 | /** | 304 | /** |
305 | * iucv_path_sever | 305 | * iucv_path_sever |
@@ -310,7 +310,7 @@ int iucv_path_resume(struct iucv_path *path, u8 userdata[16]); | |||
310 | * | 310 | * |
311 | * Returns the result from the CP IUCV call. | 311 | * Returns the result from the CP IUCV call. |
312 | */ | 312 | */ |
313 | int iucv_path_sever(struct iucv_path *path, u8 userdata[16]); | 313 | int iucv_path_sever(struct iucv_path *path, u8 *userdata); |
314 | 314 | ||
315 | /** | 315 | /** |
316 | * iucv_message_purge | 316 | * iucv_message_purge |
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 918151c11348..fcb2752419c6 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -95,11 +95,10 @@ static void afiucv_hs_callback_txnotify(struct sk_buff *, enum iucv_tx_notify); | |||
95 | /* Call Back functions */ | 95 | /* Call Back functions */ |
96 | static void iucv_callback_rx(struct iucv_path *, struct iucv_message *); | 96 | static void iucv_callback_rx(struct iucv_path *, struct iucv_message *); |
97 | static void iucv_callback_txdone(struct iucv_path *, struct iucv_message *); | 97 | static void iucv_callback_txdone(struct iucv_path *, struct iucv_message *); |
98 | static void iucv_callback_connack(struct iucv_path *, u8 ipuser[16]); | 98 | static void iucv_callback_connack(struct iucv_path *, u8 *); |
99 | static int iucv_callback_connreq(struct iucv_path *, u8 ipvmid[8], | 99 | static int iucv_callback_connreq(struct iucv_path *, u8 *, u8 *); |
100 | u8 ipuser[16]); | 100 | static void iucv_callback_connrej(struct iucv_path *, u8 *); |
101 | static void iucv_callback_connrej(struct iucv_path *, u8 ipuser[16]); | 101 | static void iucv_callback_shutdown(struct iucv_path *, u8 *); |
102 | static void iucv_callback_shutdown(struct iucv_path *, u8 ipuser[16]); | ||
103 | 102 | ||
104 | static struct iucv_sock_list iucv_sk_list = { | 103 | static struct iucv_sock_list iucv_sk_list = { |
105 | .lock = __RW_LOCK_UNLOCKED(iucv_sk_list.lock), | 104 | .lock = __RW_LOCK_UNLOCKED(iucv_sk_list.lock), |
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 2a6a1fdd62c0..7eaa000c9258 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -713,7 +713,7 @@ static struct notifier_block __refdata iucv_cpu_notifier = { | |||
713 | * | 713 | * |
714 | * Sever an iucv path to free up the pathid. Used internally. | 714 | * Sever an iucv path to free up the pathid. Used internally. |
715 | */ | 715 | */ |
716 | static int iucv_sever_pathid(u16 pathid, u8 userdata[16]) | 716 | static int iucv_sever_pathid(u16 pathid, u8 *userdata) |
717 | { | 717 | { |
718 | union iucv_param *parm; | 718 | union iucv_param *parm; |
719 | 719 | ||
@@ -876,7 +876,7 @@ static struct notifier_block iucv_reboot_notifier = { | |||
876 | * Returns the result of the CP IUCV call. | 876 | * Returns the result of the CP IUCV call. |
877 | */ | 877 | */ |
878 | int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, | 878 | int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, |
879 | u8 userdata[16], void *private) | 879 | u8 *userdata, void *private) |
880 | { | 880 | { |
881 | union iucv_param *parm; | 881 | union iucv_param *parm; |
882 | int rc; | 882 | int rc; |
@@ -923,7 +923,7 @@ EXPORT_SYMBOL(iucv_path_accept); | |||
923 | * Returns the result of the CP IUCV call. | 923 | * Returns the result of the CP IUCV call. |
924 | */ | 924 | */ |
925 | int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, | 925 | int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, |
926 | u8 userid[8], u8 system[8], u8 userdata[16], | 926 | u8 *userid, u8 *system, u8 *userdata, |
927 | void *private) | 927 | void *private) |
928 | { | 928 | { |
929 | union iucv_param *parm; | 929 | union iucv_param *parm; |
@@ -985,7 +985,7 @@ EXPORT_SYMBOL(iucv_path_connect); | |||
985 | * | 985 | * |
986 | * Returns the result from the CP IUCV call. | 986 | * Returns the result from the CP IUCV call. |
987 | */ | 987 | */ |
988 | int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]) | 988 | int iucv_path_quiesce(struct iucv_path *path, u8 *userdata) |
989 | { | 989 | { |
990 | union iucv_param *parm; | 990 | union iucv_param *parm; |
991 | int rc; | 991 | int rc; |
@@ -1017,7 +1017,7 @@ EXPORT_SYMBOL(iucv_path_quiesce); | |||
1017 | * | 1017 | * |
1018 | * Returns the result from the CP IUCV call. | 1018 | * Returns the result from the CP IUCV call. |
1019 | */ | 1019 | */ |
1020 | int iucv_path_resume(struct iucv_path *path, u8 userdata[16]) | 1020 | int iucv_path_resume(struct iucv_path *path, u8 *userdata) |
1021 | { | 1021 | { |
1022 | union iucv_param *parm; | 1022 | union iucv_param *parm; |
1023 | int rc; | 1023 | int rc; |
@@ -1047,7 +1047,7 @@ out: | |||
1047 | * | 1047 | * |
1048 | * Returns the result from the CP IUCV call. | 1048 | * Returns the result from the CP IUCV call. |
1049 | */ | 1049 | */ |
1050 | int iucv_path_sever(struct iucv_path *path, u8 userdata[16]) | 1050 | int iucv_path_sever(struct iucv_path *path, u8 *userdata) |
1051 | { | 1051 | { |
1052 | int rc; | 1052 | int rc; |
1053 | 1053 | ||