diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 81 |
1 files changed, 20 insertions, 61 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index bd35e9c7b995..356dede9cd65 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -1113,7 +1113,13 @@ MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" | |||
1113 | " 2 - select SLI-2 even on SLI-3 capable HBAs," | 1113 | " 2 - select SLI-2 even on SLI-3 capable HBAs," |
1114 | " 3 - select SLI-3"); | 1114 | " 3 - select SLI-3"); |
1115 | 1115 | ||
1116 | LPFC_ATTR_R(enable_npiv, 0, 0, 1, "Enable NPIV functionality"); | 1116 | int lpfc_enable_npiv = 0; |
1117 | module_param(lpfc_enable_npiv, int, 0); | ||
1118 | MODULE_PARM_DESC(lpfc_enable_npiv, "Enable NPIV functionality"); | ||
1119 | lpfc_param_show(enable_npiv); | ||
1120 | lpfc_param_init(enable_npiv, 0, 0, 1); | ||
1121 | static CLASS_DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO, | ||
1122 | lpfc_enable_npiv_show, NULL); | ||
1117 | 1123 | ||
1118 | /* | 1124 | /* |
1119 | # lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear | 1125 | # lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear |
@@ -1259,6 +1265,13 @@ LPFC_VPORT_ATTR_HEX_RW(log_verbose, 0x0, 0x0, 0xffff, | |||
1259 | "Verbose logging bit-mask"); | 1265 | "Verbose logging bit-mask"); |
1260 | 1266 | ||
1261 | /* | 1267 | /* |
1268 | # lpfc_enable_da_id: This turns on the DA_ID CT command that deregisters | ||
1269 | # objects that have been registered with the nameserver after login. | ||
1270 | */ | ||
1271 | LPFC_VPORT_ATTR_R(enable_da_id, 0, 0, 1, | ||
1272 | "Deregister nameserver objects before LOGO"); | ||
1273 | |||
1274 | /* | ||
1262 | # lun_queue_depth: This parameter is used to limit the number of outstanding | 1275 | # lun_queue_depth: This parameter is used to limit the number of outstanding |
1263 | # commands per FCP LUN. Value range is [1,128]. Default value is 30. | 1276 | # commands per FCP LUN. Value range is [1,128]. Default value is 30. |
1264 | */ | 1277 | */ |
@@ -1564,6 +1577,7 @@ struct class_device_attribute *lpfc_vport_attrs[] = { | |||
1564 | &class_device_attr_lpfc_max_luns, | 1577 | &class_device_attr_lpfc_max_luns, |
1565 | &class_device_attr_nport_evt_cnt, | 1578 | &class_device_attr_nport_evt_cnt, |
1566 | &class_device_attr_npiv_info, | 1579 | &class_device_attr_npiv_info, |
1580 | &class_device_attr_lpfc_enable_da_id, | ||
1567 | NULL, | 1581 | NULL, |
1568 | }; | 1582 | }; |
1569 | 1583 | ||
@@ -2349,69 +2363,13 @@ struct fc_function_template lpfc_transport_functions = { | |||
2349 | .dev_loss_tmo_callbk = lpfc_dev_loss_tmo_callbk, | 2363 | .dev_loss_tmo_callbk = lpfc_dev_loss_tmo_callbk, |
2350 | .terminate_rport_io = lpfc_terminate_rport_io, | 2364 | .terminate_rport_io = lpfc_terminate_rport_io, |
2351 | 2365 | ||
2352 | .vport_create = lpfc_vport_create, | 2366 | /* Vport fields are filled in at runtime based on enable_npiv */ |
2353 | .vport_delete = lpfc_vport_delete, | 2367 | .vport_create = NULL, |
2368 | .vport_delete = NULL, | ||
2369 | .vport_disable = NULL, | ||
2354 | .dd_fcvport_size = sizeof(struct lpfc_vport *), | 2370 | .dd_fcvport_size = sizeof(struct lpfc_vport *), |
2355 | }; | 2371 | }; |
2356 | 2372 | ||
2357 | struct fc_function_template lpfc_vport_transport_functions = { | ||
2358 | /* fixed attributes the driver supports */ | ||
2359 | .show_host_node_name = 1, | ||
2360 | .show_host_port_name = 1, | ||
2361 | .show_host_supported_classes = 1, | ||
2362 | .show_host_supported_fc4s = 1, | ||
2363 | .show_host_supported_speeds = 1, | ||
2364 | .show_host_maxframe_size = 1, | ||
2365 | |||
2366 | /* dynamic attributes the driver supports */ | ||
2367 | .get_host_port_id = lpfc_get_host_port_id, | ||
2368 | .show_host_port_id = 1, | ||
2369 | |||
2370 | .get_host_port_type = lpfc_get_host_port_type, | ||
2371 | .show_host_port_type = 1, | ||
2372 | |||
2373 | .get_host_port_state = lpfc_get_host_port_state, | ||
2374 | .show_host_port_state = 1, | ||
2375 | |||
2376 | /* active_fc4s is shown but doesn't change (thus no get function) */ | ||
2377 | .show_host_active_fc4s = 1, | ||
2378 | |||
2379 | .get_host_speed = lpfc_get_host_speed, | ||
2380 | .show_host_speed = 1, | ||
2381 | |||
2382 | .get_host_fabric_name = lpfc_get_host_fabric_name, | ||
2383 | .show_host_fabric_name = 1, | ||
2384 | |||
2385 | /* | ||
2386 | * The LPFC driver treats linkdown handling as target loss events | ||
2387 | * so there are no sysfs handlers for link_down_tmo. | ||
2388 | */ | ||
2389 | |||
2390 | .get_fc_host_stats = lpfc_get_stats, | ||
2391 | .reset_fc_host_stats = lpfc_reset_stats, | ||
2392 | |||
2393 | .dd_fcrport_size = sizeof(struct lpfc_rport_data), | ||
2394 | .show_rport_maxframe_size = 1, | ||
2395 | .show_rport_supported_classes = 1, | ||
2396 | |||
2397 | .set_rport_dev_loss_tmo = lpfc_set_rport_loss_tmo, | ||
2398 | .show_rport_dev_loss_tmo = 1, | ||
2399 | |||
2400 | .get_starget_port_id = lpfc_get_starget_port_id, | ||
2401 | .show_starget_port_id = 1, | ||
2402 | |||
2403 | .get_starget_node_name = lpfc_get_starget_node_name, | ||
2404 | .show_starget_node_name = 1, | ||
2405 | |||
2406 | .get_starget_port_name = lpfc_get_starget_port_name, | ||
2407 | .show_starget_port_name = 1, | ||
2408 | |||
2409 | .dev_loss_tmo_callbk = lpfc_dev_loss_tmo_callbk, | ||
2410 | .terminate_rport_io = lpfc_terminate_rport_io, | ||
2411 | |||
2412 | .vport_disable = lpfc_vport_disable, | ||
2413 | }; | ||
2414 | |||
2415 | void | 2373 | void |
2416 | lpfc_get_cfgparam(struct lpfc_hba *phba) | 2374 | lpfc_get_cfgparam(struct lpfc_hba *phba) |
2417 | { | 2375 | { |
@@ -2460,5 +2418,6 @@ lpfc_get_vport_cfgparam(struct lpfc_vport *vport) | |||
2460 | lpfc_discovery_threads_init(vport, lpfc_discovery_threads); | 2418 | lpfc_discovery_threads_init(vport, lpfc_discovery_threads); |
2461 | lpfc_max_luns_init(vport, lpfc_max_luns); | 2419 | lpfc_max_luns_init(vport, lpfc_max_luns); |
2462 | lpfc_scan_down_init(vport, lpfc_scan_down); | 2420 | lpfc_scan_down_init(vport, lpfc_scan_down); |
2421 | lpfc_enable_da_id_init(vport, lpfc_enable_da_id); | ||
2463 | return; | 2422 | return; |
2464 | } | 2423 | } |