* failures due to "libata: disable forced PORTS_IMPL for >= AHCI 1.3 patch"
@ 2016-03-23 16:36 Srinivas Kandagatla
2016-03-23 18:28 ` Justin Maggard
0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Kandagatla @ 2016-03-23 16:36 UTC (permalink / raw)
To: tj; +Cc: linux-ide, hdegoede, mikpelinux
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<--------------------------
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;
}
if (hpriv->mask_port_map) {
--------------------------->cut<--------------------------
Thanks,
srini
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: failures due to "libata: disable forced PORTS_IMPL for >= AHCI 1.3 patch"
2016-03-23 16:36 failures due to "libata: disable forced PORTS_IMPL for >= AHCI 1.3 patch" Srinivas Kandagatla
@ 2016-03-23 18:28 ` Justin Maggard
2016-03-23 19:06 ` Srinivas Kandagatla
0 siblings, 1 reply; 4+ messages in thread
From: Justin Maggard @ 2016-03-23 18:28 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: Tejun Heo, linux-ide, hdegoede, mikpelinux
On Wed, Mar 23, 2016 at 9:36 AM, Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
> 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.
>
A generic dt binding is probably a better way forward. The Annapurna
Alpine platform seems to have the same issue.
-Justin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: failures due to "libata: disable forced PORTS_IMPL for >= AHCI 1.3 patch"
2016-03-23 18:28 ` Justin Maggard
@ 2016-03-23 19:06 ` Srinivas Kandagatla
2016-03-24 19:14 ` Tejun Heo
0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Kandagatla @ 2016-03-23 19:06 UTC (permalink / raw)
To: Justin Maggard; +Cc: Tejun Heo, linux-ide, hdegoede, mikpelinux
On 23/03/16 18:28, Justin Maggard wrote:
> On Wed, Mar 23, 2016 at 9:36 AM, Srinivas Kandagatla
> <srinivas.kandagatla@linaro.org> wrote:
>> 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.
>>
>
> A generic dt binding is probably a better way forward. The Annapurna
> Alpine platform seems to have the same issue.
+1 for generic bindings.
I suspected that other platforms would also hit the same issue.
--srini
>
> -Justin
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: failures due to "libata: disable forced PORTS_IMPL for >= AHCI 1.3 patch"
2016-03-23 19:06 ` Srinivas Kandagatla
@ 2016-03-24 19:14 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2016-03-24 19:14 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: Justin Maggard, linux-ide, hdegoede, mikpelinux
Hello,
On Wed, Mar 23, 2016 at 07:06:25PM +0000, Srinivas Kandagatla wrote:
> >A generic dt binding is probably a better way forward. The Annapurna
> >Alpine platform seems to have the same issue.
>
> +1 for generic bindings.
>
> I suspected that other platforms would also hit the same issue.
I can change the code so that PORTS_IMPL workaround is applied
automatically for all platform drivers as a stop-gap. Do we need
that or can we push dt based solution quickly enough?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-24 19:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-23 16:36 failures due to "libata: disable forced PORTS_IMPL for >= AHCI 1.3 patch" Srinivas Kandagatla
2016-03-23 18:28 ` Justin Maggard
2016-03-23 19:06 ` Srinivas Kandagatla
2016-03-24 19:14 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).