Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6722166ybp; Tue, 15 Oct 2019 20:37:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqy200rqTy1whCH1Ih5GEznPmgdCifvzEkVQ9OnBhurxMJmfBoWl/fcuVL/ZAAbKJKjFtrPm X-Received: by 2002:a05:6402:21e8:: with SMTP id ce8mr37299600edb.32.1571197056463; Tue, 15 Oct 2019 20:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571197056; cv=none; d=google.com; s=arc-20160816; b=Lpk/0ccNJf7iVnBqqGab6mFIPNRaCTPohqE1/zJlVQCLGB0jQwPurwfzLAwJ0tXrml 29uInTGbMhIjEi0AUPXBLUFvaYDJafnfLcI1s3QMj4lsgCuEI+BDMkJboz5z3+qpZUM1 Bn/aGzCilXlV0rMA9T6qNP3dqDhjADMykGAF7EEnpxAB1owwtNYAimgqRfoMebk0zmrU 81E04jap7wy87ds/WK/eFJtKhRZpyB+KRFqxokxg7TByZS+UE2ILxPi6PkWxhLb/gPdu E0/Gm32+fKjpP8biuLh8DV6R33GMHPYvD3O4Vl8ceM01KPNLY8f2RYSXLGnc2LkYgtjO 7Imw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject; bh=dO9+EA9YrCD6bpFQNPy9MZwXN9j2fjPOuF5HOsCeTVQ=; b=BnJpEeidjhqxi7r914ReeQSl30pKbI91839rlrDFzwLY+Y3ld9jv2Li/Ec8sMV/ILV xDkcsEKt3jIcckcvthvsQb0e1dov/NIM2Ll1xFGTJ+269BTjGDdX27vioG1yzHsV0UQz RWKgOtdX309h7pxqN3+YRjjd2N2lhuN4gRlpZOc9P79PIayAEurvU1yZi/g02vGadN+v b1txWiE2oPNaM115gKaf30leswSxbHgV7OqD1vZanxI+YV8nVbbeUlcDEQE4EXr1vF1E Yw1dcHIn0Ts9kac67w4QvQknZrXRifTLWmzq0jApnm3T2w3lOFcERdPqp2lLMMYisvZz SJxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j34si14959215ede.10.2019.10.15.20.37.13; Tue, 15 Oct 2019 20:37:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732791AbfJOUIi (ORCPT + 99 others); Tue, 15 Oct 2019 16:08:38 -0400 Received: from mga02.intel.com ([134.134.136.20]:55088 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726717AbfJOUIi (ORCPT ); Tue, 15 Oct 2019 16:08:38 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 13:08:37 -0700 X-IronPort-AV: E=Sophos;i="5.67,300,1566889200"; d="scan'208";a="220545203" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 13:08:36 -0700 Subject: [PATCH] libata/ahci: Fix PCS quirk application From: Dan Williams To: axboe@kernel.dk Cc: Andreas Friedrich , Stephen Douthit , stable@vger.kernel.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 15 Oct 2019 12:54:17 -0700 Message-ID: <157116925749.1211205.12806062056189943042.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/ata/ahci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index dd92faf197d5..05c2b32dcc4d 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; /*