Skip to content

Commit

Permalink
NVME workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Jan 11, 2024
1 parent 4ec708b commit dca7c16
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,16 @@ static inline int nvme_poll_cq(struct nvme_queue *nvmeq,
{
int found = 0;

/*
* In some cases, such as JH7110 SoC working with Kingston SSD,
* the CQE status may update a little bit later than the MSI,
* which cause an IRQ handle missing.
* As a workaround, here we will check the status first, and wait
* 1us if we get nothing.
*/
if (!nvme_cqe_pending(nvmeq))
udelay(1);

while (nvme_cqe_pending(nvmeq)) {
found++;
/*
Expand Down

0 comments on commit dca7c16

Please sign in to comment.