LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: rol@as2917.net
Cc: "'Alan'" <alan@lxorguk.ukuu.org.uk>,
	"'Robert Hancock'" <hancockr@shaw.ca>,
	"'Linux Kernel Mailing List'" <linux-kernel@vger.kernel.org>
Subject: Re: AHCI - remove probing of ata2
Date: Sun, 11 Feb 2007 16:53:36 -0800	[thread overview]
Message-ID: <45CFBA90.4090201@gmail.com> (raw)
In-Reply-To: <010a01c74dc5$d41af120$2101a8c0@donald>

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

Hello, Paul.

Paul Rolland wrote:
>>> This looks like the problems that hopefully the patches 
>> from Tejun and
>>> from Mark Lord cured (the delay after reset and the task file clear)
>> Any chance I can find this patch(es) and try them ?
>>  
>>>> Also, I've seen a :
>>>>
>>>> ata1: Spurious SDB FIS during NCQ issue=0x0 SAct=0x7ff8001f
>>>> FIS=004040a1:00040000
>>>>
>>>> What's this ? Is it really bad or just a warning ???
>>> It's one Tejun stuck logging in for in order to investigate further.
>> OK, will wait a little bit ;)

You have a Maxtor connected to that port, right?  That's caused by 
firmware bug.  Future kernels will consider that condition as protocol 
violation and blacklist the drive such that NCQ is not used on it.  I 
think it can be dangerous on rare corner/error cases but there hasn't 
been any actual report of problems caused by that, so no need to worry 
about it too much.  If it bothers you, you can turn NCQ off using sysfs 
node.  Take a look at FAQ section of http://linux-ata.org

> In the meantime, I've been trying 2.6.20-rc7.
> Things are not better, except that the ata2 probing failing results in
> no /dev/sdd being allocated, thus it changes all the naming afterwards.

Slightly OT, but it's generally a good idea to use LABELs to access 
filesystems.  With so many ports and EH dynamics including hotplug, it's 
much more difficult to keep device names persistent and remember them.

> So, 2.6.20-rc7 results are :
>  - ata2 probing still very long and delaying boot a lot,

That's sil4726's config device acting weird.  When reset as a normal 
device (not PMP device), sil4726 acts as a normal ATA device which is 
used to configure how the chip behaves.  Unfortunately, the emulation 
seems to contain some flaws and cause lots of delays as you've seen. 
I'm attaching a patch to clear TF before IDENTIFY which fixes similar 
IDENTIFY failures on buggy ATAPI devices.

>  - Jmicron PATA still not working, and doesn't even detect the DVD-ROM on
>    the port.

This problem is likely to be fixed by clearing TF before IDENTIFY.

So, please test the attached patch and report the result.

-- 
tejun

[-- Attachment #2: clear-TF-before-IDENTIFY.patch --]
[-- Type: text/x-patch, Size: 780 bytes --]

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 667acd2..d6fcf0a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1478,7 +1478,16 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
 	}
 
 	tf.protocol = ATA_PROT_PIO;
-	tf.flags |= ATA_TFLAG_POLLING; /* for polling presence detection */
+
+	/* Some devices choke if TF registers contain garbage.  Make
+	 * sure those are properly initialized.
+	 */
+	tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
+
+	/* Device presence detection is unreliable on some
+	 * controllers.  Always poll IDENTIFY if available.
+	 */
+	tf.flags |= ATA_TFLAG_POLLING;
 
 	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE,
 				     id, sizeof(id[0]) * ATA_ID_WORDS);

  reply	other threads:[~2007-02-12  6:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.R5BFxVmVJj5OnAPGQI7410dt/fA@ifi.uio.no>
2007-02-10 17:20 ` Robert Hancock
2007-02-10 17:32   ` Paul Rolland
2007-02-10 18:39     ` Paul Rolland
2007-02-10 19:06       ` Alan
2007-02-10 20:01         ` Paul Rolland
2007-02-10 20:36           ` Alan
2007-02-10 21:59             ` Paul Rolland
2007-02-11 10:17               ` Paul Rolland
2007-02-12  0:53                 ` Tejun Heo [this message]
2007-02-12 11:19                   ` Paul Rolland
2007-02-13  7:33                     ` Paul Rolland
2007-02-13 20:20                       ` Tejun Heo
2007-02-14  0:56 Greg Trounson
2007-02-14 17:47 ` Bill Davidsen
2007-02-14 21:43   ` Greg Trounson
2007-04-01 14:19 ` Håkan Lindqvist
  -- strict thread matches above, loose matches on Subject: below --
2007-02-10 14:24 Paul Rolland

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=45CFBA90.4090201@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hancockr@shaw.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rol@as2917.net \
    --subject='Re: AHCI - remove probing of ata2' \
    /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

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).