mirror of
https://github.com/torvalds/linux
synced 2024-09-25 05:50:57 +00:00
lpfc: Remove global lpfc_enable_npiv attribute in leiu of per-hba lpfc_enable_npiv
Remove global lpfc_enable_npiv attribute in leiu of per-hba lpfc_enable_npiv Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
0e916ee71d
commit
458c083e83
|
@ -2844,12 +2844,8 @@ MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:"
|
||||||
" 2 - select SLI-2 even on SLI-3 capable HBAs,"
|
" 2 - select SLI-2 even on SLI-3 capable HBAs,"
|
||||||
" 3 - select SLI-3");
|
" 3 - select SLI-3");
|
||||||
|
|
||||||
int lpfc_enable_npiv = 1;
|
LPFC_ATTR_R(enable_npiv, 1, 0, 1,
|
||||||
module_param(lpfc_enable_npiv, int, S_IRUGO);
|
"Enable NPIV functionality");
|
||||||
MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality");
|
|
||||||
lpfc_param_show(enable_npiv);
|
|
||||||
lpfc_param_init(enable_npiv, 1, 0, 1);
|
|
||||||
static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, lpfc_enable_npiv_show, NULL);
|
|
||||||
|
|
||||||
LPFC_ATTR_R(fcf_failover_policy, 1, 1, 2,
|
LPFC_ATTR_R(fcf_failover_policy, 1, 1, 2,
|
||||||
"FCF Fast failover=1 Priority failover=2");
|
"FCF Fast failover=1 Priority failover=2");
|
||||||
|
|
|
@ -360,7 +360,6 @@ extern struct scsi_host_template lpfc_vport_template;
|
||||||
extern struct fc_function_template lpfc_transport_functions;
|
extern struct fc_function_template lpfc_transport_functions;
|
||||||
extern struct fc_function_template lpfc_vport_transport_functions;
|
extern struct fc_function_template lpfc_vport_transport_functions;
|
||||||
extern int lpfc_sli_mode;
|
extern int lpfc_sli_mode;
|
||||||
extern int lpfc_enable_npiv;
|
|
||||||
extern int lpfc_delay_discovery;
|
extern int lpfc_delay_discovery;
|
||||||
|
|
||||||
int lpfc_vport_symbolic_node_name(struct lpfc_vport *, char *, size_t);
|
int lpfc_vport_symbolic_node_name(struct lpfc_vport *, char *, size_t);
|
||||||
|
|
|
@ -11441,22 +11441,18 @@ lpfc_init(void)
|
||||||
printk(KERN_ERR "Could not register lpfcmgmt device, "
|
printk(KERN_ERR "Could not register lpfcmgmt device, "
|
||||||
"misc_register returned with status %d", error);
|
"misc_register returned with status %d", error);
|
||||||
|
|
||||||
if (lpfc_enable_npiv) {
|
|
||||||
lpfc_transport_functions.vport_create = lpfc_vport_create;
|
lpfc_transport_functions.vport_create = lpfc_vport_create;
|
||||||
lpfc_transport_functions.vport_delete = lpfc_vport_delete;
|
lpfc_transport_functions.vport_delete = lpfc_vport_delete;
|
||||||
}
|
|
||||||
lpfc_transport_template =
|
lpfc_transport_template =
|
||||||
fc_attach_transport(&lpfc_transport_functions);
|
fc_attach_transport(&lpfc_transport_functions);
|
||||||
if (lpfc_transport_template == NULL)
|
if (lpfc_transport_template == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
if (lpfc_enable_npiv) {
|
|
||||||
lpfc_vport_transport_template =
|
lpfc_vport_transport_template =
|
||||||
fc_attach_transport(&lpfc_vport_transport_functions);
|
fc_attach_transport(&lpfc_vport_transport_functions);
|
||||||
if (lpfc_vport_transport_template == NULL) {
|
if (lpfc_vport_transport_template == NULL) {
|
||||||
fc_release_transport(lpfc_transport_template);
|
fc_release_transport(lpfc_transport_template);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize in case vector mapping is needed */
|
/* Initialize in case vector mapping is needed */
|
||||||
lpfc_used_cpu = NULL;
|
lpfc_used_cpu = NULL;
|
||||||
|
@ -11467,7 +11463,6 @@ lpfc_init(void)
|
||||||
error = pci_register_driver(&lpfc_driver);
|
error = pci_register_driver(&lpfc_driver);
|
||||||
if (error) {
|
if (error) {
|
||||||
fc_release_transport(lpfc_transport_template);
|
fc_release_transport(lpfc_transport_template);
|
||||||
if (lpfc_enable_npiv)
|
|
||||||
fc_release_transport(lpfc_vport_transport_template);
|
fc_release_transport(lpfc_vport_transport_template);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11487,7 +11482,6 @@ lpfc_exit(void)
|
||||||
misc_deregister(&lpfc_mgmt_dev);
|
misc_deregister(&lpfc_mgmt_dev);
|
||||||
pci_unregister_driver(&lpfc_driver);
|
pci_unregister_driver(&lpfc_driver);
|
||||||
fc_release_transport(lpfc_transport_template);
|
fc_release_transport(lpfc_transport_template);
|
||||||
if (lpfc_enable_npiv)
|
|
||||||
fc_release_transport(lpfc_vport_transport_template);
|
fc_release_transport(lpfc_vport_transport_template);
|
||||||
if (_dump_buf_data) {
|
if (_dump_buf_data) {
|
||||||
printk(KERN_ERR "9062 BLKGRD: freeing %lu pages for "
|
printk(KERN_ERR "9062 BLKGRD: freeing %lu pages for "
|
||||||
|
|
Loading…
Reference in a new issue