Linux 4.18.10
[linux/fpc-iii.git] / drivers / s390 / net / qeth_core_sys.c
blobcfb6597476935bddabdb9f45bc19076783a11928
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright IBM Corp. 2007
4 * Author(s): Utz Bacher <utz.bacher@de.ibm.com>,
5 * Frank Pavlic <fpavlic@de.ibm.com>,
6 * Thomas Spatzier <tspat@de.ibm.com>,
7 * Frank Blaschka <frank.blaschka@de.ibm.com>
8 */
10 #define KMSG_COMPONENT "qeth"
11 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
13 #include <linux/list.h>
14 #include <linux/rwsem.h>
15 #include <asm/ebcdic.h>
17 #include "qeth_core.h"
19 static ssize_t qeth_dev_state_show(struct device *dev,
20 struct device_attribute *attr, char *buf)
22 struct qeth_card *card = dev_get_drvdata(dev);
23 if (!card)
24 return -EINVAL;
26 switch (card->state) {
27 case CARD_STATE_DOWN:
28 return sprintf(buf, "DOWN\n");
29 case CARD_STATE_HARDSETUP:
30 return sprintf(buf, "HARDSETUP\n");
31 case CARD_STATE_SOFTSETUP:
32 return sprintf(buf, "SOFTSETUP\n");
33 case CARD_STATE_UP:
34 if (card->lan_online)
35 return sprintf(buf, "UP (LAN ONLINE)\n");
36 else
37 return sprintf(buf, "UP (LAN OFFLINE)\n");
38 case CARD_STATE_RECOVER:
39 return sprintf(buf, "RECOVER\n");
40 default:
41 return sprintf(buf, "UNKNOWN\n");
45 static DEVICE_ATTR(state, 0444, qeth_dev_state_show, NULL);
47 static ssize_t qeth_dev_chpid_show(struct device *dev,
48 struct device_attribute *attr, char *buf)
50 struct qeth_card *card = dev_get_drvdata(dev);
51 if (!card)
52 return -EINVAL;
54 return sprintf(buf, "%02X\n", card->info.chpid);
57 static DEVICE_ATTR(chpid, 0444, qeth_dev_chpid_show, NULL);
59 static ssize_t qeth_dev_if_name_show(struct device *dev,
60 struct device_attribute *attr, char *buf)
62 struct qeth_card *card = dev_get_drvdata(dev);
63 if (!card)
64 return -EINVAL;
65 return sprintf(buf, "%s\n", QETH_CARD_IFNAME(card));
68 static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL);
70 static ssize_t qeth_dev_card_type_show(struct device *dev,
71 struct device_attribute *attr, char *buf)
73 struct qeth_card *card = dev_get_drvdata(dev);
74 if (!card)
75 return -EINVAL;
77 return sprintf(buf, "%s\n", qeth_get_cardname_short(card));
80 static DEVICE_ATTR(card_type, 0444, qeth_dev_card_type_show, NULL);
82 static const char *qeth_get_bufsize_str(struct qeth_card *card)
84 if (card->qdio.in_buf_size == 16384)
85 return "16k";
86 else if (card->qdio.in_buf_size == 24576)
87 return "24k";
88 else if (card->qdio.in_buf_size == 32768)
89 return "32k";
90 else if (card->qdio.in_buf_size == 40960)
91 return "40k";
92 else
93 return "64k";
96 static ssize_t qeth_dev_inbuf_size_show(struct device *dev,
97 struct device_attribute *attr, char *buf)
99 struct qeth_card *card = dev_get_drvdata(dev);
100 if (!card)
101 return -EINVAL;
103 return sprintf(buf, "%s\n", qeth_get_bufsize_str(card));
106 static DEVICE_ATTR(inbuf_size, 0444, qeth_dev_inbuf_size_show, NULL);
108 static ssize_t qeth_dev_portno_show(struct device *dev,
109 struct device_attribute *attr, char *buf)
111 struct qeth_card *card = dev_get_drvdata(dev);
112 if (!card)
113 return -EINVAL;
115 return sprintf(buf, "%i\n", card->info.portno);
118 static ssize_t qeth_dev_portno_store(struct device *dev,
119 struct device_attribute *attr, const char *buf, size_t count)
121 struct qeth_card *card = dev_get_drvdata(dev);
122 char *tmp;
123 unsigned int portno, limit;
124 int rc = 0;
126 if (!card)
127 return -EINVAL;
129 mutex_lock(&card->conf_mutex);
130 if ((card->state != CARD_STATE_DOWN) &&
131 (card->state != CARD_STATE_RECOVER)) {
132 rc = -EPERM;
133 goto out;
136 portno = simple_strtoul(buf, &tmp, 16);
137 if (portno > QETH_MAX_PORTNO) {
138 rc = -EINVAL;
139 goto out;
141 limit = (card->ssqd.pcnt ? card->ssqd.pcnt - 1 : card->ssqd.pcnt);
142 if (portno > limit) {
143 rc = -EINVAL;
144 goto out;
146 card->info.portno = portno;
147 if (card->dev)
148 card->dev->dev_port = portno;
149 out:
150 mutex_unlock(&card->conf_mutex);
151 return rc ? rc : count;
154 static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store);
156 static ssize_t qeth_dev_portname_show(struct device *dev,
157 struct device_attribute *attr, char *buf)
159 return sprintf(buf, "no portname required\n");
162 static ssize_t qeth_dev_portname_store(struct device *dev,
163 struct device_attribute *attr, const char *buf, size_t count)
165 struct qeth_card *card = dev_get_drvdata(dev);
167 dev_warn_once(&card->gdev->dev,
168 "portname is deprecated and is ignored\n");
169 return count;
172 static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show,
173 qeth_dev_portname_store);
175 static ssize_t qeth_dev_prioqing_show(struct device *dev,
176 struct device_attribute *attr, char *buf)
178 struct qeth_card *card = dev_get_drvdata(dev);
180 if (!card)
181 return -EINVAL;
183 switch (card->qdio.do_prio_queueing) {
184 case QETH_PRIO_Q_ING_PREC:
185 return sprintf(buf, "%s\n", "by precedence");
186 case QETH_PRIO_Q_ING_TOS:
187 return sprintf(buf, "%s\n", "by type of service");
188 case QETH_PRIO_Q_ING_SKB:
189 return sprintf(buf, "%s\n", "by skb-priority");
190 case QETH_PRIO_Q_ING_VLAN:
191 return sprintf(buf, "%s\n", "by VLAN headers");
192 default:
193 return sprintf(buf, "always queue %i\n",
194 card->qdio.default_out_queue);
198 static ssize_t qeth_dev_prioqing_store(struct device *dev,
199 struct device_attribute *attr, const char *buf, size_t count)
201 struct qeth_card *card = dev_get_drvdata(dev);
202 int rc = 0;
204 if (!card)
205 return -EINVAL;
207 mutex_lock(&card->conf_mutex);
208 if ((card->state != CARD_STATE_DOWN) &&
209 (card->state != CARD_STATE_RECOVER)) {
210 rc = -EPERM;
211 goto out;
214 /* check if 1920 devices are supported ,
215 * if though we have to permit priority queueing
217 if (card->qdio.no_out_queues == 1) {
218 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT;
219 rc = -EPERM;
220 goto out;
223 if (sysfs_streq(buf, "prio_queueing_prec")) {
224 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_PREC;
225 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
226 } else if (sysfs_streq(buf, "prio_queueing_skb")) {
227 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_SKB;
228 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
229 } else if (sysfs_streq(buf, "prio_queueing_tos")) {
230 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS;
231 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
232 } else if (sysfs_streq(buf, "prio_queueing_vlan")) {
233 if (!card->options.layer2) {
234 rc = -ENOTSUPP;
235 goto out;
237 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_VLAN;
238 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
239 } else if (sysfs_streq(buf, "no_prio_queueing:0")) {
240 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
241 card->qdio.default_out_queue = 0;
242 } else if (sysfs_streq(buf, "no_prio_queueing:1")) {
243 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
244 card->qdio.default_out_queue = 1;
245 } else if (sysfs_streq(buf, "no_prio_queueing:2")) {
246 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
247 card->qdio.default_out_queue = 2;
248 } else if (sysfs_streq(buf, "no_prio_queueing:3")) {
249 if (card->info.type == QETH_CARD_TYPE_IQD) {
250 rc = -EPERM;
251 goto out;
253 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
254 card->qdio.default_out_queue = 3;
255 } else if (sysfs_streq(buf, "no_prio_queueing")) {
256 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
257 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
258 } else
259 rc = -EINVAL;
260 out:
261 mutex_unlock(&card->conf_mutex);
262 return rc ? rc : count;
265 static DEVICE_ATTR(priority_queueing, 0644, qeth_dev_prioqing_show,
266 qeth_dev_prioqing_store);
268 static ssize_t qeth_dev_bufcnt_show(struct device *dev,
269 struct device_attribute *attr, char *buf)
271 struct qeth_card *card = dev_get_drvdata(dev);
273 if (!card)
274 return -EINVAL;
276 return sprintf(buf, "%i\n", card->qdio.in_buf_pool.buf_count);
279 static ssize_t qeth_dev_bufcnt_store(struct device *dev,
280 struct device_attribute *attr, const char *buf, size_t count)
282 struct qeth_card *card = dev_get_drvdata(dev);
283 char *tmp;
284 int cnt, old_cnt;
285 int rc = 0;
287 if (!card)
288 return -EINVAL;
290 mutex_lock(&card->conf_mutex);
291 if ((card->state != CARD_STATE_DOWN) &&
292 (card->state != CARD_STATE_RECOVER)) {
293 rc = -EPERM;
294 goto out;
297 old_cnt = card->qdio.in_buf_pool.buf_count;
298 cnt = simple_strtoul(buf, &tmp, 10);
299 cnt = (cnt < QETH_IN_BUF_COUNT_MIN) ? QETH_IN_BUF_COUNT_MIN :
300 ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt);
301 if (old_cnt != cnt) {
302 rc = qeth_realloc_buffer_pool(card, cnt);
304 out:
305 mutex_unlock(&card->conf_mutex);
306 return rc ? rc : count;
309 static DEVICE_ATTR(buffer_count, 0644, qeth_dev_bufcnt_show,
310 qeth_dev_bufcnt_store);
312 static ssize_t qeth_dev_recover_store(struct device *dev,
313 struct device_attribute *attr, const char *buf, size_t count)
315 struct qeth_card *card = dev_get_drvdata(dev);
316 char *tmp;
317 int i;
319 if (!card)
320 return -EINVAL;
322 if (card->state != CARD_STATE_UP)
323 return -EPERM;
325 i = simple_strtoul(buf, &tmp, 16);
326 if (i == 1)
327 qeth_schedule_recovery(card);
329 return count;
332 static DEVICE_ATTR(recover, 0200, NULL, qeth_dev_recover_store);
334 static ssize_t qeth_dev_performance_stats_show(struct device *dev,
335 struct device_attribute *attr, char *buf)
337 struct qeth_card *card = dev_get_drvdata(dev);
339 if (!card)
340 return -EINVAL;
342 return sprintf(buf, "%i\n", card->options.performance_stats ? 1:0);
345 static ssize_t qeth_dev_performance_stats_store(struct device *dev,
346 struct device_attribute *attr, const char *buf, size_t count)
348 struct qeth_card *card = dev_get_drvdata(dev);
349 char *tmp;
350 int i, rc = 0;
352 if (!card)
353 return -EINVAL;
355 mutex_lock(&card->conf_mutex);
356 i = simple_strtoul(buf, &tmp, 16);
357 if ((i == 0) || (i == 1)) {
358 if (i == card->options.performance_stats)
359 goto out;
360 card->options.performance_stats = i;
361 if (i == 0)
362 memset(&card->perf_stats, 0,
363 sizeof(struct qeth_perf_stats));
364 card->perf_stats.initial_rx_packets = card->stats.rx_packets;
365 card->perf_stats.initial_tx_packets = card->stats.tx_packets;
366 } else
367 rc = -EINVAL;
368 out:
369 mutex_unlock(&card->conf_mutex);
370 return rc ? rc : count;
373 static DEVICE_ATTR(performance_stats, 0644, qeth_dev_performance_stats_show,
374 qeth_dev_performance_stats_store);
376 static ssize_t qeth_dev_layer2_show(struct device *dev,
377 struct device_attribute *attr, char *buf)
379 struct qeth_card *card = dev_get_drvdata(dev);
381 if (!card)
382 return -EINVAL;
384 return sprintf(buf, "%i\n", card->options.layer2);
387 static ssize_t qeth_dev_layer2_store(struct device *dev,
388 struct device_attribute *attr, const char *buf, size_t count)
390 struct qeth_card *card = dev_get_drvdata(dev);
391 char *tmp;
392 int i, rc = 0;
393 enum qeth_discipline_id newdis;
395 if (!card)
396 return -EINVAL;
398 mutex_lock(&card->discipline_mutex);
399 if (card->state != CARD_STATE_DOWN) {
400 rc = -EPERM;
401 goto out;
404 i = simple_strtoul(buf, &tmp, 16);
405 switch (i) {
406 case 0:
407 newdis = QETH_DISCIPLINE_LAYER3;
408 break;
409 case 1:
410 newdis = QETH_DISCIPLINE_LAYER2;
411 break;
412 default:
413 rc = -EINVAL;
414 goto out;
417 if (card->options.layer2 == newdis)
418 goto out;
419 if (card->info.layer_enforced) {
420 /* fixed layer, can't switch */
421 rc = -EOPNOTSUPP;
422 goto out;
425 card->info.mac_bits = 0;
426 if (card->discipline) {
427 card->discipline->remove(card->gdev);
428 qeth_core_free_discipline(card);
429 card->options.layer2 = -1;
432 rc = qeth_core_load_discipline(card, newdis);
433 if (rc)
434 goto out;
436 rc = card->discipline->setup(card->gdev);
437 if (rc)
438 qeth_core_free_discipline(card);
439 out:
440 mutex_unlock(&card->discipline_mutex);
441 return rc ? rc : count;
444 static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show,
445 qeth_dev_layer2_store);
447 #define ATTR_QETH_ISOLATION_NONE ("none")
448 #define ATTR_QETH_ISOLATION_FWD ("forward")
449 #define ATTR_QETH_ISOLATION_DROP ("drop")
451 static ssize_t qeth_dev_isolation_show(struct device *dev,
452 struct device_attribute *attr, char *buf)
454 struct qeth_card *card = dev_get_drvdata(dev);
456 if (!card)
457 return -EINVAL;
459 switch (card->options.isolation) {
460 case ISOLATION_MODE_NONE:
461 return snprintf(buf, 6, "%s\n", ATTR_QETH_ISOLATION_NONE);
462 case ISOLATION_MODE_FWD:
463 return snprintf(buf, 9, "%s\n", ATTR_QETH_ISOLATION_FWD);
464 case ISOLATION_MODE_DROP:
465 return snprintf(buf, 6, "%s\n", ATTR_QETH_ISOLATION_DROP);
466 default:
467 return snprintf(buf, 5, "%s\n", "N/A");
471 static ssize_t qeth_dev_isolation_store(struct device *dev,
472 struct device_attribute *attr, const char *buf, size_t count)
474 struct qeth_card *card = dev_get_drvdata(dev);
475 enum qeth_ipa_isolation_modes isolation;
476 int rc = 0;
478 if (!card)
479 return -EINVAL;
481 mutex_lock(&card->conf_mutex);
482 if (card->info.type != QETH_CARD_TYPE_OSD &&
483 card->info.type != QETH_CARD_TYPE_OSX) {
484 rc = -EOPNOTSUPP;
485 dev_err(&card->gdev->dev, "Adapter does not "
486 "support QDIO data connection isolation\n");
487 goto out;
490 /* parse input into isolation mode */
491 if (sysfs_streq(buf, ATTR_QETH_ISOLATION_NONE)) {
492 isolation = ISOLATION_MODE_NONE;
493 } else if (sysfs_streq(buf, ATTR_QETH_ISOLATION_FWD)) {
494 isolation = ISOLATION_MODE_FWD;
495 } else if (sysfs_streq(buf, ATTR_QETH_ISOLATION_DROP)) {
496 isolation = ISOLATION_MODE_DROP;
497 } else {
498 rc = -EINVAL;
499 goto out;
501 rc = count;
503 /* defer IP assist if device is offline (until discipline->set_online)*/
504 card->options.prev_isolation = card->options.isolation;
505 card->options.isolation = isolation;
506 if (qeth_card_hw_is_reachable(card)) {
507 int ipa_rc = qeth_set_access_ctrl_online(card, 1);
508 if (ipa_rc != 0)
509 rc = ipa_rc;
511 out:
512 mutex_unlock(&card->conf_mutex);
513 return rc;
516 static DEVICE_ATTR(isolation, 0644, qeth_dev_isolation_show,
517 qeth_dev_isolation_store);
519 static ssize_t qeth_dev_switch_attrs_show(struct device *dev,
520 struct device_attribute *attr, char *buf)
522 struct qeth_card *card = dev_get_drvdata(dev);
523 struct qeth_switch_info sw_info;
524 int rc = 0;
526 if (!card)
527 return -EINVAL;
529 if (!qeth_card_hw_is_reachable(card))
530 return sprintf(buf, "n/a\n");
532 rc = qeth_query_switch_attributes(card, &sw_info);
533 if (rc)
534 return rc;
536 if (!sw_info.capabilities)
537 rc = sprintf(buf, "unknown");
539 if (sw_info.capabilities & QETH_SWITCH_FORW_802_1)
540 rc = sprintf(buf, (sw_info.settings & QETH_SWITCH_FORW_802_1 ?
541 "[802.1]" : "802.1"));
542 if (sw_info.capabilities & QETH_SWITCH_FORW_REFL_RELAY)
543 rc += sprintf(buf + rc,
544 (sw_info.settings & QETH_SWITCH_FORW_REFL_RELAY ?
545 " [rr]" : " rr"));
546 rc += sprintf(buf + rc, "\n");
548 return rc;
551 static DEVICE_ATTR(switch_attrs, 0444,
552 qeth_dev_switch_attrs_show, NULL);
554 static ssize_t qeth_hw_trap_show(struct device *dev,
555 struct device_attribute *attr, char *buf)
557 struct qeth_card *card = dev_get_drvdata(dev);
559 if (!card)
560 return -EINVAL;
561 if (card->info.hwtrap)
562 return snprintf(buf, 5, "arm\n");
563 else
564 return snprintf(buf, 8, "disarm\n");
567 static ssize_t qeth_hw_trap_store(struct device *dev,
568 struct device_attribute *attr, const char *buf, size_t count)
570 struct qeth_card *card = dev_get_drvdata(dev);
571 int rc = 0;
572 int state = 0;
574 if (!card)
575 return -EINVAL;
577 mutex_lock(&card->conf_mutex);
578 if (qeth_card_hw_is_reachable(card))
579 state = 1;
581 if (sysfs_streq(buf, "arm") && !card->info.hwtrap) {
582 if (state) {
583 if (qeth_is_diagass_supported(card,
584 QETH_DIAGS_CMD_TRAP)) {
585 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_ARM);
586 if (!rc)
587 card->info.hwtrap = 1;
588 } else
589 rc = -EINVAL;
590 } else
591 card->info.hwtrap = 1;
592 } else if (sysfs_streq(buf, "disarm") && card->info.hwtrap) {
593 if (state) {
594 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
595 if (!rc)
596 card->info.hwtrap = 0;
597 } else
598 card->info.hwtrap = 0;
599 } else if (sysfs_streq(buf, "trap") && state && card->info.hwtrap)
600 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_CAPTURE);
601 else
602 rc = -EINVAL;
604 mutex_unlock(&card->conf_mutex);
605 return rc ? rc : count;
608 static DEVICE_ATTR(hw_trap, 0644, qeth_hw_trap_show,
609 qeth_hw_trap_store);
611 static ssize_t qeth_dev_blkt_show(char *buf, struct qeth_card *card, int value)
614 if (!card)
615 return -EINVAL;
617 return sprintf(buf, "%i\n", value);
620 static ssize_t qeth_dev_blkt_store(struct qeth_card *card,
621 const char *buf, size_t count, int *value, int max_value)
623 char *tmp;
624 int i, rc = 0;
626 if (!card)
627 return -EINVAL;
629 mutex_lock(&card->conf_mutex);
630 if ((card->state != CARD_STATE_DOWN) &&
631 (card->state != CARD_STATE_RECOVER)) {
632 rc = -EPERM;
633 goto out;
635 i = simple_strtoul(buf, &tmp, 10);
636 if (i <= max_value)
637 *value = i;
638 else
639 rc = -EINVAL;
640 out:
641 mutex_unlock(&card->conf_mutex);
642 return rc ? rc : count;
645 static ssize_t qeth_dev_blkt_total_show(struct device *dev,
646 struct device_attribute *attr, char *buf)
648 struct qeth_card *card = dev_get_drvdata(dev);
650 return qeth_dev_blkt_show(buf, card, card->info.blkt.time_total);
653 static ssize_t qeth_dev_blkt_total_store(struct device *dev,
654 struct device_attribute *attr, const char *buf, size_t count)
656 struct qeth_card *card = dev_get_drvdata(dev);
658 return qeth_dev_blkt_store(card, buf, count,
659 &card->info.blkt.time_total, 5000);
664 static DEVICE_ATTR(total, 0644, qeth_dev_blkt_total_show,
665 qeth_dev_blkt_total_store);
667 static ssize_t qeth_dev_blkt_inter_show(struct device *dev,
668 struct device_attribute *attr, char *buf)
670 struct qeth_card *card = dev_get_drvdata(dev);
672 return qeth_dev_blkt_show(buf, card, card->info.blkt.inter_packet);
675 static ssize_t qeth_dev_blkt_inter_store(struct device *dev,
676 struct device_attribute *attr, const char *buf, size_t count)
678 struct qeth_card *card = dev_get_drvdata(dev);
680 return qeth_dev_blkt_store(card, buf, count,
681 &card->info.blkt.inter_packet, 1000);
684 static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show,
685 qeth_dev_blkt_inter_store);
687 static ssize_t qeth_dev_blkt_inter_jumbo_show(struct device *dev,
688 struct device_attribute *attr, char *buf)
690 struct qeth_card *card = dev_get_drvdata(dev);
692 return qeth_dev_blkt_show(buf, card,
693 card->info.blkt.inter_packet_jumbo);
696 static ssize_t qeth_dev_blkt_inter_jumbo_store(struct device *dev,
697 struct device_attribute *attr, const char *buf, size_t count)
699 struct qeth_card *card = dev_get_drvdata(dev);
701 return qeth_dev_blkt_store(card, buf, count,
702 &card->info.blkt.inter_packet_jumbo, 1000);
705 static DEVICE_ATTR(inter_jumbo, 0644, qeth_dev_blkt_inter_jumbo_show,
706 qeth_dev_blkt_inter_jumbo_store);
708 static struct attribute *qeth_blkt_device_attrs[] = {
709 &dev_attr_total.attr,
710 &dev_attr_inter.attr,
711 &dev_attr_inter_jumbo.attr,
712 NULL,
714 const struct attribute_group qeth_device_blkt_group = {
715 .name = "blkt",
716 .attrs = qeth_blkt_device_attrs,
718 EXPORT_SYMBOL_GPL(qeth_device_blkt_group);
720 static struct attribute *qeth_device_attrs[] = {
721 &dev_attr_state.attr,
722 &dev_attr_chpid.attr,
723 &dev_attr_if_name.attr,
724 &dev_attr_card_type.attr,
725 &dev_attr_inbuf_size.attr,
726 &dev_attr_portno.attr,
727 &dev_attr_portname.attr,
728 &dev_attr_priority_queueing.attr,
729 &dev_attr_buffer_count.attr,
730 &dev_attr_recover.attr,
731 &dev_attr_performance_stats.attr,
732 &dev_attr_layer2.attr,
733 &dev_attr_isolation.attr,
734 &dev_attr_hw_trap.attr,
735 &dev_attr_switch_attrs.attr,
736 NULL,
738 const struct attribute_group qeth_device_attr_group = {
739 .attrs = qeth_device_attrs,
741 EXPORT_SYMBOL_GPL(qeth_device_attr_group);
743 const struct attribute_group *qeth_generic_attr_groups[] = {
744 &qeth_device_attr_group,
745 &qeth_device_blkt_group,
746 NULL,
749 static struct attribute *qeth_osn_device_attrs[] = {
750 &dev_attr_state.attr,
751 &dev_attr_chpid.attr,
752 &dev_attr_if_name.attr,
753 &dev_attr_card_type.attr,
754 &dev_attr_buffer_count.attr,
755 &dev_attr_recover.attr,
756 NULL,
758 static struct attribute_group qeth_osn_device_attr_group = {
759 .attrs = qeth_osn_device_attrs,
761 const struct attribute_group *qeth_osn_attr_groups[] = {
762 &qeth_osn_device_attr_group,
763 NULL,