ScsiPortLogError


VOID ScsiPortLogError(HwDeviceExtension, Srb, PathId, TargetId, Lun, ErrorCode, UniqueId)
IN PVOID  HwDeviceExtension;
IN PSCSI_REQUEST_BLOCK  Srb;    /* optional    */
IN UCHAR  PathId;
IN UCHAR  TargetId;
IN UCHAR  Lun;
IN LONG  ErrorCode;
IN LONG  UniqueId;

Logs errors that are detected by the miniport driver or HBA.

HwDeviceExtension

Identifies the HBA miniport driver's storage for adapter data.

Srb

Points to a SCSI request block if one is associated with the error.

PathId

Identifies the SCSI bus.

TargetId

Identifies the target ID on the bus.

Lun

Identifies the logical unit number of the target device.

ErrorCode

Specifies an error code indicating one of the following values as the type of error:

Values

Meaning

SP_PROTOCOL_ERROR

Indicates the HBA miniport driver detected a SCSI bus protocol error.

SP_BUS_PARITY_ERROR

Indicates a SCSI bus parity error was detected.

SP_INTERNAL_ADAPTER_ERROR

Indicates an internal HBA error was detected.

SP_UNEXPECTED_DISCONNECT

Indicates that a target disconnected unexpectedly.

SP_INVALID_RESELECTION

Indicates a logical unit reselected unexpectedly or with an invalid queue tag.

SP_BUS_TIME_OUT

Indicates a SCSI bus connection to a logical unit timed out.

SP_REQUEST_TIMEOUT

Indicates an operation to the controller has timed out.

SP_IRQ_NOT_RESPONDING

Indicates the card is not interrupting when expected.

SP_BAD_FW_ERROR

Indicates the driver has detected bad or old firmware. The device will not be used.

SP_BAD_FW_WARNING

Indicates the driver has detected a card with old or bad firmware which then results in reduced performance.


UniqueId

Specifies a unique identifier for the error. The value differentiates the error from other errors with the same ErrorCode. For some HBA miniport drivers, this identifies the line of code where the error was detected; for others, it is any additional information returned by the HBA.

All real errors should be logged; however, errors such as selection time out or reset detected should not be logged. Recoverable errors should be retried after they have been logged.

See also ScsiPortNotification