1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/dcache.h>
3 #include <linux/debugfs.h>
4 #include <linux/delay.h>
5 #include <linux/hardirq.h>
7 #include <linux/string.h>
8 #include <linux/slab.h>
9 #include <linux/export.h>
15 static struct dentry
*lbs_dir
;
16 static char *szStates
[] = {
22 static void lbs_debug_init(struct lbs_private
*priv
);
25 static ssize_t
write_file_dummy(struct file
*file
, const char __user
*buf
,
26 size_t count
, loff_t
*ppos
)
31 static const size_t len
= PAGE_SIZE
;
33 static ssize_t
lbs_dev_info(struct file
*file
, char __user
*userbuf
,
34 size_t count
, loff_t
*ppos
)
36 struct lbs_private
*priv
= file
->private_data
;
38 unsigned long addr
= get_zeroed_page(GFP_KERNEL
);
39 char *buf
= (char *)addr
;
44 pos
+= snprintf(buf
+pos
, len
-pos
, "state = %s\n",
45 szStates
[priv
->connect_status
]);
46 pos
+= snprintf(buf
+pos
, len
-pos
, "region_code = %02x\n",
47 (u32
) priv
->regioncode
);
49 res
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, pos
);
55 static ssize_t
lbs_sleepparams_write(struct file
*file
,
56 const char __user
*user_buf
, size_t count
,
59 struct lbs_private
*priv
= file
->private_data
;
61 struct sleep_params sp
;
62 int p1
, p2
, p3
, p4
, p5
, p6
;
65 buf
= memdup_user_nul(user_buf
, min(count
, len
- 1));
69 ret
= sscanf(buf
, "%d %d %d %d %d %d", &p1
, &p2
, &p3
, &p4
, &p5
, &p6
);
76 sp
.sp_stabletime
= p3
;
77 sp
.sp_calcontrol
= p4
;
78 sp
.sp_extsleepclk
= p5
;
81 ret
= lbs_cmd_802_11_sleep_params(priv
, CMD_ACT_SET
, &sp
);
92 static ssize_t
lbs_sleepparams_read(struct file
*file
, char __user
*userbuf
,
93 size_t count
, loff_t
*ppos
)
95 struct lbs_private
*priv
= file
->private_data
;
98 struct sleep_params sp
;
99 unsigned long addr
= get_zeroed_page(GFP_KERNEL
);
100 char *buf
= (char *)addr
;
104 ret
= lbs_cmd_802_11_sleep_params(priv
, CMD_ACT_GET
, &sp
);
108 pos
+= snprintf(buf
, len
, "%d %d %d %d %d %d\n", sp
.sp_error
,
109 sp
.sp_offset
, sp
.sp_stabletime
,
110 sp
.sp_calcontrol
, sp
.sp_extsleepclk
,
113 ret
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, pos
);
120 static ssize_t
lbs_host_sleep_write(struct file
*file
,
121 const char __user
*user_buf
, size_t count
,
124 struct lbs_private
*priv
= file
->private_data
;
129 buf
= memdup_user_nul(user_buf
, min(count
, len
- 1));
133 ret
= sscanf(buf
, "%d", &host_sleep
);
140 ret
= lbs_set_host_sleep(priv
, 0);
141 else if (host_sleep
== 1) {
142 if (priv
->wol_criteria
== EHS_REMOVE_WAKEUP
) {
143 netdev_info(priv
->dev
,
144 "wake parameters not configured\n");
148 ret
= lbs_set_host_sleep(priv
, 1);
150 netdev_err(priv
->dev
, "invalid option\n");
162 static ssize_t
lbs_host_sleep_read(struct file
*file
, char __user
*userbuf
,
163 size_t count
, loff_t
*ppos
)
165 struct lbs_private
*priv
= file
->private_data
;
168 unsigned long addr
= get_zeroed_page(GFP_KERNEL
);
169 char *buf
= (char *)addr
;
173 pos
+= snprintf(buf
, len
, "%d\n", priv
->is_host_sleep_activated
);
175 ret
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, pos
);
182 * When calling CMD_802_11_SUBSCRIBE_EVENT with CMD_ACT_GET, me might
183 * get a bunch of vendor-specific TLVs (a.k.a. IEs) back from the
184 * firmware. Here's an example:
185 * 04 01 02 00 00 00 05 01 02 00 00 00 06 01 02 00
186 * 00 00 07 01 02 00 3c 00 00 00 00 00 00 00 03 03
187 * 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
189 * The 04 01 is the TLV type (here TLV_TYPE_RSSI_LOW), 02 00 is the length,
190 * 00 00 are the data bytes of this TLV. For this TLV, their meaning is
191 * defined in mrvlietypes_thresholds
193 * This function searches in this TLV data chunk for a given TLV type
194 * and returns a pointer to the first data byte of the TLV, or to NULL
195 * if the TLV hasn't been found.
197 static void *lbs_tlv_find(uint16_t tlv_type
, const uint8_t *tlv
, uint16_t size
)
199 struct mrvl_ie_header
*tlv_h
;
204 tlv_h
= (struct mrvl_ie_header
*) tlv
;
207 if (tlv_h
->type
== cpu_to_le16(tlv_type
))
209 length
= le16_to_cpu(tlv_h
->len
) + sizeof(*tlv_h
);
217 static ssize_t
lbs_threshold_read(uint16_t tlv_type
, uint16_t event_mask
,
218 struct file
*file
, char __user
*userbuf
,
219 size_t count
, loff_t
*ppos
)
221 struct cmd_ds_802_11_subscribe_event
*subscribed
;
222 struct mrvl_ie_thresholds
*got
;
223 struct lbs_private
*priv
= file
->private_data
;
231 buf
= (char *)get_zeroed_page(GFP_KERNEL
);
235 subscribed
= kzalloc(sizeof(*subscribed
), GFP_KERNEL
);
241 subscribed
->hdr
.size
= cpu_to_le16(sizeof(*subscribed
));
242 subscribed
->action
= cpu_to_le16(CMD_ACT_GET
);
244 ret
= lbs_cmd_with_response(priv
, CMD_802_11_SUBSCRIBE_EVENT
, subscribed
);
248 got
= lbs_tlv_find(tlv_type
, subscribed
->tlv
, sizeof(subscribed
->tlv
));
252 events
= le16_to_cpu(subscribed
->events
);
254 pos
+= snprintf(buf
, len
, "%d %d %d\n", value
, freq
,
255 !!(events
& event_mask
));
258 ret
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, pos
);
264 free_page((unsigned long)buf
);
269 static ssize_t
lbs_threshold_write(uint16_t tlv_type
, uint16_t event_mask
,
271 const char __user
*userbuf
, size_t count
,
274 struct cmd_ds_802_11_subscribe_event
*events
;
275 struct mrvl_ie_thresholds
*tlv
;
276 struct lbs_private
*priv
= file
->private_data
;
277 int value
, freq
, new_mask
;
282 buf
= memdup_user_nul(userbuf
, min(count
, len
- 1));
286 ret
= sscanf(buf
, "%d %d %d", &value
, &freq
, &new_mask
);
291 events
= kzalloc(sizeof(*events
), GFP_KERNEL
);
297 events
->hdr
.size
= cpu_to_le16(sizeof(*events
));
298 events
->action
= cpu_to_le16(CMD_ACT_GET
);
300 ret
= lbs_cmd_with_response(priv
, CMD_802_11_SUBSCRIBE_EVENT
, events
);
304 curr_mask
= le16_to_cpu(events
->events
);
307 new_mask
= curr_mask
| event_mask
;
309 new_mask
= curr_mask
& ~event_mask
;
311 /* Now everything is set and we can send stuff down to the firmware */
313 tlv
= (void *)events
->tlv
;
315 events
->action
= cpu_to_le16(CMD_ACT_SET
);
316 events
->events
= cpu_to_le16(new_mask
);
317 tlv
->header
.type
= cpu_to_le16(tlv_type
);
318 tlv
->header
.len
= cpu_to_le16(sizeof(*tlv
) - sizeof(tlv
->header
));
320 if (tlv_type
!= TLV_TYPE_BCNMISS
)
323 /* The command header, the action, the event mask, and one TLV */
324 events
->hdr
.size
= cpu_to_le16(sizeof(events
->hdr
) + 4 + sizeof(*tlv
));
326 ret
= lbs_cmd_with_response(priv
, CMD_802_11_SUBSCRIBE_EVENT
, events
);
338 static ssize_t
lbs_lowrssi_read(struct file
*file
, char __user
*userbuf
,
339 size_t count
, loff_t
*ppos
)
341 return lbs_threshold_read(TLV_TYPE_RSSI_LOW
, CMD_SUBSCRIBE_RSSI_LOW
,
342 file
, userbuf
, count
, ppos
);
346 static ssize_t
lbs_lowrssi_write(struct file
*file
, const char __user
*userbuf
,
347 size_t count
, loff_t
*ppos
)
349 return lbs_threshold_write(TLV_TYPE_RSSI_LOW
, CMD_SUBSCRIBE_RSSI_LOW
,
350 file
, userbuf
, count
, ppos
);
354 static ssize_t
lbs_lowsnr_read(struct file
*file
, char __user
*userbuf
,
355 size_t count
, loff_t
*ppos
)
357 return lbs_threshold_read(TLV_TYPE_SNR_LOW
, CMD_SUBSCRIBE_SNR_LOW
,
358 file
, userbuf
, count
, ppos
);
362 static ssize_t
lbs_lowsnr_write(struct file
*file
, const char __user
*userbuf
,
363 size_t count
, loff_t
*ppos
)
365 return lbs_threshold_write(TLV_TYPE_SNR_LOW
, CMD_SUBSCRIBE_SNR_LOW
,
366 file
, userbuf
, count
, ppos
);
370 static ssize_t
lbs_failcount_read(struct file
*file
, char __user
*userbuf
,
371 size_t count
, loff_t
*ppos
)
373 return lbs_threshold_read(TLV_TYPE_FAILCOUNT
, CMD_SUBSCRIBE_FAILCOUNT
,
374 file
, userbuf
, count
, ppos
);
378 static ssize_t
lbs_failcount_write(struct file
*file
, const char __user
*userbuf
,
379 size_t count
, loff_t
*ppos
)
381 return lbs_threshold_write(TLV_TYPE_FAILCOUNT
, CMD_SUBSCRIBE_FAILCOUNT
,
382 file
, userbuf
, count
, ppos
);
386 static ssize_t
lbs_highrssi_read(struct file
*file
, char __user
*userbuf
,
387 size_t count
, loff_t
*ppos
)
389 return lbs_threshold_read(TLV_TYPE_RSSI_HIGH
, CMD_SUBSCRIBE_RSSI_HIGH
,
390 file
, userbuf
, count
, ppos
);
394 static ssize_t
lbs_highrssi_write(struct file
*file
, const char __user
*userbuf
,
395 size_t count
, loff_t
*ppos
)
397 return lbs_threshold_write(TLV_TYPE_RSSI_HIGH
, CMD_SUBSCRIBE_RSSI_HIGH
,
398 file
, userbuf
, count
, ppos
);
402 static ssize_t
lbs_highsnr_read(struct file
*file
, char __user
*userbuf
,
403 size_t count
, loff_t
*ppos
)
405 return lbs_threshold_read(TLV_TYPE_SNR_HIGH
, CMD_SUBSCRIBE_SNR_HIGH
,
406 file
, userbuf
, count
, ppos
);
410 static ssize_t
lbs_highsnr_write(struct file
*file
, const char __user
*userbuf
,
411 size_t count
, loff_t
*ppos
)
413 return lbs_threshold_write(TLV_TYPE_SNR_HIGH
, CMD_SUBSCRIBE_SNR_HIGH
,
414 file
, userbuf
, count
, ppos
);
417 static ssize_t
lbs_bcnmiss_read(struct file
*file
, char __user
*userbuf
,
418 size_t count
, loff_t
*ppos
)
420 return lbs_threshold_read(TLV_TYPE_BCNMISS
, CMD_SUBSCRIBE_BCNMISS
,
421 file
, userbuf
, count
, ppos
);
425 static ssize_t
lbs_bcnmiss_write(struct file
*file
, const char __user
*userbuf
,
426 size_t count
, loff_t
*ppos
)
428 return lbs_threshold_write(TLV_TYPE_BCNMISS
, CMD_SUBSCRIBE_BCNMISS
,
429 file
, userbuf
, count
, ppos
);
433 static ssize_t
lbs_rdmac_read(struct file
*file
, char __user
*userbuf
,
434 size_t count
, loff_t
*ppos
)
436 struct lbs_private
*priv
= file
->private_data
;
439 unsigned long addr
= get_zeroed_page(GFP_KERNEL
);
440 char *buf
= (char *)addr
;
446 ret
= lbs_get_reg(priv
, CMD_MAC_REG_ACCESS
, priv
->mac_offset
, &val
);
449 pos
= snprintf(buf
, len
, "MAC[0x%x] = 0x%08x\n",
450 priv
->mac_offset
, val
);
451 ret
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, pos
);
457 static ssize_t
lbs_rdmac_write(struct file
*file
,
458 const char __user
*userbuf
,
459 size_t count
, loff_t
*ppos
)
461 struct lbs_private
*priv
= file
->private_data
;
464 buf
= memdup_user_nul(userbuf
, min(count
, len
- 1));
468 priv
->mac_offset
= simple_strtoul(buf
, NULL
, 16);
473 static ssize_t
lbs_wrmac_write(struct file
*file
,
474 const char __user
*userbuf
,
475 size_t count
, loff_t
*ppos
)
478 struct lbs_private
*priv
= file
->private_data
;
483 buf
= memdup_user_nul(userbuf
, min(count
, len
- 1));
487 res
= sscanf(buf
, "%x %x", &offset
, &value
);
493 res
= lbs_set_reg(priv
, CMD_MAC_REG_ACCESS
, offset
, value
);
503 static ssize_t
lbs_rdbbp_read(struct file
*file
, char __user
*userbuf
,
504 size_t count
, loff_t
*ppos
)
506 struct lbs_private
*priv
= file
->private_data
;
509 unsigned long addr
= get_zeroed_page(GFP_KERNEL
);
510 char *buf
= (char *)addr
;
516 ret
= lbs_get_reg(priv
, CMD_BBP_REG_ACCESS
, priv
->bbp_offset
, &val
);
519 pos
= snprintf(buf
, len
, "BBP[0x%x] = 0x%08x\n",
520 priv
->bbp_offset
, val
);
521 ret
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, pos
);
528 static ssize_t
lbs_rdbbp_write(struct file
*file
,
529 const char __user
*userbuf
,
530 size_t count
, loff_t
*ppos
)
532 struct lbs_private
*priv
= file
->private_data
;
535 buf
= memdup_user_nul(userbuf
, min(count
, len
- 1));
539 priv
->bbp_offset
= simple_strtoul(buf
, NULL
, 16);
545 static ssize_t
lbs_wrbbp_write(struct file
*file
,
546 const char __user
*userbuf
,
547 size_t count
, loff_t
*ppos
)
550 struct lbs_private
*priv
= file
->private_data
;
555 buf
= memdup_user_nul(userbuf
, min(count
, len
- 1));
559 res
= sscanf(buf
, "%x %x", &offset
, &value
);
565 res
= lbs_set_reg(priv
, CMD_BBP_REG_ACCESS
, offset
, value
);
575 static ssize_t
lbs_rdrf_read(struct file
*file
, char __user
*userbuf
,
576 size_t count
, loff_t
*ppos
)
578 struct lbs_private
*priv
= file
->private_data
;
581 unsigned long addr
= get_zeroed_page(GFP_KERNEL
);
582 char *buf
= (char *)addr
;
588 ret
= lbs_get_reg(priv
, CMD_RF_REG_ACCESS
, priv
->rf_offset
, &val
);
591 pos
= snprintf(buf
, len
, "RF[0x%x] = 0x%08x\n",
592 priv
->rf_offset
, val
);
593 ret
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, pos
);
600 static ssize_t
lbs_rdrf_write(struct file
*file
,
601 const char __user
*userbuf
,
602 size_t count
, loff_t
*ppos
)
604 struct lbs_private
*priv
= file
->private_data
;
607 buf
= memdup_user_nul(userbuf
, min(count
, len
- 1));
611 priv
->rf_offset
= simple_strtoul(buf
, NULL
, 16);
616 static ssize_t
lbs_wrrf_write(struct file
*file
,
617 const char __user
*userbuf
,
618 size_t count
, loff_t
*ppos
)
621 struct lbs_private
*priv
= file
->private_data
;
626 buf
= memdup_user_nul(userbuf
, min(count
, len
- 1));
630 res
= sscanf(buf
, "%x %x", &offset
, &value
);
636 res
= lbs_set_reg(priv
, CMD_RF_REG_ACCESS
, offset
, value
);
646 #define FOPS(fread, fwrite) { \
647 .owner = THIS_MODULE, \
648 .open = simple_open, \
651 .llseek = generic_file_llseek, \
654 struct lbs_debugfs_files
{
657 struct file_operations fops
;
660 static const struct lbs_debugfs_files debugfs_files
[] = {
661 { "info", 0444, FOPS(lbs_dev_info
, write_file_dummy
), },
662 { "sleepparams", 0644, FOPS(lbs_sleepparams_read
,
663 lbs_sleepparams_write
), },
664 { "hostsleep", 0644, FOPS(lbs_host_sleep_read
,
665 lbs_host_sleep_write
), },
668 static const struct lbs_debugfs_files debugfs_events_files
[] = {
669 {"low_rssi", 0644, FOPS(lbs_lowrssi_read
,
670 lbs_lowrssi_write
), },
671 {"low_snr", 0644, FOPS(lbs_lowsnr_read
,
672 lbs_lowsnr_write
), },
673 {"failure_count", 0644, FOPS(lbs_failcount_read
,
674 lbs_failcount_write
), },
675 {"beacon_missed", 0644, FOPS(lbs_bcnmiss_read
,
676 lbs_bcnmiss_write
), },
677 {"high_rssi", 0644, FOPS(lbs_highrssi_read
,
678 lbs_highrssi_write
), },
679 {"high_snr", 0644, FOPS(lbs_highsnr_read
,
680 lbs_highsnr_write
), },
683 static const struct lbs_debugfs_files debugfs_regs_files
[] = {
684 {"rdmac", 0644, FOPS(lbs_rdmac_read
, lbs_rdmac_write
), },
685 {"wrmac", 0600, FOPS(NULL
, lbs_wrmac_write
), },
686 {"rdbbp", 0644, FOPS(lbs_rdbbp_read
, lbs_rdbbp_write
), },
687 {"wrbbp", 0600, FOPS(NULL
, lbs_wrbbp_write
), },
688 {"rdrf", 0644, FOPS(lbs_rdrf_read
, lbs_rdrf_write
), },
689 {"wrrf", 0600, FOPS(NULL
, lbs_wrrf_write
), },
692 void lbs_debugfs_init(void)
695 lbs_dir
= debugfs_create_dir("lbs_wireless", NULL
);
698 void lbs_debugfs_remove(void)
700 debugfs_remove(lbs_dir
);
703 void lbs_debugfs_init_one(struct lbs_private
*priv
, struct net_device
*dev
)
706 const struct lbs_debugfs_files
*files
;
710 priv
->debugfs_dir
= debugfs_create_dir(dev
->name
, lbs_dir
);
712 for (i
=0; i
<ARRAY_SIZE(debugfs_files
); i
++) {
713 files
= &debugfs_files
[i
];
714 priv
->debugfs_files
[i
] = debugfs_create_file(files
->name
,
721 priv
->events_dir
= debugfs_create_dir("subscribed_events", priv
->debugfs_dir
);
723 for (i
=0; i
<ARRAY_SIZE(debugfs_events_files
); i
++) {
724 files
= &debugfs_events_files
[i
];
725 priv
->debugfs_events_files
[i
] = debugfs_create_file(files
->name
,
732 priv
->regs_dir
= debugfs_create_dir("registers", priv
->debugfs_dir
);
734 for (i
=0; i
<ARRAY_SIZE(debugfs_regs_files
); i
++) {
735 files
= &debugfs_regs_files
[i
];
736 priv
->debugfs_regs_files
[i
] = debugfs_create_file(files
->name
,
744 lbs_debug_init(priv
);
750 void lbs_debugfs_remove_one(struct lbs_private
*priv
)
754 for(i
=0; i
<ARRAY_SIZE(debugfs_regs_files
); i
++)
755 debugfs_remove(priv
->debugfs_regs_files
[i
]);
757 debugfs_remove(priv
->regs_dir
);
759 for(i
=0; i
<ARRAY_SIZE(debugfs_events_files
); i
++)
760 debugfs_remove(priv
->debugfs_events_files
[i
]);
762 debugfs_remove(priv
->events_dir
);
764 debugfs_remove(priv
->debugfs_debug
);
766 for(i
=0; i
<ARRAY_SIZE(debugfs_files
); i
++)
767 debugfs_remove(priv
->debugfs_files
[i
]);
768 debugfs_remove(priv
->debugfs_dir
);
777 #define item_size(n) (sizeof_field(struct lbs_private, n))
778 #define item_addr(n) (offsetof(struct lbs_private, n))
787 /* To debug any member of struct lbs_private, simply add one line here.
789 static struct debug_data items
[] = {
790 {"psmode", item_size(psmode
), item_addr(psmode
)},
791 {"psstate", item_size(psstate
), item_addr(psstate
)},
794 static int num_of_items
= ARRAY_SIZE(items
);
797 * lbs_debugfs_read - proc read function
799 * @file: file to read
800 * @userbuf: pointer to buffer
801 * @count: number of bytes to read
802 * @ppos: read data starting position
804 * returns: amount of data read or negative error code
806 static ssize_t
lbs_debugfs_read(struct file
*file
, char __user
*userbuf
,
807 size_t count
, loff_t
*ppos
)
814 struct debug_data
*d
;
815 unsigned long addr
= get_zeroed_page(GFP_KERNEL
);
816 char *buf
= (char *)addr
;
822 d
= file
->private_data
;
824 for (i
= 0; i
< num_of_items
; i
++) {
826 val
= *((u8
*) d
[i
].addr
);
827 else if (d
[i
].size
== 2)
828 val
= *((u16
*) d
[i
].addr
);
829 else if (d
[i
].size
== 4)
830 val
= *((u32
*) d
[i
].addr
);
831 else if (d
[i
].size
== 8)
832 val
= *((u64
*) d
[i
].addr
);
834 pos
+= sprintf(p
+ pos
, "%s=%d\n", d
[i
].name
, val
);
837 res
= simple_read_from_buffer(userbuf
, count
, ppos
, p
, pos
);
844 * lbs_debugfs_write - proc write function
847 * @buf: pointer to data buffer
848 * @cnt: data number to write
849 * @ppos: file position
851 * returns: amount of data written
853 static ssize_t
lbs_debugfs_write(struct file
*f
, const char __user
*buf
,
854 size_t cnt
, loff_t
*ppos
)
862 struct debug_data
*d
= f
->private_data
;
867 pdata
= memdup_user_nul(buf
, cnt
);
869 return PTR_ERR(pdata
);
872 for (i
= 0; i
< num_of_items
; i
++) {
874 p
= strstr(p0
, d
[i
].name
);
877 p1
= strchr(p
, '\n');
885 r
= simple_strtoul(p2
, NULL
, 0);
887 *((u8
*) d
[i
].addr
) = (u8
) r
;
888 else if (d
[i
].size
== 2)
889 *((u16
*) d
[i
].addr
) = (u16
) r
;
890 else if (d
[i
].size
== 4)
891 *((u32
*) d
[i
].addr
) = (u32
) r
;
892 else if (d
[i
].size
== 8)
893 *((u64
*) d
[i
].addr
) = (u64
) r
;
902 static const struct file_operations lbs_debug_fops
= {
903 .owner
= THIS_MODULE
,
905 .write
= lbs_debugfs_write
,
906 .read
= lbs_debugfs_read
,
907 .llseek
= default_llseek
,
911 * lbs_debug_init - create debug proc file
913 * @priv: pointer to &struct lbs_private
917 static void lbs_debug_init(struct lbs_private
*priv
)
921 if (!priv
->debugfs_dir
)
924 for (i
= 0; i
< num_of_items
; i
++)
925 items
[i
].addr
+= (size_t) priv
;
927 priv
->debugfs_debug
= debugfs_create_file("debug", 0644,
928 priv
->debugfs_dir
, &items
[0],