diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_def.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index e268f79bdbd2..9e9f6c1e4e5d 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -118,7 +118,7 @@ zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size) | |||
118 | 118 | ||
119 | #define ZFCP_SBAL_TIMEOUT (5*HZ) | 119 | #define ZFCP_SBAL_TIMEOUT (5*HZ) |
120 | 120 | ||
121 | #define ZFCP_TYPE2_RECOVERY_TIME (8*HZ) | 121 | #define ZFCP_TYPE2_RECOVERY_TIME 8 /* seconds */ |
122 | 122 | ||
123 | /* queue polling (values in microseconds) */ | 123 | /* queue polling (values in microseconds) */ |
124 | #define ZFCP_MAX_INPUT_THRESHOLD 5000 /* FIXME: tune */ | 124 | #define ZFCP_MAX_INPUT_THRESHOLD 5000 /* FIXME: tune */ |
@@ -139,7 +139,7 @@ zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size) | |||
139 | #define ZFCP_STATUS_READS_RECOM FSF_STATUS_READS_RECOM | 139 | #define ZFCP_STATUS_READS_RECOM FSF_STATUS_READS_RECOM |
140 | 140 | ||
141 | /* Do 1st retry in 1 second, then double the timeout for each following retry */ | 141 | /* Do 1st retry in 1 second, then double the timeout for each following retry */ |
142 | #define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 100 | 142 | #define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 1 |
143 | #define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 7 | 143 | #define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 7 |
144 | 144 | ||
145 | /* timeout value for "default timer" for fsf requests */ | 145 | /* timeout value for "default timer" for fsf requests */ |
@@ -983,10 +983,6 @@ struct zfcp_unit { | |||
983 | struct scsi_device *device; /* scsi device struct pointer */ | 983 | struct scsi_device *device; /* scsi device struct pointer */ |
984 | struct zfcp_erp_action erp_action; /* pending error recovery */ | 984 | struct zfcp_erp_action erp_action; /* pending error recovery */ |
985 | atomic_t erp_counter; | 985 | atomic_t erp_counter; |
986 | wait_queue_head_t scsi_scan_wq; /* can be used to wait until | ||
987 | all scsi_scan_target | ||
988 | requests have been | ||
989 | completed. */ | ||
990 | }; | 986 | }; |
991 | 987 | ||
992 | /* FSF request */ | 988 | /* FSF request */ |
@@ -1127,6 +1123,20 @@ zfcp_reqlist_find(struct zfcp_adapter *adapter, unsigned long req_id) | |||
1127 | return NULL; | 1123 | return NULL; |
1128 | } | 1124 | } |
1129 | 1125 | ||
1126 | static inline struct zfcp_fsf_req * | ||
1127 | zfcp_reqlist_find_safe(struct zfcp_adapter *adapter, struct zfcp_fsf_req *req) | ||
1128 | { | ||
1129 | struct zfcp_fsf_req *request; | ||
1130 | unsigned int idx; | ||
1131 | |||
1132 | for (idx = 0; idx < REQUEST_LIST_SIZE; idx++) { | ||
1133 | list_for_each_entry(request, &adapter->req_list[idx], list) | ||
1134 | if (request == req) | ||
1135 | return request; | ||
1136 | } | ||
1137 | return NULL; | ||
1138 | } | ||
1139 | |||
1130 | /* | 1140 | /* |
1131 | * functions needed for reference/usage counting | 1141 | * functions needed for reference/usage counting |
1132 | */ | 1142 | */ |