From: Dan Williams Date: Tue, 15 Oct 2019 19:54:17 +0000 (-0700) Subject: libata/ahci: Fix PCS quirk application X-Git-Tag: v5.15~5280^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09d6ac8dc51a033ae0043c1fe40b4d02563c2496;p=platform%2Fkernel%2Flinux-starfive.git libata/ahci: Fix PCS quirk application Commit c312ef176399 "libata/ahci: Drop PCS quirk for Denverton and beyond" got the polarity wrong on the check for which board-ids should have the quirk applied. The board type board_ahci_pcs7 is defined at the end of the list such that "pcs7" boards can be special cased in the future if they need the quirk. All prior Intel board ids "< board_ahci_pcs7" should proceed with applying the quirk. Reported-by: Andreas Friedrich Reported-by: Stephen Douthit Fixes: c312ef176399 ("libata/ahci: Drop PCS quirk for Denverton and beyond") Cc: Signed-off-by: Dan Williams Signed-off-by: Jens Axboe --- diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index dd92faf..05c2b32 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1600,7 +1600,9 @@ static void ahci_intel_pcs_quirk(struct pci_dev *pdev, struct ahci_host_priv *hp */ if (!id || id->vendor != PCI_VENDOR_ID_INTEL) return; - if (((enum board_ids) id->driver_data) < board_ahci_pcs7) + + /* Skip applying the quirk on Denverton and beyond */ + if (((enum board_ids) id->driver_data) >= board_ahci_pcs7) return; /*