aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_qdio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 23:32:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 23:32:16 -0400
commit6ec129c3a2f8b38bc37e42348470ccfcb7460146 (patch)
tree3f11a99b9680728951b371fe12b5e01b6fc545a4 /drivers/s390/scsi/zfcp_qdio.c
parent01e73be3c8f254ef19d787f9b6757468175267eb (diff)
parentb64ddf96456cde17be22bf74cafed381a29d58ba (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (58 commits) [SCSI] zfcp: clear boxed flag on unit reopen. [SCSI] zfcp: clear adapter failed flag if an fsf request times out. [SCSI] zfcp: rework request ID management. [SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI [SCSI] zfcp: Locking for req_no and req_seq_no [SCSI] zfcp: print S_ID and D_ID with 3 bytes [SCSI] ipr: Use PCI-E reset API for new ipr adapter [SCSI] qla2xxx: Update version number to 8.01.07-k7. [SCSI] qla2xxx: Add MSI support. [SCSI] qla2xxx: Correct pci_set_msi() usage semantics. [SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed. [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings. [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization. [SCSI] zfcp: Stop system after memory corruption [SCSI] mesh: cleanup variable usage in interrupt handler [SCSI] megaraid: replace yield() with cond_resched() [SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n [SCSI] aacraid: correct SUN products to README [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers [SCSI] aacraid: kexec fix (reset interrupt handler) ...
Diffstat (limited to 'drivers/s390/scsi/zfcp_qdio.c')
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c49
1 files changed, 15 insertions, 34 deletions
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index 1e12a78e8edd..cb08ca3cc0f9 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -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