linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Mark Lord <liml@rtr.ca>
Cc: Guntsche Michael <mike@it-loops.com>,
	Sergei Shtylyov <sshtylyov@ru.mvista.com>,
	linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH #upstream-fixes 1/4] libata: fix device iteration bugs
Date: Wed, 12 Nov 2008 11:34:19 +0900	[thread overview]
Message-ID: <491A40AB.4070002@kernel.org> (raw)
In-Reply-To: <491A2F65.8030605@rtr.ca>

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

Mark Lord wrote:
> Guntsche Michael wrote:
>>
>> On Nov 11, 2008, at 15:29, Mark Lord wrote:
>>> .
>>>
>>> Yeah, that's the right one.  But if you are technically apt,
>>> then perhaps you could try a brief experiment for us:
>>>
>>> Use drivers/ide instead, and see what it reports in the boot log.
>>>
>>> One simple way to do this, is to boot a Knoppix CD, say v5.01 or so
>>> (but not the newest version, which probably uses libata instead).
>>>
>>> Then just grab the boot log with dmesg, and post it here.
>>
>> Ok, recompiled the kernel with the old driver, here the relevant dmesg
>> output.
>>
>> Uniform Multi-Platform E-IDE driver
>> piix 0000:00:07.1: IDE controller (0x8086:0x7010 rev 0x00)
>> piix 0000:00:07.1: not 100% native mode: will probe irqs later
>>     ide0: BM-DMA at 0xe800-0xe807
>>     ide1: BM-DMA at 0xe808-0xe80f
>> Probing IDE interface ide0...
>> hda: IC35L040AVER07-0, ATA DISK drive
>> hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
>> hda: MWDMA2 mode selected
>> Probing IDE interface ide1...
>> hdc: SAMSUNG CD-R/RW SW-408B, ATAPI CD/DVD-ROM drive
>> hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4
>> hdc: MWDMA2 mode selected
>> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
>> ide1 at 0x170-0x177,0x376 on irq 15
> ..
> 
> Mmm.. no phantom device showing up there,
> so I suppose what's left of my ancient device probing
> is still mostly working (does any of it remain now?).

Looks like we screwed up phantom device detection somewhere.  Michael,
can you please apply the attached patch and report kernel boot log?

Thanks.

-- 
tejun

[-- Attachment #2: phantom-debug.patch --]
[-- Type: text/x-patch, Size: 1639 bytes --]

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 4b47394..abbb5f0 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1226,11 +1226,16 @@ fsm_start:
 		} else {
 			/* ATA PIO protocol */
 			if (unlikely((status & ATA_DRQ) == 0)) {
+				ata_dev_printk(qc->dev, KERN_INFO, "XXX status=0x%x hdiag=%d\n",
+					       status, qc->dev->horkage & ATA_HORKAGE_DIAGNOSTIC);
+
 				/* handle BSY=0, DRQ=0 as error */
-				if (likely(status & (ATA_ERR | ATA_DF)))
+				if (likely(status & (ATA_ERR | ATA_DF))) {
 					/* device stops HSM for abort/error */
 					qc->err_mask |= AC_ERR_DEV;
-				else {
+					if (qc->dev->horkage & ATA_HORKAGE_DIAGNOSTIC)
+						qc->err_mask |= AC_ERR_NODEV_HINT;
+				} else {
 					/* HSM violation. Let EH handle this.
 					 * Phantom devices also trigger this
 					 * condition.  Mark hint.
@@ -1838,6 +1843,8 @@ unsigned int ata_sff_dev_classify(struct ata_device *dev, int present,
 
 	/* determine if device is ATA or ATAPI */
 	class = ata_dev_classify(&tf);
+	ata_dev_printk(dev, KERN_INFO, "XXX sff_dev_classify present=%d hdiag=%d tf=%02x:%02x:%02x class=%d\n",
+		       present, dev->horkage & ATA_HORKAGE_DIAGNOSTIC, tf.lbal, tf.lbam, tf.lbah, class);
 
 	if (class == ATA_DEV_UNKNOWN) {
 		/* If the device failed diagnostic, it's likely to
@@ -1981,6 +1988,7 @@ int ata_sff_softreset(struct ata_link *link, unsigned int *classes,
 		devmask |= (1 << 0);
 	if (slave_possible && ata_devchk(ap, 1))
 		devmask |= (1 << 1);
+	ata_link_printk(link, KERN_INFO, "XXX devmask=%x\n", devmask);
 
 	/* select device 0 again */
 	ap->ops->sff_dev_select(ap, 0);

  reply	other threads:[~2008-11-12  2:38 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6ca8fe89c868f95831328d31c27f9cdb@localhost>
2008-10-27 15:45 ` Fwd: [PATCH #upstream-fixes 1/4] libata: fix device iteration bugs Guntsche Michael
2008-11-10  6:52   ` Tejun Heo
2008-11-10 10:10     ` Michael Guntsche
2008-11-10 10:21       ` Tejun Heo
2008-11-10 15:07         ` Mark Lord
2008-11-11  2:45           ` Tejun Heo
2008-11-11  4:01             ` Mark Lord
2008-11-11  9:19               ` Sergei Shtylyov
2008-11-11 13:34                 ` Michael Guntsche
2008-11-11 14:29                   ` Mark Lord
2008-11-11 15:03                     ` Guntsche Michael
2008-11-12  1:20                       ` Mark Lord
2008-11-12  2:34                         ` Tejun Heo [this message]
2008-11-12  7:22                           ` Michael Guntsche
2008-11-12  8:15                             ` Tejun Heo
2008-11-12  9:16                               ` Michael Guntsche
2008-11-12  9:27                                 ` Tejun Heo
2008-11-12  9:43                                   ` Michael Guntsche
2008-11-12  9:48                                     ` Tejun Heo
2008-11-12  9:55                                       ` Michael Guntsche
2008-11-14  2:38                                         ` Mark Lord
2008-11-14  6:59                                           ` Michael Guntsche
2008-11-14 17:21                                             ` Mark Lord
2008-11-14 17:24                                               ` Mark Lord
2008-11-14 22:26                                                 ` Guntsche Michael
2008-11-15  4:13                                                   ` Mark Lord
2008-11-15  4:17                                                     ` Mark Lord
2008-11-15  9:29                                                       ` Guntsche Michael
2008-11-15 10:22                                                       ` Guntsche Michael
2008-11-15 20:43                                                         ` Mark Lord
2008-11-16  5:14                                                           ` Tejun Heo
2008-11-16  5:49                                                             ` Mark Lord
2008-11-16  8:41                                                               ` Michael Guntsche
2008-11-16  9:15                                                               ` Michael Guntsche
2008-11-16 10:48                                                               ` Sergei Shtylyov
2008-11-16 11:23                                                               ` Alan Cox
2008-11-11 14:27                 ` Fwd: " Mark Lord
2008-11-11 14:34                   ` Alan Cox
2008-11-12  1:18                     ` Mark Lord
2008-10-26  6:50 Tejun Heo
2008-10-26 10:47 ` Sergei Shtylyov
2008-10-27  9:07   ` 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=491A40AB.4070002@kernel.org \
    --to=tj@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=mike@it-loops.com \
    --cc=sshtylyov@ru.mvista.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).