2 * linux/drivers/s390/net/qeth_fs.h
4 * Linux on zSeries OSA Express and HiperSockets support.
6 * This header file contains definitions related to sysfs and procfs.
8 * Copyright 2000,2003 IBM Corporation
9 * Author(s): Thomas Spatzier <tspat@de.ibm.com>
15 #define VERSION_QETH_FS_H "$Revision: 1.10 $"
17 extern const char *VERSION_QETH_PROC_C
;
18 extern const char *VERSION_QETH_SYS_C
;
22 qeth_create_procfs_entries(void);
25 qeth_remove_procfs_entries(void);
28 qeth_create_procfs_entries(void)
34 qeth_remove_procfs_entries(void)
37 #endif /* CONFIG_PROC_FS */
40 qeth_create_device_attributes(struct device
*dev
);
43 qeth_remove_device_attributes(struct device
*dev
);
46 qeth_create_device_attributes_osn(struct device
*dev
);
49 qeth_remove_device_attributes_osn(struct device
*dev
);
52 qeth_create_driver_attributes(void);
55 qeth_remove_driver_attributes(void);
58 * utility functions used in qeth_proc.c and qeth_sys.c
61 static inline const char *
62 qeth_get_checksum_str(struct qeth_card
*card
)
64 if (card
->options
.checksum_type
== SW_CHECKSUMMING
)
66 else if (card
->options
.checksum_type
== HW_CHECKSUMMING
)
72 static inline const char *
73 qeth_get_prioq_str(struct qeth_card
*card
, char *buf
)
75 if (card
->qdio
.do_prio_queueing
== QETH_NO_PRIO_QUEUEING
)
76 sprintf(buf
, "always_q_%i", card
->qdio
.default_out_queue
);
78 strcpy(buf
, (card
->qdio
.do_prio_queueing
==
79 QETH_PRIO_Q_ING_PREC
)?
80 "by_prec." : "by_ToS");
84 static inline const char *
85 qeth_get_bufsize_str(struct qeth_card
*card
)
87 if (card
->qdio
.in_buf_size
== 16384)
89 else if (card
->qdio
.in_buf_size
== 24576)
91 else if (card
->qdio
.in_buf_size
== 32768)
93 else if (card
->qdio
.in_buf_size
== 40960)
99 static inline const char *
100 qeth_get_cardname(struct qeth_card
*card
)
102 if (card
->info
.guestlan
) {
103 switch (card
->info
.type
) {
104 case QETH_CARD_TYPE_OSAE
:
105 return " Guest LAN QDIO";
106 case QETH_CARD_TYPE_IQD
:
107 return " Guest LAN Hiper";
112 switch (card
->info
.type
) {
113 case QETH_CARD_TYPE_OSAE
:
114 return " OSD Express";
115 case QETH_CARD_TYPE_IQD
:
116 return " HiperSockets";
117 case QETH_CARD_TYPE_OSN
:
126 /* max length to be returned: 14 */
127 static inline const char *
128 qeth_get_cardname_short(struct qeth_card
*card
)
130 if (card
->info
.guestlan
){
131 switch (card
->info
.type
){
132 case QETH_CARD_TYPE_OSAE
:
133 return "GuestLAN QDIO";
134 case QETH_CARD_TYPE_IQD
:
135 return "GuestLAN Hiper";
140 switch (card
->info
.type
) {
141 case QETH_CARD_TYPE_OSAE
:
142 switch (card
->info
.link_type
) {
143 case QETH_LINK_TYPE_FAST_ETH
:
145 case QETH_LINK_TYPE_HSTR
:
147 case QETH_LINK_TYPE_GBIT_ETH
:
149 case QETH_LINK_TYPE_10GBIT_ETH
:
151 case QETH_LINK_TYPE_LANE_ETH100
:
152 return "OSD_FE_LANE";
153 case QETH_LINK_TYPE_LANE_TR
:
154 return "OSD_TR_LANE";
155 case QETH_LINK_TYPE_LANE_ETH1000
:
156 return "OSD_GbE_LANE";
157 case QETH_LINK_TYPE_LANE
:
158 return "OSD_ATM_LANE";
160 return "OSD_Express";
162 case QETH_CARD_TYPE_IQD
:
163 return "HiperSockets";
164 case QETH_CARD_TYPE_OSN
:
173 #endif /* __QETH_FS_H__ */