From patchwork Mon Jan 10 15:47:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lin Mac X-Patchwork-Id: 78163 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 392BBB70B3 for ; Tue, 11 Jan 2011 02:47:33 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831Ab1AJPrc (ORCPT ); Mon, 10 Jan 2011 10:47:32 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:35282 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751651Ab1AJPrb (ORCPT ); Mon, 10 Jan 2011 10:47:31 -0500 Received: by fxm20 with SMTP id 20so18966875fxm.19 for ; Mon, 10 Jan 2011 07:47:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=fxfQuUqOJBuYg/YiyxYF2AvVUYnsA36hMwugJRCRVEk=; b=D6bNMmJwtirJ9yz3CVhQNlX3j8wa1AGkA3v8bYS0NQJH+67JFS9xnOf+bOQV8lfjQW 08dITCUhtIInSjKGdYHSrSpbPehKzNyH0AKTWsSl1Il9WLSTyhAybD4FESo6F7bq46nV IHkL3CZJ2nNtpg4U16BBk6q2326ZxTR1VhX1Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=P6e+S0sdH3wRnvI04bf/MvHU8sw/4osMPVb1QztZ9KpaxQis2Bbv1ZLyexZM7BqF/F H215yug8F+75oEbCfR1mTQ6GeJiadvQKnQ7rCyzvcCUbaudcNoul4ZvnbFjEloL0ZsvG ZvT8kRFTu/CXNSa3/EktKQuOjNySBZMzVKqkM= MIME-Version: 1.0 Received: by 10.223.83.11 with SMTP id d11mr1577474fal.37.1294674449951; Mon, 10 Jan 2011 07:47:29 -0800 (PST) Received: by 10.223.86.69 with HTTP; Mon, 10 Jan 2011 07:47:29 -0800 (PST) In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB0373E1D99B@dbde02.ent.ti.com> References: <1294557970-654-1-git-send-email-mkl0301@gmail.com> <1294557970-654-4-git-send-email-mkl0301@gmail.com> <5A47E75E594F054BAF48C5E4FC4B92AB0373E1D99B@dbde02.ent.ti.com> Date: Mon, 10 Jan 2011 23:47:29 +0800 Message-ID: Subject: Re: [PATCH v5 3/3] ahci_platforms: add support for CNS3xxx SoC devices From: Lin Mac To: "Basheer, Mansoor Ahamed" Cc: "htejun@gmail.com" , "cbouatmailru@gmail.com" , "linux-arm-kernel@lists.infradead.org" , "jgarzik@pobox.com" , "linux-ide@vger.kernel.org" Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 2011/1/10 Basheer, Mansoor Ahamed : >> From: Mac Lin >> >> 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 , and all the SoC specific code could exist in arch folder, similar to my v1 patchset. Best Regards, Mac Lin From 030eefbcba9499b2aa24171895881afe6c385fd9 Mon Sep 17 00:00:00 2001 From: Mac Lin 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