diff options
Diffstat (limited to 'drivers/net/ethernet/brocade/bna/bnad.c')
| -rw-r--r-- | drivers/net/ethernet/brocade/bna/bnad.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index 741f2e405006..2eddbaa5db47 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c | |||
| @@ -44,6 +44,11 @@ static uint bnad_ioc_auto_recover = 1; | |||
| 44 | module_param(bnad_ioc_auto_recover, uint, 0444); | 44 | module_param(bnad_ioc_auto_recover, uint, 0444); |
| 45 | MODULE_PARM_DESC(bnad_ioc_auto_recover, "Enable / Disable auto recovery"); | 45 | MODULE_PARM_DESC(bnad_ioc_auto_recover, "Enable / Disable auto recovery"); |
| 46 | 46 | ||
| 47 | static uint bna_debugfs_enable = 1; | ||
| 48 | module_param(bna_debugfs_enable, uint, S_IRUGO | S_IWUSR); | ||
| 49 | MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1," | ||
| 50 | " Range[false:0|true:1]"); | ||
| 51 | |||
| 47 | /* | 52 | /* |
| 48 | * Global variables | 53 | * Global variables |
| 49 | */ | 54 | */ |
| @@ -3312,6 +3317,10 @@ bnad_pci_probe(struct pci_dev *pdev, | |||
| 3312 | /* Set link to down state */ | 3317 | /* Set link to down state */ |
| 3313 | netif_carrier_off(netdev); | 3318 | netif_carrier_off(netdev); |
| 3314 | 3319 | ||
| 3320 | /* Setup the debugfs node for this bfad */ | ||
| 3321 | if (bna_debugfs_enable) | ||
| 3322 | bnad_debugfs_init(bnad); | ||
| 3323 | |||
| 3315 | /* Get resource requirement form bna */ | 3324 | /* Get resource requirement form bna */ |
| 3316 | spin_lock_irqsave(&bnad->bna_lock, flags); | 3325 | spin_lock_irqsave(&bnad->bna_lock, flags); |
| 3317 | bna_res_req(&bnad->res_info[0]); | 3326 | bna_res_req(&bnad->res_info[0]); |
| @@ -3433,6 +3442,9 @@ disable_ioceth: | |||
| 3433 | res_free: | 3442 | res_free: |
| 3434 | bnad_res_free(bnad, &bnad->res_info[0], BNA_RES_T_MAX); | 3443 | bnad_res_free(bnad, &bnad->res_info[0], BNA_RES_T_MAX); |
| 3435 | drv_uninit: | 3444 | drv_uninit: |
| 3445 | /* Remove the debugfs node for this bnad */ | ||
| 3446 | kfree(bnad->regdata); | ||
| 3447 | bnad_debugfs_uninit(bnad); | ||
| 3436 | bnad_uninit(bnad); | 3448 | bnad_uninit(bnad); |
| 3437 | pci_uninit: | 3449 | pci_uninit: |
| 3438 | bnad_pci_uninit(pdev); | 3450 | bnad_pci_uninit(pdev); |
| @@ -3479,6 +3491,9 @@ bnad_pci_remove(struct pci_dev *pdev) | |||
| 3479 | mutex_unlock(&bnad->conf_mutex); | 3491 | mutex_unlock(&bnad->conf_mutex); |
| 3480 | bnad_remove_from_list(bnad); | 3492 | bnad_remove_from_list(bnad); |
| 3481 | bnad_lock_uninit(bnad); | 3493 | bnad_lock_uninit(bnad); |
| 3494 | /* Remove the debugfs node for this bnad */ | ||
| 3495 | kfree(bnad->regdata); | ||
| 3496 | bnad_debugfs_uninit(bnad); | ||
| 3482 | bnad_uninit(bnad); | 3497 | bnad_uninit(bnad); |
| 3483 | free_netdev(netdev); | 3498 | free_netdev(netdev); |
| 3484 | } | 3499 | } |
