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.9 $"
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_driver_attributes(void);
49 qeth_remove_driver_attributes(void);
52 * utility functions used in qeth_proc.c and qeth_sys.c
55 static inline const char *
56 qeth_get_checksum_str(struct qeth_card
*card
)
58 if (card
->options
.checksum_type
== SW_CHECKSUMMING
)
60 else if (card
->options
.checksum_type
== HW_CHECKSUMMING
)
66 static inline const char *
67 qeth_get_prioq_str(struct qeth_card
*card
, char *buf
)
69 if (card
->qdio
.do_prio_queueing
== QETH_NO_PRIO_QUEUEING
)
70 sprintf(buf
, "always_q_%i", card
->qdio
.default_out_queue
);
72 strcpy(buf
, (card
->qdio
.do_prio_queueing
==
73 QETH_PRIO_Q_ING_PREC
)?
74 "by_prec." : "by_ToS");
78 static inline const char *
79 qeth_get_bufsize_str(struct qeth_card
*card
)
81 if (card
->qdio
.in_buf_size
== 16384)
83 else if (card
->qdio
.in_buf_size
== 24576)
85 else if (card
->qdio
.in_buf_size
== 32768)
87 else if (card
->qdio
.in_buf_size
== 40960)
93 static inline const char *
94 qeth_get_cardname(struct qeth_card
*card
)
96 if (card
->info
.guestlan
) {
97 switch (card
->info
.type
) {
98 case QETH_CARD_TYPE_OSAE
:
99 return " Guest LAN QDIO";
100 case QETH_CARD_TYPE_IQD
:
101 return " Guest LAN Hiper";
106 switch (card
->info
.type
) {
107 case QETH_CARD_TYPE_OSAE
:
108 return " OSD Express";
109 case QETH_CARD_TYPE_IQD
:
110 return " HiperSockets";
118 /* max length to be returned: 14 */
119 static inline const char *
120 qeth_get_cardname_short(struct qeth_card
*card
)
122 if (card
->info
.guestlan
){
123 switch (card
->info
.type
){
124 case QETH_CARD_TYPE_OSAE
:
125 return "GuestLAN QDIO";
126 case QETH_CARD_TYPE_IQD
:
127 return "GuestLAN Hiper";
132 switch (card
->info
.type
) {
133 case QETH_CARD_TYPE_OSAE
:
134 switch (card
->info
.link_type
) {
135 case QETH_LINK_TYPE_FAST_ETH
:
137 case QETH_LINK_TYPE_HSTR
:
139 case QETH_LINK_TYPE_GBIT_ETH
:
141 case QETH_LINK_TYPE_10GBIT_ETH
:
143 case QETH_LINK_TYPE_LANE_ETH100
:
144 return "OSD_FE_LANE";
145 case QETH_LINK_TYPE_LANE_TR
:
146 return "OSD_TR_LANE";
147 case QETH_LINK_TYPE_LANE_ETH1000
:
148 return "OSD_GbE_LANE";
149 case QETH_LINK_TYPE_LANE
:
150 return "OSD_ATM_LANE";
152 return "OSD_Express";
154 case QETH_CARD_TYPE_IQD
:
155 return "HiperSockets";
163 #endif /* __QETH_FS_H__ */