aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_def.h')
-rw-r--r--drivers/s390/scsi/zfcp_def.h31
1 files changed, 4 insertions, 27 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 2af043a5c74b..206b6e7a8bfd 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -76,11 +76,6 @@ zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
76#define ZFCP_DEVICE_MODEL 0x03 76#define ZFCP_DEVICE_MODEL 0x03
77#define ZFCP_DEVICE_MODEL_PRIV 0x04 77#define ZFCP_DEVICE_MODEL_PRIV 0x04
78 78
79/* allow as many chained SBALs as are supported by hardware */
80#define ZFCP_MAX_SBALS_PER_REQ FSF_MAX_SBALS_PER_REQ
81#define ZFCP_MAX_SBALS_PER_CT_REQ FSF_MAX_SBALS_PER_REQ
82#define ZFCP_MAX_SBALS_PER_ELS_REQ FSF_MAX_SBALS_PER_ELS_REQ
83
84/* DMQ bug workaround: don't use last SBALE */ 79/* DMQ bug workaround: don't use last SBALE */
85#define ZFCP_MAX_SBALES_PER_SBAL (QDIO_MAX_ELEMENTS_PER_BUFFER - 1) 80#define ZFCP_MAX_SBALES_PER_SBAL (QDIO_MAX_ELEMENTS_PER_BUFFER - 1)
86 81
@@ -89,21 +84,17 @@ zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
89 84
90/* max. number of (data buffer) SBALEs in largest SBAL chain */ 85/* max. number of (data buffer) SBALEs in largest SBAL chain */
91#define ZFCP_MAX_SBALES_PER_REQ \ 86#define ZFCP_MAX_SBALES_PER_REQ \
92 (ZFCP_MAX_SBALS_PER_REQ * ZFCP_MAX_SBALES_PER_SBAL - 2) 87 (FSF_MAX_SBALS_PER_REQ * ZFCP_MAX_SBALES_PER_SBAL - 2)
93 /* request ID + QTCB in SBALE 0 + 1 of first SBAL in chain */ 88 /* request ID + QTCB in SBALE 0 + 1 of first SBAL in chain */
94 89
95#define ZFCP_MAX_SECTORS (ZFCP_MAX_SBALES_PER_REQ * 8) 90#define ZFCP_MAX_SECTORS (ZFCP_MAX_SBALES_PER_REQ * 8)
96 /* max. number of (data buffer) SBALEs in largest SBAL chain 91 /* max. number of (data buffer) SBALEs in largest SBAL chain
97 multiplied with number of sectors per 4k block */ 92 multiplied with number of sectors per 4k block */
98 93
99#define ZFCP_SBAL_TIMEOUT (5*HZ)
100
101#define ZFCP_TYPE2_RECOVERY_TIME 8 /* seconds */ 94#define ZFCP_TYPE2_RECOVERY_TIME 8 /* seconds */
102 95
103/********************* FSF SPECIFIC DEFINES *********************************/ 96/********************* FSF SPECIFIC DEFINES *********************************/
104 97
105#define ZFCP_ULP_INFO_VERSION 26
106#define ZFCP_QTCB_VERSION FSF_QTCB_CURRENT_VERSION
107/* ATTENTION: value must not be used by hardware */ 98/* ATTENTION: value must not be used by hardware */
108#define FSF_QTCB_UNSOLICITED_STATUS 0x6305 99#define FSF_QTCB_UNSOLICITED_STATUS 0x6305
109 100
@@ -121,8 +112,6 @@ typedef unsigned long long fcp_lun_t;
121/* data length field may be at variable position in FCP-2 FCP_CMND IU */ 112/* data length field may be at variable position in FCP-2 FCP_CMND IU */
122typedef unsigned int fcp_dl_t; 113typedef unsigned int fcp_dl_t;
123 114
124#define ZFCP_FC_SERVICE_CLASS_DEFAULT FSF_CLASS_3
125
126/* timeout for name-server lookup (in seconds) */ 115/* timeout for name-server lookup (in seconds) */
127#define ZFCP_NS_GID_PN_TIMEOUT 10 116#define ZFCP_NS_GID_PN_TIMEOUT 10
128 117
@@ -228,7 +217,6 @@ struct fcp_logo {
228 * FC-FS stuff 217 * FC-FS stuff
229 */ 218 */
230#define R_A_TOV 10 /* seconds */ 219#define R_A_TOV 10 /* seconds */
231#define ZFCP_ELS_TIMEOUT (2 * R_A_TOV)
232 220
233#define ZFCP_LS_RLS 0x0f 221#define ZFCP_LS_RLS 0x0f
234#define ZFCP_LS_ADISC 0x52 222#define ZFCP_LS_ADISC 0x52
@@ -521,7 +509,7 @@ struct zfcp_qdio_queue {
521 in queue (free_count>0) */ 509 in queue (free_count>0) */
522 atomic_t count; /* number of free buffers 510 atomic_t count; /* number of free buffers
523 in queue */ 511 in queue */
524 rwlock_t lock; /* lock for operations on queue */ 512 spinlock_t lock; /* lock for operations on queue */
525 int pci_batch; /* SBALs since PCI indication 513 int pci_batch; /* SBALs since PCI indication
526 was last set */ 514 was last set */
527}; 515};
@@ -686,7 +674,7 @@ struct zfcp_fsf_req {
686 u32 fsf_command; /* FSF Command copy */ 674 u32 fsf_command; /* FSF Command copy */
687 struct fsf_qtcb *qtcb; /* address of associated QTCB */ 675 struct fsf_qtcb *qtcb; /* address of associated QTCB */
688 u32 seq_no; /* Sequence number of request */ 676 u32 seq_no; /* Sequence number of request */
689 unsigned long data; /* private data of request */ 677 void *data; /* private data of request */
690 struct timer_list timer; /* used for erp or scsi er */ 678 struct timer_list timer; /* used for erp or scsi er */
691 struct zfcp_erp_action *erp_action; /* used if this request is 679 struct zfcp_erp_action *erp_action; /* used if this request is
692 issued on behalf of erp */ 680 issued on behalf of erp */
@@ -694,10 +682,9 @@ struct zfcp_fsf_req {
694 from emergency pool */ 682 from emergency pool */
695 unsigned long long issued; /* request sent time (STCK) */ 683 unsigned long long issued; /* request sent time (STCK) */
696 struct zfcp_unit *unit; 684 struct zfcp_unit *unit;
685 void (*handler)(struct zfcp_fsf_req *);
697}; 686};
698 687
699typedef void zfcp_fsf_req_handler_t(struct zfcp_fsf_req*);
700
701/* driver data */ 688/* driver data */
702struct zfcp_data { 689struct zfcp_data {
703 struct scsi_host_template scsi_host_template; 690 struct scsi_host_template scsi_host_template;
@@ -730,7 +717,6 @@ struct zfcp_fsf_req_qtcb {
730/********************** ZFCP SPECIFIC DEFINES ********************************/ 717/********************** ZFCP SPECIFIC DEFINES ********************************/
731 718
732#define ZFCP_REQ_AUTO_CLEANUP 0x00000002 719#define ZFCP_REQ_AUTO_CLEANUP 0x00000002
733#define ZFCP_WAIT_FOR_SBAL 0x00000004
734#define ZFCP_REQ_NO_QTCB 0x00000008 720#define ZFCP_REQ_NO_QTCB 0x00000008
735 721
736#define ZFCP_SET 0x00000100 722#define ZFCP_SET 0x00000100
@@ -753,15 +739,6 @@ static inline int zfcp_reqlist_hash(unsigned long req_id)
753 return req_id % REQUEST_LIST_SIZE; 739 return req_id % REQUEST_LIST_SIZE;
754} 740}
755 741
756static inline void zfcp_reqlist_add(struct zfcp_adapter *adapter,
757 struct zfcp_fsf_req *fsf_req)
758{
759 unsigned int idx;
760
761 idx = zfcp_reqlist_hash(fsf_req->req_id);
762 list_add_tail(&fsf_req->list, &adapter->req_list[idx]);
763}
764
765static inline void zfcp_reqlist_remove(struct zfcp_adapter *adapter, 742static inline void zfcp_reqlist_remove(struct zfcp_adapter *adapter,
766 struct zfcp_fsf_req *fsf_req) 743 struct zfcp_fsf_req *fsf_req)
767{ 744{