kernel - More AHCI work to help support broken AMD chipsets
This cleans up more of our AHCI support for AMD 880/890/SB850 chipsets.
This does NOT clean up hot-plug issues (fixing those might require actually
probing dead ports every few seconds).
* Better PCS/PRCS masking during low level reset sequences to prevent
the PCS/PRCS interrupt from poking ports while we are in a hard reset.
* Breakout the COMRESET sequence into its own procedure.
* Make sure SPM is disabled in addition to IPM when doing a hard reset
of a port. Also make sure that POD (Power Up Device) is set in
addition to SUD (Spin up Device) while we are in a hard reset.
* Wait one full second after aftering DET_INIT (sending COMINIT) before
testing the SSTS bits, to ensure the microcontroller has reinitialized
itself so we do not get bogus bits and to prevent bogus device detection
which some chipsets may have left unmasked.
This may also be needed in general when supporting SATA-III's longer
training times.
* Do not reinit the port after a PM probe fails as it could undo all of
the hard work we did initializing it.
* Reissue the COMRESET if a PM probe fails to ensure that any state left
over from the PM detection gets cleared and to deal with any devices
which brick when they receive a PM-related command.