aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorSaurav Kashyap <saurav.kashyap@qlogic.com>2012-08-22 14:21:01 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-24 04:10:47 -0400
commita9b6f722f62d0a302b980a4fdcdf9c9933955772 (patch)
treed353225c380d8183faddbf535a6116ada1a41279 /drivers/scsi/qla2xxx/qla_def.h
parent5f16b331d83757ad5154af07b449c722fef45d5e (diff)
[SCSI] qla2xxx: Implementation of bidirectional.
[jejb: merge fix for introduced warning] Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 28c0b3575616..7ff92ce42821 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -260,6 +260,7 @@ struct srb_iocb {
260#define SRB_ADISC_CMD 6 260#define SRB_ADISC_CMD 6
261#define SRB_TM_CMD 7 261#define SRB_TM_CMD 7
262#define SRB_SCSI_CMD 8 262#define SRB_SCSI_CMD 8
263#define SRB_BIDI_CMD 9
263 264
264typedef struct srb { 265typedef struct srb {
265 atomic_t ref_count; 266 atomic_t ref_count;
@@ -1510,6 +1511,13 @@ typedef struct {
1510#define CS_RETRY 0x82 /* Driver defined */ 1511#define CS_RETRY 0x82 /* Driver defined */
1511#define CS_LOOP_DOWN_ABORT 0x83 /* Driver defined */ 1512#define CS_LOOP_DOWN_ABORT 0x83 /* Driver defined */
1512 1513
1514#define CS_BIDIR_RD_OVERRUN 0x700
1515#define CS_BIDIR_RD_WR_OVERRUN 0x707
1516#define CS_BIDIR_RD_OVERRUN_WR_UNDERRUN 0x715
1517#define CS_BIDIR_RD_UNDERRUN 0x1500
1518#define CS_BIDIR_RD_UNDERRUN_WR_OVERRUN 0x1507
1519#define CS_BIDIR_RD_WR_UNDERRUN 0x1515
1520#define CS_BIDIR_DMA 0x200
1513/* 1521/*
1514 * Status entry status flags 1522 * Status entry status flags
1515 */ 1523 */
@@ -2374,6 +2382,11 @@ struct qla_statistics {
2374 uint64_t output_bytes; 2382 uint64_t output_bytes;
2375}; 2383};
2376 2384
2385struct bidi_statistics {
2386 unsigned long long io_count;
2387 unsigned long long transfer_bytes;
2388};
2389
2377/* Multi queue support */ 2390/* Multi queue support */
2378#define MBC_INITIALIZE_MULTIQ 0x1f 2391#define MBC_INITIALIZE_MULTIQ 0x1f
2379#define QLA_QUE_PAGE 0X1000 2392#define QLA_QUE_PAGE 0X1000
@@ -2671,6 +2684,7 @@ struct qla_hw_data {
2671#define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS) 2684#define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS)
2672#define IS_CT6_SUPPORTED(ha) ((ha)->device_type & DT_CT6_SUPPORTED) 2685#define IS_CT6_SUPPORTED(ha) ((ha)->device_type & DT_CT6_SUPPORTED)
2673#define IS_MQUE_CAPABLE(ha) ((ha)->mqenable || IS_QLA83XX(ha)) 2686#define IS_MQUE_CAPABLE(ha) ((ha)->mqenable || IS_QLA83XX(ha))
2687#define IS_BIDI_CAPABLE(ha) ((IS_QLA25XX(ha) || IS_QLA2031(ha)))
2674 2688
2675 /* HBA serial number */ 2689 /* HBA serial number */
2676 uint8_t serial0; 2690 uint8_t serial0;
@@ -2754,6 +2768,7 @@ struct qla_hw_data {
2754 struct completion mbx_intr_comp; /* Used for completion notification */ 2768 struct completion mbx_intr_comp; /* Used for completion notification */
2755 struct completion dcbx_comp; /* For set port config notification */ 2769 struct completion dcbx_comp; /* For set port config notification */
2756 int notify_dcbx_comp; 2770 int notify_dcbx_comp;
2771 struct mutex selflogin_lock;
2757 2772
2758 /* Basic firmware related information. */ 2773 /* Basic firmware related information. */
2759 uint16_t fw_major_version; 2774 uint16_t fw_major_version;
@@ -2987,6 +3002,13 @@ typedef struct scsi_qla_host {
2987 3002
2988 /* ISP configuration data. */ 3003 /* ISP configuration data. */
2989 uint16_t loop_id; /* Host adapter loop id */ 3004 uint16_t loop_id; /* Host adapter loop id */
3005 uint16_t self_login_loop_id; /* host adapter loop id
3006 * get it on self login
3007 */
3008 fc_port_t bidir_fcport; /* fcport used for bidir cmnds
3009 * no need of allocating it for
3010 * each command
3011 */
2990 3012
2991 port_id_t d_id; /* Host adapter port id */ 3013 port_id_t d_id; /* Host adapter port id */
2992 uint8_t marker_needed; 3014 uint8_t marker_needed;
@@ -3040,6 +3062,7 @@ typedef struct scsi_qla_host {
3040 int seconds_since_last_heartbeat; 3062 int seconds_since_last_heartbeat;
3041 struct fc_host_statistics fc_host_stat; 3063 struct fc_host_statistics fc_host_stat;
3042 struct qla_statistics qla_stats; 3064 struct qla_statistics qla_stats;
3065 struct bidi_statistics bidi_stats;
3043 3066
3044 atomic_t vref_count; 3067 atomic_t vref_count;
3045} scsi_qla_host_t; 3068} scsi_qla_host_t;