summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2019-10-15 22:54:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-29 11:19:36 +0300
commit51f0c10890aa9d3315164063187cbf80368dc5a6 (patch)
tree41f7f64389149ed69ade68e6dd0c08f868bc1fa7 /drivers/ata
parent9bc5a4db9aa96989f131a92ee3d002e285b84596 (diff)
downloadlinux-51f0c10890aa9d3315164063187cbf80368dc5a6.tar.xz
libata/ahci: Fix PCS quirk application
[ Upstream commit 09d6ac8dc51a033ae0043c1fe40b4d02563c2496 ] 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 <afrie@gmx.net> Reported-by: Stephen Douthit <stephend@silicom-usa.com> Fixes: c312ef176399 ("libata/ahci: Drop PCS quirk for Denverton and beyond") Cc: <stable@vger.kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 5d110b1362e7..fa1c5a442957 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1633,7 +1633,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;
/*