Re: Linux v2.6.22-rc3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Tuesday, May 29, 2007 - 9:44 am

On Tue, 29 May 2007, Tejun Heo wrote:

It would appear that the old code largely ignored the SRST error entirely, 
no?

If we *used* to do (in ata_bus_post_reset()):

	if (dev0)
		ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT);

and you changed that to actually care about the return value:

	if (dev0) {
		rc = ata_wait_ready(ap, deadline);
		if (rc && rc != -ENODEV)
			return rc;
	}

(in _two_ places). That change also changed the same "post_reset" handling 
in a totally _different_ way: it used to do ata_busy_sleep() twice, now it 
still does it twice, but it does it with the same "timeout" value, so if 
the first one times out, then the second one won't be given any timeout AT 
ALL!

And to make matters worse: the first timeout seems to be for ANOTHER PORT 
ENTIRELY! So you seem to break port 1 even if the timeout happened on port 
0, as far as I can read that sequence. 

So I think your ata_bus_post_reset() changes are rather suspect. The fact 
that you don't change the timeout, and use the same deadline for two 
different ports (and for multiple commands to the same port, afaik), seems 
rather suspect. The old code also didn't care about failures in certain 
phases of the reset sequence, and it appears that it did so for good 
reason.

		Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Linux v2.6.22-rc3, Linus Torvalds, (Fri May 25, 8:21 pm)
Re: Linux v2.6.22-rc3, Jan Engelhardt, (Sat May 26, 12:55 am)
Re: Linux v2.6.22-rc3, la deng, (Sat May 26, 10:34 am)
Re: Linux v2.6.22-rc3, Gregor Jasny, (Sun May 27, 8:01 am)
Re: Linux v2.6.22-rc3, Jeff Garzik, (Sun May 27, 8:06 am)
Re: Linux v2.6.22-rc3, Jeff Chua, (Sun May 27, 8:50 am)
Re: Linux v2.6.22-rc3, Gregor Jasny, (Sun May 27, 9:07 am)
Re: Linux v2.6.22-rc3, Linus Torvalds, (Sun May 27, 9:24 am)
Re: Linux v2.6.22-rc3, Gregor Jasny, (Sun May 27, 1:15 pm)
Re: Linux v2.6.22-rc3, Qi Yong, (Sun May 27, 11:35 pm)
Re: Linux v2.6.22-rc3, Russell King, (Mon May 28, 2:14 am)
Re: Linux v2.6.22-rc3, Tejun Heo, (Mon May 28, 2:47 am)
Re: Linux v2.6.22-rc3, Ben Dooks, (Mon May 28, 3:43 am)
Re: Linux v2.6.22-rc3, Gregor Jasny, (Mon May 28, 7:07 am)
Re: Linux v2.6.22-rc3, Bill Davidsen, (Mon May 28, 2:50 pm)
Re: Linux v2.6.22-rc3, Tejun Heo, (Tue May 29, 2:28 am)
Re: Linux v2.6.22-rc3, Gregor Jasny, (Tue May 29, 8:19 am)
Re: Linux v2.6.22-rc3, Linus Torvalds, (Tue May 29, 9:44 am)
Re: Linux v2.6.22-rc3, Tejun Heo, (Thu May 31, 5:58 pm)
Re: Linux v2.6.22-rc3, Linus Torvalds, (Thu May 31, 6:37 pm)
Re: Linux v2.6.22-rc3, Tejun Heo, (Thu May 31, 7:19 pm)
Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 1, 9:50 am)
Re: Linux v2.6.22-rc3, Linus Torvalds, (Fri Jun 1, 10:04 am)
Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 1, 10:35 am)
Re: Linux v2.6.22-rc3, Linus Torvalds, (Fri Jun 1, 10:59 am)
Re: Linux v2.6.22-rc3, Dave Jones, (Fri Jun 1, 11:20 am)
Re: Linux v2.6.22-rc3, Linus Torvalds, (Fri Jun 1, 11:30 am)
Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 1, 11:41 am)
Re: Linux v2.6.22-rc3, Dave Jones, (Fri Jun 1, 11:46 am)
Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 1, 11:48 am)
Re: Linux v2.6.22-rc3, Tejun Heo, (Sat Jun 2, 12:50 am)
[PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Sat Jun 2, 9:11 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Gregor Jasny, (Sun Jun 3, 10:46 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Tejun Heo, (Wed Jun 6, 1:46 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Gregor Jasny, (Wed Jun 6, 11:22 pm)
Re: [PATCH] Re: Linux v2.6.22-rc3, Tejun Heo, (Thu Jun 7, 12:27 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Gregor Jasny, (Thu Jun 7, 1:37 pm)
Re: [PATCH] Re: Linux v2.6.22-rc3, Linus Torvalds, (Thu Jun 7, 1:56 pm)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Thu Jun 7, 3:39 pm)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Thu Jun 7, 3:47 pm)
Re: [PATCH] Re: Linux v2.6.22-rc3, Tejun Heo, (Fri Jun 8, 1:02 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Fri Jun 8, 4:27 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Tejun Heo, (Fri Jun 8, 4:32 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Fri Jun 8, 4:40 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 8, 7:28 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 8, 7:31 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 8, 8:32 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 8, 8:35 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Fri Jun 8, 8:36 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Fri Jun 8, 8:38 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Fri Jun 8, 8:44 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Fri Jun 8, 8:46 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 8, 8:49 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Fri Jun 8, 8:55 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Alan Cox, (Fri Jun 8, 8:59 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Linus Torvalds, (Sat Jun 9, 11:12 am)
Re: [PATCH] Re: Linux v2.6.22-rc3, Jeff Garzik, (Sat Jun 9, 12:03 pm)