Skip to content

Commit

Permalink
nvme: Explain a workaround a little better
Browse files Browse the repository at this point in the history
The don't touch the mmio of the drive after we do a EN 1->0 transition
is only for a tiny number of dirves that have this unforunate issue.

Sponsored by:		Netflix

(cherry picked from commit 77054a8)
  • Loading branch information
bsdimp authored and amotin committed Jan 21, 2022
1 parent 02325a4 commit 0c3d88b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/dev/nvme/nvme_ctrlr.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ nvme_ctrlr_disable(struct nvme_controller *ctrlr)

cc &= ~NVME_CC_REG_EN_MASK;
nvme_mmio_write_4(ctrlr, cc, cc);

/*
* Some drives have issues with accessing the mmio after we
* disable, so delay for a bit after we write the bit to
* cope with these issues.
* A few drives have firmware bugs that freeze the drive if we access
* the mmio too soon after we disable.
*/
if (ctrlr->quirks & QUIRK_DELAY_B4_CHK_RDY)
pause("nvmeR", MSEC_2_TICKS(B4_CHK_RDY_DELAY_MS));
Expand Down

0 comments on commit 0c3d88b

Please sign in to comment.