aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2005-08-26 22:08:30 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-04 20:53:07 -0400
commitcca5335caf2d19ef8bd6b833445d2c6ca652a89b (patch)
tree74bb0b787d9feb1499ed2eafb2aa5a4317b6d3b5 /drivers/scsi/qla2xxx/qla_def.h
parentad3e0edaceb9771be7ffbd7aa24fb444a7ed85bf (diff)
[SCSI] qla2xxx: Add FDMI support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h151
1 files changed, 147 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 38848c38ad8d..cdef86e49c60 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -214,6 +214,7 @@
214 * valid range of an N-PORT id is 0 through 0x7ef. 214 * valid range of an N-PORT id is 0 through 0x7ef.
215 */ 215 */
216#define NPH_LAST_HANDLE 0x7ef 216#define NPH_LAST_HANDLE 0x7ef
217#define NPH_MGMT_SERVER 0x7fa /* FFFFFA */
217#define NPH_SNS 0x7fc /* FFFFFC */ 218#define NPH_SNS 0x7fc /* FFFFFC */
218#define NPH_FABRIC_CONTROLLER 0x7fd /* FFFFFD */ 219#define NPH_FABRIC_CONTROLLER 0x7fd /* FFFFFD */
219#define NPH_F_PORT 0x7fe /* FFFFFE */ 220#define NPH_F_PORT 0x7fe /* FFFFFE */
@@ -1131,10 +1132,7 @@ typedef struct {
1131 1132
1132 uint8_t link_down_timeout; 1133 uint8_t link_down_timeout;
1133 1134
1134 uint8_t adapter_id_0[4]; 1135 uint8_t adapter_id[16];
1135 uint8_t adapter_id_1[4];
1136 uint8_t adapter_id_2[4];
1137 uint8_t adapter_id_3[4];
1138 1136
1139 uint8_t alt1_boot_node_name[WWN_SIZE]; 1137 uint8_t alt1_boot_node_name[WWN_SIZE];
1140 uint16_t alt1_boot_lun_number; 1138 uint16_t alt1_boot_lun_number;
@@ -1728,6 +1726,8 @@ typedef struct fc_port {
1728 1726
1729#define CT_REJECT_RESPONSE 0x8001 1727#define CT_REJECT_RESPONSE 0x8001
1730#define CT_ACCEPT_RESPONSE 0x8002 1728#define CT_ACCEPT_RESPONSE 0x8002
1729#define CT_REASON_CANNOT_PERFORM 0x09
1730#define CT_EXPL_ALREADY_REGISTERED 0x10
1731 1731
1732#define NS_N_PORT_TYPE 0x01 1732#define NS_N_PORT_TYPE 0x01
1733#define NS_NL_PORT_TYPE 0x02 1733#define NS_NL_PORT_TYPE 0x02
@@ -1769,6 +1769,100 @@ typedef struct fc_port {
1769#define RSNN_NN_REQ_SIZE (16 + 8 + 1 + 255) 1769#define RSNN_NN_REQ_SIZE (16 + 8 + 1 + 255)
1770#define RSNN_NN_RSP_SIZE 16 1770#define RSNN_NN_RSP_SIZE 16
1771 1771
1772/*
1773 * HBA attribute types.
1774 */
1775#define FDMI_HBA_ATTR_COUNT 9
1776#define FDMI_HBA_NODE_NAME 1
1777#define FDMI_HBA_MANUFACTURER 2
1778#define FDMI_HBA_SERIAL_NUMBER 3
1779#define FDMI_HBA_MODEL 4
1780#define FDMI_HBA_MODEL_DESCRIPTION 5
1781#define FDMI_HBA_HARDWARE_VERSION 6
1782#define FDMI_HBA_DRIVER_VERSION 7
1783#define FDMI_HBA_OPTION_ROM_VERSION 8
1784#define FDMI_HBA_FIRMWARE_VERSION 9
1785#define FDMI_HBA_OS_NAME_AND_VERSION 0xa
1786#define FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH 0xb
1787
1788struct ct_fdmi_hba_attr {
1789 uint16_t type;
1790 uint16_t len;
1791 union {
1792 uint8_t node_name[WWN_SIZE];
1793 uint8_t manufacturer[32];
1794 uint8_t serial_num[8];
1795 uint8_t model[16];
1796 uint8_t model_desc[80];
1797 uint8_t hw_version[16];
1798 uint8_t driver_version[32];
1799 uint8_t orom_version[16];
1800 uint8_t fw_version[16];
1801 uint8_t os_version[128];
1802 uint8_t max_ct_len[4];
1803 } a;
1804};
1805
1806struct ct_fdmi_hba_attributes {
1807 uint32_t count;
1808 struct ct_fdmi_hba_attr entry[FDMI_HBA_ATTR_COUNT];
1809};
1810
1811/*
1812 * Port attribute types.
1813 */
1814#define FDMI_PORT_ATTR_COUNT 5
1815#define FDMI_PORT_FC4_TYPES 1
1816#define FDMI_PORT_SUPPORT_SPEED 2
1817#define FDMI_PORT_CURRENT_SPEED 3
1818#define FDMI_PORT_MAX_FRAME_SIZE 4
1819#define FDMI_PORT_OS_DEVICE_NAME 5
1820#define FDMI_PORT_HOST_NAME 6
1821
1822struct ct_fdmi_port_attr {
1823 uint16_t type;
1824 uint16_t len;
1825 union {
1826 uint8_t fc4_types[32];
1827 uint32_t sup_speed;
1828 uint32_t cur_speed;
1829 uint32_t max_frame_size;
1830 uint8_t os_dev_name[32];
1831 uint8_t host_name[32];
1832 } a;
1833};
1834
1835/*
1836 * Port Attribute Block.
1837 */
1838struct ct_fdmi_port_attributes {
1839 uint32_t count;
1840 struct ct_fdmi_port_attr entry[FDMI_PORT_ATTR_COUNT];
1841};
1842
1843/* FDMI definitions. */
1844#define GRHL_CMD 0x100
1845#define GHAT_CMD 0x101
1846#define GRPL_CMD 0x102
1847#define GPAT_CMD 0x110
1848
1849#define RHBA_CMD 0x200
1850#define RHBA_RSP_SIZE 16
1851
1852#define RHAT_CMD 0x201
1853#define RPRT_CMD 0x210
1854
1855#define RPA_CMD 0x211
1856#define RPA_RSP_SIZE 16
1857
1858#define DHBA_CMD 0x300
1859#define DHBA_REQ_SIZE (16 + 8)
1860#define DHBA_RSP_SIZE 16
1861
1862#define DHAT_CMD 0x301
1863#define DPRT_CMD 0x310
1864#define DPA_CMD 0x311
1865
1772/* CT command header -- request/response common fields */ 1866/* CT command header -- request/response common fields */
1773struct ct_cmd_hdr { 1867struct ct_cmd_hdr {
1774 uint8_t revision; 1868 uint8_t revision;
@@ -1826,6 +1920,43 @@ struct ct_sns_req {
1826 uint8_t name_len; 1920 uint8_t name_len;
1827 uint8_t sym_node_name[255]; 1921 uint8_t sym_node_name[255];
1828 } rsnn_nn; 1922 } rsnn_nn;
1923
1924 struct {
1925 uint8_t hba_indentifier[8];
1926 } ghat;
1927
1928 struct {
1929 uint8_t hba_identifier[8];
1930 uint32_t entry_count;
1931 uint8_t port_name[8];
1932 struct ct_fdmi_hba_attributes attrs;
1933 } rhba;
1934
1935 struct {
1936 uint8_t hba_identifier[8];
1937 struct ct_fdmi_hba_attributes attrs;
1938 } rhat;
1939
1940 struct {
1941 uint8_t port_name[8];
1942 struct ct_fdmi_port_attributes attrs;
1943 } rpa;
1944
1945 struct {
1946 uint8_t port_name[8];
1947 } dhba;
1948
1949 struct {
1950 uint8_t port_name[8];
1951 } dhat;
1952
1953 struct {
1954 uint8_t port_name[8];
1955 } dprt;
1956
1957 struct {
1958 uint8_t port_name[8];
1959 } dpa;
1829 } req; 1960 } req;
1830}; 1961};
1831 1962
@@ -1883,6 +2014,12 @@ struct ct_sns_rsp {
1883 struct { 2014 struct {
1884 uint8_t fc4_types[32]; 2015 uint8_t fc4_types[32];
1885 } gft_id; 2016 } gft_id;
2017
2018 struct {
2019 uint32_t entry_count;
2020 uint8_t port_name[8];
2021 struct ct_fdmi_hba_attributes attrs;
2022 } ghat;
1886 } rsp; 2023 } rsp;
1887}; 2024};
1888 2025
@@ -2033,6 +2170,8 @@ struct isp_operations {
2033 uint16_t (*calc_req_entries) (uint16_t); 2170 uint16_t (*calc_req_entries) (uint16_t);
2034 void (*build_iocbs) (srb_t *, cmd_entry_t *, uint16_t); 2171 void (*build_iocbs) (srb_t *, cmd_entry_t *, uint16_t);
2035 void * (*prep_ms_iocb) (struct scsi_qla_host *, uint32_t, uint32_t); 2172 void * (*prep_ms_iocb) (struct scsi_qla_host *, uint32_t, uint32_t);
2173 void * (*prep_ms_fdmi_iocb) (struct scsi_qla_host *, uint32_t,
2174 uint32_t);
2036 2175
2037 uint8_t * (*read_nvram) (struct scsi_qla_host *, uint8_t *, 2176 uint8_t * (*read_nvram) (struct scsi_qla_host *, uint8_t *,
2038 uint32_t, uint32_t); 2177 uint32_t, uint32_t);
@@ -2112,6 +2251,7 @@ typedef struct scsi_qla_host {
2112#define IOCTL_ERROR_RECOVERY 23 2251#define IOCTL_ERROR_RECOVERY 23
2113#define LOOP_RESET_NEEDED 24 2252#define LOOP_RESET_NEEDED 24
2114#define BEACON_BLINK_NEEDED 25 2253#define BEACON_BLINK_NEEDED 25
2254#define REGISTER_FDMI_NEEDED 26
2115 2255
2116 uint32_t device_flags; 2256 uint32_t device_flags;
2117#define DFLG_LOCAL_DEVICES BIT_0 2257#define DFLG_LOCAL_DEVICES BIT_0
@@ -2205,6 +2345,7 @@ typedef struct scsi_qla_host {
2205 int port_down_retry_count; 2345 int port_down_retry_count;
2206 uint8_t mbx_count; 2346 uint8_t mbx_count;
2207 uint16_t last_loop_id; 2347 uint16_t last_loop_id;
2348 uint16_t mgmt_svr_loop_id;
2208 2349
2209 uint32_t login_retry_count; 2350 uint32_t login_retry_count;
2210 2351
@@ -2319,6 +2460,7 @@ typedef struct scsi_qla_host {
2319 uint8_t model_number[16+1]; 2460 uint8_t model_number[16+1];
2320#define BINZERO "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" 2461#define BINZERO "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
2321 char *model_desc; 2462 char *model_desc;
2463 uint8_t adapter_id[16+1];
2322 2464
2323 uint8_t *node_name; 2465 uint8_t *node_name;
2324 uint8_t *port_name; 2466 uint8_t *port_name;
@@ -2378,6 +2520,7 @@ typedef struct scsi_qla_host {
2378#define QLA_SUSPENDED 0x106 2520#define QLA_SUSPENDED 0x106
2379#define QLA_BUSY 0x107 2521#define QLA_BUSY 0x107
2380#define QLA_RSCNS_HANDLED 0x108 2522#define QLA_RSCNS_HANDLED 0x108
2523#define QLA_ALREADY_REGISTERED 0x109
2381 2524
2382/* 2525/*
2383* Stat info for all adpaters 2526* Stat info for all adpaters