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 */ 9 10 #define KMSG_COMPONENT "qeth" 11 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt 12 13 #include <linux/list.h> 14 #include <linux/rwsem.h> 15 #include <asm/ebcdic.h> 16 17 #include "qeth_core.h" 18 19 static ssize_t qeth_dev_state_show(struct device *dev, 20 struct device_attribute *attr, char *buf) 21 { 22 struct qeth_card *card = dev_get_drvdata(dev); 23 24 switch (card->state) { 25 case CARD_STATE_DOWN: 26 return sprintf(buf, "DOWN\n"); 27 case CARD_STATE_SOFTSETUP: 28 if (card->dev->flags & IFF_UP) 29 return sprintf(buf, "UP (LAN %s)\n", 30 netif_carrier_ok(card->dev) ? "ONLINE" : 31 "OFFLINE"); 32 return sprintf(buf, "SOFTSETUP\n"); 33 default: 34 return sprintf(buf, "UNKNOWN\n"); 35 } 36 } 37 38 static DEVICE_ATTR(state, 0444, qeth_dev_state_show, NULL); 39 40 static ssize_t qeth_dev_chpid_show(struct device *dev, 41 struct device_attribute *attr, char *buf) 42 { 43 struct qeth_card *card = dev_get_drvdata(dev); 44 45 return sprintf(buf, "%02X\n", card->info.chpid); 46 } 47 48 static DEVICE_ATTR(chpid, 0444, qeth_dev_chpid_show, NULL); 49 50 static ssize_t qeth_dev_if_name_show(struct device *dev, 51 struct device_attribute *attr, char *buf) 52 { 53 struct qeth_card *card = dev_get_drvdata(dev); 54 55 return sprintf(buf, "%s\n", QETH_CARD_IFNAME(card)); 56 } 57 58 static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL); 59 60 static ssize_t qeth_dev_card_type_show(struct device *dev, 61 struct device_attribute *attr, char *buf) 62 { 63 struct qeth_card *card = dev_get_drvdata(dev); 64 65 return sprintf(buf, "%s\n", qeth_get_cardname_short(card)); 66 } 67 68 static DEVICE_ATTR(card_type, 0444, qeth_dev_card_type_show, NULL); 69 70 static const char *qeth_get_bufsize_str(struct qeth_card *card) 71 { 72 if (card->qdio.in_buf_size == 16384) 73 return "16k"; 74 else if (card->qdio.in_buf_size == 24576) 75 return "24k"; 76 else if (card->qdio.in_buf_size == 32768) 77 return "32k"; 78 else if (card->qdio.in_buf_size == 40960) 79 return "40k"; 80 else 81 return "64k"; 82 } 83 84 static ssize_t qeth_dev_inbuf_size_show(struct device *dev, 85 struct device_attribute *attr, char *buf) 86 { 87 struct qeth_card *card = dev_get_drvdata(dev); 88 89 return sprintf(buf, "%s\n", qeth_get_bufsize_str(card)); 90 } 91 92 static DEVICE_ATTR(inbuf_size, 0444, qeth_dev_inbuf_size_show, NULL); 93 94 static ssize_t qeth_dev_portno_show(struct device *dev, 95 struct device_attribute *attr, char *buf) 96 { 97 struct qeth_card *card = dev_get_drvdata(dev); 98 99 return sprintf(buf, "%i\n", card->dev->dev_port); 100 } 101 102 static ssize_t qeth_dev_portno_store(struct device *dev, 103 struct device_attribute *attr, const char *buf, size_t count) 104 { 105 struct qeth_card *card = dev_get_drvdata(dev); 106 char *tmp; 107 unsigned int portno, limit; 108 int rc = 0; 109 110 mutex_lock(&card->conf_mutex); 111 if (card->state != CARD_STATE_DOWN) { 112 rc = -EPERM; 113 goto out; 114 } 115 116 portno = simple_strtoul(buf, &tmp, 16); 117 if (portno > QETH_MAX_PORTNO) { 118 rc = -EINVAL; 119 goto out; 120 } 121 limit = (card->ssqd.pcnt ? card->ssqd.pcnt - 1 : card->ssqd.pcnt); 122 if (portno > limit) { 123 rc = -EINVAL; 124 goto out; 125 } 126 card->dev->dev_port = portno; 127 out: 128 mutex_unlock(&card->conf_mutex); 129 return rc ? rc : count; 130 } 131 132 static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store); 133 134 static ssize_t qeth_dev_portname_show(struct device *dev, 135 struct device_attribute *attr, char *buf) 136 { 137 return sprintf(buf, "no portname required\n"); 138 } 139 140 static ssize_t qeth_dev_portname_store(struct device *dev, 141 struct device_attribute *attr, const char *buf, size_t count) 142 { 143 struct qeth_card *card = dev_get_drvdata(dev); 144 145 dev_warn_once(&card->gdev->dev, 146 "portname is deprecated and is ignored\n"); 147 return count; 148 } 149 150 static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show, 151 qeth_dev_portname_store); 152 153 static ssize_t qeth_dev_prioqing_show(struct device *dev, 154 struct device_attribute *attr, char *buf) 155 { 156 struct qeth_card *card = dev_get_drvdata(dev); 157 158 switch (card->qdio.do_prio_queueing) { 159 case QETH_PRIO_Q_ING_PREC: 160 return sprintf(buf, "%s\n", "by precedence"); 161 case QETH_PRIO_Q_ING_TOS: 162 return sprintf(buf, "%s\n", "by type of service"); 163 case QETH_PRIO_Q_ING_SKB: 164 return sprintf(buf, "%s\n", "by skb-priority"); 165 case QETH_PRIO_Q_ING_VLAN: 166 return sprintf(buf, "%s\n", "by VLAN headers"); 167 default: 168 return sprintf(buf, "always queue %i\n", 169 card->qdio.default_out_queue); 170 } 171 } 172 173 static ssize_t qeth_dev_prioqing_store(struct device *dev, 174 struct device_attribute *attr, const char *buf, size_t count) 175 { 176 struct qeth_card *card = dev_get_drvdata(dev); 177 int rc = 0; 178 179 if (IS_IQD(card) || IS_VM_NIC(card)) 180 return -EOPNOTSUPP; 181 182 mutex_lock(&card->conf_mutex); 183 if (card->state != CARD_STATE_DOWN) { 184 rc = -EPERM; 185 goto out; 186 } 187 188 /* check if 1920 devices are supported , 189 * if though we have to permit priority queueing 190 */ 191 if (card->qdio.no_out_queues == 1) { 192 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT; 193 rc = -EPERM; 194 goto out; 195 } 196 197 if (sysfs_streq(buf, "prio_queueing_prec")) { 198 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_PREC; 199 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 200 } else if (sysfs_streq(buf, "prio_queueing_skb")) { 201 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_SKB; 202 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 203 } else if (sysfs_streq(buf, "prio_queueing_tos")) { 204 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS; 205 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 206 } else if (sysfs_streq(buf, "prio_queueing_vlan")) { 207 if (IS_LAYER3(card)) { 208 rc = -EOPNOTSUPP; 209 goto out; 210 } 211 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_VLAN; 212 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 213 } else if (sysfs_streq(buf, "no_prio_queueing:0")) { 214 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_FIXED; 215 card->qdio.default_out_queue = 0; 216 } else if (sysfs_streq(buf, "no_prio_queueing:1")) { 217 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_FIXED; 218 card->qdio.default_out_queue = 1; 219 } else if (sysfs_streq(buf, "no_prio_queueing:2")) { 220 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_FIXED; 221 card->qdio.default_out_queue = 2; 222 } else if (sysfs_streq(buf, "no_prio_queueing:3")) { 223 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_FIXED; 224 card->qdio.default_out_queue = 3; 225 } else if (sysfs_streq(buf, "no_prio_queueing")) { 226 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING; 227 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 228 } else 229 rc = -EINVAL; 230 out: 231 mutex_unlock(&card->conf_mutex); 232 return rc ? rc : count; 233 } 234 235 static DEVICE_ATTR(priority_queueing, 0644, qeth_dev_prioqing_show, 236 qeth_dev_prioqing_store); 237 238 static ssize_t qeth_dev_bufcnt_show(struct device *dev, 239 struct device_attribute *attr, char *buf) 240 { 241 struct qeth_card *card = dev_get_drvdata(dev); 242 243 return sprintf(buf, "%i\n", card->qdio.in_buf_pool.buf_count); 244 } 245 246 static ssize_t qeth_dev_bufcnt_store(struct device *dev, 247 struct device_attribute *attr, const char *buf, size_t count) 248 { 249 struct qeth_card *card = dev_get_drvdata(dev); 250 unsigned int cnt; 251 char *tmp; 252 int rc = 0; 253 254 mutex_lock(&card->conf_mutex); 255 if (card->state != CARD_STATE_DOWN) { 256 rc = -EPERM; 257 goto out; 258 } 259 260 cnt = simple_strtoul(buf, &tmp, 10); 261 cnt = (cnt < QETH_IN_BUF_COUNT_MIN) ? QETH_IN_BUF_COUNT_MIN : 262 ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt); 263 264 rc = qeth_resize_buffer_pool(card, cnt); 265 266 out: 267 mutex_unlock(&card->conf_mutex); 268 return rc ? rc : count; 269 } 270 271 static DEVICE_ATTR(buffer_count, 0644, qeth_dev_bufcnt_show, 272 qeth_dev_bufcnt_store); 273 274 static ssize_t qeth_dev_recover_store(struct device *dev, 275 struct device_attribute *attr, const char *buf, size_t count) 276 { 277 struct qeth_card *card = dev_get_drvdata(dev); 278 char *tmp; 279 int i; 280 281 if (!qeth_card_hw_is_reachable(card)) 282 return -EPERM; 283 284 i = simple_strtoul(buf, &tmp, 16); 285 if (i == 1) 286 qeth_schedule_recovery(card); 287 288 return count; 289 } 290 291 static DEVICE_ATTR(recover, 0200, NULL, qeth_dev_recover_store); 292 293 static ssize_t qeth_dev_performance_stats_show(struct device *dev, 294 struct device_attribute *attr, char *buf) 295 { 296 return sprintf(buf, "1\n"); 297 } 298 299 static ssize_t qeth_dev_performance_stats_store(struct device *dev, 300 struct device_attribute *attr, const char *buf, size_t count) 301 { 302 struct qeth_card *card = dev_get_drvdata(dev); 303 struct qeth_qdio_out_q *queue; 304 unsigned int i; 305 bool reset; 306 int rc; 307 308 rc = kstrtobool(buf, &reset); 309 if (rc) 310 return rc; 311 312 if (reset) { 313 memset(&card->stats, 0, sizeof(card->stats)); 314 for (i = 0; i < card->qdio.no_out_queues; i++) { 315 queue = card->qdio.out_qs[i]; 316 if (!queue) 317 break; 318 memset(&queue->stats, 0, sizeof(queue->stats)); 319 } 320 } 321 322 return count; 323 } 324 325 static DEVICE_ATTR(performance_stats, 0644, qeth_dev_performance_stats_show, 326 qeth_dev_performance_stats_store); 327 328 static ssize_t qeth_dev_layer2_show(struct device *dev, 329 struct device_attribute *attr, char *buf) 330 { 331 struct qeth_card *card = dev_get_drvdata(dev); 332 333 return sprintf(buf, "%i\n", card->options.layer); 334 } 335 336 static ssize_t qeth_dev_layer2_store(struct device *dev, 337 struct device_attribute *attr, const char *buf, size_t count) 338 { 339 struct qeth_card *card = dev_get_drvdata(dev); 340 struct net_device *ndev; 341 char *tmp; 342 int i, rc = 0; 343 enum qeth_discipline_id newdis; 344 345 mutex_lock(&card->discipline_mutex); 346 if (card->state != CARD_STATE_DOWN) { 347 rc = -EPERM; 348 goto out; 349 } 350 351 i = simple_strtoul(buf, &tmp, 16); 352 switch (i) { 353 case 0: 354 newdis = QETH_DISCIPLINE_LAYER3; 355 break; 356 case 1: 357 newdis = QETH_DISCIPLINE_LAYER2; 358 break; 359 default: 360 rc = -EINVAL; 361 goto out; 362 } 363 364 if (card->options.layer == newdis) 365 goto out; 366 if (card->info.layer_enforced) { 367 /* fixed layer, can't switch */ 368 rc = -EOPNOTSUPP; 369 goto out; 370 } 371 372 if (card->discipline) { 373 /* start with a new, pristine netdevice: */ 374 ndev = qeth_clone_netdev(card->dev); 375 if (!ndev) { 376 rc = -ENOMEM; 377 goto out; 378 } 379 380 card->discipline->remove(card->gdev); 381 qeth_core_free_discipline(card); 382 free_netdev(card->dev); 383 card->dev = ndev; 384 } 385 386 rc = qeth_core_load_discipline(card, newdis); 387 if (rc) 388 goto out; 389 390 rc = card->discipline->setup(card->gdev); 391 if (rc) 392 qeth_core_free_discipline(card); 393 out: 394 mutex_unlock(&card->discipline_mutex); 395 return rc ? rc : count; 396 } 397 398 static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show, 399 qeth_dev_layer2_store); 400 401 #define ATTR_QETH_ISOLATION_NONE ("none") 402 #define ATTR_QETH_ISOLATION_FWD ("forward") 403 #define ATTR_QETH_ISOLATION_DROP ("drop") 404 405 static ssize_t qeth_dev_isolation_show(struct device *dev, 406 struct device_attribute *attr, char *buf) 407 { 408 struct qeth_card *card = dev_get_drvdata(dev); 409 410 switch (card->options.isolation) { 411 case ISOLATION_MODE_NONE: 412 return snprintf(buf, 6, "%s\n", ATTR_QETH_ISOLATION_NONE); 413 case ISOLATION_MODE_FWD: 414 return snprintf(buf, 9, "%s\n", ATTR_QETH_ISOLATION_FWD); 415 case ISOLATION_MODE_DROP: 416 return snprintf(buf, 6, "%s\n", ATTR_QETH_ISOLATION_DROP); 417 default: 418 return snprintf(buf, 5, "%s\n", "N/A"); 419 } 420 } 421 422 static ssize_t qeth_dev_isolation_store(struct device *dev, 423 struct device_attribute *attr, const char *buf, size_t count) 424 { 425 struct qeth_card *card = dev_get_drvdata(dev); 426 enum qeth_ipa_isolation_modes isolation; 427 int rc = 0; 428 429 mutex_lock(&card->conf_mutex); 430 if (!IS_OSD(card) && !IS_OSX(card)) { 431 rc = -EOPNOTSUPP; 432 dev_err(&card->gdev->dev, "Adapter does not " 433 "support QDIO data connection isolation\n"); 434 goto out; 435 } 436 437 /* parse input into isolation mode */ 438 if (sysfs_streq(buf, ATTR_QETH_ISOLATION_NONE)) { 439 isolation = ISOLATION_MODE_NONE; 440 } else if (sysfs_streq(buf, ATTR_QETH_ISOLATION_FWD)) { 441 isolation = ISOLATION_MODE_FWD; 442 } else if (sysfs_streq(buf, ATTR_QETH_ISOLATION_DROP)) { 443 isolation = ISOLATION_MODE_DROP; 444 } else { 445 rc = -EINVAL; 446 goto out; 447 } 448 rc = count; 449 450 /* defer IP assist if device is offline (until discipline->set_online)*/ 451 card->options.prev_isolation = card->options.isolation; 452 card->options.isolation = isolation; 453 if (qeth_card_hw_is_reachable(card)) { 454 int ipa_rc = qeth_set_access_ctrl_online(card, 1); 455 if (ipa_rc != 0) 456 rc = ipa_rc; 457 } 458 out: 459 mutex_unlock(&card->conf_mutex); 460 return rc; 461 } 462 463 static DEVICE_ATTR(isolation, 0644, qeth_dev_isolation_show, 464 qeth_dev_isolation_store); 465 466 static ssize_t qeth_dev_switch_attrs_show(struct device *dev, 467 struct device_attribute *attr, char *buf) 468 { 469 struct qeth_card *card = dev_get_drvdata(dev); 470 struct qeth_switch_info sw_info; 471 int rc = 0; 472 473 if (!qeth_card_hw_is_reachable(card)) 474 return sprintf(buf, "n/a\n"); 475 476 rc = qeth_query_switch_attributes(card, &sw_info); 477 if (rc) 478 return rc; 479 480 if (!sw_info.capabilities) 481 rc = sprintf(buf, "unknown"); 482 483 if (sw_info.capabilities & QETH_SWITCH_FORW_802_1) 484 rc = sprintf(buf, (sw_info.settings & QETH_SWITCH_FORW_802_1 ? 485 "[802.1]" : "802.1")); 486 if (sw_info.capabilities & QETH_SWITCH_FORW_REFL_RELAY) 487 rc += sprintf(buf + rc, 488 (sw_info.settings & QETH_SWITCH_FORW_REFL_RELAY ? 489 " [rr]" : " rr")); 490 rc += sprintf(buf + rc, "\n"); 491 492 return rc; 493 } 494 495 static DEVICE_ATTR(switch_attrs, 0444, 496 qeth_dev_switch_attrs_show, NULL); 497 498 static ssize_t qeth_hw_trap_show(struct device *dev, 499 struct device_attribute *attr, char *buf) 500 { 501 struct qeth_card *card = dev_get_drvdata(dev); 502 503 if (card->info.hwtrap) 504 return snprintf(buf, 5, "arm\n"); 505 else 506 return snprintf(buf, 8, "disarm\n"); 507 } 508 509 static ssize_t qeth_hw_trap_store(struct device *dev, 510 struct device_attribute *attr, const char *buf, size_t count) 511 { 512 struct qeth_card *card = dev_get_drvdata(dev); 513 int rc = 0; 514 int state = 0; 515 516 mutex_lock(&card->conf_mutex); 517 if (qeth_card_hw_is_reachable(card)) 518 state = 1; 519 520 if (sysfs_streq(buf, "arm") && !card->info.hwtrap) { 521 if (state) { 522 if (qeth_is_diagass_supported(card, 523 QETH_DIAGS_CMD_TRAP)) { 524 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_ARM); 525 if (!rc) 526 card->info.hwtrap = 1; 527 } else 528 rc = -EINVAL; 529 } else 530 card->info.hwtrap = 1; 531 } else if (sysfs_streq(buf, "disarm") && card->info.hwtrap) { 532 if (state) { 533 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM); 534 if (!rc) 535 card->info.hwtrap = 0; 536 } else 537 card->info.hwtrap = 0; 538 } else if (sysfs_streq(buf, "trap") && state && card->info.hwtrap) 539 rc = qeth_hw_trap(card, QETH_DIAGS_TRAP_CAPTURE); 540 else 541 rc = -EINVAL; 542 543 mutex_unlock(&card->conf_mutex); 544 return rc ? rc : count; 545 } 546 547 static DEVICE_ATTR(hw_trap, 0644, qeth_hw_trap_show, 548 qeth_hw_trap_store); 549 550 static ssize_t qeth_dev_blkt_store(struct qeth_card *card, 551 const char *buf, size_t count, int *value, int max_value) 552 { 553 char *tmp; 554 int i, rc = 0; 555 556 mutex_lock(&card->conf_mutex); 557 if (card->state != CARD_STATE_DOWN) { 558 rc = -EPERM; 559 goto out; 560 } 561 i = simple_strtoul(buf, &tmp, 10); 562 if (i <= max_value) 563 *value = i; 564 else 565 rc = -EINVAL; 566 out: 567 mutex_unlock(&card->conf_mutex); 568 return rc ? rc : count; 569 } 570 571 static ssize_t qeth_dev_blkt_total_show(struct device *dev, 572 struct device_attribute *attr, char *buf) 573 { 574 struct qeth_card *card = dev_get_drvdata(dev); 575 576 return sprintf(buf, "%i\n", card->info.blkt.time_total); 577 } 578 579 static ssize_t qeth_dev_blkt_total_store(struct device *dev, 580 struct device_attribute *attr, const char *buf, size_t count) 581 { 582 struct qeth_card *card = dev_get_drvdata(dev); 583 584 return qeth_dev_blkt_store(card, buf, count, 585 &card->info.blkt.time_total, 5000); 586 } 587 588 static DEVICE_ATTR(total, 0644, qeth_dev_blkt_total_show, 589 qeth_dev_blkt_total_store); 590 591 static ssize_t qeth_dev_blkt_inter_show(struct device *dev, 592 struct device_attribute *attr, char *buf) 593 { 594 struct qeth_card *card = dev_get_drvdata(dev); 595 596 return sprintf(buf, "%i\n", card->info.blkt.inter_packet); 597 } 598 599 static ssize_t qeth_dev_blkt_inter_store(struct device *dev, 600 struct device_attribute *attr, const char *buf, size_t count) 601 { 602 struct qeth_card *card = dev_get_drvdata(dev); 603 604 return qeth_dev_blkt_store(card, buf, count, 605 &card->info.blkt.inter_packet, 1000); 606 } 607 608 static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show, 609 qeth_dev_blkt_inter_store); 610 611 static ssize_t qeth_dev_blkt_inter_jumbo_show(struct device *dev, 612 struct device_attribute *attr, char *buf) 613 { 614 struct qeth_card *card = dev_get_drvdata(dev); 615 616 return sprintf(buf, "%i\n", card->info.blkt.inter_packet_jumbo); 617 } 618 619 static ssize_t qeth_dev_blkt_inter_jumbo_store(struct device *dev, 620 struct device_attribute *attr, const char *buf, size_t count) 621 { 622 struct qeth_card *card = dev_get_drvdata(dev); 623 624 return qeth_dev_blkt_store(card, buf, count, 625 &card->info.blkt.inter_packet_jumbo, 1000); 626 } 627 628 static DEVICE_ATTR(inter_jumbo, 0644, qeth_dev_blkt_inter_jumbo_show, 629 qeth_dev_blkt_inter_jumbo_store); 630 631 static struct attribute *qeth_blkt_device_attrs[] = { 632 &dev_attr_total.attr, 633 &dev_attr_inter.attr, 634 &dev_attr_inter_jumbo.attr, 635 NULL, 636 }; 637 const struct attribute_group qeth_device_blkt_group = { 638 .name = "blkt", 639 .attrs = qeth_blkt_device_attrs, 640 }; 641 EXPORT_SYMBOL_GPL(qeth_device_blkt_group); 642 643 static struct attribute *qeth_device_attrs[] = { 644 &dev_attr_state.attr, 645 &dev_attr_chpid.attr, 646 &dev_attr_if_name.attr, 647 &dev_attr_card_type.attr, 648 &dev_attr_inbuf_size.attr, 649 &dev_attr_portno.attr, 650 &dev_attr_portname.attr, 651 &dev_attr_priority_queueing.attr, 652 &dev_attr_buffer_count.attr, 653 &dev_attr_recover.attr, 654 &dev_attr_performance_stats.attr, 655 &dev_attr_layer2.attr, 656 &dev_attr_isolation.attr, 657 &dev_attr_hw_trap.attr, 658 &dev_attr_switch_attrs.attr, 659 NULL, 660 }; 661 const struct attribute_group qeth_device_attr_group = { 662 .attrs = qeth_device_attrs, 663 }; 664 EXPORT_SYMBOL_GPL(qeth_device_attr_group); 665 666 const struct attribute_group *qeth_generic_attr_groups[] = { 667 &qeth_device_attr_group, 668 &qeth_device_blkt_group, 669 NULL, 670 }; 671 672 static struct attribute *qeth_osn_device_attrs[] = { 673 &dev_attr_state.attr, 674 &dev_attr_chpid.attr, 675 &dev_attr_if_name.attr, 676 &dev_attr_card_type.attr, 677 &dev_attr_buffer_count.attr, 678 &dev_attr_recover.attr, 679 NULL, 680 }; 681 static struct attribute_group qeth_osn_device_attr_group = { 682 .attrs = qeth_osn_device_attrs, 683 }; 684 const struct attribute_group *qeth_osn_attr_groups[] = { 685 &qeth_osn_device_attr_group, 686 NULL, 687 }; 688