Enable optional soft reset in AHCI

It occurred that some Marvell integrated controllers
require additional time after soft reset to work properly.
Introduce new quirk (AHCI_Q_MRVL_SR_DEL), that enable
such operation.

Submitted by:          Konrad Adamczyk <ka@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           mav
Differential revision: https://reviews.freebsd.org/D9221
This commit is contained in:
Wojciech Macek 2017-01-25 10:32:57 +00:00
parent ccd5b1b023
commit a569f640e3
2 changed files with 9 additions and 0 deletions

View File

@ -1597,6 +1597,14 @@ ahci_execute_transaction(struct ahci_slot *slot)
}
}
/*
* Some Marvell controllers require additional time
* after soft reset to work properly. Setup delay
* to 50ms after soft reset.
*/
if (ch->quirks & AHCI_Q_MRVL_SR_DEL)
DELAY(50000);
/*
* Marvell HBAs with non-RAID firmware do not wait for
* readiness after soft reset, so we have to wait here.

View File

@ -598,6 +598,7 @@ enum ahci_err_type {
#define AHCI_Q_FORCE_PI 0x00040000
#define AHCI_Q_RESTORE_CAP 0x00080000
#define AHCI_Q_NOMSIX 0x00100000
#define AHCI_Q_MRVL_SR_DEL 0x00200000
#define AHCI_Q_BIT_STRING \
"\020" \