mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -5348,15 +5348,22 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
|
||||
rport->supported_classes = fcport->supported_classes;
|
||||
|
||||
rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
|
||||
rport_ids.roles = FC_PORT_ROLE_UNKNOWN;
|
||||
if (fcport->port_type == FCT_INITIATOR)
|
||||
rport_ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;
|
||||
rport_ids.roles |= FC_PORT_ROLE_FCP_INITIATOR;
|
||||
if (fcport->port_type == FCT_TARGET)
|
||||
rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
|
||||
rport_ids.roles |= FC_PORT_ROLE_FCP_TARGET;
|
||||
if (fcport->port_type & FCT_NVME_INITIATOR)
|
||||
rport_ids.roles |= FC_PORT_ROLE_NVME_INITIATOR;
|
||||
if (fcport->port_type & FCT_NVME_TARGET)
|
||||
rport_ids.roles |= FC_PORT_ROLE_NVME_TARGET;
|
||||
if (fcport->port_type & FCT_NVME_DISCOVERY)
|
||||
rport_ids.roles |= FC_PORT_ROLE_NVME_DISCOVERY;
|
||||
|
||||
ql_dbg(ql_dbg_disc, vha, 0x20ee, "%s %s. rport %p is %s mode\n",
|
||||
__func__, wwn_to_str(fcport->port_name), rport,
|
||||
(fcport->port_type == FCT_TARGET) ? "tgt" : "ini");
|
||||
(fcport->port_type == FCT_TARGET) ? "tgt" :
|
||||
((fcport->port_type & FCT_NVME) ? "nvme" :"ini"));
|
||||
|
||||
fc_remote_port_rolechg(rport, rport_ids.roles);
|
||||
}
|
||||
|
||||
@@ -1629,6 +1629,19 @@ enum {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef FC_PORT_ROLE_UNKNOWN
|
||||
#define FC_PORT_ROLE_UNKNOWN 0x00
|
||||
#define FC_PORT_ROLE_FCP_TARGET 0x01
|
||||
#define FC_PORT_ROLE_FCP_INITIATOR 0x02
|
||||
#define FC_PORT_ROLE_IP_PORT 0x04
|
||||
#endif
|
||||
|
||||
#ifndef FC_PORT_ROLE_NVME_INITIATOR
|
||||
#define FC_PORT_ROLE_NVME_INITIATOR 0x10
|
||||
#define FC_PORT_ROLE_NVME_TARGET 0x20
|
||||
#define FC_PORT_ROLE_NVME_DISCOVERY 0x40
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
|
||||
#define wwn_to_u64(wwn) get_unaligned_be64(wwn)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user