Skip to contentSkip to conversation

zfcp: transport class adaptations II

PATCH In review Andreas Herrmann 2 participants 3 messages Jan 13, 2006 – Jan 17, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zfcp: transport class adaptations II

This patch replaces my patch from 2006-01-05
"zfcp: use fc_host attributes physical_port_name and physical_port_id"
http://marc.theaimsgroup.com/?l=linux-scsi&m=113645196121540&w=2

It depends on following patches
zfcp: handle unsolicited status notification lost
zfcp: transport class adaptations
fc transport: add permanent_port_name fc_host attribute

Please apply.

Regards,

Andreas

zfcp: transport class adaptations II

Replaced zfcp adapter attributes with fc_host attributes:
fc_topology by port_type, physical_wwpn by permanent_port_name. Make use of fc_host attribute supported_speeds. Removed zfcp adapter attribute physical_s_id.

---

 drivers/s390/scsi/zfcp_def.h           |    1 -
 drivers/s390/scsi/zfcp_erp.c           |    2 +
 drivers/s390/scsi/zfcp_fsf.c           |   49 ++++++++++++++++----------------
 drivers/s390/scsi/zfcp_fsf.h           |    1 -
 drivers/s390/scsi/zfcp_scsi.c          |    3 ++
 drivers/s390/scsi/zfcp_sysfs_adapter.c |   11 -------
 6 files changed, 29 insertions(+), 38 deletions(-)

4fe5c0d2b1953543c64c462ed5ad2b6de77747be

drivers/s390/scsi/zfcp_def.h +0 -1
index 3785b3c..9bb5110 100644
@@ -921,7 +921,6 @@ struct zfcp_adapter {
 	u32			physical_s_id;     /* local FC port ID */
 	struct ccw_device       *ccw_device;	   /* S/390 ccw device */
 	u8			fc_service_class;
-	u32			fc_topology;	   /* FC topology */
 	u32			hydra_version;	   /* Hydra version */
 	u32			fsf_lic_version;
 	u32			adapter_features;  /* FCP channel features */
drivers/s390/scsi/zfcp_erp.c +1 -1
index ee7314d..7bdb00b 100644
@@ -2613,7 +2613,7 @@ zfcp_erp_port_strategy_open_common(struc
 	case ZFCP_ERP_STEP_UNINITIALIZED:
 	case ZFCP_ERP_STEP_PHYS_PORT_CLOSING:
 	case ZFCP_ERP_STEP_PORT_CLOSING:
-		if (adapter->fc_topology == FSF_TOPO_P2P) {
+		if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP) {
 			if (port->wwpn != adapter->peer_wwpn) {
 				ZFCP_LOG_NORMAL("Failed to open port 0x%016Lx "
 						"on adapter %s.\nPeer WWPN "
drivers/s390/scsi/zfcp_fsf.c +25 -24

95 lines not on this page · raw message

drivers/s390/scsi/zfcp_fsf.h +0 -1
index 39475db..e734415 100644
@@ -199,7 +199,6 @@
 #define FSF_TOPO_P2P				0x00000001
 #define FSF_TOPO_FABRIC				0x00000002
 #define FSF_TOPO_AL				0x00000003
-#define FSF_TOPO_FABRIC_VIRT			0x00000004
 
 /* data direction for FCP commands */
 #define FSF_DATADIR_WRITE			0x00000001
drivers/s390/scsi/zfcp_scsi.c +3 -0
index 5ca0992..3c2cbcc 100644
@@ -865,13 +865,16 @@ struct fc_function_template zfcp_transpo
 	.show_rport_supported_classes = 1,
 	.show_host_node_name = 1,
 	.show_host_port_name = 1,
+	.show_host_permanent_port_name = 1,
 	.show_host_supported_classes = 1,
+	.show_host_supported_speeds = 1,
 	.show_host_maxframe_size = 1,
 	.show_host_serial_number = 1,
 	.get_fc_host_stats = zfcp_get_fc_host_stats,
 	.reset_fc_host_stats = zfcp_reset_fc_host_stats,
 	/* no functions registered for following dynamic attributes but
 	   directly set by LLDD */
+	.show_host_port_type = 1,
 	.show_host_speed = 1,
 	.show_host_port_id = 1,
 };
drivers/s390/scsi/zfcp_sysfs_adapter.c +0 -11
index c85df9c..9f26225 100644
@@ -33,14 +33,6 @@
 
 #define ZFCP_LOG_AREA                   ZFCP_LOG_AREA_CONFIG
 
-static const char fc_topologies[5][25] = {
-	"<error>",
-	"point-to-point",
-	"fabric",
-	"arbitrated loop",
-	"fabric (virt. adapter)"
-};
-
 /**
  * ZFCP_DEFINE_ADAPTER_ATTR
  * @_name:   name of show attribute
@@ -69,8 +61,6 @@ ZFCP_DEFINE_ADAPTER_ATTR(physical_wwpn, 
 ZFCP_DEFINE_ADAPTER_ATTR(physical_s_id, "0x%06x\n", adapter->physical_s_id);
 ZFCP_DEFINE_ADAPTER_ATTR(card_version, "0x%04x\n", adapter->hydra_version);
 ZFCP_DEFINE_ADAPTER_ATTR(lic_version, "0x%08x\n", adapter->fsf_lic_version);
-ZFCP_DEFINE_ADAPTER_ATTR(fc_topology, "%s\n",
-			 fc_topologies[adapter->fc_topology]);
 ZFCP_DEFINE_ADAPTER_ATTR(hardware_version, "0x%08x\n",
 			 adapter->hardware_version);
 ZFCP_DEFINE_ADAPTER_ATTR(in_recovery, "%d\n", atomic_test_mask
@@ -257,7 +247,6 @@ static struct attribute *zfcp_adapter_at
 	&dev_attr_physical_s_id.attr,
 	&dev_attr_card_version.attr,
 	&dev_attr_lic_version.attr,
-	&dev_attr_fc_topology.attr,
 	&dev_attr_status.attr,
 	&dev_attr_hardware_version.attr,
 	NULL
Signature · 1 line
0.99.9n-g5a22
#1 lore raw
Quoted 10 lines · Andreas Herrmann

This patch replaces my patch from 2006-01-05
"zfcp: use fc_host attributes physical_port_name and physical_port_id"
http://marc.theaimsgroup.com/?l=linux-scsi&m=113645196121540&w=2

It depends on following patches
zfcp: handle unsolicited status notification lost
zfcp: transport class adaptations
fc transport: add permanent_port_name fc_host attribute

Please apply.

looks good. btw, does zfcp now always have rports as parents for targets so we can remove the special case in fc_target_setup?

#2 lore raw
Quoted 2 lines · On 13.01.2006 19:12 Christoph Hellwig <[email protected]> wrote:

btw, does zfcp now always have rports as parents for targets so we can remove the special case in fc_target_setup?

If you mean the initialisation to "known non-values". I think this is not needed by zfcp.

In fact beginning with 2.6.13 or so I was forced to introduce rports to zfcp because _scsi_add_device did not work otherwise.

I guess you also mean that the get_starget##field stuff can be removed from fc_starget_show_function?

Or why would we need those get_starget functions if information is received from rports and the functions are not used somewhere else.

This may affect lpfc and qla2xxx, too.

Regards,

Andreas