3 * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.53 $)
5 * Linux on zSeries OSA Express and HiperSockets support
6 * This file contains code related to sysfs.
8 * Copyright 2000,2003 IBM Corporation
10 * Author(s): Thomas Spatzier <tspat@de.ibm.com>
11 * Frank Pavlic <pavlic@de.ibm.com>
14 #include <linux/list.h>
15 #include <linux/rwsem.h>
17 #include <asm/ebcdic.h>
23 const char *VERSION_QETH_SYS_C = "$Revision: 1.53 $";
25 /*****************************************************************************/
27 /* /sys-fs stuff UNDER DEVELOPMENT !!! */
29 /*****************************************************************************/
33 qeth_dev_state_show(struct device *dev, struct device_attribute *attr, char *buf)
35 struct qeth_card *card = dev->driver_data;
39 switch (card->state) {
41 return sprintf(buf, "DOWN\n");
42 case CARD_STATE_HARDSETUP:
43 return sprintf(buf, "HARDSETUP\n");
44 case CARD_STATE_SOFTSETUP:
45 return sprintf(buf, "SOFTSETUP\n");
48 return sprintf(buf, "UP (LAN ONLINE)\n");
50 return sprintf(buf, "UP (LAN OFFLINE)\n");
51 case CARD_STATE_RECOVER:
52 return sprintf(buf, "RECOVER\n");
54 return sprintf(buf, "UNKNOWN\n");
58 static DEVICE_ATTR(state, 0444, qeth_dev_state_show, NULL);
61 qeth_dev_chpid_show(struct device *dev, struct device_attribute *attr, char *buf)
63 struct qeth_card *card = dev->driver_data;
67 return sprintf(buf, "%02X\n", card->info.chpid);
70 static DEVICE_ATTR(chpid, 0444, qeth_dev_chpid_show, NULL);
73 qeth_dev_if_name_show(struct device *dev, struct device_attribute *attr, char *buf)
75 struct qeth_card *card = dev->driver_data;
78 return sprintf(buf, "%s\n", QETH_CARD_IFNAME(card));
81 static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL);
84 qeth_dev_card_type_show(struct device *dev, struct device_attribute *attr, char *buf)
86 struct qeth_card *card = dev->driver_data;
90 return sprintf(buf, "%s\n", qeth_get_cardname_short(card));
93 static DEVICE_ATTR(card_type, 0444, qeth_dev_card_type_show, NULL);
96 qeth_dev_portno_show(struct device *dev, struct device_attribute *attr, char *buf)
98 struct qeth_card *card = dev->driver_data;
102 return sprintf(buf, "%i\n", card->info.portno);
106 qeth_dev_portno_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
108 struct qeth_card *card = dev->driver_data;
115 if ((card->state != CARD_STATE_DOWN) &&
116 (card->state != CARD_STATE_RECOVER))
119 portno = simple_strtoul(buf, &tmp, 16);
120 if ((portno < 0) || (portno > MAX_PORTNO)){
121 PRINT_WARN("portno 0x%X is out of range\n", portno);
125 card->info.portno = portno;
129 static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store);
132 qeth_dev_portname_show(struct device *dev, struct device_attribute *attr, char *buf)
134 struct qeth_card *card = dev->driver_data;
135 char portname[9] = {0, };
140 if (card->info.portname_required) {
141 memcpy(portname, card->info.portname + 1, 8);
143 return sprintf(buf, "%s\n", portname);
145 return sprintf(buf, "no portname required\n");
149 qeth_dev_portname_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
151 struct qeth_card *card = dev->driver_data;
158 if ((card->state != CARD_STATE_DOWN) &&
159 (card->state != CARD_STATE_RECOVER))
162 tmp = strsep((char **) &buf, "\n");
163 if ((strlen(tmp) > 8) || (strlen(tmp) < 2))
166 card->info.portname[0] = strlen(tmp);
167 /* for beauty reasons */
168 for (i = 1; i < 9; i++)
169 card->info.portname[i] = ' ';
170 strcpy(card->info.portname + 1, tmp);
171 ASCEBC(card->info.portname + 1, 8);
176 static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show,
177 qeth_dev_portname_store);
180 qeth_dev_checksum_show(struct device *dev, struct device_attribute *attr, char *buf)
182 struct qeth_card *card = dev->driver_data;
187 return sprintf(buf, "%s checksumming\n", qeth_get_checksum_str(card));
191 qeth_dev_checksum_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
193 struct qeth_card *card = dev->driver_data;
199 if ((card->state != CARD_STATE_DOWN) &&
200 (card->state != CARD_STATE_RECOVER))
203 tmp = strsep((char **) &buf, "\n");
204 if (!strcmp(tmp, "sw_checksumming"))
205 card->options.checksum_type = SW_CHECKSUMMING;
206 else if (!strcmp(tmp, "hw_checksumming"))
207 card->options.checksum_type = HW_CHECKSUMMING;
208 else if (!strcmp(tmp, "no_checksumming"))
209 card->options.checksum_type = NO_CHECKSUMMING;
211 PRINT_WARN("Unknown checksumming type '%s'\n", tmp);
217 static DEVICE_ATTR(checksumming, 0644, qeth_dev_checksum_show,
218 qeth_dev_checksum_store);
221 qeth_dev_prioqing_show(struct device *dev, struct device_attribute *attr, char *buf)
223 struct qeth_card *card = dev->driver_data;
228 switch (card->qdio.do_prio_queueing) {
229 case QETH_PRIO_Q_ING_PREC:
230 return sprintf(buf, "%s\n", "by precedence");
231 case QETH_PRIO_Q_ING_TOS:
232 return sprintf(buf, "%s\n", "by type of service");
234 return sprintf(buf, "always queue %i\n",
235 card->qdio.default_out_queue);
240 qeth_dev_prioqing_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
242 struct qeth_card *card = dev->driver_data;
248 if ((card->state != CARD_STATE_DOWN) &&
249 (card->state != CARD_STATE_RECOVER))
252 /* check if 1920 devices are supported ,
253 * if though we have to permit priority queueing
255 if (card->qdio.no_out_queues == 1) {
256 PRINT_WARN("Priority queueing disabled due "
257 "to hardware limitations!\n");
258 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT;
262 tmp = strsep((char **) &buf, "\n");
263 if (!strcmp(tmp, "prio_queueing_prec"))
264 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_PREC;
265 else if (!strcmp(tmp, "prio_queueing_tos"))
266 card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS;
267 else if (!strcmp(tmp, "no_prio_queueing:0")) {
268 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
269 card->qdio.default_out_queue = 0;
270 } else if (!strcmp(tmp, "no_prio_queueing:1")) {
271 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
272 card->qdio.default_out_queue = 1;
273 } else if (!strcmp(tmp, "no_prio_queueing:2")) {
274 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
275 card->qdio.default_out_queue = 2;
276 } else if (!strcmp(tmp, "no_prio_queueing:3")) {
277 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
278 card->qdio.default_out_queue = 3;
279 } else if (!strcmp(tmp, "no_prio_queueing")) {
280 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
281 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
283 PRINT_WARN("Unknown queueing type '%s'\n", tmp);
289 static DEVICE_ATTR(priority_queueing, 0644, qeth_dev_prioqing_show,
290 qeth_dev_prioqing_store);
293 qeth_dev_bufcnt_show(struct device *dev, struct device_attribute *attr, char *buf)
295 struct qeth_card *card = dev->driver_data;
300 return sprintf(buf, "%i\n", card->qdio.in_buf_pool.buf_count);
304 qeth_dev_bufcnt_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
306 struct qeth_card *card = dev->driver_data;
314 if ((card->state != CARD_STATE_DOWN) &&
315 (card->state != CARD_STATE_RECOVER))
318 old_cnt = card->qdio.in_buf_pool.buf_count;
319 cnt = simple_strtoul(buf, &tmp, 10);
320 cnt = (cnt < QETH_IN_BUF_COUNT_MIN) ? QETH_IN_BUF_COUNT_MIN :
321 ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt);
322 if (old_cnt != cnt) {
323 if ((rc = qeth_realloc_buffer_pool(card, cnt)))
324 PRINT_WARN("Error (%d) while setting "
325 "buffer count.\n", rc);
330 static DEVICE_ATTR(buffer_count, 0644, qeth_dev_bufcnt_show,
331 qeth_dev_bufcnt_store);
333 static inline ssize_t
334 qeth_dev_route_show(struct qeth_card *card, struct qeth_routing_info *route,
337 switch (route->type) {
339 return sprintf(buf, "%s\n", "primary router");
340 case SECONDARY_ROUTER:
341 return sprintf(buf, "%s\n", "secondary router");
342 case MULTICAST_ROUTER:
343 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
344 return sprintf(buf, "%s\n", "multicast router+");
346 return sprintf(buf, "%s\n", "multicast router");
347 case PRIMARY_CONNECTOR:
348 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
349 return sprintf(buf, "%s\n", "primary connector+");
351 return sprintf(buf, "%s\n", "primary connector");
352 case SECONDARY_CONNECTOR:
353 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
354 return sprintf(buf, "%s\n", "secondary connector+");
356 return sprintf(buf, "%s\n", "secondary connector");
358 return sprintf(buf, "%s\n", "no");
363 qeth_dev_route4_show(struct device *dev, struct device_attribute *attr, char *buf)
365 struct qeth_card *card = dev->driver_data;
370 return qeth_dev_route_show(card, &card->options.route4, buf);
373 static inline ssize_t
374 qeth_dev_route_store(struct qeth_card *card, struct qeth_routing_info *route,
375 enum qeth_prot_versions prot, const char *buf, size_t count)
377 enum qeth_routing_types old_route_type = route->type;
381 tmp = strsep((char **) &buf, "\n");
383 if (!strcmp(tmp, "no_router")){
384 route->type = NO_ROUTER;
385 } else if (!strcmp(tmp, "primary_connector")) {
386 route->type = PRIMARY_CONNECTOR;
387 } else if (!strcmp(tmp, "secondary_connector")) {
388 route->type = SECONDARY_CONNECTOR;
389 } else if (!strcmp(tmp, "multicast_router")) {
390 route->type = MULTICAST_ROUTER;
391 } else if (!strcmp(tmp, "primary_router")) {
392 route->type = PRIMARY_ROUTER;
393 } else if (!strcmp(tmp, "secondary_router")) {
394 route->type = SECONDARY_ROUTER;
395 } else if (!strcmp(tmp, "multicast_router")) {
396 route->type = MULTICAST_ROUTER;
398 PRINT_WARN("Invalid routing type '%s'.\n", tmp);
401 if (((card->state == CARD_STATE_SOFTSETUP) ||
402 (card->state == CARD_STATE_UP)) &&
403 (old_route_type != route->type)){
404 if (prot == QETH_PROT_IPV4)
405 rc = qeth_setrouting_v4(card);
406 else if (prot == QETH_PROT_IPV6)
407 rc = qeth_setrouting_v6(card);
413 qeth_dev_route4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
415 struct qeth_card *card = dev->driver_data;
420 return qeth_dev_route_store(card, &card->options.route4,
421 QETH_PROT_IPV4, buf, count);
424 static DEVICE_ATTR(route4, 0644, qeth_dev_route4_show, qeth_dev_route4_store);
426 #ifdef CONFIG_QETH_IPV6
428 qeth_dev_route6_show(struct device *dev, struct device_attribute *attr, char *buf)
430 struct qeth_card *card = dev->driver_data;
435 if (!qeth_is_supported(card, IPA_IPV6))
436 return sprintf(buf, "%s\n", "n/a");
438 return qeth_dev_route_show(card, &card->options.route6, buf);
442 qeth_dev_route6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
444 struct qeth_card *card = dev->driver_data;
449 if (!qeth_is_supported(card, IPA_IPV6)){
450 PRINT_WARN("IPv6 not supported for interface %s.\n"
451 "Routing status no changed.\n",
452 QETH_CARD_IFNAME(card));
456 return qeth_dev_route_store(card, &card->options.route6,
457 QETH_PROT_IPV6, buf, count);
460 static DEVICE_ATTR(route6, 0644, qeth_dev_route6_show, qeth_dev_route6_store);
464 qeth_dev_add_hhlen_show(struct device *dev, struct device_attribute *attr, char *buf)
466 struct qeth_card *card = dev->driver_data;
471 return sprintf(buf, "%i\n", card->options.add_hhlen);
475 qeth_dev_add_hhlen_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
477 struct qeth_card *card = dev->driver_data;
484 if ((card->state != CARD_STATE_DOWN) &&
485 (card->state != CARD_STATE_RECOVER))
488 i = simple_strtoul(buf, &tmp, 10);
489 if ((i < 0) || (i > MAX_ADD_HHLEN)) {
490 PRINT_WARN("add_hhlen out of range\n");
493 card->options.add_hhlen = i;
498 static DEVICE_ATTR(add_hhlen, 0644, qeth_dev_add_hhlen_show,
499 qeth_dev_add_hhlen_store);
502 qeth_dev_fake_ll_show(struct device *dev, struct device_attribute *attr, char *buf)
504 struct qeth_card *card = dev->driver_data;
509 return sprintf(buf, "%i\n", card->options.fake_ll? 1:0);
513 qeth_dev_fake_ll_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
515 struct qeth_card *card = dev->driver_data;
522 if ((card->state != CARD_STATE_DOWN) &&
523 (card->state != CARD_STATE_RECOVER))
526 i = simple_strtoul(buf, &tmp, 16);
527 if ((i != 0) && (i != 1)) {
528 PRINT_WARN("fake_ll: write 0 or 1 to this file!\n");
531 card->options.fake_ll = i;
535 static DEVICE_ATTR(fake_ll, 0644, qeth_dev_fake_ll_show,
536 qeth_dev_fake_ll_store);
539 qeth_dev_fake_broadcast_show(struct device *dev, struct device_attribute *attr, char *buf)
541 struct qeth_card *card = dev->driver_data;
546 return sprintf(buf, "%i\n", card->options.fake_broadcast? 1:0);
550 qeth_dev_fake_broadcast_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
552 struct qeth_card *card = dev->driver_data;
559 if ((card->state != CARD_STATE_DOWN) &&
560 (card->state != CARD_STATE_RECOVER))
563 i = simple_strtoul(buf, &tmp, 16);
564 if ((i == 0) || (i == 1))
565 card->options.fake_broadcast = i;
567 PRINT_WARN("fake_broadcast: write 0 or 1 to this file!\n");
573 static DEVICE_ATTR(fake_broadcast, 0644, qeth_dev_fake_broadcast_show,
574 qeth_dev_fake_broadcast_store);
577 qeth_dev_recover_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
579 struct qeth_card *card = dev->driver_data;
586 if (card->state != CARD_STATE_UP)
589 i = simple_strtoul(buf, &tmp, 16);
591 qeth_schedule_recovery(card);
596 static DEVICE_ATTR(recover, 0200, NULL, qeth_dev_recover_store);
599 qeth_dev_broadcast_mode_show(struct device *dev, struct device_attribute *attr, char *buf)
601 struct qeth_card *card = dev->driver_data;
606 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
607 (card->info.link_type == QETH_LINK_TYPE_LANE_TR)))
608 return sprintf(buf, "n/a\n");
610 return sprintf(buf, "%s\n", (card->options.broadcast_mode ==
611 QETH_TR_BROADCAST_ALLRINGS)?
612 "all rings":"local");
616 qeth_dev_broadcast_mode_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
618 struct qeth_card *card = dev->driver_data;
624 if ((card->state != CARD_STATE_DOWN) &&
625 (card->state != CARD_STATE_RECOVER))
628 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
629 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))){
630 PRINT_WARN("Device is not a tokenring device!\n");
634 tmp = strsep((char **) &buf, "\n");
636 if (!strcmp(tmp, "local")){
637 card->options.broadcast_mode = QETH_TR_BROADCAST_LOCAL;
639 } else if (!strcmp(tmp, "all_rings")) {
640 card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS;
643 PRINT_WARN("broadcast_mode: invalid mode %s!\n",
650 static DEVICE_ATTR(broadcast_mode, 0644, qeth_dev_broadcast_mode_show,
651 qeth_dev_broadcast_mode_store);
654 qeth_dev_canonical_macaddr_show(struct device *dev, struct device_attribute *attr, char *buf)
656 struct qeth_card *card = dev->driver_data;
661 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
662 (card->info.link_type == QETH_LINK_TYPE_LANE_TR)))
663 return sprintf(buf, "n/a\n");
665 return sprintf(buf, "%i\n", (card->options.macaddr_mode ==
666 QETH_TR_MACADDR_CANONICAL)? 1:0);
670 qeth_dev_canonical_macaddr_store(struct device *dev, struct device_attribute *attr, const char *buf,
673 struct qeth_card *card = dev->driver_data;
680 if ((card->state != CARD_STATE_DOWN) &&
681 (card->state != CARD_STATE_RECOVER))
684 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
685 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))){
686 PRINT_WARN("Device is not a tokenring device!\n");
690 i = simple_strtoul(buf, &tmp, 16);
691 if ((i == 0) || (i == 1))
692 card->options.macaddr_mode = i?
693 QETH_TR_MACADDR_CANONICAL :
694 QETH_TR_MACADDR_NONCANONICAL;
696 PRINT_WARN("canonical_macaddr: write 0 or 1 to this file!\n");
702 static DEVICE_ATTR(canonical_macaddr, 0644, qeth_dev_canonical_macaddr_show,
703 qeth_dev_canonical_macaddr_store);
706 qeth_dev_layer2_show(struct device *dev, struct device_attribute *attr, char *buf)
708 struct qeth_card *card = dev->driver_data;
713 return sprintf(buf, "%i\n", card->options.layer2 ? 1:0);
717 qeth_dev_layer2_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
719 struct qeth_card *card = dev->driver_data;
726 if (((card->state != CARD_STATE_DOWN) &&
727 (card->state != CARD_STATE_RECOVER)) ||
728 (card->info.type != QETH_CARD_TYPE_OSAE))
731 i = simple_strtoul(buf, &tmp, 16);
732 if ((i == 0) || (i == 1))
733 card->options.layer2 = i;
735 PRINT_WARN("layer2: write 0 or 1 to this file!\n");
741 static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show,
742 qeth_dev_layer2_store);
745 qeth_dev_large_send_show(struct device *dev, struct device_attribute *attr, char *buf)
747 struct qeth_card *card = dev->driver_data;
752 switch (card->options.large_send) {
753 case QETH_LARGE_SEND_NO:
754 return sprintf(buf, "%s\n", "no");
755 case QETH_LARGE_SEND_EDDP:
756 return sprintf(buf, "%s\n", "EDDP");
757 case QETH_LARGE_SEND_TSO:
758 return sprintf(buf, "%s\n", "TSO");
760 return sprintf(buf, "%s\n", "N/A");
765 qeth_dev_large_send_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
767 struct qeth_card *card = dev->driver_data;
768 enum qeth_large_send_types type;
774 tmp = strsep((char **) &buf, "\n");
775 if (!strcmp(tmp, "no")){
776 type = QETH_LARGE_SEND_NO;
777 } else if (!strcmp(tmp, "EDDP")) {
778 type = QETH_LARGE_SEND_EDDP;
779 } else if (!strcmp(tmp, "TSO")) {
780 type = QETH_LARGE_SEND_TSO;
782 PRINT_WARN("large_send: invalid mode %s!\n", tmp);
785 if (card->options.large_send == type)
787 if ((rc = qeth_set_large_send(card, type)))
792 static DEVICE_ATTR(large_send, 0644, qeth_dev_large_send_show,
793 qeth_dev_large_send_store);
796 qeth_dev_blkt_show(char *buf, struct qeth_card *card, int value )
802 return sprintf(buf, "%i\n", value);
806 qeth_dev_blkt_store(struct qeth_card *card, const char *buf, size_t count,
807 int *value, int max_value)
815 if ((card->state != CARD_STATE_DOWN) &&
816 (card->state != CARD_STATE_RECOVER))
819 i = simple_strtoul(buf, &tmp, 10);
820 if (i <= max_value) {
823 PRINT_WARN("blkt total time: write values between"
824 " 0 and %d to this file!\n", max_value);
831 qeth_dev_blkt_total_show(struct device *dev, struct device_attribute *attr, char *buf)
833 struct qeth_card *card = dev->driver_data;
835 return qeth_dev_blkt_show(buf, card, card->info.blkt.time_total);
840 qeth_dev_blkt_total_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
842 struct qeth_card *card = dev->driver_data;
844 return qeth_dev_blkt_store(card, buf, count,
845 &card->info.blkt.time_total,1000);
850 static DEVICE_ATTR(total, 0644, qeth_dev_blkt_total_show,
851 qeth_dev_blkt_total_store);
854 qeth_dev_blkt_inter_show(struct device *dev, struct device_attribute *attr, char *buf)
856 struct qeth_card *card = dev->driver_data;
858 return qeth_dev_blkt_show(buf, card, card->info.blkt.inter_packet);
863 qeth_dev_blkt_inter_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
865 struct qeth_card *card = dev->driver_data;
867 return qeth_dev_blkt_store(card, buf, count,
868 &card->info.blkt.inter_packet,100);
871 static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show,
872 qeth_dev_blkt_inter_store);
875 qeth_dev_blkt_inter_jumbo_show(struct device *dev, struct device_attribute *attr, char *buf)
877 struct qeth_card *card = dev->driver_data;
879 return qeth_dev_blkt_show(buf, card,
880 card->info.blkt.inter_packet_jumbo);
885 qeth_dev_blkt_inter_jumbo_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
887 struct qeth_card *card = dev->driver_data;
889 return qeth_dev_blkt_store(card, buf, count,
890 &card->info.blkt.inter_packet_jumbo,100);
893 static DEVICE_ATTR(inter_jumbo, 0644, qeth_dev_blkt_inter_jumbo_show,
894 qeth_dev_blkt_inter_jumbo_store);
896 static struct device_attribute * qeth_blkt_device_attrs[] = {
899 &dev_attr_inter_jumbo,
903 static struct attribute_group qeth_device_blkt_group = {
905 .attrs = (struct attribute **)qeth_blkt_device_attrs,
908 static struct device_attribute * qeth_device_attrs[] = {
915 &dev_attr_checksumming,
916 &dev_attr_priority_queueing,
917 &dev_attr_buffer_count,
919 #ifdef CONFIG_QETH_IPV6
924 &dev_attr_fake_broadcast,
926 &dev_attr_broadcast_mode,
927 &dev_attr_canonical_macaddr,
929 &dev_attr_large_send,
933 static struct attribute_group qeth_device_attr_group = {
934 .attrs = (struct attribute **)qeth_device_attrs,
938 #define QETH_DEVICE_ATTR(_id,_name,_mode,_show,_store) \
939 struct device_attribute dev_attr_##_id = { \
940 .attr = {.name=__stringify(_name), .mode=_mode, .owner=THIS_MODULE },\
946 qeth_check_layer2(struct qeth_card *card)
948 if (card->options.layer2)
955 qeth_dev_ipato_enable_show(struct device *dev, struct device_attribute *attr, char *buf)
957 struct qeth_card *card = dev->driver_data;
962 if (qeth_check_layer2(card))
964 return sprintf(buf, "%i\n", card->ipato.enabled? 1:0);
968 qeth_dev_ipato_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
970 struct qeth_card *card = dev->driver_data;
976 if ((card->state != CARD_STATE_DOWN) &&
977 (card->state != CARD_STATE_RECOVER))
980 if (qeth_check_layer2(card))
983 tmp = strsep((char **) &buf, "\n");
984 if (!strcmp(tmp, "toggle")){
985 card->ipato.enabled = (card->ipato.enabled)? 0 : 1;
986 } else if (!strcmp(tmp, "1")){
987 card->ipato.enabled = 1;
988 } else if (!strcmp(tmp, "0")){
989 card->ipato.enabled = 0;
991 PRINT_WARN("ipato_enable: write 0, 1 or 'toggle' to "
998 static QETH_DEVICE_ATTR(ipato_enable, enable, 0644,
999 qeth_dev_ipato_enable_show,
1000 qeth_dev_ipato_enable_store);
1003 qeth_dev_ipato_invert4_show(struct device *dev, struct device_attribute *attr, char *buf)
1005 struct qeth_card *card = dev->driver_data;
1010 if (qeth_check_layer2(card))
1013 return sprintf(buf, "%i\n", card->ipato.invert4? 1:0);
1017 qeth_dev_ipato_invert4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1019 struct qeth_card *card = dev->driver_data;
1025 if (qeth_check_layer2(card))
1028 tmp = strsep((char **) &buf, "\n");
1029 if (!strcmp(tmp, "toggle")){
1030 card->ipato.invert4 = (card->ipato.invert4)? 0 : 1;
1031 } else if (!strcmp(tmp, "1")){
1032 card->ipato.invert4 = 1;
1033 } else if (!strcmp(tmp, "0")){
1034 card->ipato.invert4 = 0;
1036 PRINT_WARN("ipato_invert4: write 0, 1 or 'toggle' to "
1043 static QETH_DEVICE_ATTR(ipato_invert4, invert4, 0644,
1044 qeth_dev_ipato_invert4_show,
1045 qeth_dev_ipato_invert4_store);
1047 static inline ssize_t
1048 qeth_dev_ipato_add_show(char *buf, struct qeth_card *card,
1049 enum qeth_prot_versions proto)
1051 struct qeth_ipato_entry *ipatoe;
1052 unsigned long flags;
1054 int entry_len; /* length of 1 entry string, differs between v4 and v6 */
1057 if (qeth_check_layer2(card))
1060 entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
1061 /* add strlen for "/<mask>\n" */
1062 entry_len += (proto == QETH_PROT_IPV4)? 5 : 6;
1063 spin_lock_irqsave(&card->ip_lock, flags);
1064 list_for_each_entry(ipatoe, &card->ipato.entries, entry){
1065 if (ipatoe->proto != proto)
1067 /* String must not be longer than PAGE_SIZE. So we check if
1068 * string length gets near PAGE_SIZE. Then we can savely display
1069 * the next IPv6 address (worst case, compared to IPv4) */
1070 if ((PAGE_SIZE - i) <= entry_len)
1072 qeth_ipaddr_to_string(proto, ipatoe->addr, addr_str);
1073 i += snprintf(buf + i, PAGE_SIZE - i,
1074 "%s/%i\n", addr_str, ipatoe->mask_bits);
1076 spin_unlock_irqrestore(&card->ip_lock, flags);
1077 i += snprintf(buf + i, PAGE_SIZE - i, "\n");
1083 qeth_dev_ipato_add4_show(struct device *dev, struct device_attribute *attr, char *buf)
1085 struct qeth_card *card = dev->driver_data;
1090 return qeth_dev_ipato_add_show(buf, card, QETH_PROT_IPV4);
1094 qeth_parse_ipatoe(const char* buf, enum qeth_prot_versions proto,
1095 u8 *addr, int *mask_bits)
1097 const char *start, *end;
1099 char buffer[49] = {0, };
1102 /* get address string */
1103 end = strchr(start, '/');
1105 PRINT_WARN("Invalid format for ipato_addx/delx. "
1106 "Use <ip addr>/<mask bits>\n");
1109 strncpy(buffer, start, end - start);
1110 if (qeth_string_to_ipaddr(buffer, proto, addr)){
1111 PRINT_WARN("Invalid IP address format!\n");
1115 *mask_bits = simple_strtoul(start, &tmp, 10);
1120 static inline ssize_t
1121 qeth_dev_ipato_add_store(const char *buf, size_t count,
1122 struct qeth_card *card, enum qeth_prot_versions proto)
1124 struct qeth_ipato_entry *ipatoe;
1129 if (qeth_check_layer2(card))
1131 if ((rc = qeth_parse_ipatoe(buf, proto, addr, &mask_bits)))
1134 if (!(ipatoe = kmalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL))){
1135 PRINT_WARN("No memory to allocate ipato entry\n");
1138 memset(ipatoe, 0, sizeof(struct qeth_ipato_entry));
1139 ipatoe->proto = proto;
1140 memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4)? 4:16);
1141 ipatoe->mask_bits = mask_bits;
1143 if ((rc = qeth_add_ipato_entry(card, ipatoe))){
1152 qeth_dev_ipato_add4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1154 struct qeth_card *card = dev->driver_data;
1159 return qeth_dev_ipato_add_store(buf, count, card, QETH_PROT_IPV4);
1162 static QETH_DEVICE_ATTR(ipato_add4, add4, 0644,
1163 qeth_dev_ipato_add4_show,
1164 qeth_dev_ipato_add4_store);
1166 static inline ssize_t
1167 qeth_dev_ipato_del_store(const char *buf, size_t count,
1168 struct qeth_card *card, enum qeth_prot_versions proto)
1174 if (qeth_check_layer2(card))
1176 if ((rc = qeth_parse_ipatoe(buf, proto, addr, &mask_bits)))
1179 qeth_del_ipato_entry(card, proto, addr, mask_bits);
1185 qeth_dev_ipato_del4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1187 struct qeth_card *card = dev->driver_data;
1192 return qeth_dev_ipato_del_store(buf, count, card, QETH_PROT_IPV4);
1195 static QETH_DEVICE_ATTR(ipato_del4, del4, 0200, NULL,
1196 qeth_dev_ipato_del4_store);
1198 #ifdef CONFIG_QETH_IPV6
1200 qeth_dev_ipato_invert6_show(struct device *dev, struct device_attribute *attr, char *buf)
1202 struct qeth_card *card = dev->driver_data;
1207 if (qeth_check_layer2(card))
1210 return sprintf(buf, "%i\n", card->ipato.invert6? 1:0);
1214 qeth_dev_ipato_invert6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1216 struct qeth_card *card = dev->driver_data;
1222 if (qeth_check_layer2(card))
1225 tmp = strsep((char **) &buf, "\n");
1226 if (!strcmp(tmp, "toggle")){
1227 card->ipato.invert6 = (card->ipato.invert6)? 0 : 1;
1228 } else if (!strcmp(tmp, "1")){
1229 card->ipato.invert6 = 1;
1230 } else if (!strcmp(tmp, "0")){
1231 card->ipato.invert6 = 0;
1233 PRINT_WARN("ipato_invert6: write 0, 1 or 'toggle' to "
1240 static QETH_DEVICE_ATTR(ipato_invert6, invert6, 0644,
1241 qeth_dev_ipato_invert6_show,
1242 qeth_dev_ipato_invert6_store);
1246 qeth_dev_ipato_add6_show(struct device *dev, struct device_attribute *attr, char *buf)
1248 struct qeth_card *card = dev->driver_data;
1253 return qeth_dev_ipato_add_show(buf, card, QETH_PROT_IPV6);
1257 qeth_dev_ipato_add6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1259 struct qeth_card *card = dev->driver_data;
1264 return qeth_dev_ipato_add_store(buf, count, card, QETH_PROT_IPV6);
1267 static QETH_DEVICE_ATTR(ipato_add6, add6, 0644,
1268 qeth_dev_ipato_add6_show,
1269 qeth_dev_ipato_add6_store);
1272 qeth_dev_ipato_del6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1274 struct qeth_card *card = dev->driver_data;
1279 return qeth_dev_ipato_del_store(buf, count, card, QETH_PROT_IPV6);
1282 static QETH_DEVICE_ATTR(ipato_del6, del6, 0200, NULL,
1283 qeth_dev_ipato_del6_store);
1284 #endif /* CONFIG_QETH_IPV6 */
1286 static struct device_attribute * qeth_ipato_device_attrs[] = {
1287 &dev_attr_ipato_enable,
1288 &dev_attr_ipato_invert4,
1289 &dev_attr_ipato_add4,
1290 &dev_attr_ipato_del4,
1291 #ifdef CONFIG_QETH_IPV6
1292 &dev_attr_ipato_invert6,
1293 &dev_attr_ipato_add6,
1294 &dev_attr_ipato_del6,
1299 static struct attribute_group qeth_device_ipato_group = {
1300 .name = "ipa_takeover",
1301 .attrs = (struct attribute **)qeth_ipato_device_attrs,
1304 static inline ssize_t
1305 qeth_dev_vipa_add_show(char *buf, struct qeth_card *card,
1306 enum qeth_prot_versions proto)
1308 struct qeth_ipaddr *ipaddr;
1310 int entry_len; /* length of 1 entry string, differs between v4 and v6 */
1311 unsigned long flags;
1314 if (qeth_check_layer2(card))
1317 entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
1318 entry_len += 2; /* \n + terminator */
1319 spin_lock_irqsave(&card->ip_lock, flags);
1320 list_for_each_entry(ipaddr, &card->ip_list, entry){
1321 if (ipaddr->proto != proto)
1323 if (ipaddr->type != QETH_IP_TYPE_VIPA)
1325 /* String must not be longer than PAGE_SIZE. So we check if
1326 * string length gets near PAGE_SIZE. Then we can savely display
1327 * the next IPv6 address (worst case, compared to IPv4) */
1328 if ((PAGE_SIZE - i) <= entry_len)
1330 qeth_ipaddr_to_string(proto, (const u8 *)&ipaddr->u, addr_str);
1331 i += snprintf(buf + i, PAGE_SIZE - i, "%s\n", addr_str);
1333 spin_unlock_irqrestore(&card->ip_lock, flags);
1334 i += snprintf(buf + i, PAGE_SIZE - i, "\n");
1340 qeth_dev_vipa_add4_show(struct device *dev, struct device_attribute *attr, char *buf)
1342 struct qeth_card *card = dev->driver_data;
1347 return qeth_dev_vipa_add_show(buf, card, QETH_PROT_IPV4);
1351 qeth_parse_vipae(const char* buf, enum qeth_prot_versions proto,
1354 if (qeth_string_to_ipaddr(buf, proto, addr)){
1355 PRINT_WARN("Invalid IP address format!\n");
1361 static inline ssize_t
1362 qeth_dev_vipa_add_store(const char *buf, size_t count,
1363 struct qeth_card *card, enum qeth_prot_versions proto)
1365 u8 addr[16] = {0, };
1368 if (qeth_check_layer2(card))
1370 if ((rc = qeth_parse_vipae(buf, proto, addr)))
1373 if ((rc = qeth_add_vipa(card, proto, addr)))
1380 qeth_dev_vipa_add4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1382 struct qeth_card *card = dev->driver_data;
1387 return qeth_dev_vipa_add_store(buf, count, card, QETH_PROT_IPV4);
1390 static QETH_DEVICE_ATTR(vipa_add4, add4, 0644,
1391 qeth_dev_vipa_add4_show,
1392 qeth_dev_vipa_add4_store);
1394 static inline ssize_t
1395 qeth_dev_vipa_del_store(const char *buf, size_t count,
1396 struct qeth_card *card, enum qeth_prot_versions proto)
1401 if (qeth_check_layer2(card))
1403 if ((rc = qeth_parse_vipae(buf, proto, addr)))
1406 qeth_del_vipa(card, proto, addr);
1412 qeth_dev_vipa_del4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1414 struct qeth_card *card = dev->driver_data;
1419 return qeth_dev_vipa_del_store(buf, count, card, QETH_PROT_IPV4);
1422 static QETH_DEVICE_ATTR(vipa_del4, del4, 0200, NULL,
1423 qeth_dev_vipa_del4_store);
1425 #ifdef CONFIG_QETH_IPV6
1427 qeth_dev_vipa_add6_show(struct device *dev, struct device_attribute *attr, char *buf)
1429 struct qeth_card *card = dev->driver_data;
1434 return qeth_dev_vipa_add_show(buf, card, QETH_PROT_IPV6);
1438 qeth_dev_vipa_add6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1440 struct qeth_card *card = dev->driver_data;
1445 return qeth_dev_vipa_add_store(buf, count, card, QETH_PROT_IPV6);
1448 static QETH_DEVICE_ATTR(vipa_add6, add6, 0644,
1449 qeth_dev_vipa_add6_show,
1450 qeth_dev_vipa_add6_store);
1453 qeth_dev_vipa_del6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1455 struct qeth_card *card = dev->driver_data;
1460 if (qeth_check_layer2(card))
1463 return qeth_dev_vipa_del_store(buf, count, card, QETH_PROT_IPV6);
1466 static QETH_DEVICE_ATTR(vipa_del6, del6, 0200, NULL,
1467 qeth_dev_vipa_del6_store);
1468 #endif /* CONFIG_QETH_IPV6 */
1470 static struct device_attribute * qeth_vipa_device_attrs[] = {
1471 &dev_attr_vipa_add4,
1472 &dev_attr_vipa_del4,
1473 #ifdef CONFIG_QETH_IPV6
1474 &dev_attr_vipa_add6,
1475 &dev_attr_vipa_del6,
1480 static struct attribute_group qeth_device_vipa_group = {
1482 .attrs = (struct attribute **)qeth_vipa_device_attrs,
1485 static inline ssize_t
1486 qeth_dev_rxip_add_show(char *buf, struct qeth_card *card,
1487 enum qeth_prot_versions proto)
1489 struct qeth_ipaddr *ipaddr;
1491 int entry_len; /* length of 1 entry string, differs between v4 and v6 */
1492 unsigned long flags;
1495 if (qeth_check_layer2(card))
1498 entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
1499 entry_len += 2; /* \n + terminator */
1500 spin_lock_irqsave(&card->ip_lock, flags);
1501 list_for_each_entry(ipaddr, &card->ip_list, entry){
1502 if (ipaddr->proto != proto)
1504 if (ipaddr->type != QETH_IP_TYPE_RXIP)
1506 /* String must not be longer than PAGE_SIZE. So we check if
1507 * string length gets near PAGE_SIZE. Then we can savely display
1508 * the next IPv6 address (worst case, compared to IPv4) */
1509 if ((PAGE_SIZE - i) <= entry_len)
1511 qeth_ipaddr_to_string(proto, (const u8 *)&ipaddr->u, addr_str);
1512 i += snprintf(buf + i, PAGE_SIZE - i, "%s\n", addr_str);
1514 spin_unlock_irqrestore(&card->ip_lock, flags);
1515 i += snprintf(buf + i, PAGE_SIZE - i, "\n");
1521 qeth_dev_rxip_add4_show(struct device *dev, struct device_attribute *attr, char *buf)
1523 struct qeth_card *card = dev->driver_data;
1528 return qeth_dev_rxip_add_show(buf, card, QETH_PROT_IPV4);
1532 qeth_parse_rxipe(const char* buf, enum qeth_prot_versions proto,
1535 if (qeth_string_to_ipaddr(buf, proto, addr)){
1536 PRINT_WARN("Invalid IP address format!\n");
1542 static inline ssize_t
1543 qeth_dev_rxip_add_store(const char *buf, size_t count,
1544 struct qeth_card *card, enum qeth_prot_versions proto)
1546 u8 addr[16] = {0, };
1549 if (qeth_check_layer2(card))
1551 if ((rc = qeth_parse_rxipe(buf, proto, addr)))
1554 if ((rc = qeth_add_rxip(card, proto, addr)))
1561 qeth_dev_rxip_add4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1563 struct qeth_card *card = dev->driver_data;
1568 return qeth_dev_rxip_add_store(buf, count, card, QETH_PROT_IPV4);
1571 static QETH_DEVICE_ATTR(rxip_add4, add4, 0644,
1572 qeth_dev_rxip_add4_show,
1573 qeth_dev_rxip_add4_store);
1575 static inline ssize_t
1576 qeth_dev_rxip_del_store(const char *buf, size_t count,
1577 struct qeth_card *card, enum qeth_prot_versions proto)
1582 if (qeth_check_layer2(card))
1584 if ((rc = qeth_parse_rxipe(buf, proto, addr)))
1587 qeth_del_rxip(card, proto, addr);
1593 qeth_dev_rxip_del4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1595 struct qeth_card *card = dev->driver_data;
1600 return qeth_dev_rxip_del_store(buf, count, card, QETH_PROT_IPV4);
1603 static QETH_DEVICE_ATTR(rxip_del4, del4, 0200, NULL,
1604 qeth_dev_rxip_del4_store);
1606 #ifdef CONFIG_QETH_IPV6
1608 qeth_dev_rxip_add6_show(struct device *dev, struct device_attribute *attr, char *buf)
1610 struct qeth_card *card = dev->driver_data;
1615 return qeth_dev_rxip_add_show(buf, card, QETH_PROT_IPV6);
1619 qeth_dev_rxip_add6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1621 struct qeth_card *card = dev->driver_data;
1626 return qeth_dev_rxip_add_store(buf, count, card, QETH_PROT_IPV6);
1629 static QETH_DEVICE_ATTR(rxip_add6, add6, 0644,
1630 qeth_dev_rxip_add6_show,
1631 qeth_dev_rxip_add6_store);
1634 qeth_dev_rxip_del6_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
1636 struct qeth_card *card = dev->driver_data;
1641 return qeth_dev_rxip_del_store(buf, count, card, QETH_PROT_IPV6);
1644 static QETH_DEVICE_ATTR(rxip_del6, del6, 0200, NULL,
1645 qeth_dev_rxip_del6_store);
1646 #endif /* CONFIG_QETH_IPV6 */
1648 static struct device_attribute * qeth_rxip_device_attrs[] = {
1649 &dev_attr_rxip_add4,
1650 &dev_attr_rxip_del4,
1651 #ifdef CONFIG_QETH_IPV6
1652 &dev_attr_rxip_add6,
1653 &dev_attr_rxip_del6,
1658 static struct attribute_group qeth_device_rxip_group = {
1660 .attrs = (struct attribute **)qeth_rxip_device_attrs,
1664 qeth_create_device_attributes(struct device *dev)
1668 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_attr_group)))
1670 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group))){
1671 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1674 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_vipa_group))){
1675 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1676 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1679 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_rxip_group))){
1680 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1681 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1682 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
1684 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group)))
1691 qeth_remove_device_attributes(struct device *dev)
1693 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1694 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1695 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
1696 sysfs_remove_group(&dev->kobj, &qeth_device_rxip_group);
1697 sysfs_remove_group(&dev->kobj, &qeth_device_blkt_group);
1700 /**********************/
1701 /* DRIVER ATTRIBUTES */
1702 /**********************/
1704 qeth_driver_group_store(struct device_driver *ddrv, const char *buf,
1707 const char *start, *end;
1708 char bus_ids[3][BUS_ID_SIZE], *argv[3];
1713 for (i = 0; i < 3; i++) {
1714 static const char delim[] = { ',', ',', '\n' };
1717 if (!(end = strchr(start, delim[i])))
1719 len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start);
1720 strncpy(bus_ids[i], start, len);
1721 bus_ids[i][len] = '\0';
1723 argv[i] = bus_ids[i];
1725 err = ccwgroup_create(qeth_root_dev, qeth_ccwgroup_driver.driver_id,
1726 &qeth_ccw_driver, 3, argv);
1734 static DRIVER_ATTR(group, 0200, 0, qeth_driver_group_store);
1737 qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf,
1744 tmp = strsep((char **) &buf, "\n");
1745 if (!strncmp(tmp, "unregister", 10)){
1746 if ((rc = qeth_notifier_unregister(current)))
1751 signum = simple_strtoul(tmp, &tmp2, 10);
1752 if ((signum < 0) || (signum > 32)){
1753 PRINT_WARN("Signal number %d is out of range\n", signum);
1756 if ((rc = qeth_notifier_register(current, signum)))
1762 static DRIVER_ATTR(notifier_register, 0200, 0,
1763 qeth_driver_notifier_register_store);
1766 qeth_create_driver_attributes(void)
1770 if ((rc = driver_create_file(&qeth_ccwgroup_driver.driver,
1771 &driver_attr_group)))
1773 return driver_create_file(&qeth_ccwgroup_driver.driver,
1774 &driver_attr_notifier_register);
1778 qeth_remove_driver_attributes(void)
1780 driver_remove_file(&qeth_ccwgroup_driver.driver,
1781 &driver_attr_group);
1782 driver_remove_file(&qeth_ccwgroup_driver.driver,
1783 &driver_attr_notifier_register);