Microsoft KB Archive/126431

{|
 * width="100%"|

PRB: ScsiPortLogError May Not Log Multiple Errors

 * }

Q126431

-

The information in this article applies to:


 * Microsoft Win32 Device Driver Kit (DDK) for Windows NT, versions 3.5, 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 query words: 3.50

Keywords :

Issue type :

Technology : kbAudDeveloper kbWinDDKSearch kbWin32sSearch kbWin32DDKSearch kbWin32DDKNT350 kbWin32DDKNT351 kbWin32DDKNTSearch