|
#define | FC_DEVICE_ATTR(_prefix, _name, _mode, _show, _store) |
|
#define | fc_enum_name_search(title, table_type, table) |
|
#define | fc_enum_name_match(title, table_type, table) |
|
#define | FC_PORTTYPE_MAX_NAMELEN 50 |
|
#define | get_fc_vport_type_name get_fc_port_type_name |
|
#define | FC_HOST_EVENT_CODE_MAX_NAMELEN 30 |
|
#define | FC_PORTSTATE_MAX_NAMELEN 20 |
|
#define | FC_VPORTSTATE_MAX_NAMELEN 24 |
|
#define | get_fc_vport_last_state_name get_fc_vport_state_name |
|
#define | FC_BINDTYPE_MAX_NAMELEN 30 |
|
#define | fc_bitfield_name_search(title, table) |
|
#define | FC_WELLKNOWN_PORTID_MASK 0xfffff0 |
|
#define | FC_WELLKNOWN_ROLE_MASK 0x00000f |
|
#define | FC_FPORT_PORTID 0x00000e |
|
#define | FC_FABCTLR_PORTID 0x00000d |
|
#define | FC_DIRSRVR_PORTID 0x00000c |
|
#define | FC_TIMESRVR_PORTID 0x00000b |
|
#define | FC_MGMTSRVR_PORTID 0x00000a |
|
#define | FC_STARGET_NUM_ATTRS 3 |
|
#define | FC_RPORT_NUM_ATTRS 10 |
|
#define | FC_VPORT_NUM_ATTRS 9 |
|
#define | FC_HOST_NUM_ATTRS 29 |
|
#define | to_fc_internal(tmpl) container_of(tmpl, struct fc_internal, t) |
|
#define | fc_rport_show_function(field, format_string, sz, cast) |
|
#define | fc_rport_store_function(field) |
|
#define | fc_rport_rd_attr(field, format_string, sz) |
|
#define | fc_rport_rd_attr_cast(field, format_string, sz, cast) |
|
#define | fc_rport_rw_attr(field, format_string, sz) |
|
#define | fc_private_rport_show_function(field, format_string, sz, cast) |
|
#define | fc_private_rport_rd_attr(field, format_string, sz) |
|
#define | fc_private_rport_rd_attr_cast(field, format_string, sz, cast) |
|
#define | fc_private_rport_rd_enum_attr(title, maxlen) |
|
#define | SETUP_RPORT_ATTRIBUTE_RD(field) |
|
#define | SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(field) |
|
#define | SETUP_RPORT_ATTRIBUTE_RW(field) |
|
#define | SETUP_PRIVATE_RPORT_ATTRIBUTE_RW(field) |
|
#define | fc_starget_show_function(field, format_string, sz, cast) |
|
#define | fc_starget_rd_attr(field, format_string, sz) |
|
#define | fc_starget_rd_attr_cast(field, format_string, sz, cast) |
|
#define | SETUP_STARGET_ATTRIBUTE_RD(field) |
|
#define | SETUP_STARGET_ATTRIBUTE_RW(field) |
|
#define | fc_vport_show_function(field, format_string, sz, cast) |
|
#define | fc_vport_store_function(field) |
|
#define | fc_vport_store_str_function(field, slen) |
|
#define | fc_vport_rd_attr(field, format_string, sz) |
|
#define | fc_vport_rd_attr_cast(field, format_string, sz, cast) |
|
#define | fc_vport_rw_attr(field, format_string, sz) |
|
#define | fc_private_vport_show_function(field, format_string, sz, cast) |
|
#define | fc_private_vport_store_u32_function(field) |
|
#define | fc_private_vport_rd_attr(field, format_string, sz) |
|
#define | fc_private_vport_rd_attr_cast(field, format_string, sz, cast) |
|
#define | fc_private_vport_rw_u32_attr(field, format_string, sz) |
|
#define | fc_private_vport_rd_enum_attr(title, maxlen) |
|
#define | SETUP_VPORT_ATTRIBUTE_RD(field) |
|
#define | SETUP_PRIVATE_VPORT_ATTRIBUTE_RD(field) |
|
#define | SETUP_VPORT_ATTRIBUTE_WR(field) |
|
#define | SETUP_VPORT_ATTRIBUTE_RW(field) |
|
#define | SETUP_PRIVATE_VPORT_ATTRIBUTE_RW(field) |
|
#define | fc_host_show_function(field, format_string, sz, cast) |
|
#define | fc_host_store_function(field) |
|
#define | fc_host_store_str_function(field, slen) |
|
#define | fc_host_rd_attr(field, format_string, sz) |
|
#define | fc_host_rd_attr_cast(field, format_string, sz, cast) |
|
#define | fc_host_rw_attr(field, format_string, sz) |
|
#define | fc_host_rd_enum_attr(title, maxlen) |
|
#define | SETUP_HOST_ATTRIBUTE_RD(field) |
|
#define | SETUP_HOST_ATTRIBUTE_RD_NS(field) |
|
#define | SETUP_HOST_ATTRIBUTE_RW(field) |
|
#define | fc_private_host_show_function(field, format_string, sz, cast) |
|
#define | fc_private_host_rd_attr(field, format_string, sz) |
|
#define | fc_private_host_rd_attr_cast(field, format_string, sz, cast) |
|
#define | SETUP_PRIVATE_HOST_ATTRIBUTE_RD(field) |
|
#define | SETUP_PRIVATE_HOST_ATTRIBUTE_RW(field) |
|
#define | get_list_head_entry(pos, head, member) pos = list_entry((head)->next, typeof(*pos), member) |
|
#define | fc_host_statistic(name) |
|
|
| module_param_named (dev_loss_tmo, fc_dev_loss_tmo, uint, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (dev_loss_tmo,"Maximum number of seconds that the FC transport should"" insulate the loss of a remote port. Once this value is"" exceeded, the scsi target is removed. Value should be"" between 1 and SCSI_DEVICE_BLOCK_MAX_TIMEOUT if"" fast_io_fail_tmo is not set.") |
|
| fc_enum_name_search (port_type, fc_port_type, fc_port_type_names) |
|
| fc_enum_name_search (host_event_code, fc_host_event_code, fc_host_event_code_names) |
|
| fc_enum_name_search (port_state, fc_port_state, fc_port_state_names) |
|
| fc_enum_name_search (vport_state, fc_vport_state, fc_vport_state_names) |
|
| fc_enum_name_search (fc_enum_name_match(tgtid_bind_type, fc_enum_name_match(fc_tgtid_binding_type, fc_tgtid_binding_type_names) |
|
| fc_bitfield_name_search (cos, fc_cos_names) |
|
| fc_bitfield_name_search (port_speed, fc_port_speed_names) |
|
| fc_bitfield_name_search (port_roles, fc_port_role_names) |
|
u32 | fc_get_event_number (void) |
|
| EXPORT_SYMBOL (fc_get_event_number) |
|
void | fc_host_post_event (struct Scsi_Host *shost, u32 event_number, enum fc_host_event_code event_code, u32 event_data) |
|
| EXPORT_SYMBOL (fc_host_post_event) |
|
void | fc_host_post_vendor_event (struct Scsi_Host *shost, u32 event_number, u32 data_len, char *data_buf, u64 vendor_id) |
|
| EXPORT_SYMBOL (fc_host_post_vendor_event) |
|
| fc_private_rport_rd_attr (maxframe_size,"%u bytes\n", 20) |
|
| fc_rport_show_function (dev_loss_tmo,"%d\n", 20) |
|
| fc_private_rport_rd_attr_cast (node_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_private_rport_rd_attr_cast (port_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_private_rport_rd_attr (port_id,"0x%06x\n", 20) |
|
| fc_private_rport_rd_enum_attr (port_state, FC_PORTSTATE_MAX_NAMELEN) |
|
| fc_private_rport_rd_attr (scsi_target_id,"%d\n", 20) |
|
| fc_starget_rd_attr_cast (node_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_starget_rd_attr_cast (port_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_starget_rd_attr (port_id,"0x%06x\n", 20) |
|
| fc_private_vport_rd_enum_attr (vport_state, FC_VPORTSTATE_MAX_NAMELEN) |
|
| fc_private_vport_rd_enum_attr (vport_last_state, FC_VPORTSTATE_MAX_NAMELEN) |
|
| fc_private_vport_rd_attr_cast (node_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_private_vport_rd_attr_cast (port_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_private_vport_rd_enum_attr (vport_type, FC_PORTTYPE_MAX_NAMELEN) |
|
| fc_private_vport_show_function (symbolic_name,"%s\n", FC_VPORT_SYMBOLIC_NAMELEN+1,) fc_vport_store_str_function(symbolic_name |
|
| fc_private_host_rd_attr_cast (node_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_private_host_rd_attr_cast (port_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_private_host_rd_attr_cast (permanent_port_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_private_host_rd_attr (maxframe_size,"%u bytes\n", 20) |
|
| fc_private_host_rd_attr (max_npiv_vports,"%u\n", 20) |
|
| fc_private_host_rd_attr (serial_number,"%s\n",(FC_SERIAL_NUMBER_SIZE+1)) |
|
| fc_private_host_rd_attr (manufacturer,"%s\n", FC_SERIAL_NUMBER_SIZE+1) |
|
| fc_private_host_rd_attr (model,"%s\n", FC_SYMBOLIC_NAME_SIZE+1) |
|
| fc_private_host_rd_attr (model_description,"%s\n", FC_SYMBOLIC_NAME_SIZE+1) |
|
| fc_private_host_rd_attr (hardware_version,"%s\n", FC_VERSION_STRING_SIZE+1) |
|
| fc_private_host_rd_attr (driver_version,"%s\n", FC_VERSION_STRING_SIZE+1) |
|
| fc_private_host_rd_attr (firmware_version,"%s\n", FC_VERSION_STRING_SIZE+1) |
|
| fc_private_host_rd_attr (optionrom_version,"%s\n", FC_VERSION_STRING_SIZE+1) |
|
| fc_host_rd_attr (port_id,"0x%06x\n", 20) |
|
| fc_host_rd_enum_attr (port_type, FC_PORTTYPE_MAX_NAMELEN) |
|
| fc_host_rd_enum_attr (port_state, FC_PORTSTATE_MAX_NAMELEN) |
|
| fc_host_rd_attr_cast (fabric_name,"0x%llx\n", 20, unsigned long long) |
|
| fc_host_rd_attr (symbolic_name,"%s\n", FC_SYMBOLIC_NAME_SIZE+1) |
|
| fc_private_host_show_function (system_hostname,"%s\n", FC_SYMBOLIC_NAME_SIZE+1,) fc_host_store_str_function(system_hostname |
|
| fc_private_host_show_function (dev_loss_tmo,"%d\n", 20,) |
|
| fc_private_host_rd_attr (npiv_vports_inuse,"%u\n", 20) |
|
| fc_host_statistic (seconds_since_last_reset) |
|
| fc_host_statistic (tx_frames) |
|
| fc_host_statistic (tx_words) |
|
| fc_host_statistic (rx_frames) |
|
| fc_host_statistic (rx_words) |
|
| fc_host_statistic (lip_count) |
|
| fc_host_statistic (nos_count) |
|
| fc_host_statistic (error_frames) |
|
| fc_host_statistic (dumped_frames) |
|
| fc_host_statistic (link_failure_count) |
|
| fc_host_statistic (loss_of_sync_count) |
|
| fc_host_statistic (loss_of_signal_count) |
|
| fc_host_statistic (prim_seq_protocol_err_count) |
|
| fc_host_statistic (invalid_tx_word_count) |
|
| fc_host_statistic (invalid_crc_count) |
|
| fc_host_statistic (fcp_input_requests) |
|
| fc_host_statistic (fcp_output_requests) |
|
| fc_host_statistic (fcp_control_requests) |
|
| fc_host_statistic (fcp_input_megabytes) |
|
| fc_host_statistic (fcp_output_megabytes) |
|
| fc_host_statistic (fcp_packet_alloc_failures) |
|
| fc_host_statistic (fcp_packet_aborts) |
|
| fc_host_statistic (fcp_frame_alloc_failures) |
|
| fc_host_statistic (fc_no_free_exch) |
|
| fc_host_statistic (fc_no_free_exch_xid) |
|
| fc_host_statistic (fc_xid_not_found) |
|
| fc_host_statistic (fc_xid_busy) |
|
| fc_host_statistic (fc_seq_not_found) |
|
| fc_host_statistic (fc_non_bls_resp) |
|
int | scsi_is_fc_rport (const struct device *dev) |
|
| EXPORT_SYMBOL (scsi_is_fc_rport) |
|
int | scsi_is_fc_vport (const struct device *dev) |
|
| EXPORT_SYMBOL (scsi_is_fc_vport) |
|
struct scsi_transport_template * | fc_attach_transport (struct fc_function_template *ft) |
|
| EXPORT_SYMBOL (fc_attach_transport) |
|
void | fc_release_transport (struct scsi_transport_template *t) |
|
| EXPORT_SYMBOL (fc_release_transport) |
|
void | fc_remove_host (struct Scsi_Host *shost) |
|
| EXPORT_SYMBOL (fc_remove_host) |
|
struct fc_rport * | fc_remote_port_add (struct Scsi_Host *shost, int channel, struct fc_rport_identifiers *ids) |
|
| EXPORT_SYMBOL (fc_remote_port_add) |
|
void | fc_remote_port_delete (struct fc_rport *rport) |
|
| EXPORT_SYMBOL (fc_remote_port_delete) |
|
void | fc_remote_port_rolechg (struct fc_rport *rport, u32 roles) |
|
| EXPORT_SYMBOL (fc_remote_port_rolechg) |
|
int | fc_block_scsi_eh (struct scsi_cmnd *cmnd) |
|
| EXPORT_SYMBOL (fc_block_scsi_eh) |
|
struct fc_vport * | fc_vport_create (struct Scsi_Host *shost, int channel, struct fc_vport_identifiers *ids) |
|
| EXPORT_SYMBOL (fc_vport_create) |
|
int | fc_vport_terminate (struct fc_vport *vport) |
|
| EXPORT_SYMBOL (fc_vport_terminate) |
|
| MODULE_AUTHOR ("James Smart") |
|
| MODULE_DESCRIPTION ("FC Transport Attributes") |
|
| MODULE_LICENSE ("GPL") |
|
| module_init (fc_transport_init) |
|
| module_exit (fc_transport_exit) |
|
fc_remote_port_add - notify fc transport of the existence of a remote FC port. : scsi host the remote port is connected to. : Channel on shost port connected to. : The world wide names, fc address, and FC4 port roles for the remote port.
The LLDD calls this routine to notify the transport of the existence of a remote port. The LLDD provides the unique identifiers (wwpn,wwn) of the port, it's FC address (port_id), and the FC4 roles that are active for the port.
For ports that are FCP targets (aka scsi targets), the FC transport maintains consistent target id bindings on behalf of the LLDD. A consistent target id binding is an assignment of a target id to a remote port identifier, which persists while the scsi host is attached. The remote port can disappear, then later reappear, and it's target id assignment remains the same. This allows for shifts in FC addressing (if binding by wwpn or wwnn) with no apparent changes to the scsi subsystem which is based on scsi host number and target id values. Bindings are only valid during the attachment of the scsi host. If the host detaches, then later re-attaches, target id bindings may change.
This routine is responsible for returning a remote port structure. The routine will search the list of remote ports it maintains internally on behalf of consistent target id mappings. If found, the remote port structure will be reused. Otherwise, a new remote port structure will be allocated.
Whenever a remote port is allocated, a new fc_remote_port class device is created.
Should not be called from interrupt context.
Notes: This routine assumes no locks are held on entry.
Definition at line 2733 of file scsi_transport_fc.c.
fc_remote_port_delete - notifies the fc transport that a remote port is no longer in existence. : The remote port that no longer exists
The LLDD calls this routine to notify the transport that a remote port is no longer part of the topology. Note: Although a port may no longer be part of the topology, it may persist in the remote ports displayed by the fc_host. We do this under 2 conditions: 1) If the port was a scsi target, we delay its deletion by "blocking" it. This allows the port to temporarily disappear, then reappear without disrupting the SCSI device tree attached to it. During the "blocked" period the port will still exist. 2) If the port was a scsi target and disappears for longer than we expect, we'll delete the port and the tear down the SCSI device tree attached to it. However, we want to semi-persist the target id assigned to that port if it eventually does exist. The port structure will remain (although with minimal information) so that the target id bindings remails.
If the remote port is not an FCP Target, it will be fully torn down and deallocated, including the fc_remote_port class device.
If the remote port is an FCP Target, the port will be placed in a temporary blocked state. From the LLDD's perspective, the rport no longer exists. From the SCSI midlayer's perspective, the SCSI target exists, but all sdevs on it are blocked from further I/O. The following is then expected.
If the remote port does not return (signaled by a LLDD call to fc_remote_port_add()) within the dev_loss_tmo timeout, then the scsi target is removed - killing all outstanding i/o and removing the scsi devices attached ot it. The port structure will be marked Not Present and be partially cleared, leaving only enough information to recognize the remote port relative to the scsi target id binding if it later appears. The port will remain as long as there is a valid binding (e.g. until the user changes the binding type or unloads the scsi host with the binding).
If the remote port returns within the dev_loss_tmo value (and matches according to the target id binding type), the port structure will be reused. If it is no longer a SCSI target, the target will be torn down. If it continues to be a SCSI target, then the target will be unblocked (allowing i/o to be resumed), and a scan will be activated to ensure that all luns are detected.
Called from normal process context only - cannot be called from interrupt.
Notes: This routine assumes no locks are held on entry.
Definition at line 2974 of file scsi_transport_fc.c.