2 * Copyright IBM Corp. 2007
3 * Author(s): Utz Bacher <utz.bacher@de.ibm.com>,
4 * Frank Pavlic <fpavlic@de.ibm.com>,
5 * Thomas Spatzier <tspat@de.ibm.com>,
6 * Frank Blaschka <frank.blaschka@de.ibm.com>
9 #define KMSG_COMPONENT "qeth"
10 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
12 #include <linux/list.h>
13 #include <linux/rwsem.h>
14 #include <asm/ebcdic.h>
16 #include "qeth_core.h"
18 static ssize_t
qeth_dev_state_show(struct device
*dev
,
19 struct device_attribute
*attr
, char *buf
)
21 struct qeth_card
*card
= dev_get_drvdata(dev
);
25 switch (card
->state
) {
27 return sprintf(buf
, "DOWN\n");
28 case CARD_STATE_HARDSETUP
:
29 return sprintf(buf
, "HARDSETUP\n");
30 case CARD_STATE_SOFTSETUP
:
31 return sprintf(buf
, "SOFTSETUP\n");
34 return sprintf(buf
, "UP (LAN ONLINE)\n");
36 return sprintf(buf
, "UP (LAN OFFLINE)\n");
37 case CARD_STATE_RECOVER
:
38 return sprintf(buf
, "RECOVER\n");
40 return sprintf(buf
, "UNKNOWN\n");
44 static DEVICE_ATTR(state
, 0444, qeth_dev_state_show
, NULL
);
46 static ssize_t
qeth_dev_chpid_show(struct device
*dev
,
47 struct device_attribute
*attr
, char *buf
)
49 struct qeth_card
*card
= dev_get_drvdata(dev
);
53 return sprintf(buf
, "%02X\n", card
->info
.chpid
);
56 static DEVICE_ATTR(chpid
, 0444, qeth_dev_chpid_show
, NULL
);
58 static ssize_t
qeth_dev_if_name_show(struct device
*dev
,
59 struct device_attribute
*attr
, char *buf
)
61 struct qeth_card
*card
= dev_get_drvdata(dev
);
64 return sprintf(buf
, "%s\n", QETH_CARD_IFNAME(card
));
67 static DEVICE_ATTR(if_name
, 0444, qeth_dev_if_name_show
, NULL
);
69 static ssize_t
qeth_dev_card_type_show(struct device
*dev
,
70 struct device_attribute
*attr
, char *buf
)
72 struct qeth_card
*card
= dev_get_drvdata(dev
);
76 return sprintf(buf
, "%s\n", qeth_get_cardname_short(card
));
79 static DEVICE_ATTR(card_type
, 0444, qeth_dev_card_type_show
, NULL
);
81 static inline const char *qeth_get_bufsize_str(struct qeth_card
*card
)
83 if (card
->qdio
.in_buf_size
== 16384)
85 else if (card
->qdio
.in_buf_size
== 24576)
87 else if (card
->qdio
.in_buf_size
== 32768)
89 else if (card
->qdio
.in_buf_size
== 40960)
95 static ssize_t
qeth_dev_inbuf_size_show(struct device
*dev
,
96 struct device_attribute
*attr
, char *buf
)
98 struct qeth_card
*card
= dev_get_drvdata(dev
);
102 return sprintf(buf
, "%s\n", qeth_get_bufsize_str(card
));
105 static DEVICE_ATTR(inbuf_size
, 0444, qeth_dev_inbuf_size_show
, NULL
);
107 static ssize_t
qeth_dev_portno_show(struct device
*dev
,
108 struct device_attribute
*attr
, char *buf
)
110 struct qeth_card
*card
= dev_get_drvdata(dev
);
114 return sprintf(buf
, "%i\n", card
->info
.portno
);
117 static ssize_t
qeth_dev_portno_store(struct device
*dev
,
118 struct device_attribute
*attr
, const char *buf
, size_t count
)
120 struct qeth_card
*card
= dev_get_drvdata(dev
);
122 unsigned int portno
, limit
;
128 mutex_lock(&card
->conf_mutex
);
129 if ((card
->state
!= CARD_STATE_DOWN
) &&
130 (card
->state
!= CARD_STATE_RECOVER
)) {
135 portno
= simple_strtoul(buf
, &tmp
, 16);
136 if (portno
> QETH_MAX_PORTNO
) {
140 limit
= (card
->ssqd
.pcnt
? card
->ssqd
.pcnt
- 1 : card
->ssqd
.pcnt
);
141 if (portno
> limit
) {
145 card
->info
.portno
= portno
;
147 mutex_unlock(&card
->conf_mutex
);
148 return rc
? rc
: count
;
151 static DEVICE_ATTR(portno
, 0644, qeth_dev_portno_show
, qeth_dev_portno_store
);
153 static ssize_t
qeth_dev_portname_show(struct device
*dev
,
154 struct device_attribute
*attr
, char *buf
)
156 struct qeth_card
*card
= dev_get_drvdata(dev
);
157 char portname
[9] = {0, };
162 if (card
->info
.portname_required
) {
163 memcpy(portname
, card
->info
.portname
+ 1, 8);
165 return sprintf(buf
, "%s\n", portname
);
167 return sprintf(buf
, "no portname required\n");
170 static ssize_t
qeth_dev_portname_store(struct device
*dev
,
171 struct device_attribute
*attr
, const char *buf
, size_t count
)
173 struct qeth_card
*card
= dev_get_drvdata(dev
);
180 mutex_lock(&card
->conf_mutex
);
181 if ((card
->state
!= CARD_STATE_DOWN
) &&
182 (card
->state
!= CARD_STATE_RECOVER
)) {
187 tmp
= strsep((char **) &buf
, "\n");
188 if ((strlen(tmp
) > 8) || (strlen(tmp
) == 0)) {
193 card
->info
.portname
[0] = strlen(tmp
);
194 /* for beauty reasons */
195 for (i
= 1; i
< 9; i
++)
196 card
->info
.portname
[i
] = ' ';
197 strcpy(card
->info
.portname
+ 1, tmp
);
198 ASCEBC(card
->info
.portname
+ 1, 8);
200 mutex_unlock(&card
->conf_mutex
);
201 return rc
? rc
: count
;
204 static DEVICE_ATTR(portname
, 0644, qeth_dev_portname_show
,
205 qeth_dev_portname_store
);
207 static ssize_t
qeth_dev_prioqing_show(struct device
*dev
,
208 struct device_attribute
*attr
, char *buf
)
210 struct qeth_card
*card
= dev_get_drvdata(dev
);
215 switch (card
->qdio
.do_prio_queueing
) {
216 case QETH_PRIO_Q_ING_PREC
:
217 return sprintf(buf
, "%s\n", "by precedence");
218 case QETH_PRIO_Q_ING_TOS
:
219 return sprintf(buf
, "%s\n", "by type of service");
220 case QETH_PRIO_Q_ING_SKB
:
221 return sprintf(buf
, "%s\n", "by skb-priority");
222 case QETH_PRIO_Q_ING_VLAN
:
223 return sprintf(buf
, "%s\n", "by VLAN headers");
225 return sprintf(buf
, "always queue %i\n",
226 card
->qdio
.default_out_queue
);
230 static ssize_t
qeth_dev_prioqing_store(struct device
*dev
,
231 struct device_attribute
*attr
, const char *buf
, size_t count
)
233 struct qeth_card
*card
= dev_get_drvdata(dev
);
239 mutex_lock(&card
->conf_mutex
);
240 if ((card
->state
!= CARD_STATE_DOWN
) &&
241 (card
->state
!= CARD_STATE_RECOVER
)) {
246 /* check if 1920 devices are supported ,
247 * if though we have to permit priority queueing
249 if (card
->qdio
.no_out_queues
== 1) {
250 card
->qdio
.do_prio_queueing
= QETH_PRIOQ_DEFAULT
;
255 if (sysfs_streq(buf
, "prio_queueing_prec")) {
256 card
->qdio
.do_prio_queueing
= QETH_PRIO_Q_ING_PREC
;
257 card
->qdio
.default_out_queue
= QETH_DEFAULT_QUEUE
;
258 } else if (sysfs_streq(buf
, "prio_queueing_skb")) {
259 card
->qdio
.do_prio_queueing
= QETH_PRIO_Q_ING_SKB
;
260 card
->qdio
.default_out_queue
= QETH_DEFAULT_QUEUE
;
261 } else if (sysfs_streq(buf
, "prio_queueing_tos")) {
262 card
->qdio
.do_prio_queueing
= QETH_PRIO_Q_ING_TOS
;
263 card
->qdio
.default_out_queue
= QETH_DEFAULT_QUEUE
;
264 } else if (sysfs_streq(buf
, "prio_queueing_vlan")) {
265 if (!card
->options
.layer2
) {
269 card
->qdio
.do_prio_queueing
= QETH_PRIO_Q_ING_VLAN
;
270 card
->qdio
.default_out_queue
= QETH_DEFAULT_QUEUE
;
271 } else if (sysfs_streq(buf
, "no_prio_queueing:0")) {
272 card
->qdio
.do_prio_queueing
= QETH_NO_PRIO_QUEUEING
;
273 card
->qdio
.default_out_queue
= 0;
274 } else if (sysfs_streq(buf
, "no_prio_queueing:1")) {
275 card
->qdio
.do_prio_queueing
= QETH_NO_PRIO_QUEUEING
;
276 card
->qdio
.default_out_queue
= 1;
277 } else if (sysfs_streq(buf
, "no_prio_queueing:2")) {
278 card
->qdio
.do_prio_queueing
= QETH_NO_PRIO_QUEUEING
;
279 card
->qdio
.default_out_queue
= 2;
280 } else if (sysfs_streq(buf
, "no_prio_queueing:3")) {
281 card
->qdio
.do_prio_queueing
= QETH_NO_PRIO_QUEUEING
;
282 card
->qdio
.default_out_queue
= 3;
283 } else if (sysfs_streq(buf
, "no_prio_queueing")) {
284 card
->qdio
.do_prio_queueing
= QETH_NO_PRIO_QUEUEING
;
285 card
->qdio
.default_out_queue
= QETH_DEFAULT_QUEUE
;
289 mutex_unlock(&card
->conf_mutex
);
290 return rc
? rc
: count
;
293 static DEVICE_ATTR(priority_queueing
, 0644, qeth_dev_prioqing_show
,
294 qeth_dev_prioqing_store
);
296 static ssize_t
qeth_dev_bufcnt_show(struct device
*dev
,
297 struct device_attribute
*attr
, char *buf
)
299 struct qeth_card
*card
= dev_get_drvdata(dev
);
304 return sprintf(buf
, "%i\n", card
->qdio
.in_buf_pool
.buf_count
);
307 static ssize_t
qeth_dev_bufcnt_store(struct device
*dev
,
308 struct device_attribute
*attr
, const char *buf
, size_t count
)
310 struct qeth_card
*card
= dev_get_drvdata(dev
);
318 mutex_lock(&card
->conf_mutex
);
319 if ((card
->state
!= CARD_STATE_DOWN
) &&
320 (card
->state
!= CARD_STATE_RECOVER
)) {
325 old_cnt
= card
->qdio
.in_buf_pool
.buf_count
;
326 cnt
= simple_strtoul(buf
, &tmp
, 10);
327 cnt
= (cnt
< QETH_IN_BUF_COUNT_MIN
) ? QETH_IN_BUF_COUNT_MIN
:
328 ((cnt
> QETH_IN_BUF_COUNT_MAX
) ? QETH_IN_BUF_COUNT_MAX
: cnt
);
329 if (old_cnt
!= cnt
) {
330 rc
= qeth_realloc_buffer_pool(card
, cnt
);
333 mutex_unlock(&card
->conf_mutex
);
334 return rc
? rc
: count
;
337 static DEVICE_ATTR(buffer_count
, 0644, qeth_dev_bufcnt_show
,
338 qeth_dev_bufcnt_store
);
340 static ssize_t
qeth_dev_recover_store(struct device
*dev
,
341 struct device_attribute
*attr
, const char *buf
, size_t count
)
343 struct qeth_card
*card
= dev_get_drvdata(dev
);
350 if (card
->state
!= CARD_STATE_UP
)
353 i
= simple_strtoul(buf
, &tmp
, 16);
355 qeth_schedule_recovery(card
);
360 static DEVICE_ATTR(recover
, 0200, NULL
, qeth_dev_recover_store
);
362 static ssize_t
qeth_dev_performance_stats_show(struct device
*dev
,
363 struct device_attribute
*attr
, char *buf
)
365 struct qeth_card
*card
= dev_get_drvdata(dev
);
370 return sprintf(buf
, "%i\n", card
->options
.performance_stats
? 1:0);
373 static ssize_t
qeth_dev_performance_stats_store(struct device
*dev
,
374 struct device_attribute
*attr
, const char *buf
, size_t count
)
376 struct qeth_card
*card
= dev_get_drvdata(dev
);
383 mutex_lock(&card
->conf_mutex
);
384 i
= simple_strtoul(buf
, &tmp
, 16);
385 if ((i
== 0) || (i
== 1)) {
386 if (i
== card
->options
.performance_stats
)
388 card
->options
.performance_stats
= i
;
390 memset(&card
->perf_stats
, 0,
391 sizeof(struct qeth_perf_stats
));
392 card
->perf_stats
.initial_rx_packets
= card
->stats
.rx_packets
;
393 card
->perf_stats
.initial_tx_packets
= card
->stats
.tx_packets
;
397 mutex_unlock(&card
->conf_mutex
);
398 return rc
? rc
: count
;
401 static DEVICE_ATTR(performance_stats
, 0644, qeth_dev_performance_stats_show
,
402 qeth_dev_performance_stats_store
);
404 static ssize_t
qeth_dev_layer2_show(struct device
*dev
,
405 struct device_attribute
*attr
, char *buf
)
407 struct qeth_card
*card
= dev_get_drvdata(dev
);
412 return sprintf(buf
, "%i\n", card
->options
.layer2
);
415 static ssize_t
qeth_dev_layer2_store(struct device
*dev
,
416 struct device_attribute
*attr
, const char *buf
, size_t count
)
418 struct qeth_card
*card
= dev_get_drvdata(dev
);
421 enum qeth_discipline_id newdis
;
426 mutex_lock(&card
->discipline_mutex
);
427 if (card
->state
!= CARD_STATE_DOWN
) {
432 i
= simple_strtoul(buf
, &tmp
, 16);
435 newdis
= QETH_DISCIPLINE_LAYER3
;
438 newdis
= QETH_DISCIPLINE_LAYER2
;
445 if (card
->options
.layer2
== newdis
)
448 card
->info
.mac_bits
= 0;
449 if (card
->discipline
) {
450 card
->discipline
->remove(card
->gdev
);
451 qeth_core_free_discipline(card
);
455 rc
= qeth_core_load_discipline(card
, newdis
);
459 rc
= card
->discipline
->setup(card
->gdev
);
461 mutex_unlock(&card
->discipline_mutex
);
462 return rc
? rc
: count
;
465 static DEVICE_ATTR(layer2
, 0644, qeth_dev_layer2_show
,
466 qeth_dev_layer2_store
);
468 #define ATTR_QETH_ISOLATION_NONE ("none")
469 #define ATTR_QETH_ISOLATION_FWD ("forward")
470 #define ATTR_QETH_ISOLATION_DROP ("drop")
472 static ssize_t
qeth_dev_isolation_show(struct device
*dev
,
473 struct device_attribute
*attr
, char *buf
)
475 struct qeth_card
*card
= dev_get_drvdata(dev
);
480 switch (card
->options
.isolation
) {
481 case ISOLATION_MODE_NONE
:
482 return snprintf(buf
, 6, "%s\n", ATTR_QETH_ISOLATION_NONE
);
483 case ISOLATION_MODE_FWD
:
484 return snprintf(buf
, 9, "%s\n", ATTR_QETH_ISOLATION_FWD
);
485 case ISOLATION_MODE_DROP
:
486 return snprintf(buf
, 6, "%s\n", ATTR_QETH_ISOLATION_DROP
);
488 return snprintf(buf
, 5, "%s\n", "N/A");
492 static ssize_t
qeth_dev_isolation_store(struct device
*dev
,
493 struct device_attribute
*attr
, const char *buf
, size_t count
)
495 struct qeth_card
*card
= dev_get_drvdata(dev
);
496 enum qeth_ipa_isolation_modes isolation
;
502 mutex_lock(&card
->conf_mutex
);
503 /* check for unknown, too, in case we do not yet know who we are */
504 if (card
->info
.type
!= QETH_CARD_TYPE_OSD
&&
505 card
->info
.type
!= QETH_CARD_TYPE_OSX
&&
506 card
->info
.type
!= QETH_CARD_TYPE_UNKNOWN
) {
508 dev_err(&card
->gdev
->dev
, "Adapter does not "
509 "support QDIO data connection isolation\n");
513 /* parse input into isolation mode */
514 if (sysfs_streq(buf
, ATTR_QETH_ISOLATION_NONE
)) {
515 isolation
= ISOLATION_MODE_NONE
;
516 } else if (sysfs_streq(buf
, ATTR_QETH_ISOLATION_FWD
)) {
517 isolation
= ISOLATION_MODE_FWD
;
518 } else if (sysfs_streq(buf
, ATTR_QETH_ISOLATION_DROP
)) {
519 isolation
= ISOLATION_MODE_DROP
;
526 /* defer IP assist if device is offline (until discipline->set_online)*/
527 card
->options
.prev_isolation
= card
->options
.isolation
;
528 card
->options
.isolation
= isolation
;
529 if (qeth_card_hw_is_reachable(card
)) {
530 int ipa_rc
= qeth_set_access_ctrl_online(card
, 1);
535 mutex_unlock(&card
->conf_mutex
);
539 static DEVICE_ATTR(isolation
, 0644, qeth_dev_isolation_show
,
540 qeth_dev_isolation_store
);
542 static ssize_t
qeth_dev_switch_attrs_show(struct device
*dev
,
543 struct device_attribute
*attr
, char *buf
)
545 struct qeth_card
*card
= dev_get_drvdata(dev
);
546 struct qeth_switch_info sw_info
;
552 if (!qeth_card_hw_is_reachable(card
))
553 return sprintf(buf
, "n/a\n");
555 rc
= qeth_query_switch_attributes(card
, &sw_info
);
559 if (!sw_info
.capabilities
)
560 rc
= sprintf(buf
, "unknown");
562 if (sw_info
.capabilities
& QETH_SWITCH_FORW_802_1
)
563 rc
= sprintf(buf
, (sw_info
.settings
& QETH_SWITCH_FORW_802_1
?
564 "[802.1]" : "802.1"));
565 if (sw_info
.capabilities
& QETH_SWITCH_FORW_REFL_RELAY
)
566 rc
+= sprintf(buf
+ rc
,
567 (sw_info
.settings
& QETH_SWITCH_FORW_REFL_RELAY
?
569 rc
+= sprintf(buf
+ rc
, "\n");
574 static DEVICE_ATTR(switch_attrs
, 0444,
575 qeth_dev_switch_attrs_show
, NULL
);
577 static ssize_t
qeth_hw_trap_show(struct device
*dev
,
578 struct device_attribute
*attr
, char *buf
)
580 struct qeth_card
*card
= dev_get_drvdata(dev
);
584 if (card
->info
.hwtrap
)
585 return snprintf(buf
, 5, "arm\n");
587 return snprintf(buf
, 8, "disarm\n");
590 static ssize_t
qeth_hw_trap_store(struct device
*dev
,
591 struct device_attribute
*attr
, const char *buf
, size_t count
)
593 struct qeth_card
*card
= dev_get_drvdata(dev
);
600 mutex_lock(&card
->conf_mutex
);
601 if (qeth_card_hw_is_reachable(card
))
604 if (sysfs_streq(buf
, "arm") && !card
->info
.hwtrap
) {
606 if (qeth_is_diagass_supported(card
,
607 QETH_DIAGS_CMD_TRAP
)) {
608 rc
= qeth_hw_trap(card
, QETH_DIAGS_TRAP_ARM
);
610 card
->info
.hwtrap
= 1;
614 card
->info
.hwtrap
= 1;
615 } else if (sysfs_streq(buf
, "disarm") && card
->info
.hwtrap
) {
617 rc
= qeth_hw_trap(card
, QETH_DIAGS_TRAP_DISARM
);
619 card
->info
.hwtrap
= 0;
621 card
->info
.hwtrap
= 0;
622 } else if (sysfs_streq(buf
, "trap") && state
&& card
->info
.hwtrap
)
623 rc
= qeth_hw_trap(card
, QETH_DIAGS_TRAP_CAPTURE
);
627 mutex_unlock(&card
->conf_mutex
);
628 return rc
? rc
: count
;
631 static DEVICE_ATTR(hw_trap
, 0644, qeth_hw_trap_show
,
634 static ssize_t
qeth_dev_blkt_show(char *buf
, struct qeth_card
*card
, int value
)
640 return sprintf(buf
, "%i\n", value
);
643 static ssize_t
qeth_dev_blkt_store(struct qeth_card
*card
,
644 const char *buf
, size_t count
, int *value
, int max_value
)
652 mutex_lock(&card
->conf_mutex
);
653 if ((card
->state
!= CARD_STATE_DOWN
) &&
654 (card
->state
!= CARD_STATE_RECOVER
)) {
658 i
= simple_strtoul(buf
, &tmp
, 10);
664 mutex_unlock(&card
->conf_mutex
);
665 return rc
? rc
: count
;
668 static ssize_t
qeth_dev_blkt_total_show(struct device
*dev
,
669 struct device_attribute
*attr
, char *buf
)
671 struct qeth_card
*card
= dev_get_drvdata(dev
);
673 return qeth_dev_blkt_show(buf
, card
, card
->info
.blkt
.time_total
);
676 static ssize_t
qeth_dev_blkt_total_store(struct device
*dev
,
677 struct device_attribute
*attr
, const char *buf
, size_t count
)
679 struct qeth_card
*card
= dev_get_drvdata(dev
);
681 return qeth_dev_blkt_store(card
, buf
, count
,
682 &card
->info
.blkt
.time_total
, 5000);
687 static DEVICE_ATTR(total
, 0644, qeth_dev_blkt_total_show
,
688 qeth_dev_blkt_total_store
);
690 static ssize_t
qeth_dev_blkt_inter_show(struct device
*dev
,
691 struct device_attribute
*attr
, char *buf
)
693 struct qeth_card
*card
= dev_get_drvdata(dev
);
695 return qeth_dev_blkt_show(buf
, card
, card
->info
.blkt
.inter_packet
);
698 static ssize_t
qeth_dev_blkt_inter_store(struct device
*dev
,
699 struct device_attribute
*attr
, const char *buf
, size_t count
)
701 struct qeth_card
*card
= dev_get_drvdata(dev
);
703 return qeth_dev_blkt_store(card
, buf
, count
,
704 &card
->info
.blkt
.inter_packet
, 1000);
707 static DEVICE_ATTR(inter
, 0644, qeth_dev_blkt_inter_show
,
708 qeth_dev_blkt_inter_store
);
710 static ssize_t
qeth_dev_blkt_inter_jumbo_show(struct device
*dev
,
711 struct device_attribute
*attr
, char *buf
)
713 struct qeth_card
*card
= dev_get_drvdata(dev
);
715 return qeth_dev_blkt_show(buf
, card
,
716 card
->info
.blkt
.inter_packet_jumbo
);
719 static ssize_t
qeth_dev_blkt_inter_jumbo_store(struct device
*dev
,
720 struct device_attribute
*attr
, const char *buf
, size_t count
)
722 struct qeth_card
*card
= dev_get_drvdata(dev
);
724 return qeth_dev_blkt_store(card
, buf
, count
,
725 &card
->info
.blkt
.inter_packet_jumbo
, 1000);
728 static DEVICE_ATTR(inter_jumbo
, 0644, qeth_dev_blkt_inter_jumbo_show
,
729 qeth_dev_blkt_inter_jumbo_store
);
731 static struct attribute
*qeth_blkt_device_attrs
[] = {
732 &dev_attr_total
.attr
,
733 &dev_attr_inter
.attr
,
734 &dev_attr_inter_jumbo
.attr
,
737 static struct attribute_group qeth_device_blkt_group
= {
739 .attrs
= qeth_blkt_device_attrs
,
742 static struct attribute
*qeth_device_attrs
[] = {
743 &dev_attr_state
.attr
,
744 &dev_attr_chpid
.attr
,
745 &dev_attr_if_name
.attr
,
746 &dev_attr_card_type
.attr
,
747 &dev_attr_inbuf_size
.attr
,
748 &dev_attr_portno
.attr
,
749 &dev_attr_portname
.attr
,
750 &dev_attr_priority_queueing
.attr
,
751 &dev_attr_buffer_count
.attr
,
752 &dev_attr_recover
.attr
,
753 &dev_attr_performance_stats
.attr
,
754 &dev_attr_layer2
.attr
,
755 &dev_attr_isolation
.attr
,
756 &dev_attr_hw_trap
.attr
,
757 &dev_attr_switch_attrs
.attr
,
760 static struct attribute_group qeth_device_attr_group
= {
761 .attrs
= qeth_device_attrs
,
764 const struct attribute_group
*qeth_generic_attr_groups
[] = {
765 &qeth_device_attr_group
,
766 &qeth_device_blkt_group
,
770 static struct attribute
*qeth_osn_device_attrs
[] = {
771 &dev_attr_state
.attr
,
772 &dev_attr_chpid
.attr
,
773 &dev_attr_if_name
.attr
,
774 &dev_attr_card_type
.attr
,
775 &dev_attr_buffer_count
.attr
,
776 &dev_attr_recover
.attr
,
779 static struct attribute_group qeth_osn_device_attr_group
= {
780 .attrs
= qeth_osn_device_attrs
,
782 const struct attribute_group
*qeth_osn_attr_groups
[] = {
783 &qeth_osn_device_attr_group
,