Skip to contentSkip to conversation

IDE failure on ACPI resume

DISCUSSION Matthew Garrett 2 participants 6 messages Mar 13, 2005 – Mar 18, 2005 ACPI

lore
Share & tools
lore
#0 lore raw

On resume, an HP nc6220 fails during resuming of the IDE devices. In this section of code from ide-iops.c:

                stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
                if ((stat & BUSY_STAT) == 0)
                        return 0;
                /*
                 * Assume a value of 0xff means nothing is connected to
                 * the interface and it doesn't implement the pull-down
                 * resistor on D7.
                 */
                if (stat == 0xff)
                        return -ENODEV;

0xff is read and ENODEV returned. This results in

hda: bus not ready on wakeup
hda: drive not ready on wakeup

and then the machine sits there until some later command times out. It seems that reading anything off the IDE bus just results in 0xff being read.

The IDE controller is an Intel ICH6. Another HP laptop with an identical chipset works fine, which makes me suspicious of the BIOS. Is the fact that Linux doesn't seem to run the GTF, STM or GTM methods likely to be relevant here?

Signature · 9 lines
Matthew Garrett | [email protected]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#1 lore raw
Quoted 14 lines · Matthew Garrett

On resume, an HP nc6220 fails during resuming of the IDE devices. In this section of code from ide-iops.c:

                stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
                if ((stat & BUSY_STAT) == 0)
                        return 0;
                /*
                 * Assume a value of 0xff means nothing is connected to
                 * the interface and it doesn't implement the pull-down
                 * resistor on D7.
                 */
                if (stat == 0xff)
                        return -ENODEV;
Quoted 1 line

0xff is read and ENODEV returned. This results in

Sounds like PCI not being completely restored. We had to work around some weird ATA issues in FreeBSD with the status register being invalid for quite a while after resume. A retry loop was the solution.

Signature · 8 lines
Nate


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#2 lore raw
Quoted 3 lines · Nate Lawson

Sounds like PCI not being completely restored. We had to work around some weird ATA issues in FreeBSD with the status register being invalid for quite a while after resume. A retry loop was the solution.

FreeBSD seems to fail in the same way on the same hardware, unfortunately. I'm leaning towards suspecting that we need to be doing something with the contents of the _GTF method, but by the looks of that that requires us to be able to work out which methods correspond to which hardware. Is anyone working on implementing this?

Signature · 1 line
Matthew Garrett | [email protected]
#3 lore raw
Quoted 12 lines · Matthew Garrett
Quoted 1 line · Nate Lawson

Sounds like PCI not being completely restored. We had to work around some weird ATA issues in FreeBSD with the status register being invalid for quite a while after resume. A retry loop was the solution.

FreeBSD seems to fail in the same way on the same hardware, unfortunately. I'm leaning towards suspecting that we need to be doing something with the contents of the _GTF method, but by the looks of that that requires us to be able to work out which methods correspond to which hardware. Is anyone working on implementing this?

Very interesting. I was hoping to someday have _GTF et al implemented but the ATA knowledge required was above my head. I also strongly suspected that the info published by _GTF would likely be invalid. Does Windows actually use that method or just hardcoded ATA initialization?

Signature · 1 line
Nate
#4 lore raw
Quoted 4 lines · Nate Lawson

Very interesting. I was hoping to someday have _GTF et al implemented but the ATA knowledge required was above my head. I also strongly suspected that the info published by _GTF would likely be invalid. Does Windows actually use that method or just hardcoded ATA initialization?

I believe that Windows does use the _GTF methods.

Signature · 9 lines
Matthew Garrett | [email protected]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#5 lore raw
Quoted 4 lines · Matthew Garrett
Quoted 1 line · Nate Lawson

Very interesting. I was hoping to someday have _GTF et al implemented but the ATA knowledge required was above my head. I also strongly suspected that the info published by _GTF would likely be invalid. Does Windows actually use that method or just hardcoded ATA initialization?

I believe that Windows does use the _GTF methods.

You are correct. A quick scan of my w2k drivers shows atapi.sys uses the _GTF, _GTM, and _STM methods.

Signature · 8 lines
Nate


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click