aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index c1403a23174f..3dcd1bfba3b4 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -698,10 +698,16 @@ void
698zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter) 698zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter)
699{ 699{
700 struct Scsi_Host *shost; 700 struct Scsi_Host *shost;
701 struct zfcp_port *port;
701 702
702 shost = adapter->scsi_host; 703 shost = adapter->scsi_host;
703 if (!shost) 704 if (!shost)
704 return; 705 return;
706 read_lock_irq(&zfcp_data.config_lock);
707 list_for_each_entry(port, &adapter->port_list_head, list)
708 if (port->rport)
709 port->rport = NULL;
710 read_unlock_irq(&zfcp_data.config_lock);
705 fc_remove_host(shost); 711 fc_remove_host(shost);
706 scsi_remove_host(shost); 712 scsi_remove_host(shost);
707 scsi_host_put(shost); 713 scsi_host_put(shost);
@@ -776,18 +782,6 @@ zfcp_get_node_name(struct scsi_target *starget)
776 read_unlock_irqrestore(&zfcp_data.config_lock, flags); 782 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
777} 783}
778 784
779void
780zfcp_set_fc_host_attrs(struct zfcp_adapter *adapter)
781{
782 struct Scsi_Host *shost = adapter->scsi_host;
783
784 fc_host_node_name(shost) = adapter->wwnn;
785 fc_host_port_name(shost) = adapter->wwpn;
786 strncpy(fc_host_serial_number(shost), adapter->serial_number,
787 min(FC_SERIAL_NUMBER_SIZE, 32));
788 fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3;
789}
790
791struct fc_function_template zfcp_transport_functions = { 785struct fc_function_template zfcp_transport_functions = {
792 .get_starget_port_id = zfcp_get_port_id, 786 .get_starget_port_id = zfcp_get_port_id,
793 .get_starget_port_name = zfcp_get_port_name, 787 .get_starget_port_name = zfcp_get_port_name,
@@ -799,7 +793,10 @@ struct fc_function_template zfcp_transport_functions = {
799 .show_host_node_name = 1, 793 .show_host_node_name = 1,
800 .show_host_port_name = 1, 794 .show_host_port_name = 1,
801 .show_host_supported_classes = 1, 795 .show_host_supported_classes = 1,
796 .show_host_maxframe_size = 1,
802 .show_host_serial_number = 1, 797 .show_host_serial_number = 1,
798 .show_host_speed = 1,
799 .show_host_port_id = 1,
803}; 800};
804 801
805/** 802/**