summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorDuane Grigsby2017-10-13 18:34:06 +0200
committerMartin K. Petersen2017-10-17 05:02:20 +0200
commitedd05de1975927b51b4e8e1135ef4d6130dfd17c (patch)
tree0fa6ea86e07b6cab87f4bd7e39cdd5dd23b28bad /drivers/scsi/qla2xxx/qla_def.h
parentscsi: qla2xxx: Allow MBC_GET_PORT_DATABASE to query and save the port states (diff)
downloadkernel-qcow2-linux-edd05de1975927b51b4e8e1135ef4d6130dfd17c.tar.gz
kernel-qcow2-linux-edd05de1975927b51b4e8e1135ef4d6130dfd17c.tar.xz
kernel-qcow2-linux-edd05de1975927b51b4e8e1135ef4d6130dfd17c.zip
scsi: qla2xxx: Changes to support N2N logins
If we discovered a topology that is N2N then we will issue a login to the target. If our WWPN is bigger than the target's WWPN then we will initiate login, otherwise we will just wait for the target to initiate login. [mkp: many whitespace errors] Signed-off-by: Duane Grigsby <duane.grigsby@cavium.com> Signed-off-by: Michael Hernandez <michael.hernandez@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Tested-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index f712c0cd46d6..01a9b8971e88 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -323,6 +323,12 @@ struct els_logo_payload {
uint8_t wwpn[WWN_SIZE];
};
+struct els_plogi_payload {
+ uint8_t opcode;
+ uint8_t rsvd[3];
+ uint8_t data[112];
+};
+
struct ct_arg {
void *iocb;
u16 nport_handle;
@@ -358,6 +364,19 @@ struct srb_iocb {
dma_addr_t els_logo_pyld_dma;
} els_logo;
struct {
+#define ELS_DCMD_PLOGI 0x3
+ uint32_t flags;
+ uint32_t els_cmd;
+ struct completion comp;
+ struct els_plogi_payload *els_plogi_pyld;
+ struct els_plogi_payload *els_resp_pyld;
+ dma_addr_t els_plogi_pyld_dma;
+ dma_addr_t els_resp_pyld_dma;
+ uint32_t fw_status[3];
+ __le16 comp_status;
+ __le16 len;
+ } els_plogi;
+ struct {
/*
* Values for flags field below are as
* defined in tsk_mgmt_entry struct
@@ -2349,6 +2368,7 @@ typedef struct fc_port {
uint8_t fc4_type;
uint8_t fc4f_nvme;
uint8_t scan_state;
+ uint8_t n2n_flag;
unsigned long last_queue_full;
unsigned long last_ramp_up;
@@ -2372,6 +2392,7 @@ typedef struct fc_port {
u8 iocb[IOCB_SIZE];
u8 current_login_state;
u8 last_login_state;
+ struct completion n2n_done;
} fc_port_t;
#define QLA_FCPORT_SCAN 1
@@ -4228,6 +4249,9 @@ typedef struct scsi_qla_host {
wait_queue_head_t fcport_waitQ;
wait_queue_head_t vref_waitq;
uint8_t min_link_speed_feat;
+ uint8_t n2n_node_name[WWN_SIZE];
+ uint8_t n2n_port_name[WWN_SIZE];
+ uint16_t n2n_id;
} scsi_qla_host_t;
struct qla27xx_image_status {