linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lin Mac <mkl0301@gmail.com>
To: "Basheer, Mansoor Ahamed" <mansoor.ahamed@ti.com>
Cc: "htejun@gmail.com" <htejun@gmail.com>,
	"cbouatmailru@gmail.com" <cbouatmailru@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"jgarzik@pobox.com" <jgarzik@pobox.com>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH v5 3/3] ahci_platforms: add support for CNS3xxx SoC devices
Date: Mon, 10 Jan 2011 23:47:29 +0800	[thread overview]
Message-ID: <AANLkTikrFpD+MDqyjS3CMGceMHXWhELPGNv1FaqEqP0s@mail.gmail.com> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB0373E1D99B@dbde02.ent.ti.com>

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

2011/1/10 Basheer, Mansoor Ahamed <mansoor.ahamed@ti.com>:
>> From: Mac Lin <mkl0301@gmail.com>
>>
>> CNS3xxx override the softreset function of ahci_platform
>> ahci_softreset by cns3xxx_ahci_softreset, which would retry
>> ahci_do_softreset again with pmp=0 if
>> pmp=15 failed, for the controller has problem receiving D2H
>> Reg FIS of the different PMP setting of the previous sent H2D Reg FIS.
>>
>
> Is this issue only with your ahci platform controller? I came across another
> thread here,
>
> http://www.spinics.net/lists/linux-ide/msg39865.html
Thanks for mentioning this.
They do look alike. I'll confirm with them.

> Also, the ahci platform controller on Texas Instruments OMAP L138 platform
> behaves in a similar fashion.
>
> Currently I see only Cavium Networks, Faraday and TI using ahci platform
> controller and all 3 facing same issue.
>
> Hence, should we fix this in ahci_platform.c conditionally using platform data,
> otherwise we will end-up adding file for every platform (just for one
> function).
We can add quirk in ahci platform data, just like sdhci_pltfm.c and
sdhci_cns3xxx.c.
Thus, in cns3xxx's case, all we need is to include
<linux/ahci_platform.h>, and all the SoC specific code could exist in
arch folder, similar to my v1 patchset.

Best Regards,
Mac Lin

[-- Attachment #2: 0001-libahci-Fixup-for-softwreset-failures-with-direct-co.patch --]
[-- Type: text/x-diff, Size: 1003 bytes --]

From 030eefbcba9499b2aa24171895881afe6c385fd9 Mon Sep 17 00:00:00 2001
From: Mac Lin <mkl0301@gmail.com>
Date: Mon, 10 Jan 2011 22:37:57 +0800
Subject: [PATCH] libahci: Fixup for softwreset failures with direct connected disks with CONFIG_SATA_PMP enabled

---
 drivers/ata/libahci.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index ebc08d6..081548f 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1302,10 +1302,15 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,
 			  unsigned long deadline)
 {
 	int pmp = sata_srst_pmp(link);
+	int ret;
 
 	DPRINTK("ENTER\n");
 
-	return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
+	ret = ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
+	if (ret && pmp)
+		return ahci_do_softreset(link, class, 0, deadline,
+			ahci_check_ready);
+	return ret;
 }
 EXPORT_SYMBOL_GPL(ahci_do_softreset);
 
-- 
1.7.3


  parent reply	other threads:[~2011-01-10 15:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-09  7:26 [PATCH v5 0/3] add CNS3xxx AHCI support mkl0301
2011-01-09  7:26 ` [PATCH v5 1/3] ahci_platform: rename module ahci_platform to ahci_platforms mkl0301
2011-01-09  7:26 ` [PATCH v5 2/3] ahci_platform: switch to module device table matching mkl0301
2011-01-09  7:26 ` [PATCH v5 3/3] ahci_platforms: add support for CNS3xxx SoC devices mkl0301
2011-01-10 12:20   ` Basheer, Mansoor Ahamed
     [not found]   ` <5A47E75E594F054BAF48C5E4FC4B92AB0373E1D99B@dbde02.ent.ti.com>
2011-01-10 15:47     ` Lin Mac [this message]
2011-02-15 13:02 ` [PATCH v5 0/3] add CNS3xxx AHCI support Lin Mac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikrFpD+MDqyjS3CMGceMHXWhELPGNv1FaqEqP0s@mail.gmail.com \
    --to=mkl0301@gmail.com \
    --cc=cbouatmailru@gmail.com \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mansoor.ahamed@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).