From: Antoine Tenart <antoine.tenart@free-electrons.com>
To: Zlatko Calusic <zcalusic@bitsync.net>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>,
"Tejun Heo" <tj@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
linux-ide@vger.kernel.org
Subject: Re: BUG: AHCI: ata8 port resetting needlessly, slow boot
Date: Mon, 3 Nov 2014 10:11:16 +0100 [thread overview]
Message-ID: <20141103091116.GA21659@kwain> (raw)
In-Reply-To: <54564A6C.4060009@bitsync.net>
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]
Hi Zlatko,
On Sun, Nov 02, 2014 at 04:14:52PM +0100, Zlatko Calusic wrote:
>
> I have an issue with AHCI driver, starting with kernel 3.17.0, where ata8
> port is resetting multiple times during boot, and it takes about a minute
> until it gives up, dmesg excerpt:
>
> [ 0.698367] ata8: SATA max UDMA/133 abar m8192@0xfebfe000 port 0xfebfe180
> irq 16
> [ 6.052229] ata8: link is slow to respond, please be patient (ready=-19)
> [ 10.744229] ata8: COMRESET failed (errno=-16)
> [ 16.098114] ata8: link is slow to respond, please be patient (ready=-19)
> [ 20.790040] ata8: COMRESET failed (errno=-16)
> [ 26.144229] ata8: link is slow to respond, please be patient (ready=-19)
> [ 55.826199] ata8: COMRESET failed (errno=-16)
> [ 55.826386] ata8: limiting SATA link speed to 1.5 Gbps
> [ 60.874228] ata8: COMRESET failed (errno=-16)
> [ 60.874413] ata8: reset failed, giving up
>
> In kernel 3.16.0 the same port was reported as dummy and the boot sequence
> was fast:
>
> [ 0.757323] ata8: DUMMY
>
> I took some time, bisected between 3.16 and 3.17, and eventually found this
> commit as culprit:
>
> commit 725c7b570fda4207e465ff8856c2c12c2645a685
> Author: Antoine Ténart <antoine.tenart@free-electrons.com>
> Date: Wed Jul 30 20:13:56 2014 +0200
>
> ata: libahci_platform: move port_map parameters into the AHCI structure
>
> Indeed, after reverting that commit in current 3.18-rc2, once again ata8 is
> reported as dummy, and the machine boots fast.
>
> I'm attaching the full dmesg output.
Thanks for reporting this!
Can you give a try to the attached patch, to see if it fixes the issue?
Thanks,
Antoine
--
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: 0001-ahci-fix-AHCI-parameters-not-taken-into-account.patch --]
[-- Type: text/x-diff, Size: 1757 bytes --]
>From 78af1100856d5f304b794727005fda589d2c4c84 Mon Sep 17 00:00:00 2001
From: Antoine Tenart <antoine.tenart@free-electrons.com>
Date: Mon, 3 Nov 2014 09:56:11 +0100
Subject: [PATCH] ahci: fix AHCI parameters not taken into account
Changes into the AHCI subsystem have introduced a bug by not taking into
account the force_port_map and mask_port_map parameters when using the
ahci_pci_save_initial_config function. This commit fixes it by setting
the internal parameters of the ahci_port_priv structure.
Fixes: 725c7b570fda
Reported-by: Zlatko Calusic <zcalusic@bitsync.net>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
drivers/ata/ahci.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a29f8012fb08..b3da6a2c44dd 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -504,12 +504,9 @@ MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)");
static void ahci_pci_save_initial_config(struct pci_dev *pdev,
struct ahci_host_priv *hpriv)
{
- unsigned int force_port_map = 0;
- unsigned int mask_port_map = 0;
-
if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) {
dev_info(&pdev->dev, "JMB361 has only one port\n");
- force_port_map = 1;
+ hpriv->force_port_map = 1;
}
/*
@@ -519,9 +516,9 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,
*/
if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
if (pdev->device == 0x6121)
- mask_port_map = 0x3;
+ hpriv->mask_port_map = 0x3;
else
- mask_port_map = 0xf;
+ hpriv->mask_port_map = 0xf;
dev_info(&pdev->dev,
"Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n");
}
--
2.1.0
next prev parent reply other threads:[~2014-11-03 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-02 15:14 BUG: AHCI: ata8 port resetting needlessly, slow boot Zlatko Calusic
2014-11-03 9:11 ` Antoine Tenart [this message]
2014-11-04 17:54 ` Zlatko Calusic
2014-11-04 17:59 ` Tejun Heo
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=20141103091116.GA21659@kwain \
--to=antoine.tenart@free-electrons.com \
--cc=hdegoede@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.org \
--cc=zcalusic@bitsync.net \
/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