PRB: ScsiPortLogError May Not Log Multiple Errors

Last reviewed: September 18, 1995
Article ID: Q126431
The information in this article applies to:
  • Microsoft Win32 Device Development Kit (DDK) for Windows NT, versions 3.5 and 3.51

SYMPTOMS

When a SCSI miniport calls ScsiPortLogError, only the first error is guaranteed to be logged to the Event Log. Additional calls to ScsiPortLogError may or may not succeed, depending on whether a SCSI port DPC routine was allowed to run.

The call to ScsiPortLogError does not directly write to the event log. Rather, a flag is set in the SCSI port driver that indicates that the error message is to be logged. Later, a DPC routine is run that checks whether that flag is set and, if so, calls IoWriteErrorLogEntry to write the error message.

Between the time that the first call to ScsiPortLogError and the call to IoWriteErrorLogEntry (by the SCSI port DPC routine), all other calls to ScsiPortLogError will be ignored.

RESOLUTION

If a SCSI miniport driver absolutely must log multiple errors in a routine, the driver will have to call ScsiPortLogError to log the first error, and then request a timer call via ScsiPortNotification to log the second error. In the timer routine, the driver would call ScsiPortLogError. If additional errors must be logged, the process of requesting another timer call must be repeated.

STATUS

This behavior is by design. The main reason for this implementation is that the IoWriteErrorLogEntry can only be run at IRQL <= DISPATCH_LEVEL, but ScsiPortLogError can be called at any level. This means that ScsiPortLogError might be called from a SCSI miniport's interrupt routine (IRQL > DISPATCH_LEVEL), so the SCSI port driver couldn't call IoWriteErrorLogEntry.


Additional reference words: 3.50
KBCategory: kbprg kbprb
KBSubcategory: ntddkstorage


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 18, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.