Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

SATA/ATA pass through status infomation

Gary_Little-3Gary_Little-3 Member Posts: 1,208
Here's a problem that we have been encountering in both a quick and dirty test application and our primary app.

If an ATA pass through command on a SATA drive is aborted, the NEXT PIO IN command will receive the aborted status for the prior command. For instance:

1. send an ATA command that errors out and receives an error status in the returned FIS, such as reading read a bad LBA
Note the settings in the Current TFR fields.
2. send an IDENTIFY
Current TFR still set to 51:04 status.
the data buffer contains valid IDENTIFY information indicating the IDENTIFY command succeeded.

We can clear the error by performing a non-PIO command such a a READ or READ DMA, but until we do that, PIO IN commands such as IDENTIFY will have "stale" status information in the Current TFR fields. Surely this is NOT expected behavior for ATA pass through? We have seen this across all current versions of the OS; XP, Server 2008, Win 7 using either iastor?.sys and msahci.sys. Is there a mechanism, also known as a "work around" that will allow us to clear the last status information to allow the next PIO IN to not be bounced with an infamous "false positive" ... or is that a "true negative"?

Gary G. Little

Comments

  • Gary_Little-3Gary_Little-3 Member Posts: 1,208
    In point 2, change that to read "Current TFR still set to the prior error status". Yes, the error we see is a 51:04, but depending on what you do, your mileage may vary.

    Gary Little
    H (952) 223-1349
    C (952) 454-4629
    xxxxx@comcast.net


    On Aug 30, 2011, at 6:31 AM, Gary G. Little wrote:

    > Here's a problem that we have been encountering in both a quick and dirty test application and our primary app.
    >
    > If an ATA pass through command on a SATA drive is aborted, the NEXT PIO IN command will receive the aborted status for the prior command. For instance:
    >
    > 1. send an ATA command that errors out and receives an error status in the returned FIS, such as reading read a bad LBA
    > Note the settings in the Current TFR fields.
    > 2. send an IDENTIFY
    > Current TFR still set to 51:04 status.
    > the data buffer contains valid IDENTIFY information indicating the IDENTIFY command succeeded.
    >
    > We can clear the error by performing a non-PIO command such a a READ or READ DMA, but until we do that, PIO IN commands such as IDENTIFY will have "stale" status information in the Current TFR fields. Surely this is NOT expected behavior for ATA pass through? We have seen this across all current versions of the OS; XP, Server 2008, Win 7 using either iastor?.sys and msahci.sys. Is there a mechanism, also known as a "work around" that will allow us to clear the last status information to allow the next PIO IN to not be bounced with an infamous "false positive" ... or is that a "true negative"?
    >
    > Gary G. Little
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 25 Feb 2019 OSR Seminar Space
Developing Minifilters 8 April 2019 OSR Seminar Space