Re: swsusp: don't eat ide disks

benh@kernel.crashing.org
Mon, 4 Nov 2002 09:16:24 +0100


>S4 the bios has spun the disks back up, S3 we may need to let the disks
>perform the IDE power on and diskware load. Ben has some possible code
>for that

On pmac, I just hard reset them as I have GPIOs to control
the disk reset line, then wait for BSY to go away. We need something
smarter for the generic case, typically a mix of ATA/ATAPI reset,
and eventually execute diagnostics. I need to talk to Andre a bit
about it.

Also, I know at least of one nasty device here that won't play
nice unless it gets the identify command after reset (special
hacked device that lies about it's device type, a ZIP that
masquerades as an IDE-CD, to workaround firmware bugs in some
older laptops, ugh !)

For now, I suspect sending an ATA reset or ATAPI reset depending
on the device type, and making sure BSY is gone should cover
most cases though.

For disks, you may also need to redo the LBA setting (never played
with that, I only own sane enough disks...) and the SET_FEATURE for
PIO & DMA modes (provided your host controller chipset driver
saves & restore them).
But with the current design we have, this should probably be done
by the host chipset driver too. In 2.4, I just re-do a dma_check()
at the end of the resume phase, but that's incomplete in theory.

Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/