Linux 4.19.133
[linux/fpc-iii.git] / drivers / s390 / net / qeth_core_sys.c
blob25d0be25bcb35b2242042cf58bf3441785019f53
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->dev->dev_port);
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->dev->dev_port = portno;
147 out:
148 mutex_unlock(&card->conf_mutex);
149 return rc ? rc : count;
152 static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store);
154 static ssize_t qeth_dev_portname_show(struct device *dev,
155 struct device_attribute *attr, char *buf)
157 return sprintf(buf, "no portname required\n");
160 static ssize_t qeth_dev_portname_store(struct device *dev,
161 struct device_attribute *attr, const char *buf, size_t count)
163 struct qeth_card *card = dev_get_drvdata(dev);
165 dev_warn_once(&card->gdev->dev,
166 "portname is deprecated and is ignored\n");
167 return count;
170 static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show,
171 qeth_dev_portname_store);
173 static ssize_t qeth_dev_prioqing_show(struct device *dev,
174 struct device_attribute *attr, char *buf)
176 struct qeth_card *card = dev_get_drvdata(dev);
178 if (!card)
179 return -EINVAL;
181 switch (card->qdio.do_prio_queueing) {
182 case QETH_PRIO_Q_ING_PREC:
183 return sprintf(buf, "%s\n", "by precedence");
184 case QETH_PRIO_Q_ING_TOS:
185 return sprintf(buf, "%s\n", "by type of service");
186 case QETH_PRIO_Q_ING_SKB:
187 return sprintf(buf, "%s\n", "by skb-priority");
188 case QETH_PRIO_Q_ING_VLAN:
189 return sprintf(buf, "%s\n", "by VLAN headers");
190 default:
191 return sprintf(buf, "always queue %i\n",
192 card->qdio.default_out_queue);
196 static ssize_t qeth_dev_prioqing_store(struct device *dev,
197 struct device_attribute *attr, const char *buf, size_t count)
199 struct qeth_card *card = dev_get_drvdata(dev);
200 int rc = 0;
202 if (!card)
203 return -EINVAL;
205 mutex_lock(&card->conf_mutex);
206 if ((card->state != CARD_STATE_DOWN) &&
207 (card->state != CARD_STATE_RECOVER)) {
208 rc = -EPERM;
209 goto out;
212 /* check if 1920 devices are supported ,
213 * if though we have to permit priority queueing
215 if (card->qdio.no_out_queues == 1) {
216 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT;
217 rc = -EPERM;
218 goto out;
221 if (sysfs_streq(buf, "prio_queueing_prec")) {
222 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_PREC;
223 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
224 } else if (sysfs_streq(buf, "prio_queueing_skb")) {
225 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_SKB;
226 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
227 } else if (sysfs_streq(buf, "prio_queueing_tos")) {
228 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS;
229 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
230 } else if (sysfs_streq(buf, "prio_queueing_vlan")) {
231 if (!card->options.layer2) {
232 rc = -ENOTSUPP;
233 goto out;
235 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_VLAN;
236 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
237 } else if (sysfs_streq(buf, "no_prio_queueing:0")) {
238 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
239 card->qdio.default_out_queue = 0;
240 } else if (sysfs_streq(buf, "no_prio_queueing:1")) {
241 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
242 card->qdio.default_out_queue = 1;
243 } else if (sysfs_streq(buf, "no_prio_queueing:2")) {
244 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
245 card->qdio.default_out_queue = 2;
246 } else if (sysfs_streq(buf, "no_prio_queueing:3")) {
247 if (card->info.type == QETH_CARD_TYPE_IQD) {
248 rc = -EPERM;
249 goto out;
251 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
252 card->qdio.default_out_queue = 3;
253 } else if (sysfs_streq(buf, "no_prio_queueing")) {
254 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
255 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
256 } else
257 rc = -EINVAL;
258 out:
259 mutex_unlock(&card->conf_mutex);
260 return rc ? rc : count;
263 static DEVICE_ATTR(priority_queueing, 0644, qeth_dev_prioqing_show,
264 qeth_dev_prioqing_store);
266 static ssize_t qeth_dev_bufcnt_show(struct device *dev,
267 struct device_attribute *attr, char *buf)
269 struct qeth_card *card = dev_get_drvdata(dev);
271 if (!card)
272 return -EINVAL;
274 return sprintf(buf, "%i\n", card->qdio.in_buf_pool.buf_count);
277 static ssize_t qeth_dev_bufcnt_store(struct device *dev,
278 struct device_attribute *attr, const char *buf, size_t count)
280 struct qeth_card *card = dev_get_drvdata(dev);
281 char *tmp;
282 int cnt, old_cnt;
283 int rc = 0;
285 if (!card)
286 return -EINVAL;
288 mutex_lock(&card->conf_mutex);
289 if ((card->state != CARD_STATE_DOWN) &&
290 (card->state != CARD_STATE_RECOVER)) {
291 rc = -EPERM;
292 goto out;
295 old_cnt = card->qdio.in_buf_pool.buf_count;
296 cnt = simple_strtoul(buf, &tmp, 10);
297 cnt = (cnt < QETH_IN_BUF_COUNT_MIN) ? QETH_IN_BUF_COUNT_MIN :
298 ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt);
299 if (old_cnt != cnt) {
300 rc = qeth_realloc_buffer_pool(card, cnt);
302 out:
303 mutex_unlock(&card->conf_mutex);
304 return rc ? rc : count;
307 static DEVICE_ATTR(buffer_count, 0644, qeth_dev_bufcnt_show,
308 qeth_dev_bufcnt_store);
310 static ssize_t qeth_dev_recover_store(struct device *dev,
311 struct device_attribute *attr, const char *buf, size_t count)
313 struct qeth_card *card = dev_get_drvdata(dev);
314 char *tmp;
315 int i;
317 if (!card)
318 return -EINVAL;
320 if (card->state != CARD_STATE_UP)
321 return -EPERM;
323 i = simple_strtoul(buf, &tmp, 16);
324 if (i == 1)
325 qeth_schedule_recovery(card);
327 return count;
330 static DEVICE_ATTR(recover, 0200, NULL, qeth_dev_recover_store);
332 static ssize_t qeth_dev_performance_stats_show(struct device *dev,
333 struct device_attribute *attr, char *buf)
335 struct qeth_card *card = dev_get_drvdata(dev);
337 if (!card)
338 return -EINVAL;
340 return sprintf(buf, "%i\n", card->options.performance_stats ? 1:0);
343 static ssize_t qeth_dev_performance_stats_store(struct device *dev,
344 struct device_attribute *attr, const char *buf, size_t count)
346 struct qeth_card *card = dev_get_drvdata(dev);
347 char *tmp;
348 int i, rc = 0;
350 if (!card)
351 return -EINVAL;
353 mutex_lock(&card->conf_mutex);
354 i = simple_strtoul(buf, &tmp, 16);
355 if ((i == 0) || (i == 1)) {
356 if (i == card->options.performance_stats)
357 goto out;
358 card->options.performance_stats = i;
359 if (i == 0)
360 memset(&card->perf_stats, 0,
361 sizeof(struct qeth_perf_stats));
362 card->perf_stats.initial_rx_packets = card->stats.rx_packets;
363 card->perf_stats.initial_tx_packets = card->stats.tx_packets;
364 } else
365 rc = -EINVAL;
366 out:
367 mutex_unlock(&card->conf_mutex);
368 return rc ? rc : count;
371 static DEVICE_ATTR(performance_stats, 0644, qeth_dev_performance_stats_show,
372 qeth_dev_performance_stats_store);
374 static ssize_t qeth_dev_layer2_show(struct device *dev,
375 struct device_attribute *attr, char *buf)
377 struct qeth_card *card = dev_get_drvdata(dev);
379 if (!card)
380 return -EINVAL;
382 return sprintf(buf, "%i\n", card->options.layer2);
385 static ssize_t qeth_dev_layer2_store(struct device *dev,
386 struct device_attribute *attr, const char *buf, size_t count)
388 struct qeth_card *card = dev_get_drvdata(dev);
389 struct net_device *ndev;
390 char *tmp;
391 int i, rc = 0;
392 enum qeth_discipline_id newdis;
394 if (!card)
395 return -EINVAL;
397 mutex_lock(&card->discipline_mutex);
398 if (card->state != CARD_STATE_DOWN) {
399 rc = -EPERM;
400 goto out;
403 i = simple_strtoul(buf, &tmp, 16);
404 switch (i) {
405 case 0:
406 newdis = QETH_DISCIPLINE_LAYER3;
407 break;
408 case 1:
409 newdis = QETH_DISCIPLINE_LAYER2;
410 break;
411 default:
412 rc = -EINVAL;
413 goto out;
416 if (card->options.layer2 == newdis)
417 goto out;
418 if (card->info.layer_enforced) {
419 /* fixed layer, can't switch */
420 rc = -EOPNOTSUPP;
421 goto out;
424 card->info.mac_bits = 0;
425 if (card->discipline) {
426 /* start with a new, pristine netdevice: */
427 ndev = qeth_clone_netdev(card->dev);
428 if (!ndev) {
429 rc = -ENOMEM;
430 goto out;
433 card->discipline->remove(card->gdev);
434 qeth_core_free_discipline(card);
435 card->options.layer2 = -1;
437 free_netdev(card->dev);
438 card->dev = ndev;
441 rc = qeth_core_load_discipline(card, newdis);
442 if (rc)
443 goto out;
445 rc = card->discipline->setup(card->gdev);
446 if (rc)
447 qeth_core_free_discipline(card);
448 out:
449 mutex_unlock(&card->discipline_mutex);
450 return rc ? rc : count;
453 static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show,
454 qeth_dev_layer2_store);
456 #define ATTR_QETH_ISOLATION_NONE ("none")
457 #define ATTR_QETH_ISOLATION_FWD ("forward")
458 #define ATTR_QETH_ISOLATION_DROP ("drop")
460 static ssize_t qeth_dev_isolation_show(struct device *dev,
461 struct device_attribute *attr, char *buf)
463 struct qeth_card *card = dev_get_drvdata(dev);
465 if (!card)
466 return -EINVAL;
468 switch (card->options.isolation) {
469 case ISOLATION_MODE_NONE:
470 return snprintf(buf, 6, "%s\n", ATTR_QETH_ISOLATION_NONE);
471 case ISOLATION_MODE_FWD:
472 return snprintf(buf, 9, "%s\n", ATTR_QETH_ISOLATION_FWD);
473 case ISOLATION_MODE_DROP:
474 return snprintf(buf, 6, "%s\n", ATTR_QETH_ISOLATION_DROP);
475 default:
476 return snprintf(buf, 5, "%s\n", "N/A");
480 static ssize_t qeth_dev_isolation_store(struct device *dev,
481 struct device_attribute *attr, const char *buf, size_t count)
483 struct qeth_card *card = dev_get_drvdata(dev);
484 enum qeth_ipa_isolation_modes isolation;
485 int rc = 0;
487 if (!card)
488 return -EINVAL;
490 mutex_lock(&card->conf_mutex);
491 if (card->info.type != QETH_CARD_TYPE_OSD &&
492 card->info.type != QETH_CARD_TYPE_OSX) {
493 rc = -EOPNOTSUPP;
494 dev_err(&card->gdev->dev, "Adapter does not "
495 "support QDIO data connection isolation\n");
496 goto out;
499 /* parse input into isolation mode */
500 if (sysfs_streq(buf, ATTR_QETH_ISOLATION_NONE)) {
501 isolation = ISOLATION_MODE_NONE;
502 } else if (sysfs_streq(buf, ATTR_QETH_ISOLATION_FWD)) {
503 isolation = ISOLATION_MODE_FWD;
504 } else if (sysfs_streq(buf, ATTR_QETH_ISOLATION_DROP)) {
505 isolation = ISOLATION_MODE_DROP;
506 } else {
507 rc = -EINVAL;
508 goto out;
510 rc = count;
512 /* defer IP assist if device is offline (until discipline->set_online)*/
513 card->options.prev_isolation = card->options.isolation;
514 card->options.isolation = isolation;
515 if (qeth_card_hw_is_reachable(card)) {
516 int ipa_rc = qeth_set_access_ctrl_online(card, 1);
517 if (ipa_rc != 0)
518 rc = ipa_rc;
520 out:
521 mutex_unlock(&card->conf_mutex);
522 return rc;
525 static DEVICE_ATTR(isolation, 0644, qeth_dev_isolation_show,
526 qeth_dev_isolation_store);
528 static ssize_t qeth_dev_switch_attrs_show(struct device *dev,
529 struct device_attribute *attr, char *buf)
531 struct qeth_card *card = dev_get_drvdata(dev);
532 struct qeth_switch_info sw_info;
533 int rc = 0;
535 if (!card)
536 return -EINVAL;
538 if (!qeth_card_hw_is_reachable(card))
539 return sprintf(buf, "n/a\n");
541 rc = qeth_query_switch_attributes(card, &sw_info);
542 if (rc)
543 return rc;
545 if (!sw_info.capabilities)
546 rc = sprintf(buf, "unknown");
548 if (sw_info.capabilities & QETH_SWITCH_FORW_802_1)
549 rc = sprintf(buf, (sw_info.settings & QETH_SWITCH_FORW_802_1 ?
550 "[802.1]" : "802.1"));
551 if (sw_info.capabilities & QETH_SWITCH_FORW_REFL_RELAY)
552 rc += sprintf(buf + rc,
553 (sw_info.settings & QETH_SWITCH_FORW_REFL_RELAY ?
554 " [rr]" : " rr"));
555 rc += sprintf(buf + rc, "\n");
557 return rc;
560 static DEVICE_ATTR(switch_attrs, 0444,
561 qeth_dev_switch_attrs_show, NULL);
563 static ssize_t qeth_hw_trap_show(struct device *dev,
564 struct device_attribute *attr, char *buf)
566 struct qeth_card *card = dev_get_drvdata(dev);
568 if (!card)
569 return -EINVAL;
570 if (card->info.hwtrap)
571 return snprintf(buf, 5, "arm\n");
572 else
573 return snprintf(buf, 8, "disarm\n");
576 static ssize_t qeth_hw_trap_store(struct device *dev,
577 struct device_attribute *attr, const char *buf, size_t count)
579 struct qeth_card *card = dev_get_drvdata(dev);
580 int rc = 0;
581 int state = 0;
583 if (!card)
584 return -EINVAL;
586 mutex_lock(&card->conf_mutex);
587 if (qeth_card_hw_is_reachable(card))
588 state = 1;
590 if (sysfs_streq(buf, "arm") && !card->info.hwtrap) {
591 if (state) {
592 if (qeth_is_diagass_supported(card,
593 QETH_DIAGS_CMD_TRAP)) {
594 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_ARM);
595 if (!rc)
596 card->info.hwtrap = 1;
597 } else
598 rc = -EINVAL;
599 } else
600 card->info.hwtrap = 1;
601 } else if (sysfs_streq(buf, "disarm") && card->info.hwtrap) {
602 if (state) {
603 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
604 if (!rc)
605 card->info.hwtrap = 0;
606 } else
607 card->info.hwtrap = 0;
608 } else if (sysfs_streq(buf, "trap") && state && card->info.hwtrap)
609 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_CAPTURE);
610 else
611 rc = -EINVAL;
613 mutex_unlock(&card->conf_mutex);
614 return rc ? rc : count;
617 static DEVICE_ATTR(hw_trap, 0644, qeth_hw_trap_show,
618 qeth_hw_trap_store);
620 static ssize_t qeth_dev_blkt_show(char *buf, struct qeth_card *card, int value)
623 if (!card)
624 return -EINVAL;
626 return sprintf(buf, "%i\n", value);
629 static ssize_t qeth_dev_blkt_store(struct qeth_card *card,
630 const char *buf, size_t count, int *value, int max_value)
632 char *tmp;
633 int i, rc = 0;
635 if (!card)
636 return -EINVAL;
638 mutex_lock(&card->conf_mutex);
639 if ((card->state != CARD_STATE_DOWN) &&
640 (card->state != CARD_STATE_RECOVER)) {
641 rc = -EPERM;
642 goto out;
644 i = simple_strtoul(buf, &tmp, 10);
645 if (i <= max_value)
646 *value = i;
647 else
648 rc = -EINVAL;
649 out:
650 mutex_unlock(&card->conf_mutex);
651 return rc ? rc : count;
654 static ssize_t qeth_dev_blkt_total_show(struct device *dev,
655 struct device_attribute *attr, char *buf)
657 struct qeth_card *card = dev_get_drvdata(dev);
659 return qeth_dev_blkt_show(buf, card, card->info.blkt.time_total);
662 static ssize_t qeth_dev_blkt_total_store(struct device *dev,
663 struct device_attribute *attr, const char *buf, size_t count)
665 struct qeth_card *card = dev_get_drvdata(dev);
667 return qeth_dev_blkt_store(card, buf, count,
668 &card->info.blkt.time_total, 5000);
673 static DEVICE_ATTR(total, 0644, qeth_dev_blkt_total_show,
674 qeth_dev_blkt_total_store);
676 static ssize_t qeth_dev_blkt_inter_show(struct device *dev,
677 struct device_attribute *attr, char *buf)
679 struct qeth_card *card = dev_get_drvdata(dev);
681 return qeth_dev_blkt_show(buf, card, card->info.blkt.inter_packet);
684 static ssize_t qeth_dev_blkt_inter_store(struct device *dev,
685 struct device_attribute *attr, const char *buf, size_t count)
687 struct qeth_card *card = dev_get_drvdata(dev);
689 return qeth_dev_blkt_store(card, buf, count,
690 &card->info.blkt.inter_packet, 1000);
693 static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show,
694 qeth_dev_blkt_inter_store);
696 static ssize_t qeth_dev_blkt_inter_jumbo_show(struct device *dev,
697 struct device_attribute *attr, char *buf)
699 struct qeth_card *card = dev_get_drvdata(dev);
701 return qeth_dev_blkt_show(buf, card,
702 card->info.blkt.inter_packet_jumbo);
705 static ssize_t qeth_dev_blkt_inter_jumbo_store(struct device *dev,
706 struct device_attribute *attr, const char *buf, size_t count)
708 struct qeth_card *card = dev_get_drvdata(dev);
710 return qeth_dev_blkt_store(card, buf, count,
711 &card->info.blkt.inter_packet_jumbo, 1000);
714 static DEVICE_ATTR(inter_jumbo, 0644, qeth_dev_blkt_inter_jumbo_show,
715 qeth_dev_blkt_inter_jumbo_store);
717 static struct attribute *qeth_blkt_device_attrs[] = {
718 &dev_attr_total.attr,
719 &dev_attr_inter.attr,
720 &dev_attr_inter_jumbo.attr,
721 NULL,
723 const struct attribute_group qeth_device_blkt_group = {
724 .name = "blkt",
725 .attrs = qeth_blkt_device_attrs,
727 EXPORT_SYMBOL_GPL(qeth_device_blkt_group);
729 static struct attribute *qeth_device_attrs[] = {
730 &dev_attr_state.attr,
731 &dev_attr_chpid.attr,
732 &dev_attr_if_name.attr,
733 &dev_attr_card_type.attr,
734 &dev_attr_inbuf_size.attr,
735 &dev_attr_portno.attr,
736 &dev_attr_portname.attr,
737 &dev_attr_priority_queueing.attr,
738 &dev_attr_buffer_count.attr,
739 &dev_attr_recover.attr,
740 &dev_attr_performance_stats.attr,
741 &dev_attr_layer2.attr,
742 &dev_attr_isolation.attr,
743 &dev_attr_hw_trap.attr,
744 &dev_attr_switch_attrs.attr,
745 NULL,
747 const struct attribute_group qeth_device_attr_group = {
748 .attrs = qeth_device_attrs,
750 EXPORT_SYMBOL_GPL(qeth_device_attr_group);
752 const struct attribute_group *qeth_generic_attr_groups[] = {
753 &qeth_device_attr_group,
754 &qeth_device_blkt_group,
755 NULL,
758 static struct attribute *qeth_osn_device_attrs[] = {
759 &dev_attr_state.attr,
760 &dev_attr_chpid.attr,
761 &dev_attr_if_name.attr,
762 &dev_attr_card_type.attr,
763 &dev_attr_buffer_count.attr,
764 &dev_attr_recover.attr,
765 NULL,
767 static struct attribute_group qeth_osn_device_attr_group = {
768 .attrs = qeth_osn_device_attrs,
770 const struct attribute_group *qeth_osn_attr_groups[] = {
771 &qeth_osn_device_attr_group,
772 NULL,