aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_qdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_qdio.c')
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c51
1 files changed, 16 insertions, 35 deletions
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index 1e12a78e8edd..bdf5782b8a7a 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -222,7 +222,7 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, unsigned int status,
222 * Since we have been using this adapter, it is save to assume 222 * Since we have been using this adapter, it is save to assume
223 * that it is not failed but recoverable. The card seems to 223 * that it is not failed but recoverable. The card seems to
224 * report link-up events by self-initiated queue shutdown. 224 * report link-up events by self-initiated queue shutdown.
225 * That is why we need to clear the the link-down flag 225 * That is why we need to clear the link-down flag
226 * which is set again in case we have missed by a mile. 226 * which is set again in case we have missed by a mile.
227 */ 227 */
228 zfcp_erp_adapter_reopen( 228 zfcp_erp_adapter_reopen(
@@ -283,10 +283,10 @@ zfcp_qdio_request_handler(struct ccw_device *ccw_device,
283} 283}
284 284
285/** 285/**
286 * zfcp_qdio_reqid_check - checks for valid reqids or unsolicited status 286 * zfcp_qdio_reqid_check - checks for valid reqids.
287 */ 287 */
288static int zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, 288static void zfcp_qdio_reqid_check(struct zfcp_adapter *adapter,
289 unsigned long req_id) 289 unsigned long req_id)
290{ 290{
291 struct zfcp_fsf_req *fsf_req; 291 struct zfcp_fsf_req *fsf_req;
292 unsigned long flags; 292 unsigned long flags;
@@ -294,23 +294,22 @@ static int zfcp_qdio_reqid_check(struct zfcp_adapter *adapter,
294 debug_long_event(adapter->erp_dbf, 4, req_id); 294 debug_long_event(adapter->erp_dbf, 4, req_id);
295 295
296 spin_lock_irqsave(&adapter->req_list_lock, flags); 296 spin_lock_irqsave(&adapter->req_list_lock, flags);
297 fsf_req = zfcp_reqlist_ismember(adapter, req_id); 297 fsf_req = zfcp_reqlist_find(adapter, req_id);
298 298
299 if (!fsf_req) { 299 if (!fsf_req)
300 spin_unlock_irqrestore(&adapter->req_list_lock, flags); 300 /*
301 ZFCP_LOG_NORMAL("error: unknown request id (%ld).\n", req_id); 301 * Unknown request means that we have potentially memory
302 zfcp_erp_adapter_reopen(adapter, 0); 302 * corruption and must stop the machine immediatly.
303 return -EINVAL; 303 */
304 } 304 panic("error: unknown request id (%ld) on adapter %s.\n",
305 req_id, zfcp_get_busid_by_adapter(adapter));
305 306
306 zfcp_reqlist_remove(adapter, req_id); 307 zfcp_reqlist_remove(adapter, fsf_req);
307 atomic_dec(&adapter->reqs_active); 308 atomic_dec(&adapter->reqs_active);
308 spin_unlock_irqrestore(&adapter->req_list_lock, flags); 309 spin_unlock_irqrestore(&adapter->req_list_lock, flags);
309 310
310 /* finish the FSF request */ 311 /* finish the FSF request */
311 zfcp_fsf_req_complete(fsf_req); 312 zfcp_fsf_req_complete(fsf_req);
312
313 return 0;
314} 313}
315 314
316/* 315/*
@@ -374,27 +373,9 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device,
374 373
375 /* look for QDIO request identifiers in SB */ 374 /* look for QDIO request identifiers in SB */
376 buffere = &buffer->element[buffere_index]; 375 buffere = &buffer->element[buffere_index];
377 retval = zfcp_qdio_reqid_check(adapter, 376 zfcp_qdio_reqid_check(adapter,
378 (unsigned long) buffere->addr); 377 (unsigned long) buffere->addr);
379 378
380 if (retval) {
381 ZFCP_LOG_NORMAL("bug: unexpected inbound "
382 "packet on adapter %s "
383 "(reqid=0x%lx, "
384 "first_element=%d, "
385 "elements_processed=%d)\n",
386 zfcp_get_busid_by_adapter(adapter),
387 (unsigned long) buffere->addr,
388 first_element,
389 elements_processed);
390 ZFCP_LOG_NORMAL("hex dump of inbound buffer "
391 "at address %p "
392 "(buffer_index=%d, "
393 "buffere_index=%d)\n", buffer,
394 buffer_index, buffere_index);
395 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
396 (char *) buffer, SBAL_SIZE);
397 }
398 /* 379 /*
399 * A single used SBALE per inbound SBALE has been 380 * A single used SBALE per inbound SBALE has been
400 * implemented by QDIO so far. Hope they will 381 * implemented by QDIO so far. Hope they will