diff options
author | Ursula Braun <braunu@de.ibm.com> | 2005-09-30 04:19:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 22:06:46 -0400 |
commit | 500f83abdc83d6bd472f3d103a9a9cd85df29a29 (patch) | |
tree | 33e6c948592c7c9b77ad8ebdc489e32ffb9c4b70 /drivers/s390/net/qeth.h | |
parent | 3c8c7b2f32c52b259daa7564fefd582146799b23 (diff) |
[PATCH] s390: introducing support in qeth for new OSA CHPID type OSN
This patch introduces new feature in qeth:
qeth enhancement provides the device driver support for
the Communication Controller for Linux on System z9 and zSeries
(CCL), which is software that enables running the Network Control
Program (NCP) on a zSeries machine. The OSA CDLC support is based
on a new IBM mainframe CHPID type called Open Systems Adaper for
NCP (OSN). In case of OSN qeth communicates with the type-OSN
OSA-card on one hand, and with the CCL-kernel-component Network
Device Handler (NDH) on the other.
Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/s390/net/qeth.h')
-rw-r--r-- | drivers/s390/net/qeth.h | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 9963479ba89f..38a2441564d7 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h | |||
@@ -275,6 +275,10 @@ qeth_is_ipa_enabled(struct qeth_ipa_info *ipa, enum qeth_ipa_funcs func) | |||
275 | QETH_IDX_FUNC_LEVEL_IQD_ENA_IPAT, \ | 275 | QETH_IDX_FUNC_LEVEL_IQD_ENA_IPAT, \ |
276 | QETH_IDX_FUNC_LEVEL_IQD_DIS_IPAT, \ | 276 | QETH_IDX_FUNC_LEVEL_IQD_DIS_IPAT, \ |
277 | QETH_MAX_QUEUES,0x103}, \ | 277 | QETH_MAX_QUEUES,0x103}, \ |
278 | {0x1731,0x06,0x1732,0x06,QETH_CARD_TYPE_OSN,0, \ | ||
279 | QETH_IDX_FUNC_LEVEL_OSAE_ENA_IPAT, \ | ||
280 | QETH_IDX_FUNC_LEVEL_OSAE_DIS_IPAT, \ | ||
281 | QETH_MAX_QUEUES,0}, \ | ||
278 | {0,0,0,0,0,0,0,0,0}} | 282 | {0,0,0,0,0,0,0,0,0}} |
279 | 283 | ||
280 | #define QETH_REAL_CARD 1 | 284 | #define QETH_REAL_CARD 1 |
@@ -363,10 +367,22 @@ struct qeth_hdr_layer2 { | |||
363 | __u8 reserved2[16]; | 367 | __u8 reserved2[16]; |
364 | } __attribute__ ((packed)); | 368 | } __attribute__ ((packed)); |
365 | 369 | ||
370 | struct qeth_hdr_osn { | ||
371 | __u8 id; | ||
372 | __u8 reserved; | ||
373 | __u16 seq_no; | ||
374 | __u16 reserved2; | ||
375 | __u16 control_flags; | ||
376 | __u16 pdu_length; | ||
377 | __u8 reserved3[18]; | ||
378 | __u32 ccid; | ||
379 | } __attribute__ ((packed)); | ||
380 | |||
366 | struct qeth_hdr { | 381 | struct qeth_hdr { |
367 | union { | 382 | union { |
368 | struct qeth_hdr_layer2 l2; | 383 | struct qeth_hdr_layer2 l2; |
369 | struct qeth_hdr_layer3 l3; | 384 | struct qeth_hdr_layer3 l3; |
385 | struct qeth_hdr_osn osn; | ||
370 | } hdr; | 386 | } hdr; |
371 | } __attribute__ ((packed)); | 387 | } __attribute__ ((packed)); |
372 | 388 | ||
@@ -413,6 +429,7 @@ enum qeth_header_ids { | |||
413 | QETH_HEADER_TYPE_LAYER3 = 0x01, | 429 | QETH_HEADER_TYPE_LAYER3 = 0x01, |
414 | QETH_HEADER_TYPE_LAYER2 = 0x02, | 430 | QETH_HEADER_TYPE_LAYER2 = 0x02, |
415 | QETH_HEADER_TYPE_TSO = 0x03, | 431 | QETH_HEADER_TYPE_TSO = 0x03, |
432 | QETH_HEADER_TYPE_OSN = 0x04, | ||
416 | }; | 433 | }; |
417 | /* flags for qeth_hdr.ext_flags */ | 434 | /* flags for qeth_hdr.ext_flags */ |
418 | #define QETH_HDR_EXT_VLAN_FRAME 0x01 | 435 | #define QETH_HDR_EXT_VLAN_FRAME 0x01 |
@@ -582,7 +599,6 @@ enum qeth_card_states { | |||
582 | * Protocol versions | 599 | * Protocol versions |
583 | */ | 600 | */ |
584 | enum qeth_prot_versions { | 601 | enum qeth_prot_versions { |
585 | QETH_PROT_SNA = 0x0001, | ||
586 | QETH_PROT_IPV4 = 0x0004, | 602 | QETH_PROT_IPV4 = 0x0004, |
587 | QETH_PROT_IPV6 = 0x0006, | 603 | QETH_PROT_IPV6 = 0x0006, |
588 | }; | 604 | }; |
@@ -761,6 +777,11 @@ enum qeth_threads { | |||
761 | QETH_RECOVER_THREAD = 2, | 777 | QETH_RECOVER_THREAD = 2, |
762 | }; | 778 | }; |
763 | 779 | ||
780 | struct qeth_osn_info { | ||
781 | int (*assist_cb)(struct net_device *dev, void *data); | ||
782 | int (*data_cb)(struct sk_buff *skb); | ||
783 | }; | ||
784 | |||
764 | struct qeth_card { | 785 | struct qeth_card { |
765 | struct list_head list; | 786 | struct list_head list; |
766 | enum qeth_card_states state; | 787 | enum qeth_card_states state; |
@@ -803,6 +824,7 @@ struct qeth_card { | |||
803 | int use_hard_stop; | 824 | int use_hard_stop; |
804 | int (*orig_hard_header)(struct sk_buff *,struct net_device *, | 825 | int (*orig_hard_header)(struct sk_buff *,struct net_device *, |
805 | unsigned short,void *,void *,unsigned); | 826 | unsigned short,void *,void *,unsigned); |
827 | struct qeth_osn_info osn_info; | ||
806 | }; | 828 | }; |
807 | 829 | ||
808 | struct qeth_card_list_struct { | 830 | struct qeth_card_list_struct { |
@@ -916,10 +938,12 @@ qeth_get_hlen(__u8 link_type) | |||
916 | static inline unsigned short | 938 | static inline unsigned short |
917 | qeth_get_netdev_flags(struct qeth_card *card) | 939 | qeth_get_netdev_flags(struct qeth_card *card) |
918 | { | 940 | { |
919 | if (card->options.layer2) | 941 | if (card->options.layer2 && |
942 | (card->info.type == QETH_CARD_TYPE_OSAE)) | ||
920 | return 0; | 943 | return 0; |
921 | switch (card->info.type) { | 944 | switch (card->info.type) { |
922 | case QETH_CARD_TYPE_IQD: | 945 | case QETH_CARD_TYPE_IQD: |
946 | case QETH_CARD_TYPE_OSN: | ||
923 | return IFF_NOARP; | 947 | return IFF_NOARP; |
924 | #ifdef CONFIG_QETH_IPV6 | 948 | #ifdef CONFIG_QETH_IPV6 |
925 | default: | 949 | default: |
@@ -956,9 +980,10 @@ static inline int | |||
956 | qeth_get_max_mtu_for_card(int cardtype) | 980 | qeth_get_max_mtu_for_card(int cardtype) |
957 | { | 981 | { |
958 | switch (cardtype) { | 982 | switch (cardtype) { |
983 | |||
959 | case QETH_CARD_TYPE_UNKNOWN: | 984 | case QETH_CARD_TYPE_UNKNOWN: |
960 | return 61440; | ||
961 | case QETH_CARD_TYPE_OSAE: | 985 | case QETH_CARD_TYPE_OSAE: |
986 | case QETH_CARD_TYPE_OSN: | ||
962 | return 61440; | 987 | return 61440; |
963 | case QETH_CARD_TYPE_IQD: | 988 | case QETH_CARD_TYPE_IQD: |
964 | return 57344; | 989 | return 57344; |
@@ -1004,6 +1029,7 @@ qeth_mtu_is_valid(struct qeth_card * card, int mtu) | |||
1004 | case QETH_CARD_TYPE_IQD: | 1029 | case QETH_CARD_TYPE_IQD: |
1005 | return ((mtu >= 576) && | 1030 | return ((mtu >= 576) && |
1006 | (mtu <= card->info.max_mtu + 4096 - 32)); | 1031 | (mtu <= card->info.max_mtu + 4096 - 32)); |
1032 | case QETH_CARD_TYPE_OSN: | ||
1007 | case QETH_CARD_TYPE_UNKNOWN: | 1033 | case QETH_CARD_TYPE_UNKNOWN: |
1008 | default: | 1034 | default: |
1009 | return 1; | 1035 | return 1; |
@@ -1015,6 +1041,7 @@ qeth_get_arphdr_type(int cardtype, int linktype) | |||
1015 | { | 1041 | { |
1016 | switch (cardtype) { | 1042 | switch (cardtype) { |
1017 | case QETH_CARD_TYPE_OSAE: | 1043 | case QETH_CARD_TYPE_OSAE: |
1044 | case QETH_CARD_TYPE_OSN: | ||
1018 | switch (linktype) { | 1045 | switch (linktype) { |
1019 | case QETH_LINK_TYPE_LANE_TR: | 1046 | case QETH_LINK_TYPE_LANE_TR: |
1020 | case QETH_LINK_TYPE_HSTR: | 1047 | case QETH_LINK_TYPE_HSTR: |
@@ -1182,4 +1209,16 @@ qeth_fill_header(struct qeth_card *, struct qeth_hdr *, | |||
1182 | extern void | 1209 | extern void |
1183 | qeth_flush_buffers(struct qeth_qdio_out_q *, int, int, int); | 1210 | qeth_flush_buffers(struct qeth_qdio_out_q *, int, int, int); |
1184 | 1211 | ||
1212 | extern int | ||
1213 | qeth_osn_assist(struct net_device *, void *, int); | ||
1214 | |||
1215 | extern int | ||
1216 | qeth_osn_register(unsigned char *read_dev_no, | ||
1217 | struct net_device **, | ||
1218 | int (*assist_cb)(struct net_device *, void *), | ||
1219 | int (*data_cb)(struct sk_buff *)); | ||
1220 | |||
1221 | extern void | ||
1222 | qeth_osn_deregister(struct net_device *); | ||
1223 | |||
1185 | #endif /* __QETH_H__ */ | 1224 | #endif /* __QETH_H__ */ |