aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2010-07-23 06:28:25 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:06:09 -0400
commite8c72ba51a159f5d1cb195d3fb47262c782939d9 (patch)
tree7ea9c96011386e4c36b9bb2c35da55ae7160fcb9 /drivers/scsi/qla2xxx/qla_def.h
parent2f0f3f4f06f7cfadebf58b70bd9e7f71d8fd96e4 (diff)
[SCSI] qla2xxx: Use GFF_ID to check FCP-SCSI FC4 type before logging into Nx_Ports
The default method that qla2xxx uses is the GID_PT nameserver command to get a list of Nx_Ports. This patch adds a GFF_ID call for each port returned by GID_PT to get the FC4 type. If the FC4 type is not FCP SCSI then the qla2xxx driver will not record that port in it's port database. For switches that do not support the GFF_ID command, the behavior will be for qla2xxx to store that port anyways. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 7f9f86b8140b..02c7480c99c3 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1652,8 +1652,14 @@ typedef struct {
1652 uint8_t port_name[WWN_SIZE]; 1652 uint8_t port_name[WWN_SIZE];
1653 uint8_t fabric_port_name[WWN_SIZE]; 1653 uint8_t fabric_port_name[WWN_SIZE];
1654 uint16_t fp_speed; 1654 uint16_t fp_speed;
1655 uint8_t fc4_type;
1655} sw_info_t; 1656} sw_info_t;
1656 1657
1658/* FCP-4 types */
1659#define FC4_TYPE_FCP_SCSI 0x08
1660#define FC4_TYPE_OTHER 0x0
1661#define FC4_TYPE_UNKNOWN 0xff
1662
1657/* 1663/*
1658 * Fibre channel port type. 1664 * Fibre channel port type.
1659 */ 1665 */
@@ -1697,6 +1703,7 @@ typedef struct fc_port {
1697 u32 supported_classes; 1703 u32 supported_classes;
1698 1704
1699 uint16_t vp_idx; 1705 uint16_t vp_idx;
1706 uint8_t fc4_type;
1700} fc_port_t; 1707} fc_port_t;
1701 1708
1702/* 1709/*
@@ -1779,6 +1786,9 @@ typedef struct fc_port {
1779#define GPSC_REQ_SIZE (16 + 8) 1786#define GPSC_REQ_SIZE (16 + 8)
1780#define GPSC_RSP_SIZE (16 + 2 + 2) 1787#define GPSC_RSP_SIZE (16 + 2 + 2)
1781 1788
1789#define GFF_ID_CMD 0x011F
1790#define GFF_ID_REQ_SIZE (16 + 4)
1791#define GFF_ID_RSP_SIZE (16 + 128)
1782 1792
1783/* 1793/*
1784 * HBA attribute types. 1794 * HBA attribute types.
@@ -1980,6 +1990,11 @@ struct ct_sns_req {
1980 struct { 1990 struct {
1981 uint8_t port_name[8]; 1991 uint8_t port_name[8];
1982 } gpsc; 1992 } gpsc;
1993
1994 struct {
1995 uint8_t reserved;
1996 uint8_t port_name[3];
1997 } gff_id;
1983 } req; 1998 } req;
1984}; 1999};
1985 2000
@@ -2052,6 +2067,11 @@ struct ct_sns_rsp {
2052 uint16_t speeds; 2067 uint16_t speeds;
2053 uint16_t speed; 2068 uint16_t speed;
2054 } gpsc; 2069 } gpsc;
2070
2071#define GFF_FCP_SCSI_OFFSET 7
2072 struct {
2073 uint8_t fc4_features[128];
2074 } gff_id;
2055 } rsp; 2075 } rsp;
2056}; 2076};
2057 2077