libata-acpi: summary, problems, questions and proposal

2007-03-28 Thread Tejun Heo
Hello, ATA and ACPI crowd. This mail tries to summarize the current state of libata ACPI support and establish consensus how it should be improved. If you're familiar with ACPI or the current libata-acpi implementation, please try to answer questions in section 3. Table of Contents 1.

[git patches] libata fixes

2007-03-28 Thread Jeff Garzik
This disables libata ACPI, among other things. Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: drivers/ata/ahci.c | 21 +++- drivers/ata/libata-acpi.c

Re: [git patches] libata fixes

2007-03-28 Thread Jeff Garzik
Jeff Garzik wrote: This disables libata ACPI, among other things. If a -rc6 is possible, that would be quite nice... Jeff - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Thomas Gleixner
On Tue, 2007-03-27 at 01:46 +0800, Jeff Chua wrote: On 3/27/07, Thomas Gleixner [EMAIL PROTECTED] wrote: It's related. I tested without CONFIG_HPET_TIMER, and now my X60 can suspend and resume from RAM (s2ram). Even better, it works with/without CONFIG_NO_HZ. Does the patch below

Re: HPA patches

2007-03-28 Thread Alan Cox
On Wed, 28 Mar 2007 01:08:52 +0100 Matthew Garrett [EMAIL PROTECTED] wrote: On Fri, Mar 23, 2007 at 07:13:21PM +, Alan Cox wrote: For reference this is what I am currently using with 2.6.21-rc4-mm1 and it is working for all my test cases so far: Its basically Kyle's patch with a libata

Re: ATA ACPI (was Re: Linux 2.6.21-rc5)

2007-03-28 Thread Pavel Machek
Hi! So if you have reported a regression in the 2.6.21-rc series, please check 2.6.21-rc5, and update your report as appropriate (whether fixed or still problems with xyzzy). [just got back from vacation, or would have sent this earlier] FWIW, I'm still leaning towards disabling

Re: ATA ACPI (was Re: Linux 2.6.21-rc5)

2007-03-28 Thread Tejun Heo
Pavel Machek wrote: Hi! So if you have reported a regression in the 2.6.21-rc series, please check 2.6.21-rc5, and update your report as appropriate (whether fixed or still problems with xyzzy). [just got back from vacation, or would have sent this earlier] FWIW, I'm still leaning

Re: SATA Problem: port is slow to respond

2007-03-28 Thread Rodney Padgett
Tejun Heo htejun at gmail.com writes: Sigmund Scheinbar wrote: Tejun Heo wrote: Please apply the attached patch over 2.6.20.1 and report how it works. I'm afraid that something went wrong while patching: Sorry, it was generated against the wrong tree. Regenerated patch attached.

Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Maxim
On Wednesday 28 March 2007 09:04:28 Thomas Gleixner wrote: On Tue, 2007-03-27 at 01:46 +0800, Jeff Chua wrote: On 3/27/07, Thomas Gleixner [EMAIL PROTECTED] wrote: It's related. I tested without CONFIG_HPET_TIMER, and now my X60 can suspend and resume from RAM (s2ram). Even better,

[PATCH pata-2.6] sl82c105: rework PIO support (take 2)

2007-03-28 Thread Sergei Shtylyov
Get rid of the 'pio_speed' member of 'ide_drive_t' that was only used by this driver by storing the PIO mode timings in the 'drive_data' instead -- this allows us to greatly simplify the process of reloading of the chip's timing register and do it right in sl82c150_dma_off_quietly() and to get

Re: libata-acpi: summary, problems, questions and proposal

2007-03-28 Thread Matthew Garrett
On Wed, Mar 28, 2007 at 04:30:02PM +0900, Tejun Heo wrote: Hi Tejun, Firstly, could I ask you to take a look at the patch in http://permalink.gmane.org/gmane.linux.acpi.devel/22066/ ? It deals with some of these issues. ACPI support implementation in libata-dev supports both IDE and SATA

Re: [PATCH pata-2.6] sl82c105: rework PIO support (take 2)

2007-03-28 Thread Sergei Shtylyov
Hello, I wrote: Index: linux-2.6/include/linux/ide.h === --- linux-2.6.orig/include/linux/ide.h +++ linux-2.6/include/linux/ide.h @@ -613,7 +613,6 @@ typedef struct ide_drive_s { u8 quirk_list; /* considered quirky, set

[PATCH pata-2.6] sl82c105: DMA support code cleanup (take 4)

2007-03-28 Thread Sergei Shtylyov
Fold the now equivalent code in the ide_dma_check() method into a mere call to ide_use_dma(). Make config_for_dma() return non-zero if DMA mode has been set and call it from the ide_dma_check() method instead of ide_dma_on(). Defer writing the DMA timings to the chip registers until DMA is really

[PATCH pata-2.6] sl82c105: add speedproc() method and MWDMA0/1 support

2007-03-28 Thread Sergei Shtylyov
Add the speedproc() method for setting transfer modes, modify config_for_dma() to call it and use ide_max_dma_mode() to select the best DMA mode. Add support for the multiword DMA modes 0 and 1, using the upper half of the 'drive_data' field to store the DMA timings to program into the drive

Re: Problems with VIA VT8251 SATA and kernels above 2.6.18.x

2007-03-28 Thread Geoff Rivell
On Sunday 25 March 2007 19:27, Rüdiger Otte wrote: Dear Linux ATA people, the SATA-Controller on Asus A8V-MX mainboard (VIA VT8251) doesn't recognize an attached SATA-Harddisk (Western Digital WD3200AAKS in my case) with kernels 2.6.19 and above. I get the error with 2.6.19, 2.6.20 and

Re: Why is NCQ enabled by default by libata? (2.6.20)

2007-03-28 Thread Jeff Garzik
Phillip Susi wrote: Justin Piszcz wrote: I would try with write-caching enabled. Also, the RAID5/RAID10 you mention seems like each volume is on part of the platter, a strange setup you got there :) Shouldn't NCQ only help write performance if write caching is _disabled_? Since write cache

Re: Why is NCQ enabled by default by libata? (2.6.20)

2007-03-28 Thread Phillip Susi
Justin Piszcz wrote: I would try with write-caching enabled. Also, the RAID5/RAID10 you mention seems like each volume is on part of the platter, a strange setup you got there :) Shouldn't NCQ only help write performance if write caching is _disabled_? Since write cache essentially is just

Re: [2/5] 2.6.21-rc5: known regressions

2007-03-28 Thread Laurent Riffard
Le 27.03.2007 03:59, Adrian Bunk a écrit : This email lists some known regressions in Linus' tree compared to 2.6.20. ... Subject: libata: PATA UDMA/100 configured as UDMA/33 References : http://lkml.org/lkml/2007/2/20/294

Re: HPA patches

2007-03-28 Thread Matthew Garrett
On Wed, Mar 28, 2007 at 10:57:54AM +0100, Alan Cox wrote: Ok thanks. This is interesting as the only thing new it is doing is asking for the HPA size. Does I think explain the problem however: Can you move the HPA setting call to after the mode has been set and see if that makes the problem

Re: HPA patches

2007-03-28 Thread Alan Cox
Hm. I tried adding it in the eh code after ata_set_mode() in ata_eh_recover(), which alters the problem slightly - hpa_sectors is still 0, so the taskfile call is still failing, but now the system just stops at around the time that anything attempts to access sda with no errors other than

Re: [git patches] libata fixes

2007-03-28 Thread Linus Torvalds
On Wed, 28 Mar 2007, Jeff Garzik wrote: Jeff Garzik wrote: This disables libata ACPI, among other things. If a -rc6 is possible, that would be quite nice... Heh. I don't think -rc6 is possible - it's inevitable. We have too much fallout from the timer changes still outstanding. It looks

Re: [git patches] libata fixes

2007-03-28 Thread Andrew Morton
On Wed, 28 Mar 2007 13:53:10 -0700 (PDT) Linus Torvalds [EMAIL PROTECTED] wrote: On Wed, 28 Mar 2007, Jeff Garzik wrote: Jeff Garzik wrote: This disables libata ACPI, among other things. If a -rc6 is possible, that would be quite nice... Heh. I don't think -rc6 is possible -

Re: HPA patches

2007-03-28 Thread Kyle McMartin
On Wed, Mar 28, 2007 at 10:54:31PM +0100, Alan Cox wrote: Hm. I tried adding it in the eh code after ata_set_mode() in ata_eh_recover(), which alters the problem slightly - hpa_sectors is still 0, so the taskfile call is still failing, but now the system just stops at around the time

[patch 0/3] Asynchronous Notification for SATA ATAPI devices

2007-03-28 Thread Kristen Carlson Accardi
This patch series implements Asynchronous Notification (AN) for SATA ATAPI devices as defined in SATA 2.5 and AHCI 1.1. Drives which support this feature will send a notification when new media is inserted into the drive, preventing the need for user space to poll for new media. This support is

[patch 2/3] libata: expose AN support to user space via sysfs

2007-03-28 Thread Kristen Carlson Accardi
Allow user space to determine if an ATAPI device supports async notification (AN) of media changes. This is done by adding a new sysfs file async_notification to genhd. If the file reads 1, then the device supports async notification. If the file reads 0, it does not. A flag is set in the

[patch 1/3] libata: check for AN support

2007-03-28 Thread Kristen Carlson Accardi
Check to see if an ATAPI device supports Asynchronous Notification. If so, enable it. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED] Index: 2.6-mm/drivers/ata/libata-core.c === --- 2.6-mm.orig/drivers/ata/libata-core.c +++

[patch 3/3] libata: handle AN interrupt

2007-03-28 Thread Kristen Carlson Accardi
When we get an SDB FIS with the 'N' bit set, we should send an event to user space to indicate that there has been a media change. The ahci host controller will send the event via KOBJ_CHANGE uevent. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED] Index: 2.6-mm/drivers/ata/ahci.c

Re: [patch 2/3] libata: expose AN support to user space via sysfs

2007-03-28 Thread Jeff Garzik
Kristen Carlson Accardi wrote: Allow user space to determine if an ATAPI device supports async notification (AN) of media changes. This is done by adding a new sysfs file async_notification to genhd. If the file reads 1, then the device supports async notification. If the file reads 0, it

Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Ingo Molnar
* Maxim [EMAIL PROTECTED] wrote: I almost sure I know why this happens, cool! Your patch is a definite improvement on my t60 (where suspend/resume never worked with hpet enabled). But it does not fix everything - for example the timings are way off after resume. Thomas? Ingo - To

Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Linus Torvalds
On Wed, 28 Mar 2007, Maxim wrote: Now I don't have a clue how to set those bits if only HPET is used as clock source because now clocksources don't have _any_ resume hook. One thing that drives me wild about that clocksource resume thing is that it seems to think that

Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Michael S. Tsirkin
Subject: first disk access after resume takes several minutes ('date' does not advance after resume from RAM, CONFIG_NO_HZ=n) References : http://lkml.org/lkml/2007/3/8/117 http://lkml.org/lkml/2007/3/25/20 Submitter : Michael S. Tsirkin [EMAIL PROTECTED] ...

Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Ingo Molnar
* Michael S. Tsirkin [EMAIL PROTECTED] wrote: Bingo! The patch below fixes the two problems (listed above) with resume from RAM that I have observed on my T60 with 2.6.21-rc5: with this patch applied, and with CONFIG_NO_HZ unset, date advances correctly, X functions properly and there

Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Randy Dunlap
On Wed, 28 Mar 2007 20:04:57 +0200 Michael S. Tsirkin wrote: Subject: first disk access after resume takes several minutes ('date' does not advance after resume from RAM, CONFIG_NO_HZ=n) References : http://lkml.org/lkml/2007/3/8/117

Re: [linux-pm] [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread David Brownell
On Wednesday 28 March 2007 9:38 am, Linus Torvalds wrote: It's a *device*, dammit. It should save and resume like one (probably as a system device). The set_mode() etc stuff is at a completely different (higher) conceptual level. Agreed, except about probably as a system device. Last I

Re: [linux-pm] [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Maxim
On Wednesday 28 March 2007 21:38:55 David Brownell wrote: On Wednesday 28 March 2007 9:38 am, Linus Torvalds wrote: It's a *device*, dammit. It should save and resume like one (probably as a system device). The set_mode() etc stuff is at a completely different (higher) conceptual level.

Re: [linux-pm] [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Linus Torvalds
On Wed, 28 Mar 2007, David Brownell wrote: On Wednesday 28 March 2007 9:38 am, Linus Torvalds wrote: It's a *device*, dammit. It should save and resume like one (probably as a system device). The set_mode() etc stuff is at a completely different (higher) conceptual level. Agreed,

Re: [linux-pm] [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread David Brownell
On Wednesday 28 March 2007 1:19 pm, Maxim wrote: On Wednesday 28 March 2007 21:38:55 David Brownell wrote: Also, making HPET use the legacy mode seems like a step backwards. It is not 'legacy' mode, It is a legacy replacement mode. Typo, sorry. It this mode HPET takes over IRQ0

Re: [linux-pm] [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread David Brownell
On Wednesday 28 March 2007 1:42 pm, Linus Torvalds wrote: I won't disagree - it might well be much nicer to just show it in the real device tree. I'm not 100% sure where in the tree it would go, though. It should probably be inside the root entry, before any of the PCI buses. Mixing

Re: [linux-pm] [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Maxim
On Wednesday 28 March 2007 22:59:26 David Brownell wrote: On Wednesday 28 March 2007 1:19 pm, Maxim wrote: On Wednesday 28 March 2007 21:38:55 David Brownell wrote: Also, making HPET use the legacy mode seems like a step backwards. It is not 'legacy' mode, It is a legacy

Re: [linux-pm] [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Maxim
On Wednesday 28 March 2007 22:42:00 Linus Torvalds wrote: On Wed, 28 Mar 2007, David Brownell wrote: On Wednesday 28 March 2007 9:38 am, Linus Torvalds wrote: It's a *device*, dammit. It should save and resume like one (probably as a system device). The set_mode() etc stuff is

[PATCH] Add notation that the Asus W5F laptop has a short cable instead of 80-wire.

2007-03-28 Thread Robin H\. Johnson
The Asus W5F laptop uses a short cable instead of the 80-wire style, and thus needs to be in the ich_laptop special cases for correct detection and support of UDMA/100 for the hard drive. I noticed this because I have the W5F laptop, and was tracing apparent slowness. Signed-off-by: Robin H.

Re: libata-acpi: summary, problems, questions and proposal

2007-03-28 Thread Tejun Heo
Hello, Matthew. Matthew Garrett wrote: On Wed, Mar 28, 2007 at 04:30:02PM +0900, Tejun Heo wrote: Hi Tejun, Firstly, could I ask you to take a look at the patch in http://permalink.gmane.org/gmane.linux.acpi.devel/22066/ ? It deals with some of these issues. Yeap, I've seen the patch.

Re: libata-acpi: summary, problems, questions and proposal

2007-03-28 Thread Matthew Garrett
On Thu, Mar 29, 2007 at 10:42:03AM +0900, Tejun Heo wrote: Yeap, I think it's in the right direction but we need to go further. * I'm not sure whether the complex walk libata-acpi is doing is justifiable. Yeah, that may well be less than ideal. * You'll end up doing _STM/_GTM on ahci

Re: [patch 1/3] libata: check for AN support

2007-03-28 Thread Tejun Heo
Kristen Carlson Accardi wrote: Check to see if an ATAPI device supports Asynchronous Notification. If so, enable it. As supporting AN needs host interrupt handler change. I think we need host-supports-AN flag; otherwise, we might end up with screaming interrupts in the worst case. --

Re: [patch 1/3] libata: check for AN support

2007-03-28 Thread Jeff Garzik
Tejun Heo wrote: Kristen Carlson Accardi wrote: Check to see if an ATAPI device supports Asynchronous Notification. If so, enable it. As supporting AN needs host interrupt handler change. I think we need host-supports-AN flag; otherwise, we might end up with screaming interrupts in the

Re: [patch 2/3] libata: expose AN support to user space via sysfs

2007-03-28 Thread Tejun Heo
Kristen Carlson Accardi wrote: Allow user space to determine if an ATAPI device supports async notification (AN) of media changes. This is done by adding a new sysfs file async_notification to genhd. If the file reads 1, then the device supports async notification. If the file reads 0, it

Re: [patch 2/3] libata: expose AN support to user space via sysfs

2007-03-28 Thread Tejun Heo
Jeff Garzik wrote: Kristen Carlson Accardi wrote: Allow user space to determine if an ATAPI device supports async notification (AN) of media changes. This is done by adding a new sysfs file async_notification to genhd. If the file reads 1, then the device supports async notification. If the

Re: [patch 3/3] libata: handle AN interrupt

2007-03-28 Thread Tejun Heo
Kristen Carlson Accardi wrote: When we get an SDB FIS with the 'N' bit set, we should send an event to user space to indicate that there has been a media change. The ahci host controller will send the event via KOBJ_CHANGE uevent. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]

Re: [patch 2/3] libata: expose AN support to user space via sysfs

2007-03-28 Thread Jeff Garzik
Tejun Heo wrote: Jeff Garzik wrote: Kristen Carlson Accardi wrote: Allow user space to determine if an ATAPI device supports async notification (AN) of media changes. This is done by adding a new sysfs file async_notification to genhd. If the file reads 1, then the device supports async

Re: libata-acpi: summary, problems, questions and proposal

2007-03-28 Thread Tejun Heo
Matthew Garrett wrote: * You'll end up doing _STM/_GTM on ahci controller on some BIOSen - 1. it can be dangerous 2. you might get partial or incorrect mapping - think about ICH8-split-to-two-PCI-fn-in-piix-mode case. So far I haven't seen any DSDTs that include _GTM and _STM methods for

[ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Maxim
On Wednesday 28 March 2007 18:38:48 Linus Torvalds wrote: On Wed, 28 Mar 2007, Maxim wrote: Now I don't have a clue how to set those bits if only HPET is used as clock source because now clocksources don't have _any_ resume hook. One thing that drives me wild about that

Re: [ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Linus Torvalds
On Thu, 29 Mar 2007, Maxim wrote: I am sending here a patch that as was discussed here adds hpet to list of system devices and adds suspend/resume hooks this way. I tested it and it works fine. Ok, it certainly looks better, but it *also* looks like it just assumes the

Re: [ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions

2007-03-28 Thread Maxim
On Thursday 29 March 2007 07:08:58 Linus Torvalds wrote: On Thu, 29 Mar 2007, Maxim wrote: I am sending here a patch that as was discussed here adds hpet to list of system devices and adds suspend/resume hooks this way. I tested it and it works fine. Ok, it certainly