linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Gregor Jasny <gjasny@googlemail.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] Re: Linux v2.6.22-rc3
Date: Thu, 07 Jun 2007 16:27:03 +0900	[thread overview]
Message-ID: <4667B347.9040900@gmail.com> (raw)
In-Reply-To: <9d2cd630706062322v2d73b32dp1da56f97e2069fff@mail.gmail.com>

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

Gregor Jasny wrote:
> 2007/6/6, Tejun Heo <htejun@gmail.com>:
>> Let's see where we're failing.
> 
> [  186.849280] ata_piix 0000:00:07.1: version 2.11
> [  186.849665] scsi0 : ata_piix
> [  186.850241] scsi1 : ata_piix
> [  186.850596] ata1: PATA max UDMA/33 cmd 0x000101f0 ctl 0x000103f6
> bmdma 0x00010860 irq 14
> [  186.851203] ata2: PATA max UDMA/33 cmd 0x00010170 ctl 0x00010376
> bmdma 0x00010868 irq 15
> [    0.656666] Marking TSC unstable due to: possible TSC halt in C2.
> [    0.659999] Time: acpi_pm clocksource has been installed.
> [    0.659999] Switched to NOHz mode on CPU #0
> [    0.659999] ata1: ata_bus_post_reset: EXIT3
> [    0.709999] ata1.00: ata_hpa_resize 1: sectors = 78242976,
> hpa_sectors = 78242976
> [    0.723333] ata1.00: ATA-7: SAMSUNG MP0402H, UC100-14, max UDMA/100
> [    0.739999] ata1.00: 78242976 sectors, multi 8: LBA48
> [    0.763333] ata1.00: ata_hpa_resize 1: sectors = 78242976,
> hpa_sectors = 78242976
> [    0.776666] ata1.00: configured for UDMA/33
> [    1.376666] Clocksource tsc unstable (delta = -498091579 ns)
> [   10.799998] ata2: ata_bus_post_reset: EXIT1
> [   10.813332] ata2: SRST failed (errno=-16)
> [   20.836664] ata2: ata_bus_post_reset: EXIT1
> [   20.849997] ata2: SRST failed (errno=-16)
> [   55.869994] ata2: ata_bus_post_reset: EXIT1
> [   55.883327] ata2: SRST failed (errno=-16)
> [   60.903327] ata2: ata_bus_post_reset: EXIT1
> [   60.916660] ata2: SRST failed (errno=-16)
> [   60.929993] ata2: reset failed, giving up
> [   60.946660] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG
> MP0402H  UC10 PQ: 0 ANSI: 5

Ah.. okay.  Now I see what's going on.  Jeff, this is another device
which doesn't set nsect and lbal to 1 after reset.  Gregor, please try
the attached patch.

Thanks.

-- 
tejun

[-- Attachment #2: libata-dont-test-slave-register-readiness-after-srst.patch --]
[-- Type: text/x-patch, Size: 1161 bytes --]

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4733f00..bac5e1f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3042,7 +3042,6 @@ int ata_wait_ready(struct ata_port *ap, unsigned long deadline)
 static int ata_bus_post_reset(struct ata_port *ap, unsigned int devmask,
 			      unsigned long deadline)
 {
-	struct ata_ioports *ioaddr = &ap->ioaddr;
 	unsigned int dev0 = devmask & (1 << 0);
 	unsigned int dev1 = devmask & (1 << 1);
 	int rc, ret = 0;
@@ -3059,22 +3058,9 @@ static int ata_bus_post_reset(struct ata_port *ap, unsigned int devmask,
 		}
 	}
 
-	/* if device 1 was found in ata_devchk, wait for
-	 * register access, then wait for BSY to clear
-	 */
-	while (dev1) {
-		u8 nsect, lbal;
-
-		ap->ops->dev_select(ap, 1);
-		nsect = ioread8(ioaddr->nsect_addr);
-		lbal = ioread8(ioaddr->lbal_addr);
-		if ((nsect == 1) && (lbal == 1))
-			break;
-		if (time_after(jiffies, deadline))
-			return -EBUSY;
-		msleep(50);	/* give drive a breather */
-	}
+	/* wait for device 1 */
 	if (dev1) {
+		ap->ops->dev_select(ap, 1);
 		rc = ata_wait_ready(ap, deadline);
 		if (rc) {
 			if (rc != -ENODEV)

  reply	other threads:[~2007-06-07  7:27 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LFD.0.98.0705252008210.26602@woody.linux-foundation.org>
2007-05-27 15:01 ` Linux v2.6.22-rc3 Gregor Jasny
2007-05-27 15:06   ` Jeff Garzik
2007-05-27 16:07     ` Gregor Jasny
2007-05-27 16:24       ` Linus Torvalds
2007-05-27 20:15         ` Gregor Jasny
2007-05-28  9:47           ` Tejun Heo
2007-05-28 14:07             ` Gregor Jasny
2007-05-29  9:28               ` Tejun Heo
2007-05-29 15:19                 ` Gregor Jasny
2007-05-29 16:44                 ` Linus Torvalds
2007-06-01  0:58                   ` Tejun Heo
2007-06-01  1:37                     ` Linus Torvalds
2007-06-01  2:19                       ` Tejun Heo
2007-06-01 16:50                         ` Jeff Garzik
2007-06-01 17:04                           ` Linus Torvalds
2007-06-01 17:35                             ` Jeff Garzik
2007-06-01 17:59                               ` Linus Torvalds
2007-06-01 18:20                                 ` Dave Jones
2007-06-01 18:30                                   ` Linus Torvalds
2007-06-01 18:46                                     ` Dave Jones
2007-06-01 18:41                                 ` Jeff Garzik
2007-06-01 18:48                                   ` Jeff Garzik
2007-06-02  7:50                                   ` Tejun Heo
2007-05-28 21:50     ` Bill Davidsen
2007-06-02 16:11   ` [PATCH] " Jeff Garzik
2007-06-03 17:46     ` Gregor Jasny
2007-06-06  8:46       ` Tejun Heo
2007-06-07  6:22         ` Gregor Jasny
2007-06-07  7:27           ` Tejun Heo [this message]
2007-06-07 20:37             ` Gregor Jasny
2007-06-07 20:56             ` Linus Torvalds
2007-06-07 22:39               ` Alan Cox
2007-06-07 22:47               ` Jeff Garzik
2007-06-08  8:02                 ` Tejun Heo
2007-06-08 11:27                   ` Alan Cox
2007-06-08 11:32                     ` Tejun Heo
2007-06-08 11:40                       ` Alan Cox
2007-06-08 14:28                         ` Jeff Garzik
2007-06-08 15:36                           ` Alan Cox
2007-06-08 15:32                             ` Jeff Garzik
2007-06-08 15:46                               ` Alan Cox
2007-06-08 15:49                                 ` Jeff Garzik
2007-06-08 15:59                                   ` Alan Cox
2007-06-08 14:31                   ` Jeff Garzik
2007-06-08 15:38                     ` Alan Cox
2007-06-08 15:35                       ` Jeff Garzik
2007-06-08 15:44                         ` Alan Cox
2007-06-09 18:12                 ` Linus Torvalds
2007-06-09 19:03                   ` Jeff Garzik
2007-06-10  5:26                     ` [PATCH] libata: limit post SRST nsect/lbal wait to ~100ms Tejun Heo
2007-06-10 16:23                       ` Jeff Garzik
2007-06-11  4:59                       ` Jeff Garzik
2007-06-08 15:55             ` [PATCH] Re: Linux v2.6.22-rc3 Jeff Garzik

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=4667B347.9040900@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gjasny@googlemail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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).