2006-05-12 13:24:43

by Tejun Heo

[permalink] [raw]
Subject: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Hello, all.

Lately libata has been going through a lot of changes and even more
are around the corner. I've been working on error handling and
advanced SATA features for quite sometime now, and, finally, patches
have been finalized and submitted for review a few days ago.

2.6.18 is the target for mainline merge. As there is quite some time
between now and 2.6.18, I have made patches to update the current
stable kernel to support the new features so that they can receive
wider testing and interested people don't have to wait too long. I
intend to maintain these patches through 2.6.16 and 17 until the
mainline merge happens.

Added new features are

* New error handling
* IRQ driven PIO (from Albert Lee)
* SATA NCQ support
* Hotplug support
* Port Multiplier support

The following drivers support new features.

ata_piix: new EH, irq-pio, warmplug (hardware restriction)
sata_sil: new EH, irq-pio, hotplug
ahci: new EH, irq-pio, NCQ, hotplug
sata_sil24: new EH, irq-pio, NCQ, hotplug, Port Multiplier

More info can be found at the following URL.

http://home-tj.org/wiki/index.php/Libata-tj-stable

Patches against v2.6.16.16 is avaialbe at the following URL.

http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.16.16-20060512.tar.bz2

Please read README carefully before testing the patches. Keep in mind
that these are still quite experimental and not ready for production
use.

Thanks.

--
tejun


2006-05-12 14:34:15

by Chris Boot

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Tejun Heo wrote:
> Patches against v2.6.16.16 is avaialbe at the following URL.
>
> http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.16.16-20060512.tar.bz2
>
> Please read README carefully before testing the patches. Keep in mind
> that these are still quite experimental and not ready for production
> use.

Are these patches likely to work alongside Alan's PATA patches?
Specifically I have a DVD-RW and an IDE tape that I'd like to use.

Thanks,
Chris

--
Chris Boot
[email protected]
http://www.bootc.net/

2006-05-12 15:34:55

by Mikael Pettersson

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

On Fri, 12 May 2006 22:24:37 +0900, Tejun Heo wrote:
>The following drivers support new features.
>
>ata_piix: new EH, irq-pio, warmplug (hardware restriction)
>sata_sil: new EH, irq-pio, hotplug
>ahci: new EH, irq-pio, NCQ, hotplug
>sata_sil24: new EH, irq-pio, NCQ, hotplug, Port Multiplier

If you were to add new EH and NCQ support to sata_promise,
then I'd test it on my News server.

/Mikael

2006-05-12 15:42:42

by Chris Boot

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Chris Boot wrote:
> Tejun Heo wrote:
>> Patches against v2.6.16.16 is avaialbe at the following URL.
>>
>> http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.16.16-20060512.tar.bz2
>>
>>
>> Please read README carefully before testing the patches. Keep in mind
>> that these are still quite experimental and not ready for production
>> use.
>
> Are these patches likely to work alongside Alan's PATA patches?
> Specifically I have a DVD-RW and an IDE tape that I'd like to use.

I'll answer my own question: this fails miserably!

I'll test 'em anyway, screw the DVD and tape for now. :-P

Chris

--
Chris Boot
[email protected]
http://www.bootc.net/

2006-05-12 19:18:51

by Randy Dunlap

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

On Fri, 12 May 2006 22:24:37 +0900 Tejun Heo wrote:

> Hello, all.
>
> Lately libata has been going through a lot of changes and even more
> are around the corner. I've been working on error handling and
> advanced SATA features for quite sometime now, and, finally, patches
> have been finalized and submitted for review a few days ago.
>
> 2.6.18 is the target for mainline merge. As there is quite some time
> between now and 2.6.18, I have made patches to update the current
> stable kernel to support the new features so that they can receive
> wider testing and interested people don't have to wait too long. I
> intend to maintain these patches through 2.6.16 and 17 until the
> mainline merge happens.
>
> Added new features are
>
> * New error handling
> * IRQ driven PIO (from Albert Lee)
> * SATA NCQ support
> * Hotplug support
> * Port Multiplier support

BTW, we often use PM to mean Power Management.
Could we find a different acronym for Port Multiplier support,
such as PMS or PX or PXS?

---
~Randy

2006-05-12 19:22:44

by Stefan Smietanowski

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Randy.Dunlap wrote:
>>
>>* New error handling
>>* IRQ driven PIO (from Albert Lee)
>>* SATA NCQ support
>>* Hotplug support
>>* Port Multiplier support
>
>
> BTW, we often use PM to mean Power Management.
> Could we find a different acronym for Port Multiplier support,
> such as PMS or PX or PXS?

Ok, maybe not PMS ?

Can you imagine a bug report from someone that "has problem with PMS"?
:)

// Stefan


Attachments:
signature.asc (253.00 B)
OpenPGP digital signature

2006-05-12 22:02:58

by Tejun Heo

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Stefan Smietanowski wrote:
> Randy.Dunlap wrote:
>>> * New error handling
>>> * IRQ driven PIO (from Albert Lee)
>>> * SATA NCQ support
>>> * Hotplug support
>>> * Port Multiplier support
>>
>> BTW, we often use PM to mean Power Management.
>> Could we find a different acronym for Port Multiplier support,
>> such as PMS or PX or PXS?
>
> Ok, maybe not PMS ?
>
> Can you imagine a bug report from someone that "has problem with PMS"?
> :)
>

Would be fun though. :)

I thought about using another acronym for port multiplier too. But the
spec uses that acronym all over the place, PM, PMP (Port Multiplier
Portnumber), which reminds me of USB full/high speed fiasco.

Urghh... I thought we could use power for power management inside libata
but that might be a bad idea. So, PMS?

--
tejun

2006-05-12 23:10:48

by Tejun Heo

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Mikael Pettersson wrote:
> On Fri, 12 May 2006 22:24:37 +0900, Tejun Heo wrote:
>> The following drivers support new features.
>>
>> ata_piix: new EH, irq-pio, warmplug (hardware restriction)
>> sata_sil: new EH, irq-pio, hotplug
>> ahci: new EH, irq-pio, NCQ, hotplug
>> sata_sil24: new EH, irq-pio, NCQ, hotplug, Port Multiplier
>
> If you were to add new EH and NCQ support to sata_promise,
> then I'd test it on my News server.
>

I have a promise card and played with it a little bit but I don't have
access to hardware doc. So...

--
tejun

2006-05-13 00:20:36

by Stefan Smietanowski

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Tejun Heo wrote:
> Stefan Smietanowski wrote:
>
>> Randy.Dunlap wrote:
>>
>>>> * New error handling
>>>> * IRQ driven PIO (from Albert Lee)
>>>> * SATA NCQ support
>>>> * Hotplug support
>>>> * Port Multiplier support
>>>
>>>
>>> BTW, we often use PM to mean Power Management.
>>> Could we find a different acronym for Port Multiplier support,
>>> such as PMS or PX or PXS?
>>
>>
>> Ok, maybe not PMS ?
>>
>> Can you imagine a bug report from someone that "has problem with PMS"?
>> :)
>>
>
> Would be fun though. :)
>
> I thought about using another acronym for port multiplier too. But the
> spec uses that acronym all over the place, PM, PMP (Port Multiplier
> Portnumber), which reminds me of USB full/high speed fiasco.
>
> Urghh... I thought we could use power for power management inside libata
> but that might be a bad idea. So, PMS?

Actually, pmup?

Sort of describes what it is at the same time. (Alot easier to figure
out what pmup is than what pms is (in a computer :))

// Stefan


Attachments:
signature.asc (253.00 B)
OpenPGP digital signature

2006-05-13 01:37:33

by Matthew Frost

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Stefan Smietanowski wrote:
> Tejun Heo wrote:
>> Stefan Smietanowski wrote:
>>
>>> Randy.Dunlap wrote:
>>>
>>>>> * New error handling
>>>>> * IRQ driven PIO (from Albert Lee)
>>>>> * SATA NCQ support
>>>>> * Hotplug support
>>>>> * Port Multiplier support
>>>>
>>>> BTW, we often use PM to mean Power Management.
>>>> Could we find a different acronym for Port Multiplier support,
>>>> such as PMS or PX or PXS?
>>>
>>> Ok, maybe not PMS ?
>>>
>>> Can you imagine a bug report from someone that "has problem with PMS"?
>>> :)
>>>
>> Would be fun though. :)
>>
>> I thought about using another acronym for port multiplier too. But the
>> spec uses that acronym all over the place, PM, PMP (Port Multiplier
>> Portnumber), which reminds me of USB full/high speed fiasco.
>>
>> Urghh... I thought we could use power for power management inside libata
>> but that might be a bad idea. So, PMS?
>
> Actually, pmup?
>
> Sort of describes what it is at the same time. (Alot easier to figure
> out what pmup is than what pms is (in a computer :))
>

Or PMUL? MUL is in common usage for the arithmetic multiply sense;
wouldn't it make sense in the Port Multiplier sense? Would it get too
confused with FPMUL? Too much like an arithmetic operator?

> // Stefan

Matt

2006-05-13 04:12:16

by Jeff Garzik

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Tejun Heo wrote:
> Mikael Pettersson wrote:
>> On Fri, 12 May 2006 22:24:37 +0900, Tejun Heo wrote:
>>> The following drivers support new features.
>>>
>>> ata_piix: new EH, irq-pio, warmplug (hardware restriction)
>>> sata_sil: new EH, irq-pio, hotplug
>>> ahci: new EH, irq-pio, NCQ, hotplug
>>> sata_sil24: new EH, irq-pio, NCQ, hotplug, Port Multiplier
>> If you were to add new EH and NCQ support to sata_promise,
>> then I'd test it on my News server.
>>
>
> I have a promise card and played with it a little bit but I don't have
> access to hardware doc. So...

I have Promise NCQ info, just waiting for the chance to use it :)

Plus I have a nagging suspicion that the SATA II cards have a few
differences from the SATA I cards that have yet to be coded into
sata_promise.c.

Jeff



2006-05-13 04:13:44

by Jeff Garzik

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Tejun Heo wrote:
> Stefan Smietanowski wrote:
>> Randy.Dunlap wrote:
>>>> * New error handling
>>>> * IRQ driven PIO (from Albert Lee)
>>>> * SATA NCQ support
>>>> * Hotplug support
>>>> * Port Multiplier support
>>>
>>> BTW, we often use PM to mean Power Management.
>>> Could we find a different acronym for Port Multiplier support,
>>> such as PMS or PX or PXS?
>>
>> Ok, maybe not PMS ?
>>
>> Can you imagine a bug report from someone that "has problem with PMS"?
>> :)
>>
>
> Would be fun though. :)
>
> I thought about using another acronym for port multiplier too. But the
> spec uses that acronym all over the place, PM, PMP (Port Multiplier
> Portnumber), which reminds me of USB full/high speed fiasco.
>
> Urghh... I thought we could use power for power management inside libata
> but that might be a bad idea. So, PMS?

PMS is fine. I encouraged the use of "UFO" for "UDP Fragmentation
Offload" in network driver land, and it stuck.

This is Linux, we like to have fun around here :)

Jeff



2006-05-13 07:29:14

by Tejun Heo

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Jeff Garzik wrote:
> Tejun Heo wrote:
>> Stefan Smietanowski wrote:
>>> Randy.Dunlap wrote:
>>>>> * New error handling
>>>>> * IRQ driven PIO (from Albert Lee)
>>>>> * SATA NCQ support
>>>>> * Hotplug support
>>>>> * Port Multiplier support
>>>>
>>>> BTW, we often use PM to mean Power Management.
>>>> Could we find a different acronym for Port Multiplier support,
>>>> such as PMS or PX or PXS?
>>>
>>> Ok, maybe not PMS ?
>>>
>>> Can you imagine a bug report from someone that "has problem with PMS"?
>>> :)
>>>
>>
>> Would be fun though. :)
>>
>> I thought about using another acronym for port multiplier too. But
>> the spec uses that acronym all over the place, PM, PMP (Port
>> Multiplier Portnumber), which reminds me of USB full/high speed fiasco.
>>
>> Urghh... I thought we could use power for power management inside
>> libata but that might be a bad idea. So, PMS?
>
> PMS is fine. I encouraged the use of "UFO" for "UDP Fragmentation
> Offload" in network driver land, and it stuck.
>
> This is Linux, we like to have fun around here :)
>

Currently, the candidates are...

px : short (good), but I don't know, not pretty
pmul : okay but a bit too long
pml : pretty and official
pms : pretty and fun

I think I'll go with either pms or pml. Man, this decision is difficult.

--
tejun

2006-05-13 07:35:36

by Jeff Garzik

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Tejun Heo wrote:
> Jeff Garzik wrote:
>> Tejun Heo wrote:
>>> Stefan Smietanowski wrote:
>>>> Randy.Dunlap wrote:
>>>>>> * New error handling
>>>>>> * IRQ driven PIO (from Albert Lee)
>>>>>> * SATA NCQ support
>>>>>> * Hotplug support
>>>>>> * Port Multiplier support
>>>>>
>>>>> BTW, we often use PM to mean Power Management.
>>>>> Could we find a different acronym for Port Multiplier support,
>>>>> such as PMS or PX or PXS?
>>>>
>>>> Ok, maybe not PMS ?
>>>>
>>>> Can you imagine a bug report from someone that "has problem with PMS"?
>>>> :)
>>>>
>>>
>>> Would be fun though. :)
>>>
>>> I thought about using another acronym for port multiplier too. But
>>> the spec uses that acronym all over the place, PM, PMP (Port
>>> Multiplier Portnumber), which reminds me of USB full/high speed fiasco.
>>>
>>> Urghh... I thought we could use power for power management inside
>>> libata but that might be a bad idea. So, PMS?
>>
>> PMS is fine. I encouraged the use of "UFO" for "UDP Fragmentation
>> Offload" in network driver land, and it stuck.
>>
>> This is Linux, we like to have fun around here :)
>>
>
> Currently, the candidates are...
>
> px : short (good), but I don't know, not pretty
> pmul : okay but a bit too long
> pml : pretty and official
> pms : pretty and fun
>
> I think I'll go with either pms or pml. Man, this decision is difficult.

To make it more difficult: Honestly, I prefer Port MultiPlier (PMP),
imitating (and perhaps overloading) the acronym used by the standard
SATA FIS field.

:)

Jeff



2006-05-13 08:15:33

by Tejun Heo

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Jeff Garzik wrote:
> Tejun Heo wrote:
>> Jeff Garzik wrote:
>>> Tejun Heo wrote:
>>>> Stefan Smietanowski wrote:
>>>>> Randy.Dunlap wrote:
>>>>>>> * New error handling
>>>>>>> * IRQ driven PIO (from Albert Lee)
>>>>>>> * SATA NCQ support
>>>>>>> * Hotplug support
>>>>>>> * Port Multiplier support
>>>>>>
>>>>>> BTW, we often use PM to mean Power Management.
>>>>>> Could we find a different acronym for Port Multiplier support,
>>>>>> such as PMS or PX or PXS?
>>>>>
>>>>> Ok, maybe not PMS ?
>>>>>
>>>>> Can you imagine a bug report from someone that "has problem with PMS"?
>>>>> :)
>>>>>
>>>>
>>>> Would be fun though. :)
>>>>
>>>> I thought about using another acronym for port multiplier too. But
>>>> the spec uses that acronym all over the place, PM, PMP (Port
>>>> Multiplier Portnumber), which reminds me of USB full/high speed fiasco.
>>>>
>>>> Urghh... I thought we could use power for power management inside
>>>> libata but that might be a bad idea. So, PMS?
>>>
>>> PMS is fine. I encouraged the use of "UFO" for "UDP Fragmentation
>>> Offload" in network driver land, and it stuck.
>>>
>>> This is Linux, we like to have fun around here :)
>>>
>>
>> Currently, the candidates are...
>>
>> px : short (good), but I don't know, not pretty
>> pmul : okay but a bit too long
>> pml : pretty and official
>> pms : pretty and fun
>>
>> I think I'll go with either pms or pml. Man, this decision is difficult.
>
> To make it more difficult: Honestly, I prefer Port MultiPlier (PMP),
> imitating (and perhaps overloading) the acronym used by the standard
> SATA FIS field.

Ah... I've excluded PMP because I thought it was already taken, but,
yeah, it wouldn't cause noticeable confusion and fits the best. I'll
give PMP a try.

--
tejun

2006-05-15 14:13:19

by Alan

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

On Gwe, 2006-05-12 at 21:22 +0200, Stefan Smietanowski wrote:
> Ok, maybe not PMS ?
>
> Can you imagine a bug report from someone that "has problem with PMS"?
> :)

We've had a driver for the pms card for many years and nobody over the
age of about 18 has afaik found it amusing.

Alan

2006-05-15 16:53:23

by Stefan Smietanowski

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Alan Cox wrote:
> On Gwe, 2006-05-12 at 21:22 +0200, Stefan Smietanowski wrote:
>
>>Ok, maybe not PMS ?
>>
>>Can you imagine a bug report from someone that "has problem with PMS"?
>>:)
>
> We've had a driver for the pms card for many years and nobody over the
> age of about 18 has afaik found it amusing.

Depends, I never heard of the pms card but I do have this tingling
feeling that some actually will hear of and/or use port multipliers
for SATA meaning that "not many heard of the pms card so not many
over the age of 18 found it amusing" but not the same is true
for port multipliers.

// Stefan


Attachments:
signature.asc (253.00 B)
OpenPGP digital signature

2006-05-16 14:55:06

by Michael Schierl

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

On Fri, 12 May 2006 22:24:37 +0900, Tejun Heo wrote:

> ahci: new EH, irq-pio, NCQ, hotplug

Should suspend-to-RAM work now on AHCI? It produces lots of messages now
but does not work either now.

# ls
ata1.00: exception Emask 0x10 SAct 0x1 SEra 0x4050000 action 0x3 frozen
ata1.00 tag 0 cmd 0x60 Emask 0x14 stat 0x40 err 0x0 (ATA bus error)
ata1: soft resetting port
ata1: softreset failed (1st FIS failed)
ata1: softreset failed, retrying in 5 secs
ata1: hard resettinq port
ata1: port is slow to respond, please be patient
ata1: port failed to respond (30 secs)
ata1: COMRESET failed (device not ready)
ata1: hardreset failed, retrying in 5 secs
ata1: hard resettinq port
ata1: port is slow to respond, please be patient
ata1: port failed to respond (30 secs)
ata1: COMRESET failed (device not ready)
ata1: reset failed, giving up
ata1.00: disabled
ata1: EH complete
sd 0:0:0:0: SCSI error: return code = 0x40000
...

It produces lots of more SCSI errors (I did not want to write all those
down...) but no ata1-errors any more.

Michael

2006-05-16 14:59:32

by Jeff Garzik

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Michael Schierl wrote:

> On Fri, 12 May 2006 22:24:37 +0900, Tejun Heo wrote:
>
>> ahci: new EH, irq-pio, NCQ, hotplug
>
> Should suspend-to-RAM work now on AHCI?

It probably still needs Hannes' AHCI patch, and possibly the SATA ACPI
patches too.

Jeff


2006-05-16 15:14:21

by Michael Schierl

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Jeff Garzik schrieb:
> Michael Schierl wrote:
>
>> On Fri, 12 May 2006 22:24:37 +0900, Tejun Heo wrote:
>>
>>> ahci: new EH, irq-pio, NCQ, hotplug
>>
>> Should suspend-to-RAM work now on AHCI?
>
> It probably still needs Hannes' AHCI patch, and possibly the SATA ACPI
> patches too.

hmm. ok. Hannes' patch was the one in http://lkml.org/lkml/2006/3/6/47 ?

I never found a kernel where I could apply that one and still compile
without errors :(

I am no C guru, so I had no success to fix this patch without even
knowing where to apply against... (and I don't know anything about
kernel programming or even ACHI low-level programming).

Is there a newer version available of that patch somewhere?

And - what SATA ACPI patches?

I have quite alot of patches related to sata and/or acpi (collected from
different mailing lists) here on hard disk but don't know which ones are
broken, outdated, etc. Most only apply on a 2.6.15 or 2.6.14-rc kernel...

If more recent patches are only available via git, I'd need some good
GIT tutorial first...

TIA, and sorry for stealing your time,

Michael

2006-05-17 01:40:01

by Forrest Zhao

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

On Tue, 2006-05-16 at 17:14 +0200, Michael Schierl wrote:
> hmm. ok. Hannes' patch was the one in http://lkml.org/lkml/2006/3/6/47 ?
>
> I never found a kernel where I could apply that one and still compile
> without errors :(
>
> I am no C guru, so I had no success to fix this patch without even
> knowing where to apply against... (and I don't know anything about
> kernel programming or even ACHI low-level programming).
>
> Is there a newer version available of that patch somewhere?
>
> And - what SATA ACPI patches?
>
> I have quite alot of patches related to sata and/or acpi (collected from
> different mailing lists) here on hard disk but don't know which ones are
> broken, outdated, etc. Most only apply on a 2.6.15 or 2.6.14-rc kernel...
>
> If more recent patches are only available via git, I'd need some good
> GIT tutorial first...
>
> TIA, and sorry for stealing your time,
>
> Michael
Michael,

I ported a patch from OpenSUSE for AHCI suspend/resume. You may find the
patch at:
http://marc.theaimsgroup.com/?l=linux-ide&m=114774543416039&w=2

Jeff,
If Michael have a successful AHCI suspend/resume with this patch, I'm
glad to port the patch to current libata-dev #upstream for the second
time to push it into stock kernel. How do you think?

Thanks,
Forrest

2006-05-17 12:48:30

by Michael Schierl

[permalink] [raw]
Subject: AHCI suspend works for me! (was: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel)

zhao, forrest schrieb:
>> And - what SATA ACPI patches?
>>
>> I have quite alot of patches related to sata and/or acpi (collected from
>> different mailing lists) here on hard disk but don't know which ones are
>> broken, outdated, etc. Most only apply on a 2.6.15 or 2.6.14-rc kernel...
>>
>> If more recent patches are only available via git, I'd need some good
>> GIT tutorial first...
>>
>> TIA, and sorry for stealing your time,
>>
>> Michael
> Michael,
>
> I ported a patch from OpenSUSE for AHCI suspend/resume. You may find the
> patch at:
> y

I cannot see any patch in this mail...

However, the patch linked there "indirectly",

http://www.spinnaker.de/linux/c1320/sata-resume-2.6.16.5.patch

applies well on vanilla 2.6.16 (although not on top of the "new EH"
patch) and is the first one that really works (as far as I tested it).

I tested it on a minimal kernel (no network no sound no nothing); I'll
build a new "non-minimal" kernel now :) If I run into any problems; I'll
tell you.

Thank you.

Michael

2006-05-17 15:34:49

by Chris Boot

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

Tejun Heo wrote:
> Chris Boot wrote:
>> Chris Boot wrote:
>>> Tejun Heo wrote:
>>>> Patches against v2.6.16.16 is avaialbe at the following URL.
>>>>
>>>> http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.16.16-20060512.tar.bz2
>>>>
>>>>
>>>> Please read README carefully before testing the patches. Keep in mind
>>>> that these are still quite experimental and not ready for production
>>>> use.
>>>
>>> Are these patches likely to work alongside Alan's PATA patches?
>>> Specifically I have a DVD-RW and an IDE tape that I'd like to use.
>>
>> I'll answer my own question: this fails miserably!
>
> Yeap, it would require some updates to all those pata_* drivers. Updates
> are mostly straight forward though. I think once EH stuff gets
> stabilized and gets merged into libata-dev #upstream, PATA patches will
> be updated accordingly and merged soon.
>
>> I'll test 'em anyway, screw the DVD and tape for now. :-P
>
> Heh heh. Cool.

Right, well, I've finally got round to booting a working kernel with your
patches (been trying Xen unstable without luck). I built a kernel with the
latest Xen 3.0 testing patches and your -tj patch (which applies fine). I also
tried hotplugging one of my drives on my sata_sil controller. Here are the
relevant messages:

[ 1.855133] libata version 1.30 loaded.
[ 1.855175] sata_sil 0000:00:0a.0: version 1.0
[ 1.855253] ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 17
[ 1.856452] ata1: SATA max UDMA/100 cmd 0xF1002080 ctl 0xF100208A bmdma
0xF1002000 irq 17
[ 1.857527] ata2: SATA max UDMA/100 cmd 0xF10020C0 ctl 0xF10020CA bmdma
0xF1002008 irq 17
[ 1.858571] scsi0 : sata_sil
[ 2.108048] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 2.109549] ata1.00: cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01
87:4023 88:207f
[ 2.109555] ata1.00: ATA-7, max UDMA/133, 488397168 sectors: LBA48 NCQ (depth
0/32)
[ 2.111463] ata1.00: configured for UDMA/100
[ 2.111941] scsi1 : sata_sil
[ 2.361045] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 2.362537] ata2.00: cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01
87:4023 88:207f
[ 2.362542] ata2.00: ATA-7, max UDMA/133, 488397168 sectors: LBA48 NCQ (depth
0/32)
[ 2.364456] ata2.00: configured for UDMA/100
[ 2.365043] Vendor: ATA Model: ST3250823AS Rev: 3.03
[ 2.365747] Type: Direct-Access ANSI SCSI revision: 05
[ 2.366780] Vendor: ATA Model: ST3250823AS Rev: 3.03
[ 2.367498] Type: Direct-Access ANSI SCSI revision: 05
[ 2.368484] sata_via 0000:00:0f.0: version 1.2
[ 2.368925] ACPI: PCI Interrupt Link [ALKA] BIOS reported IRQ 11, using IRQ 20
[ 2.369830] ACPI: PCI Interrupt Link [ALKA] enabled at IRQ 20
[ 2.370297] ACPI: PCI Interrupt 0000:00:0f.0[B] -> Link [ALKA] -> GSI 20
(level, low) -> IRQ 18
[ 2.371224] PCI: Via IRQ fixup for 0000:00:0f.0, from 11 to 2
[ 2.371706] sata_via 0000:00:0f.0: routed to hard irq line 2
[ 2.372235] ata3: SATA max UDMA/133 cmd 0xB800 ctl 0xBC02 bmdma 0xC800 irq 18
[ 2.373195] ata4: SATA max UDMA/133 cmd 0xC000 ctl 0xC402 bmdma 0xC808 irq 18
[ 2.375546] scsi2 : sata_via
[ 2.576029] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2.727918] ata3.00: cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01
87:4023 88:407f
[ 2.727923] ata3.00: ATA-7, max UDMA/133, 488397168 sectors: LBA48 NCQ (depth
0/32)
[ 2.731229] ata3.00: configured for UDMA/133
[ 2.733149] scsi3 : sata_via
[ 2.936028] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 3.139026] ata4.00: cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01
87:4023 88:407f
[ 3.139031] ata4.00: ATA-7, max UDMA/133, 488397168 sectors: LBA48 NCQ (depth
0/32)
[ 3.142741] ata4.00: configured for UDMA/133
[ 3.145018] Vendor: ATA Model: ST3250823AS Rev: 3.03
[ 3.147485] Type: Direct-Access ANSI SCSI revision: 05
[ 3.150318] Vendor: ATA Model: ST3250823AS Rev: 3.03
[ 3.152859] Type: Direct-Access ANSI SCSI revision: 05
[ 3.155738] SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.158039] sda: Write Protect is off
[ 3.160276] sda: Mode Sense: 00 3a 00 00
[ 3.160294] SCSI device sda: drive cache: write back
[ 3.162594] SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.164874] sda: Write Protect is off
[ 3.167148] sda: Mode Sense: 00 3a 00 00
[ 3.167164] SCSI device sda: drive cache: write back
[ 3.169427] sda: sda1 sda2 sda3
[ 3.192371] sd 0:0:0:0: Attached scsi disk sda
[ 3.194705] SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.197037] sdb: Write Protect is off
[ 3.199818] sdb: Mode Sense: 00 3a 00 00
[ 3.199835] SCSI device sdb: drive cache: write back
[ 3.202211] SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.204558] sdb: Write Protect is off
[ 3.206864] sdb: Mode Sense: 00 3a 00 00
[ 3.206880] SCSI device sdb: drive cache: write back
[ 3.209201] sdb: sdb1 sdb2 sdb3
[ 3.233992] sd 1:0:0:0: Attached scsi disk sdb
[ 3.236298] SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.238833] sdc: Write Protect is off
[ 3.241115] sdc: Mode Sense: 00 3a 00 00
[ 3.241132] SCSI device sdc: drive cache: write back
[ 3.243481] SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.245770] sdc: Write Protect is off
[ 3.248081] sdc: Mode Sense: 00 3a 00 00
[ 3.248098] SCSI device sdc: drive cache: write back
[ 3.250405] sdc: sdc1 sdc2 sdc3
[ 3.275627] sd 2:0:0:0: Attached scsi disk sdc
[ 3.278048] SCSI device sdd: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.280355] sdd: Write Protect is off
[ 3.282644] sdd: Mode Sense: 00 3a 00 00
[ 3.282661] SCSI device sdd: drive cache: write back
[ 3.285009] SCSI device sdd: 488397168 512-byte hdwr sectors (250059 MB)
[ 3.287292] sdd: Write Protect is off
[ 3.289569] sdd: Mode Sense: 00 3a 00 00
[ 3.289586] SCSI device sdd: drive cache: write back
[ 3.291830] sdd: sdd1 sdd2 sdd3
[ 3.315821] sd 3:0:0:0: Attached scsi disk sdd

Then I yanked sda:

[ 143.141029] ata1: exception Emask 0x10 SAct 0x0 SErr 0x90000 action 0x1 frozen
[ 143.142098] ata1: failed to recover some devices, retrying in 5 secs
[ 148.647042] ata1: soft resetting port
[ 148.647622] ata1: SATA link down (SStatus 0 SControl 310)
[ 148.648151] ata1: failed to recover some devices, retrying in 5 secs
[ 153.648043] ata1: hard resetting port
[ 154.156040] ata1: SATA link down (SStatus 0 SControl 310)
[ 154.156613] ata1.00: disabled
[ 154.658048] ata1: EH complete
[ 154.658633] ata1.00: detaching (SCSI 0:0:0:0)

And plugged it in again:

[ 174.945730] ata1: exception Emask 0x10 SAct 0x0 SErr 0x10000 action 0x1 frozen
[ 175.451043] ata1: soft resetting port
[ 175.602069] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 175.603778] ata1.00: cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01
87:4023 88:207f
[ 175.603786] ata1.00: ATA-7, max UDMA/133, 488397168 sectors: LBA48 NCQ (depth
0/32)
[ 175.605947] ata1.00: configured for UDMA/100
[ 175.606494] ata1: EH complete
[ 175.607347] Vendor: ATA Model: ST3250823AS Rev: 3.03
[ 175.608171] Type: Direct-Access ANSI SCSI revision: 05
[ 175.610594] SCSI device sde: 488397168 512-byte hdwr sectors (250059 MB)
[ 175.611346] sde: Write Protect is off
[ 175.611863] sde: Mode Sense: 00 3a 00 00
[ 175.612136] SCSI device sde: drive cache: write back
[ 175.613030] SCSI device sde: 488397168 512-byte hdwr sectors (250059 MB)
[ 175.613743] sde: Write Protect is off
[ 175.614260] sde: Mode Sense: 00 3a 00 00
[ 175.614509] SCSI device sde: drive cache: write back
[ 175.615071] sde: sde1 sde2 sde3
[ 175.634366] sd 0:0:0:0: Attached scsi disk sde
[ 175.634937] sd 0:0:0:0: Attached scsi generic sg0 type 0

It all looks good to me, other than the perhaps slightly scary messages when
things get [un]plugged. Now I'm just waiting for my RAID arrays to rebuild.

I'd do similar testing on my sata_via controller if there was a patch, and it
would be very nice to see NCQ for those too! ;-)

Many thanks,
Chris

PS: Sorry for the line-wrapping!

--
Chris Boot
[email protected]
http://www.bootc.net/

2006-05-18 15:27:45

by Jeff Garzik

[permalink] [raw]
Subject: Re: [ANNOUNCE] libata: new EH, NCQ, hotplug and PM patches against stable kernel

zhao, forrest wrote:
> On Tue, 2006-05-16 at 17:14 +0200, Michael Schierl wrote:
>> hmm. ok. Hannes' patch was the one in http://lkml.org/lkml/2006/3/6/47 ?
>>
>> I never found a kernel where I could apply that one and still compile
>> without errors :(
>>
>> I am no C guru, so I had no success to fix this patch without even
>> knowing where to apply against... (and I don't know anything about
>> kernel programming or even ACHI low-level programming).
>>
>> Is there a newer version available of that patch somewhere?
>>
>> And - what SATA ACPI patches?
>>
>> I have quite alot of patches related to sata and/or acpi (collected from
>> different mailing lists) here on hard disk but don't know which ones are
>> broken, outdated, etc. Most only apply on a 2.6.15 or 2.6.14-rc kernel...
>>
>> If more recent patches are only available via git, I'd need some good
>> GIT tutorial first...
>>
>> TIA, and sorry for stealing your time,
>>
>> Michael
> Michael,
>
> I ported a patch from OpenSUSE for AHCI suspend/resume. You may find the
> patch at:
> http://marc.theaimsgroup.com/?l=linux-ide&m=114774543416039&w=2
>
> Jeff,
> If Michael have a successful AHCI suspend/resume with this patch, I'm
> glad to port the patch to current libata-dev #upstream for the second
> time to push it into stock kernel. How do you think?

All reasonable patches accepted...

Jeff