aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h54
1 files changed, 40 insertions, 14 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 839610909018..3a432ea0c7a3 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * QLogic Fibre Channel HBA Driver 2 * QLogic Fibre Channel HBA Driver
3 * Copyright (c) 2003-2008 QLogic Corporation 3 * Copyright (c) 2003-2010 QLogic Corporation
4 * 4 *
5 * See LICENSE.qla2xxx for copyright and licensing details. 5 * See LICENSE.qla2xxx for copyright and licensing details.
6 */ 6 */
@@ -202,6 +202,7 @@ struct sd_dif_tuple {
202 * SCSI Request Block 202 * SCSI Request Block
203 */ 203 */
204typedef struct srb { 204typedef struct srb {
205 atomic_t ref_count;
205 struct fc_port *fcport; 206 struct fc_port *fcport;
206 uint32_t handle; 207 uint32_t handle;
207 208
@@ -249,16 +250,6 @@ struct srb_iocb {
249 uint32_t lun; 250 uint32_t lun;
250 uint32_t data; 251 uint32_t data;
251 } tmf; 252 } tmf;
252 struct {
253 /*
254 * values for modif field below are as
255 * defined in mrk_entry_24xx struct
256 * for the modifier field in qla_fw.h.
257 */
258 uint8_t modif;
259 uint16_t lun;
260 uint32_t data;
261 } marker;
262 } u; 253 } u;
263 254
264 struct timer_list timer; 255 struct timer_list timer;
@@ -276,7 +267,6 @@ struct srb_iocb {
276#define SRB_CT_CMD 5 267#define SRB_CT_CMD 5
277#define SRB_ADISC_CMD 6 268#define SRB_ADISC_CMD 6
278#define SRB_TM_CMD 7 269#define SRB_TM_CMD 7
279#define SRB_MARKER_CMD 8
280 270
281struct srb_ctx { 271struct srb_ctx {
282 uint16_t type; 272 uint16_t type;
@@ -713,6 +703,8 @@ typedef struct {
713#define MBC_SEND_RNFT_ELS 0x5e /* Send RNFT ELS request */ 703#define MBC_SEND_RNFT_ELS 0x5e /* Send RNFT ELS request */
714#define MBC_GET_LINK_PRIV_STATS 0x6d /* Get link & private data. */ 704#define MBC_GET_LINK_PRIV_STATS 0x6d /* Get link & private data. */
715#define MBC_SET_VENDOR_ID 0x76 /* Set Vendor ID. */ 705#define MBC_SET_VENDOR_ID 0x76 /* Set Vendor ID. */
706#define MBC_SET_PORT_CONFIG 0x122 /* Set port configuration */
707#define MBC_GET_PORT_CONFIG 0x123 /* Get port configuration */
716 708
717/* Firmware return data sizes */ 709/* Firmware return data sizes */
718#define FCAL_MAP_SIZE 128 710#define FCAL_MAP_SIZE 128
@@ -1660,8 +1652,14 @@ typedef struct {
1660 uint8_t port_name[WWN_SIZE]; 1652 uint8_t port_name[WWN_SIZE];
1661 uint8_t fabric_port_name[WWN_SIZE]; 1653 uint8_t fabric_port_name[WWN_SIZE];
1662 uint16_t fp_speed; 1654 uint16_t fp_speed;
1655 uint8_t fc4_type;
1663} sw_info_t; 1656} sw_info_t;
1664 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
1665/* 1663/*
1666 * Fibre channel port type. 1664 * Fibre channel port type.
1667 */ 1665 */
@@ -1705,6 +1703,7 @@ typedef struct fc_port {
1705 u32 supported_classes; 1703 u32 supported_classes;
1706 1704
1707 uint16_t vp_idx; 1705 uint16_t vp_idx;
1706 uint8_t fc4_type;
1708} fc_port_t; 1707} fc_port_t;
1709 1708
1710/* 1709/*
@@ -1787,6 +1786,9 @@ typedef struct fc_port {
1787#define GPSC_REQ_SIZE (16 + 8) 1786#define GPSC_REQ_SIZE (16 + 8)
1788#define GPSC_RSP_SIZE (16 + 2 + 2) 1787#define GPSC_RSP_SIZE (16 + 2 + 2)
1789 1788
1789#define GFF_ID_CMD 0x011F
1790#define GFF_ID_REQ_SIZE (16 + 4)
1791#define GFF_ID_RSP_SIZE (16 + 128)
1790 1792
1791/* 1793/*
1792 * HBA attribute types. 1794 * HBA attribute types.
@@ -1988,6 +1990,11 @@ struct ct_sns_req {
1988 struct { 1990 struct {
1989 uint8_t port_name[8]; 1991 uint8_t port_name[8];
1990 } gpsc; 1992 } gpsc;
1993
1994 struct {
1995 uint8_t reserved;
1996 uint8_t port_name[3];
1997 } gff_id;
1991 } req; 1998 } req;
1992}; 1999};
1993 2000
@@ -2060,6 +2067,11 @@ struct ct_sns_rsp {
2060 uint16_t speeds; 2067 uint16_t speeds;
2061 uint16_t speed; 2068 uint16_t speed;
2062 } gpsc; 2069 } gpsc;
2070
2071#define GFF_FCP_SCSI_OFFSET 7
2072 struct {
2073 uint8_t fc4_features[128];
2074 } gff_id;
2063 } rsp; 2075 } rsp;
2064}; 2076};
2065 2077
@@ -2410,6 +2422,7 @@ struct qla_hw_data {
2410 uint32_t cpu_affinity_enabled :1; 2422 uint32_t cpu_affinity_enabled :1;
2411 uint32_t disable_msix_handshake :1; 2423 uint32_t disable_msix_handshake :1;
2412 uint32_t fcp_prio_enabled :1; 2424 uint32_t fcp_prio_enabled :1;
2425 uint32_t fw_hung :1;
2413 } flags; 2426 } flags;
2414 2427
2415 /* This spinlock is used to protect "io transactions", you must 2428 /* This spinlock is used to protect "io transactions", you must
@@ -2630,6 +2643,8 @@ struct qla_hw_data {
2630 struct mutex vport_lock; /* Virtual port synchronization */ 2643 struct mutex vport_lock; /* Virtual port synchronization */
2631 struct completion mbx_cmd_comp; /* Serialize mbx access */ 2644 struct completion mbx_cmd_comp; /* Serialize mbx access */
2632 struct completion mbx_intr_comp; /* Used for completion notification */ 2645 struct completion mbx_intr_comp; /* Used for completion notification */
2646 struct completion dcbx_comp; /* For set port config notification */
2647 int notify_dcbx_comp;
2633 2648
2634 /* Basic firmware related information. */ 2649 /* Basic firmware related information. */
2635 uint16_t fw_major_version; 2650 uint16_t fw_major_version;
@@ -2699,6 +2714,8 @@ struct qla_hw_data {
2699 uint8_t fcode_revision[16]; 2714 uint8_t fcode_revision[16];
2700 uint32_t fw_revision[4]; 2715 uint32_t fw_revision[4];
2701 2716
2717 uint32_t gold_fw_version[4];
2718
2702 /* Offsets for flash/nvram access (set to ~0 if not used). */ 2719 /* Offsets for flash/nvram access (set to ~0 if not used). */
2703 uint32_t flash_conf_off; 2720 uint32_t flash_conf_off;
2704 uint32_t flash_data_off; 2721 uint32_t flash_data_off;
@@ -2783,6 +2800,9 @@ struct qla_hw_data {
2783 uint16_t gbl_dsd_avail; 2800 uint16_t gbl_dsd_avail;
2784 struct list_head gbl_dsd_list; 2801 struct list_head gbl_dsd_list;
2785#define NUM_DSD_CHAIN 4096 2802#define NUM_DSD_CHAIN 4096
2803
2804 uint8_t fw_type;
2805 __le32 file_prd_off; /* File firmware product offset */
2786}; 2806};
2787 2807
2788/* 2808/*
@@ -2961,9 +2981,15 @@ typedef struct scsi_qla_host {
2961 2981
2962#define QLA_DSDS_PER_IOCB 37 2982#define QLA_DSDS_PER_IOCB 37
2963 2983
2984#define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr)
2985
2986enum nexus_wait_type {
2987 WAIT_HOST = 0,
2988 WAIT_TARGET,
2989 WAIT_LUN,
2990};
2991
2964#include "qla_gbl.h" 2992#include "qla_gbl.h"
2965#include "qla_dbg.h" 2993#include "qla_dbg.h"
2966#include "qla_inline.h" 2994#include "qla_inline.h"
2967
2968#define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr)
2969#endif 2995#endif