public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
       [not found]   ` <4688E519.7040308@leemhuis.info>
@ 2007-07-02 14:36     ` Chr
  2007-07-04 14:03       ` Thorsten Leemhuis
  0 siblings, 1 reply; 8+ messages in thread
From: Chr @ 2007-07-02 14:36 UTC (permalink / raw)
  To: Thorsten Leemhuis
  Cc: Chuck Ebbert, Jeff Garzik, IDE/ATA development list, Jason Gaston,
	Alan Cox, linux-kernel

On Monday, 2. July 2007, Thorsten Leemhuis wrote:
> > but Alan Cox wrote:
> > http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg07417.html
> >> Its ich_pata_133 - all the newer chips are.
> 
> Intel afaik never supported Ultra ATA 133 officially in any of the
> mainstream desktop or mobile chipsets.

You're probably right! But, what about Intel's ICH5 and ICH7/7-R (i945, i975)?

see ata_piix.c: line 193ff
	{ 0x8086, 0x24DB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_133 },
[...]
	{ 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_133 },

On the other hand, we can leave it, because of a "off-by-one error" in ata_piix.c, 
do_pata_set_dmamode, line ~770:

(the comment is important!)
/*
 * --> UDMA is handled by a combination of clock switching and
 * selection of dividers <---
 * [...]
 */
u_speed = min(2 - (udma & 1), udma);
if (udma == 5)
	u_clock = 0x1000;	/* 100Mhz */ <-- wrong! it's 133Mhz.
else if (udma > 2)
	u_clock = 1;		/* 66Mhz */
else
	u_clock = 0;		/* 33Mhz */

=>
for udma = 6(133MB/s) , we get u_speed=2 and u_clock=1
for udma = 4(66MB/s), we get the "same" values! (u_speed=2 and u_clock=1)

...
so, atleast for ata_piix, UDMA6 and UDMA4 *is* the same, right?

> 
> >> They work even better if you
> >> set them into AHCI mode in the BIOS and then they should "just work" with
> >> recent kernels as the AHCI driver now matches by class.
> > And "Gaston, Jason D" <jason.d.gaston@intel.com> didn't complain about it.
> > it's a "bit" confusing with all "native" AHCI SATA chipset that have to emulate 
> > PATA for compatibility reasons... 
> 
> Well, just FYI: on my Laptop AHCI is enabled and used for the SATA hard
> disk. But the DVD drive still is a pata one afaics (I'm not in front of
> the machine, so I can't check), connected via the pata controller -- so
> for me there is no emulation involved (at least afaics).
> 
I know. I wanted to say something else... but it doesn't really matter
(not every operating system supports AHCI-only controllers by default...)

Thanks, 
	Chr.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
  2007-07-02 14:36     ` [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller Chr
@ 2007-07-04 14:03       ` Thorsten Leemhuis
  2007-07-05 20:30         ` Chr
  2007-07-05 21:17         ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: Thorsten Leemhuis @ 2007-07-04 14:03 UTC (permalink / raw)
  To: Chr
  Cc: Thorsten Leemhuis, Chuck Ebbert, Jeff Garzik,
	IDE/ATA development list, Jason Gaston, Alan Cox, linux-kernel



On 02.07.2007 16:36, Chr wrote:
> On Monday, 2. July 2007, Thorsten Leemhuis wrote:
>>> but Alan Cox wrote:
>>> http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg07417.html
>>>> Its ich_pata_133 - all the newer chips are.
>> Intel afaik never supported Ultra ATA 133 officially in any of the
>> mainstream desktop or mobile chipsets.
> You're probably right! But, what about Intel's ICH5 and ICH7/7-R (i945, i975)?
> 
> see ata_piix.c: line 193ff
> 	{ 0x8086, 0x24DB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_133 },
> [...]
> 	{ 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_133 },

Maybe Alan or someone from Intel can answer that and thus tell us how to
move forward; it would be really nice to get the patch that started this
thread (it got posted by Chuck again today) could go into 2.6.22, but I
assume the time runs away...

> On the other hand, we can leave it, because of a "off-by-one error" in ata_piix.c, 
> do_pata_set_dmamode, line ~770:
> [...]

/me gets confused by that stuff and leaves the answer to that part to
more knowledged people...

CU
thl
-- 
Thorsten Leemhuis
 c't- Magazin für Computertechnik       web    http://www.heise.de/ct/
 Heise Zeitschriften Verlag GmbH&Co.KG  phone  +49 (0)511 5352 666
 Helstorfer Str. 7                      icq    140593172
 D-30625 Hannover, Germany              jabber thl_at_work@jabber.ccc.de

/* Heise Zeitschriften Verlag GmbH & Co. KG, Registergericht:
   Amtsgericht Hannover HRA 26709; Persönlich haftende Gesellschafterin:
   Heise Zeitschriften Verlag Geschäftsführung GmbH, Registergericht:
   Amtsgericht Hannover, HRB 60405 Geschäftsführer: Ansgar Heise,
   Steven P. Steinkraus, Dr. Alfons Schräder                          */

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
  2007-07-04 14:03       ` Thorsten Leemhuis
@ 2007-07-05 20:30         ` Chr
  2007-07-06 19:06           ` Gaston, Jason D
  2007-07-05 21:17         ` Alan Cox
  1 sibling, 1 reply; 8+ messages in thread
From: Chr @ 2007-07-05 20:30 UTC (permalink / raw)
  To: Thorsten Leemhuis
  Cc: Thorsten Leemhuis, Chuck Ebbert, Jeff Garzik,
	IDE/ATA development list, Jason Gaston, Alan Cox, linux-kernel,
	chunkeey

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

On Wednesday, 4. July 2007, Thorsten Leemhuis wrote:
>
> Maybe Alan or someone from Intel can answer that and thus tell us how to
> move forward; it would be really nice to get the patch that started this
> thread (it got posted by Chuck again today) could go into 2.6.22, but I
> assume the time runs away...
>
Jeff is on holiday and Intel doesn't respond at all... 

So, if someone has a ICH5 or ICH7/7-R with a ATA133 captable HDD... could
you please try the following patch? (Of course, I don't know if it works,...
It may cause data loss, serve corruption, or damage your controller/hdd/pc,
so make backups and keep a first-aid kit handy!) 
  
> > On the other hand, we can leave it, because of a "off-by-one error" in ata_piix.c, 
> > do_pata_set_dmamode, line ~770:
> > [...]
> 

Thanks,
	Chr.


[-- Attachment #2: don_t_try_this_if_you_don_t_know_what_it_does.patch --]
[-- Type: text/x-diff, Size: 401 bytes --]

--- a/drivers/ata/ata_piix.c	2007-06-19 12:19:39.000000000 +0200
+++ b/drivers/ata/ata_piix.c	2007-07-05 22:11:52.000000000 +0200
@@ -767,8 +767,8 @@
 		 *	       except UDMA0 which is 00
 		 */
 		u_speed = min(2 - (udma & 1), udma);
-		if (udma == 5)
-			u_clock = 0x1000;	/* 100Mhz */
+		if (udma >= 5)
+			u_clock = 0x1000;	/* 133Mhz */
 		else if (udma > 2)
 			u_clock = 1;		/* 66Mhz */
 		else

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
  2007-07-04 14:03       ` Thorsten Leemhuis
  2007-07-05 20:30         ` Chr
@ 2007-07-05 21:17         ` Alan Cox
  1 sibling, 0 replies; 8+ messages in thread
From: Alan Cox @ 2007-07-05 21:17 UTC (permalink / raw)
  To: Thorsten Leemhuis
  Cc: Chr, Thorsten Leemhuis, Chuck Ebbert, Jeff Garzik,
	IDE/ATA development list, Jason Gaston, linux-kernel

> Maybe Alan or someone from Intel can answer that and thus tell us how to
> move forward; it would be really nice to get the patch that started this
> thread (it got posted by Chuck again today) could go into 2.6.22, but I
> assume the time runs away...

Folks should be back Monday I suspect. Its the US indepenence day (or
from UK perspective 'they day the terrorists won' 8) 

I don't have suitable systems to hand to test this and investigate
further.

Alan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
  2007-07-05 20:30         ` Chr
@ 2007-07-06 19:06           ` Gaston, Jason D
  2007-07-06 19:45             ` Chr
  0 siblings, 1 reply; 8+ messages in thread
From: Gaston, Jason D @ 2007-07-06 19:06 UTC (permalink / raw)
  To: chunkeey, Thorsten Leemhuis
  Cc: Thorsten Leemhuis, Chuck Ebbert, Jeff Garzik,
	IDE/ATA development list, Alan Cox, linux-kernel

>-----Original Message-----
>From: chunkeey@web.de [mailto:chunkeey@web.de] 
>Sent: Thursday, July 05, 2007 1:30 PM
>To: Thorsten Leemhuis
>Cc: Thorsten Leemhuis; Chuck Ebbert; Jeff Garzik; IDE/ATA 
>development list; Gaston, Jason D; Alan Cox; 
>linux-kernel@vger.kernel.org; chunkeey@web.de
>Subject: Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel 
>Santa Rosa PATA controller
>
>On Wednesday, 4. July 2007, Thorsten Leemhuis wrote:
>>
>> Maybe Alan or someone from Intel can answer that and thus 
>tell us how to
>> move forward; it would be really nice to get the patch that 
>started this
>> thread (it got posted by Chuck again today) could go into 
>2.6.22, but I
>> assume the time runs away...
>>
>Jeff is on holiday and Intel doesn't respond at all... 
>
>So, if someone has a ICH5 or ICH7/7-R with a ATA133 captable 
>HDD... could
>you please try the following patch? (Of course, I don't know 
>if it works,...
>It may cause data loss, serve corruption, or damage your 
>controller/hdd/pc,
>so make backups and keep a first-aid kit handy!) 
>  
>> > On the other hand, we can leave it, because of a 
>"off-by-one error" in ata_piix.c, 
>> > do_pata_set_dmamode, line ~770:
>> > [...]
>> 
>
>Thanks,
>	Chr.
>
>

I quickly tried this patch on an ICH7-R system with an ATA133 Maxtor HD
and it did not seem to do anything bad.  I see no difference in function
or performance with the patch.

Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
  2007-07-06 19:06           ` Gaston, Jason D
@ 2007-07-06 19:45             ` Chr
  2007-07-06 20:01               ` Thorsten Leemhuis
  0 siblings, 1 reply; 8+ messages in thread
From: Chr @ 2007-07-06 19:45 UTC (permalink / raw)
  To: Gaston, Jason D
  Cc: Thorsten Leemhuis, Thorsten Leemhuis, Chuck Ebbert, Jeff Garzik,
	IDE/ATA development list, Alan Cox, linux-kernel

On Friday, 6. July 2007, Gaston, Jason D wrote:
> >> > On the other hand, we can leave it, because of a 
> >"off-by-one error" in ata_piix.c, 
> >> > do_pata_set_dmamode, line ~770:
> >> > [...]
> >> 
> >
> >Thanks,
> >	Chr.
> >
> >
> 
> I quickly tried this patch on an ICH7-R system with an ATA133 Maxtor HD
> and it did not seem to do anything bad.  I see no difference in function
> or performance with the patch.
> 
> Jason
> 

Thanks for testing, but you forgot some numbers. ;)
(bonnie++? hdparm -i && hdparm -t...)

Because, I don't think that Maxtor HD's mechanics is faster than 100MB/s.. 
The only thing that can keep up with > 100MB/s are the few MB of Cache on every HDD... 
(so, does anyone have a good idea to check the HDD's cache performance?
hdparm -t reads too much data) 

I came up with something like:
"dd if=/dev/sdX of=/dev/null bs=4M count=1 iflag=direct"

and run it 10 times in a row.

here's a test run with a SATA I WD2500YD-01N ( hdparm -t performance: ~57MB/s)
4194304 bytes (4.2 MB) copied, 0.0897687 seconds, 46.7 MB/s
4194304 bytes (4.2 MB) copied, 0.0776731 seconds, 54.0 MB/s
4194304 bytes (4.2 MB) copied, 0.0711224 seconds, 59.0 MB/s
4194304 bytes (4.2 MB) copied, 0.0679675 seconds, 61.7 MB/s
4194304 bytes (4.2 MB) copied, 0.0603272 seconds, 69.5 MB/s
4194304 bytes (4.2 MB) copied, 0.0543068 seconds, 77.2 MB/s
4194304 bytes (4.2 MB) copied, 0.0522881 seconds, 80.2 MB/s
4194304 bytes (4.2 MB) copied, 0.0520612 seconds, 80.6 MB/s
4194304 bytes (4.2 MB) copied, 0.0444805 seconds, 94.3 MB/s
4194304 bytes (4.2 MB) copied, 0.0338407 seconds, 124 MB/s
4194304 bytes (4.2 MB) copied, 0.0333174 seconds, 126 MB/s 

Thanks,
	Chr

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
  2007-07-06 19:45             ` Chr
@ 2007-07-06 20:01               ` Thorsten Leemhuis
  2007-07-06 20:43                 ` Jeff Garzik
  0 siblings, 1 reply; 8+ messages in thread
From: Thorsten Leemhuis @ 2007-07-06 20:01 UTC (permalink / raw)
  To: Chr
  Cc: Gaston, Jason D, Chuck Ebbert, Jeff Garzik,
	IDE/ATA development list, Alan Cox, linux-kernel

On 06.07.2007 21:45, Chr wrote:
> On Friday, 6. July 2007, Gaston, Jason D wrote:
>>>>> On the other hand, we can leave it, because of a 
>>> "off-by-one error" in ata_piix.c, 
>>>>> do_pata_set_dmamode, line ~770:
>>>>> [...]
>> I quickly tried this patch on an ICH7-R system with an ATA133 Maxtor HD
>> and it did not seem to do anything bad.  I see no difference in function
>> or performance with the patch.
>
> Thanks for testing, but you forgot some numbers. ;)
> (bonnie++? hdparm -i && hdparm -t...)
> 
> Because, I don't think that Maxtor HD's mechanics is faster than 100MB/s.. 
> The only thing that can keep up with > 100MB/s are the few MB of Cache on every HDD... 
> (so, does anyone have a good idea to check the HDD's cache performance?

Something like the good old "Coretest" might come close to it. But I'm
not aware of any linux benchmark out there that has the
coretest-behavior (reading the same 64k block in a loop over and over
again).

But anyway: Sorry, am I the only one that gets nervous if we start to
run a ATA-Hardware (Intels recent ICH southbridges in this case) with a
speed grade (Ultra ATA/133) that is not specified by its manufacturer in
his public data sheets (Ultra ATA/100 max)?

Doing something like that by default would imho be overclocking -- sure,
it works often, but well, it can be the real pita on those systems where
it doesn't. Heck, there is likely not even a real performance advantage
 from Ultra ATA/133 in usual systems with one hard disk per channel, as
most PATA harddisks are afaics not much quicker then round about 70
MByte (and even that only in the early area of the disk).

CU
thl



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller
  2007-07-06 20:01               ` Thorsten Leemhuis
@ 2007-07-06 20:43                 ` Jeff Garzik
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2007-07-06 20:43 UTC (permalink / raw)
  To: Thorsten Leemhuis
  Cc: Chr, Gaston, Jason D, Chuck Ebbert, IDE/ATA development list,
	Alan Cox, linux-kernel

Thorsten Leemhuis wrote:
> But anyway: Sorry, am I the only one that gets nervous if we start to
> run a ATA-Hardware (Intels recent ICH southbridges in this case) with a
> speed grade (Ultra ATA/133) that is not specified by its manufacturer in
> his public data sheets (Ultra ATA/100 max)?

That's why the patch I applied referenced ATA/100...

If they fix the datasheets, we can always upgrade it later.

	Jeff



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-07-06 20:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <468408F1.3080307@redhat.com>
     [not found] ` <200707021324.17250.chunkeey@web.de>
     [not found]   ` <4688E519.7040308@leemhuis.info>
2007-07-02 14:36     ` [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller Chr
2007-07-04 14:03       ` Thorsten Leemhuis
2007-07-05 20:30         ` Chr
2007-07-06 19:06           ` Gaston, Jason D
2007-07-06 19:45             ` Chr
2007-07-06 20:01               ` Thorsten Leemhuis
2007-07-06 20:43                 ` Jeff Garzik
2007-07-05 21:17         ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox