bnad_debugfs.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. /*
  2. * Linux network driver for Brocade Converged Network Adapter.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License (GPL) Version 2 as
  6. * published by the Free Software Foundation
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. */
  13. /*
  14. * Copyright (c) 2005-2011 Brocade Communications Systems, Inc.
  15. * All rights reserved
  16. * www.brocade.com
  17. */
  18. #include <linux/debugfs.h>
  19. #include <linux/module.h>
  20. #include "bnad.h"
  21. /*
  22. * BNA debufs interface
  23. *
  24. * To access the interface, debugfs file system should be mounted
  25. * if not already mounted using:
  26. * mount -t debugfs none /sys/kernel/debug
  27. *
  28. * BNA Hierarchy:
  29. * - bna/pci_dev:<pci_name>
  30. * where the pci_name corresponds to the one under /sys/bus/pci/drivers/bna
  31. *
  32. * Debugging service available per pci_dev:
  33. * fwtrc: To collect current firmware trace.
  34. * fwsave: To collect last saved fw trace as a result of firmware crash.
  35. * regwr: To write one word to chip register
  36. * regrd: To read one or more words from chip register.
  37. */
  38. struct bnad_debug_info {
  39. char *debug_buffer;
  40. void *i_private;
  41. int buffer_len;
  42. };
  43. static int
  44. bnad_debugfs_open_fwtrc(struct inode *inode, struct file *file)
  45. {
  46. struct bnad *bnad = inode->i_private;
  47. struct bnad_debug_info *fw_debug;
  48. unsigned long flags;
  49. int rc;
  50. fw_debug = kzalloc(sizeof(struct bnad_debug_info), GFP_KERNEL);
  51. if (!fw_debug)
  52. return -ENOMEM;
  53. fw_debug->buffer_len = BNA_DBG_FWTRC_LEN;
  54. fw_debug->debug_buffer = kzalloc(fw_debug->buffer_len, GFP_KERNEL);
  55. if (!fw_debug->debug_buffer) {
  56. kfree(fw_debug);
  57. fw_debug = NULL;
  58. pr_warn("bna %s: Failed to allocate fwtrc buffer\n",
  59. pci_name(bnad->pcidev));
  60. return -ENOMEM;
  61. }
  62. spin_lock_irqsave(&bnad->bna_lock, flags);
  63. rc = bfa_nw_ioc_debug_fwtrc(&bnad->bna.ioceth.ioc,
  64. fw_debug->debug_buffer,
  65. &fw_debug->buffer_len);
  66. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  67. if (rc != BFA_STATUS_OK) {
  68. kfree(fw_debug->debug_buffer);
  69. fw_debug->debug_buffer = NULL;
  70. kfree(fw_debug);
  71. fw_debug = NULL;
  72. pr_warn("bnad %s: Failed to collect fwtrc\n",
  73. pci_name(bnad->pcidev));
  74. return -ENOMEM;
  75. }
  76. file->private_data = fw_debug;
  77. return 0;
  78. }
  79. static int
  80. bnad_debugfs_open_fwsave(struct inode *inode, struct file *file)
  81. {
  82. struct bnad *bnad = inode->i_private;
  83. struct bnad_debug_info *fw_debug;
  84. unsigned long flags;
  85. int rc;
  86. fw_debug = kzalloc(sizeof(struct bnad_debug_info), GFP_KERNEL);
  87. if (!fw_debug)
  88. return -ENOMEM;
  89. fw_debug->buffer_len = BNA_DBG_FWTRC_LEN;
  90. fw_debug->debug_buffer = kzalloc(fw_debug->buffer_len, GFP_KERNEL);
  91. if (!fw_debug->debug_buffer) {
  92. kfree(fw_debug);
  93. fw_debug = NULL;
  94. pr_warn("bna %s: Failed to allocate fwsave buffer\n",
  95. pci_name(bnad->pcidev));
  96. return -ENOMEM;
  97. }
  98. spin_lock_irqsave(&bnad->bna_lock, flags);
  99. rc = bfa_nw_ioc_debug_fwsave(&bnad->bna.ioceth.ioc,
  100. fw_debug->debug_buffer,
  101. &fw_debug->buffer_len);
  102. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  103. if (rc != BFA_STATUS_OK && rc != BFA_STATUS_ENOFSAVE) {
  104. kfree(fw_debug->debug_buffer);
  105. fw_debug->debug_buffer = NULL;
  106. kfree(fw_debug);
  107. fw_debug = NULL;
  108. pr_warn("bna %s: Failed to collect fwsave\n",
  109. pci_name(bnad->pcidev));
  110. return -ENOMEM;
  111. }
  112. file->private_data = fw_debug;
  113. return 0;
  114. }
  115. static int
  116. bnad_debugfs_open_reg(struct inode *inode, struct file *file)
  117. {
  118. struct bnad_debug_info *reg_debug;
  119. reg_debug = kzalloc(sizeof(struct bnad_debug_info), GFP_KERNEL);
  120. if (!reg_debug)
  121. return -ENOMEM;
  122. reg_debug->i_private = inode->i_private;
  123. file->private_data = reg_debug;
  124. return 0;
  125. }
  126. static int
  127. bnad_get_debug_drvinfo(struct bnad *bnad, void *buffer, u32 len)
  128. {
  129. struct bnad_drvinfo *drvinfo = (struct bnad_drvinfo *) buffer;
  130. struct bnad_iocmd_comp fcomp;
  131. unsigned long flags = 0;
  132. int ret = BFA_STATUS_FAILED;
  133. /* Get IOC info */
  134. spin_lock_irqsave(&bnad->bna_lock, flags);
  135. bfa_nw_ioc_get_attr(&bnad->bna.ioceth.ioc, &drvinfo->ioc_attr);
  136. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  137. /* Retrieve CEE related info */
  138. fcomp.bnad = bnad;
  139. fcomp.comp_status = 0;
  140. init_completion(&fcomp.comp);
  141. spin_lock_irqsave(&bnad->bna_lock, flags);
  142. ret = bfa_nw_cee_get_attr(&bnad->bna.cee, &drvinfo->cee_attr,
  143. bnad_cb_completion, &fcomp);
  144. if (ret != BFA_STATUS_OK) {
  145. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  146. goto out;
  147. }
  148. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  149. wait_for_completion(&fcomp.comp);
  150. drvinfo->cee_status = fcomp.comp_status;
  151. /* Retrieve flash partition info */
  152. fcomp.comp_status = 0;
  153. init_completion(&fcomp.comp);
  154. spin_lock_irqsave(&bnad->bna_lock, flags);
  155. ret = bfa_nw_flash_get_attr(&bnad->bna.flash, &drvinfo->flash_attr,
  156. bnad_cb_completion, &fcomp);
  157. if (ret != BFA_STATUS_OK) {
  158. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  159. goto out;
  160. }
  161. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  162. wait_for_completion(&fcomp.comp);
  163. drvinfo->flash_status = fcomp.comp_status;
  164. out:
  165. return ret;
  166. }
  167. static int
  168. bnad_debugfs_open_drvinfo(struct inode *inode, struct file *file)
  169. {
  170. struct bnad *bnad = inode->i_private;
  171. struct bnad_debug_info *drv_info;
  172. int rc;
  173. drv_info = kzalloc(sizeof(struct bnad_debug_info), GFP_KERNEL);
  174. if (!drv_info)
  175. return -ENOMEM;
  176. drv_info->buffer_len = sizeof(struct bnad_drvinfo);
  177. drv_info->debug_buffer = kzalloc(drv_info->buffer_len, GFP_KERNEL);
  178. if (!drv_info->debug_buffer) {
  179. kfree(drv_info);
  180. drv_info = NULL;
  181. pr_warn("bna %s: Failed to allocate drv info buffer\n",
  182. pci_name(bnad->pcidev));
  183. return -ENOMEM;
  184. }
  185. mutex_lock(&bnad->conf_mutex);
  186. rc = bnad_get_debug_drvinfo(bnad, drv_info->debug_buffer,
  187. drv_info->buffer_len);
  188. mutex_unlock(&bnad->conf_mutex);
  189. if (rc != BFA_STATUS_OK) {
  190. kfree(drv_info->debug_buffer);
  191. drv_info->debug_buffer = NULL;
  192. kfree(drv_info);
  193. drv_info = NULL;
  194. pr_warn("bna %s: Failed to collect drvinfo\n",
  195. pci_name(bnad->pcidev));
  196. return -ENOMEM;
  197. }
  198. file->private_data = drv_info;
  199. return 0;
  200. }
  201. /* Changes the current file position */
  202. static loff_t
  203. bnad_debugfs_lseek(struct file *file, loff_t offset, int orig)
  204. {
  205. loff_t pos = file->f_pos;
  206. struct bnad_debug_info *debug = file->private_data;
  207. if (!debug)
  208. return -EINVAL;
  209. switch (orig) {
  210. case 0:
  211. file->f_pos = offset;
  212. break;
  213. case 1:
  214. file->f_pos += offset;
  215. break;
  216. case 2:
  217. file->f_pos = debug->buffer_len - offset;
  218. break;
  219. default:
  220. return -EINVAL;
  221. }
  222. if (file->f_pos < 0 || file->f_pos > debug->buffer_len) {
  223. file->f_pos = pos;
  224. return -EINVAL;
  225. }
  226. return file->f_pos;
  227. }
  228. static ssize_t
  229. bnad_debugfs_read(struct file *file, char __user *buf,
  230. size_t nbytes, loff_t *pos)
  231. {
  232. struct bnad_debug_info *debug = file->private_data;
  233. if (!debug || !debug->debug_buffer)
  234. return 0;
  235. return simple_read_from_buffer(buf, nbytes, pos,
  236. debug->debug_buffer, debug->buffer_len);
  237. }
  238. #define BFA_REG_CT_ADDRSZ (0x40000)
  239. #define BFA_REG_CB_ADDRSZ (0x20000)
  240. #define BFA_REG_ADDRSZ(__ioc) \
  241. ((u32)(bfa_asic_id_ctc(bfa_ioc_devid(__ioc)) ? \
  242. BFA_REG_CT_ADDRSZ : BFA_REG_CB_ADDRSZ))
  243. #define BFA_REG_ADDRMSK(__ioc) (BFA_REG_ADDRSZ(__ioc) - 1)
  244. /*
  245. * Function to check if the register offset passed is valid.
  246. */
  247. static int
  248. bna_reg_offset_check(struct bfa_ioc *ioc, u32 offset, u32 len)
  249. {
  250. u8 area;
  251. /* check [16:15] */
  252. area = (offset >> 15) & 0x7;
  253. if (area == 0) {
  254. /* PCIe core register */
  255. if ((offset + (len<<2)) > 0x8000) /* 8k dwords or 32KB */
  256. return BFA_STATUS_EINVAL;
  257. } else if (area == 0x1) {
  258. /* CB 32 KB memory page */
  259. if ((offset + (len<<2)) > 0x10000) /* 8k dwords or 32KB */
  260. return BFA_STATUS_EINVAL;
  261. } else {
  262. /* CB register space 64KB */
  263. if ((offset + (len<<2)) > BFA_REG_ADDRMSK(ioc))
  264. return BFA_STATUS_EINVAL;
  265. }
  266. return BFA_STATUS_OK;
  267. }
  268. static ssize_t
  269. bnad_debugfs_read_regrd(struct file *file, char __user *buf,
  270. size_t nbytes, loff_t *pos)
  271. {
  272. struct bnad_debug_info *regrd_debug = file->private_data;
  273. struct bnad *bnad = (struct bnad *)regrd_debug->i_private;
  274. ssize_t rc;
  275. if (!bnad->regdata)
  276. return 0;
  277. rc = simple_read_from_buffer(buf, nbytes, pos,
  278. bnad->regdata, bnad->reglen);
  279. if ((*pos + nbytes) >= bnad->reglen) {
  280. kfree(bnad->regdata);
  281. bnad->regdata = NULL;
  282. bnad->reglen = 0;
  283. }
  284. return rc;
  285. }
  286. static ssize_t
  287. bnad_debugfs_write_regrd(struct file *file, const char __user *buf,
  288. size_t nbytes, loff_t *ppos)
  289. {
  290. struct bnad_debug_info *regrd_debug = file->private_data;
  291. struct bnad *bnad = (struct bnad *)regrd_debug->i_private;
  292. struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
  293. int addr, len, rc, i;
  294. u32 *regbuf;
  295. void __iomem *rb, *reg_addr;
  296. unsigned long flags;
  297. void *kern_buf;
  298. /* Allocate memory to store the user space buf */
  299. kern_buf = kzalloc(nbytes, GFP_KERNEL);
  300. if (!kern_buf) {
  301. pr_warn("bna %s: Failed to allocate user buffer\n",
  302. pci_name(bnad->pcidev));
  303. return -ENOMEM;
  304. }
  305. if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) {
  306. kfree(kern_buf);
  307. return -ENOMEM;
  308. }
  309. rc = sscanf(kern_buf, "%x:%x", &addr, &len);
  310. if (rc < 2) {
  311. pr_warn("bna %s: Failed to read user buffer\n",
  312. pci_name(bnad->pcidev));
  313. kfree(kern_buf);
  314. return -EINVAL;
  315. }
  316. kfree(kern_buf);
  317. kfree(bnad->regdata);
  318. bnad->regdata = NULL;
  319. bnad->reglen = 0;
  320. bnad->regdata = kzalloc(len << 2, GFP_KERNEL);
  321. if (!bnad->regdata) {
  322. pr_warn("bna %s: Failed to allocate regrd buffer\n",
  323. pci_name(bnad->pcidev));
  324. return -ENOMEM;
  325. }
  326. bnad->reglen = len << 2;
  327. rb = bfa_ioc_bar0(ioc);
  328. addr &= BFA_REG_ADDRMSK(ioc);
  329. /* offset and len sanity check */
  330. rc = bna_reg_offset_check(ioc, addr, len);
  331. if (rc) {
  332. pr_warn("bna %s: Failed reg offset check\n",
  333. pci_name(bnad->pcidev));
  334. kfree(bnad->regdata);
  335. bnad->regdata = NULL;
  336. bnad->reglen = 0;
  337. return -EINVAL;
  338. }
  339. reg_addr = rb + addr;
  340. regbuf = (u32 *)bnad->regdata;
  341. spin_lock_irqsave(&bnad->bna_lock, flags);
  342. for (i = 0; i < len; i++) {
  343. *regbuf = readl(reg_addr);
  344. regbuf++;
  345. reg_addr += sizeof(u32);
  346. }
  347. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  348. return nbytes;
  349. }
  350. static ssize_t
  351. bnad_debugfs_write_regwr(struct file *file, const char __user *buf,
  352. size_t nbytes, loff_t *ppos)
  353. {
  354. struct bnad_debug_info *debug = file->private_data;
  355. struct bnad *bnad = (struct bnad *)debug->i_private;
  356. struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
  357. int addr, val, rc;
  358. void __iomem *reg_addr;
  359. unsigned long flags;
  360. void *kern_buf;
  361. /* Allocate memory to store the user space buf */
  362. kern_buf = kzalloc(nbytes, GFP_KERNEL);
  363. if (!kern_buf) {
  364. pr_warn("bna %s: Failed to allocate user buffer\n",
  365. pci_name(bnad->pcidev));
  366. return -ENOMEM;
  367. }
  368. if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) {
  369. kfree(kern_buf);
  370. return -ENOMEM;
  371. }
  372. rc = sscanf(kern_buf, "%x:%x", &addr, &val);
  373. if (rc < 2) {
  374. pr_warn("bna %s: Failed to read user buffer\n",
  375. pci_name(bnad->pcidev));
  376. kfree(kern_buf);
  377. return -EINVAL;
  378. }
  379. kfree(kern_buf);
  380. addr &= BFA_REG_ADDRMSK(ioc); /* offset only 17 bit and word align */
  381. /* offset and len sanity check */
  382. rc = bna_reg_offset_check(ioc, addr, 1);
  383. if (rc) {
  384. pr_warn("bna %s: Failed reg offset check\n",
  385. pci_name(bnad->pcidev));
  386. return -EINVAL;
  387. }
  388. reg_addr = (bfa_ioc_bar0(ioc)) + addr;
  389. spin_lock_irqsave(&bnad->bna_lock, flags);
  390. writel(val, reg_addr);
  391. spin_unlock_irqrestore(&bnad->bna_lock, flags);
  392. return nbytes;
  393. }
  394. static int
  395. bnad_debugfs_release(struct inode *inode, struct file *file)
  396. {
  397. struct bnad_debug_info *debug = file->private_data;
  398. if (!debug)
  399. return 0;
  400. file->private_data = NULL;
  401. kfree(debug);
  402. return 0;
  403. }
  404. static int
  405. bnad_debugfs_buffer_release(struct inode *inode, struct file *file)
  406. {
  407. struct bnad_debug_info *debug = file->private_data;
  408. if (!debug)
  409. return 0;
  410. kfree(debug->debug_buffer);
  411. file->private_data = NULL;
  412. kfree(debug);
  413. debug = NULL;
  414. return 0;
  415. }
  416. static const struct file_operations bnad_debugfs_op_fwtrc = {
  417. .owner = THIS_MODULE,
  418. .open = bnad_debugfs_open_fwtrc,
  419. .llseek = bnad_debugfs_lseek,
  420. .read = bnad_debugfs_read,
  421. .release = bnad_debugfs_buffer_release,
  422. };
  423. static const struct file_operations bnad_debugfs_op_fwsave = {
  424. .owner = THIS_MODULE,
  425. .open = bnad_debugfs_open_fwsave,
  426. .llseek = bnad_debugfs_lseek,
  427. .read = bnad_debugfs_read,
  428. .release = bnad_debugfs_buffer_release,
  429. };
  430. static const struct file_operations bnad_debugfs_op_regrd = {
  431. .owner = THIS_MODULE,
  432. .open = bnad_debugfs_open_reg,
  433. .llseek = bnad_debugfs_lseek,
  434. .read = bnad_debugfs_read_regrd,
  435. .write = bnad_debugfs_write_regrd,
  436. .release = bnad_debugfs_release,
  437. };
  438. static const struct file_operations bnad_debugfs_op_regwr = {
  439. .owner = THIS_MODULE,
  440. .open = bnad_debugfs_open_reg,
  441. .llseek = bnad_debugfs_lseek,
  442. .write = bnad_debugfs_write_regwr,
  443. .release = bnad_debugfs_release,
  444. };
  445. static const struct file_operations bnad_debugfs_op_drvinfo = {
  446. .owner = THIS_MODULE,
  447. .open = bnad_debugfs_open_drvinfo,
  448. .llseek = bnad_debugfs_lseek,
  449. .read = bnad_debugfs_read,
  450. .release = bnad_debugfs_buffer_release,
  451. };
  452. struct bnad_debugfs_entry {
  453. const char *name;
  454. mode_t mode;
  455. const struct file_operations *fops;
  456. };
  457. static const struct bnad_debugfs_entry bnad_debugfs_files[] = {
  458. { "fwtrc", S_IFREG|S_IRUGO, &bnad_debugfs_op_fwtrc, },
  459. { "fwsave", S_IFREG|S_IRUGO, &bnad_debugfs_op_fwsave, },
  460. { "regrd", S_IFREG|S_IRUGO|S_IWUSR, &bnad_debugfs_op_regrd, },
  461. { "regwr", S_IFREG|S_IWUSR, &bnad_debugfs_op_regwr, },
  462. { "drvinfo", S_IFREG|S_IRUGO, &bnad_debugfs_op_drvinfo, },
  463. };
  464. static struct dentry *bna_debugfs_root;
  465. static atomic_t bna_debugfs_port_count;
  466. /* Initialize debugfs interface for BNA */
  467. void
  468. bnad_debugfs_init(struct bnad *bnad)
  469. {
  470. const struct bnad_debugfs_entry *file;
  471. char name[64];
  472. int i;
  473. /* Setup the BNA debugfs root directory*/
  474. if (!bna_debugfs_root) {
  475. bna_debugfs_root = debugfs_create_dir("bna", NULL);
  476. atomic_set(&bna_debugfs_port_count, 0);
  477. if (!bna_debugfs_root) {
  478. pr_warn("BNA: debugfs root dir creation failed\n");
  479. return;
  480. }
  481. }
  482. /* Setup the pci_dev debugfs directory for the port */
  483. snprintf(name, sizeof(name), "pci_dev:%s", pci_name(bnad->pcidev));
  484. if (!bnad->port_debugfs_root) {
  485. bnad->port_debugfs_root =
  486. debugfs_create_dir(name, bna_debugfs_root);
  487. if (!bnad->port_debugfs_root) {
  488. pr_warn("bna pci_dev %s: root dir creation failed\n",
  489. pci_name(bnad->pcidev));
  490. return;
  491. }
  492. atomic_inc(&bna_debugfs_port_count);
  493. for (i = 0; i < ARRAY_SIZE(bnad_debugfs_files); i++) {
  494. file = &bnad_debugfs_files[i];
  495. bnad->bnad_dentry_files[i] =
  496. debugfs_create_file(file->name,
  497. file->mode,
  498. bnad->port_debugfs_root,
  499. bnad,
  500. file->fops);
  501. if (!bnad->bnad_dentry_files[i]) {
  502. pr_warn(
  503. "BNA pci_dev:%s: create %s entry failed\n",
  504. pci_name(bnad->pcidev), file->name);
  505. return;
  506. }
  507. }
  508. }
  509. }
  510. /* Uninitialize debugfs interface for BNA */
  511. void
  512. bnad_debugfs_uninit(struct bnad *bnad)
  513. {
  514. int i;
  515. for (i = 0; i < ARRAY_SIZE(bnad_debugfs_files); i++) {
  516. if (bnad->bnad_dentry_files[i]) {
  517. debugfs_remove(bnad->bnad_dentry_files[i]);
  518. bnad->bnad_dentry_files[i] = NULL;
  519. }
  520. }
  521. /* Remove the pci_dev debugfs directory for the port */
  522. if (bnad->port_debugfs_root) {
  523. debugfs_remove(bnad->port_debugfs_root);
  524. bnad->port_debugfs_root = NULL;
  525. atomic_dec(&bna_debugfs_port_count);
  526. }
  527. /* Remove the BNA debugfs root directory */
  528. if (atomic_read(&bna_debugfs_port_count) == 0) {
  529. debugfs_remove(bna_debugfs_root);
  530. bna_debugfs_root = NULL;
  531. }
  532. }