From patchwork Mon Jan 12 13:16:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 427748 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 755931401AC for ; Tue, 13 Jan 2015 00:16:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbbALNQI (ORCPT ); Mon, 12 Jan 2015 08:16:08 -0500 Received: from mail-qa0-f47.google.com ([209.85.216.47]:48320 "EHLO mail-qa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053AbbALNQH (ORCPT ); Mon, 12 Jan 2015 08:16:07 -0500 Received: by mail-qa0-f47.google.com with SMTP id f12so10213278qad.6; Mon, 12 Jan 2015 05:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=9TjwEY4176bgoEUKx2oPFEi0xfIh509YCsAYZ6e0FPo=; b=yE4rJIITa5k0jFWgIDwaHdHYPjKq1SGNqR/NJMdL1hhS5KH2bF4bZ8SWhWoeMn5Tc1 xaIG1/DO3sfFoNIxuF3GXaqpgvgDVm76/IgxIUW8nGRCqPpfZIfweOeDzeaBmjcEqKRb sk7gIz1Q2qs4q+Bq/QsF1bbtrGWF4do6hz6LoWj+ftvpDuiNlcQ1pT1zKRQe2+d1JFML m0qjrEkZqu/q9Pot/gJOhRH5mvJK5XSYclbrzMADRLbafD9S9p1OSgMjSu5NFNqyfSzk BIzbH8pV+MHuPhwTCtpe6VBrZKc9XBVX5lQ2K4xZPR1TDBTavVuY8nWieIEvwyOEAH4N WlKg== X-Received: by 10.224.129.70 with SMTP id n6mr46942149qas.104.1421068565862; Mon, 12 Jan 2015 05:16:05 -0800 (PST) Received: from htj.dyndns.org (207-38-238-8.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com. [207.38.238.8]) by mx.google.com with ESMTPSA id c61sm14695101qgc.33.2015.01.12.05.16.04 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Jan 2015 05:16:04 -0800 (PST) Date: Mon, 12 Jan 2015 08:16:02 -0500 From: Tejun Heo To: Gabriele Mazzotta Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org Subject: Re: SATA link power management issues Message-ID: <20150112131602.GX25319@htj.dyndns.org> References: <3352987.ugV1Ipy7Z5@xps13> <20150109220018.GH2785@htj.dyndns.org> <20150109220253.GI2785@htj.dyndns.org> <1437237.yiFxI2gUSM@xps13> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1437237.yiFxI2gUSM@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Hello, What you're experiencing looks like the ssd behaving badly after link state transition. I wonder whether the right solution is plugging PHYRDY IRQ for a while after LPM state change. Does the following path make any difference? Thanks. diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 97683e4..684f45d 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -735,8 +735,8 @@ static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, sata_link_scr_lpm(link, policy, false); /* turn PHYRDY IRQ back on */ - pp->intr_mask |= PORT_IRQ_PHYRDY; - writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); + //pp->intr_mask |= PORT_IRQ_PHYRDY; + //writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); } return 0;