From patchwork Wed Mar 23 16:36:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 601284 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qVZvg4ZvFz9rxv for ; Thu, 24 Mar 2016 03:36:31 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=gsaY7Fjy; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753908AbcCWQga (ORCPT ); Wed, 23 Mar 2016 12:36:30 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33048 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549AbcCWQg3 (ORCPT ); Wed, 23 Mar 2016 12:36:29 -0400 Received: by mail-wm0-f53.google.com with SMTP id l68so241485364wml.0 for ; Wed, 23 Mar 2016 09:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=BzIGBoFO02zzFFKf3f06NLAPFqvniDzzkFot0z0uD6o=; b=gsaY7FjyMx73SXq/G0ijQPNB2Q96ya+5+SJTEEfpn5OIkxI9WTTSp6EPO3k5QOaZOi LT55CBJUeLp8r3Bk6eTb/UTnsIWdahP9dXpUqhA3g6ps1zc+4Oz5rBEbZTyX6yxvxEQU D94oSqJ20XkpdyQE7lCYuPgc5BaJoJK4DYAzo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=BzIGBoFO02zzFFKf3f06NLAPFqvniDzzkFot0z0uD6o=; b=EibnvOxhb1mwLRjWSC/tcJMGsYLhZ/OmrY07wSyg8ssBFKu6uzLm6POhiAPShTnb4l Xxmxe9i5zUGz0QyQgdarwZDpBCQG2qmpuMMHEyl7vUPeO9qM/DNYem7a3U3MVBzovfza ETf9qvxH2xFdsH+XL7GoYV5MZzpKRHTuXofrXKheLj/H4gTz8EEzoo3y0awFJu7dHqxC +ihmvEkfgPmKqBAgrBCjYTbvLdCUn0JmxR4iqbwqpGkkdwmwsdXVlHkQz5YfOS9uxnMa NAAzM53E7Vhtl0w7D25b9jeGlnJWQY3EG0ZbErmxREuD961lt6gexgOhP8rqyye3x7Cs 9GRw== X-Gm-Message-State: AD7BkJIxX1xE3mYyYs5v111qPWMY+0adjrLYS1cFaTuGP2sC6nIrpPG5HFYpO+JD4xyawd1r X-Received: by 10.28.21.75 with SMTP id 72mr26250200wmv.64.1458750988309; Wed, 23 Mar 2016 09:36:28 -0700 (PDT) Received: from [192.168.1.22] (host-92-17-247-99.as13285.net. [92.17.247.99]) by smtp.googlemail.com with ESMTPSA id t8sm3349315wjy.41.2016.03.23.09.36.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 09:36:27 -0700 (PDT) To: tj@kernel.org Cc: linux-ide@vger.kernel.org, hdegoede@redhat.com, mikpelinux@gmail.com From: Srinivas Kandagatla Subject: failures due to "libata: disable forced PORTS_IMPL for >= AHCI 1.3 patch" Message-ID: <56F2C60A.5070504@linaro.org> Date: Wed, 23 Mar 2016 16:36:26 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Hi Tejun, Its bit late but just found that commit 566d18 "libata: disable forced PORTS_IMPL for >= AHCI 1.3" is breaking AHCI on Qualcomm APQ8064 platforms in the mainline kernel (arch/arm/boot/dts/qcom-apq8064.dtsi). This platform uses "generic-ahci" platform driver and reports AHCI version as 0x10300, and PORTS_IMPL is never set, so the existing workaround was correct for this platform, however the latest patch broken this. There are few ways to fix this issue, 1> Add new compatible string to achi_platform driver so that this platform can force the port_map, Or 2> Have a generic dt binding to force the port map. I would like to know if you have plans to fix this in any other better way? Below patch fixes issue for me, will split the patches once we agree if this is the correct direction to fix it. --------------------------->cut<-------------------------- if (hpriv->mask_port_map) { --------------------------->cut<-------------------------- Thanks, srini --- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 4044233..b5cf9b1 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -51,6 +51,9 @@ static int ahci_probe(struct platform_device *pdev) if (rc) return rc; + if (of_device_is_compatible(dev->of_node, "qcom,apq8064-ahci")) + hpriv->force_port_map = 1; + if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ; @@ -72,6 +75,7 @@ static const struct of_device_id ahci_of_match[] = { { .compatible = "generic-ahci", }, /* Keep the following compatibles for device tree compatibility */ { .compatible = "snps,spear-ahci", }, + { .compatible = "qcom,apq8064-ahci", }, { .compatible = "snps,exynos5440-ahci", }, { .compatible = "ibm,476gtr-ahci", }, { .compatible = "snps,dwc-ahci", }, diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 3982054..a5d7c1c 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -507,6 +507,7 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv) dev_info(dev, "forcing port_map 0x%x -> 0x%x\n", port_map, hpriv->force_port_map); port_map = hpriv->force_port_map; + hpriv->saved_port_map = port_map; }