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>
17 qeth_create_procfs_entries(void);
20 qeth_remove_procfs_entries(void);
23 qeth_create_procfs_entries(void)
29 qeth_remove_procfs_entries(void)
32 #endif /* CONFIG_PROC_FS */
35 qeth_create_device_attributes(struct device *dev);
38 qeth_remove_device_attributes(struct device *dev);
41 qeth_create_device_attributes_osn(struct device *dev);
44 qeth_remove_device_attributes_osn(struct device *dev);
47 qeth_create_driver_attributes(void);
50 qeth_remove_driver_attributes(void);
53 * utility functions used in qeth_proc.c and qeth_sys.c
56 static inline const char *
57 qeth_get_checksum_str(struct qeth_card *card)
59 if (card->options.checksum_type == SW_CHECKSUMMING)
61 else if (card->options.checksum_type == HW_CHECKSUMMING)
67 static inline const char *
68 qeth_get_prioq_str(struct qeth_card *card, char *buf)
70 if (card->qdio.do_prio_queueing == QETH_NO_PRIO_QUEUEING)
71 sprintf(buf, "always_q_%i", card->qdio.default_out_queue);
73 strcpy(buf, (card->qdio.do_prio_queueing ==
74 QETH_PRIO_Q_ING_PREC)?
75 "by_prec." : "by_ToS");
79 static inline const char *
80 qeth_get_bufsize_str(struct qeth_card *card)
82 if (card->qdio.in_buf_size == 16384)
84 else if (card->qdio.in_buf_size == 24576)
86 else if (card->qdio.in_buf_size == 32768)
88 else if (card->qdio.in_buf_size == 40960)
94 static inline const char *
95 qeth_get_cardname(struct qeth_card *card)
97 if (card->info.guestlan) {
98 switch (card->info.type) {
99 case QETH_CARD_TYPE_OSAE:
100 return " Guest LAN QDIO";
101 case QETH_CARD_TYPE_IQD:
102 return " Guest LAN Hiper";
107 switch (card->info.type) {
108 case QETH_CARD_TYPE_OSAE:
109 return " OSD Express";
110 case QETH_CARD_TYPE_IQD:
111 return " HiperSockets";
112 case QETH_CARD_TYPE_OSN:
121 /* max length to be returned: 14 */
122 static inline const char *
123 qeth_get_cardname_short(struct qeth_card *card)
125 if (card->info.guestlan){
126 switch (card->info.type){
127 case QETH_CARD_TYPE_OSAE:
128 return "GuestLAN QDIO";
129 case QETH_CARD_TYPE_IQD:
130 return "GuestLAN Hiper";
135 switch (card->info.type) {
136 case QETH_CARD_TYPE_OSAE:
137 switch (card->info.link_type) {
138 case QETH_LINK_TYPE_FAST_ETH:
140 case QETH_LINK_TYPE_HSTR:
142 case QETH_LINK_TYPE_GBIT_ETH:
144 case QETH_LINK_TYPE_10GBIT_ETH:
146 case QETH_LINK_TYPE_LANE_ETH100:
147 return "OSD_FE_LANE";
148 case QETH_LINK_TYPE_LANE_TR:
149 return "OSD_TR_LANE";
150 case QETH_LINK_TYPE_LANE_ETH1000:
151 return "OSD_GbE_LANE";
152 case QETH_LINK_TYPE_LANE:
153 return "OSD_ATM_LANE";
155 return "OSD_Express";
157 case QETH_CARD_TYPE_IQD:
158 return "HiperSockets";
159 case QETH_CARD_TYPE_OSN:
168 #endif /* __QETH_FS_H__ */