Re: [PATCH] Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-06 Thread Bartlomiej Zolnierkiewicz
On Sunday 06 January 2008, FD Cami wrote:
> On Sun, 6 Jan 2008 17:27:38 +0100
> Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> wrote:
> 
> > On Sunday 06 January 2008, FD Cami wrote:
> > > On Sun, 6 Jan 2008 13:36:09 +
> > > Alan Cox <[EMAIL PROTECTED]> wrote:
> > > 
> > > > On Sun, 6 Jan 2008 08:03:31 +0300
> > > > > > For now you can boot with libata.dma=1 to select DMA on disks
> > > > > > but not CD
> > > > > 
> > > > > Great, but why isn't this in the documentation?
> > > > 
> > > > Send patches
> > > 
> > > patch attached.
> > > 
> > > Description : Add libata.dma= to Documentation/kernel-parameters.txt
> > > 
> > > Found documentation in :
> > > http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg09849.html
> > > http://www.redhat.com/archives/fedora-extras-commits/2007-October/msg04568.html
> > > 
> > > Signed-off-by: François Cami <[EMAIL PROTECTED]>
> > 
> > diff -rU2 linux-2.6.24-rc6/Documentation/kernel-parameters.txt 
> > linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt
> > ---
> > linux-2.6.24-rc6/Documentation/kernel-parameters.txt2008-01-06
> > 15:58:54.0 +0100 +++
> > linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt   2008-01-06
> > 16:11:20.0 +0100 @@ -883,4 +883,11 @@ C2 power state. 
> > +   libata.dma= [LIBATA] DMA control
> > +   libata.dma=0  Disable all PATA DMA like
> > old IDE
> > 
> > this doesn't seem entirely correct:
> > 
> > * IDE has "hdx=nodma" so you can disable DMA on per-device basis
> 
> I think that libata.dma=1 is designed to behave like 
> CONFIG_IDEDMA_ONLYDISK used to. "hdx=nodma" is more fine-grained than
> this.

Seems so but CONFIG_IDEDMA_ONLYDISK was removed on the same day
that "hdx=nodma" was introduced (Oct 16 2007)...

> > * is this really limited to PATA?
> 
> Alan's original patch took care of PATA. SATA support was added
> later by Jeff Garzik. Corrected documentation patch attached.
> 
> > +   libata.dma=1  Disk DMA only
> > +   libata.dma=2  ATAPI DMA only
> > +   libata.dma=3  CF DMA only 
> 
> This is also wrong, it should be "libata.dma=4  CF DMA only"
> Thanks to Zoltan Boszormenyi <[EMAIL PROTECTED]> for catching this
> mistake.
> 
> Revised patch attached.

Thanks, looks good to me.

Bart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-06 Thread FD Cami
On Sun, 6 Jan 2008 17:27:38 +0100
Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> wrote:

> On Sunday 06 January 2008, FD Cami wrote:
> > On Sun, 6 Jan 2008 13:36:09 +
> > Alan Cox <[EMAIL PROTECTED]> wrote:
> > 
> > > On Sun, 6 Jan 2008 08:03:31 +0300
> > > > > For now you can boot with libata.dma=1 to select DMA on disks
> > > > > but not CD
> > > > 
> > > > Great, but why isn't this in the documentation?
> > > 
> > > Send patches
> > 
> > patch attached.
> > 
> > Description : Add libata.dma= to Documentation/kernel-parameters.txt
> > 
> > Found documentation in :
> > http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg09849.html
> > http://www.redhat.com/archives/fedora-extras-commits/2007-October/msg04568.html
> > 
> > Signed-off-by: François Cami <[EMAIL PROTECTED]>
> 
> diff -rU2 linux-2.6.24-rc6/Documentation/kernel-parameters.txt 
> linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt
> ---
> linux-2.6.24-rc6/Documentation/kernel-parameters.txt2008-01-06
> 15:58:54.0 +0100 +++
> linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt   2008-01-06
> 16:11:20.0 +0100 @@ -883,4 +883,11 @@ C2 power state. 
> +   libata.dma= [LIBATA] DMA control
> +   libata.dma=0  Disable all PATA DMA like
> old IDE
> 
> this doesn't seem entirely correct:
> 
> * IDE has "hdx=nodma" so you can disable DMA on per-device basis

I think that libata.dma=1 is designed to behave like 
CONFIG_IDEDMA_ONLYDISK used to. "hdx=nodma" is more fine-grained than
this.

> * is this really limited to PATA?

Alan's original patch took care of PATA. SATA support was added
later by Jeff Garzik. Corrected documentation patch attached.

> +   libata.dma=1  Disk DMA only
> +   libata.dma=2  ATAPI DMA only
> +   libata.dma=3  CF DMA only 

This is also wrong, it should be "libata.dma=4  CF DMA only"
Thanks to Zoltan Boszormenyi <[EMAIL PROTECTED]> for catching this
mistake.

Revised patch attached.

Best,

François
diff -rU4 linux-2.6.24-rc6/Documentation/kernel-parameters.txt 
linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt
--- linux-2.6.24-rc6/Documentation/kernel-parameters.txt2008-01-06 
15:58:54.0 +0100
+++ linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt   2008-01-06 
18:46:49.0 +0100
@@ -881,8 +881,16 @@
 
lapic_timer_c2_ok   [X86-32,x86-64,APIC] trust the local apic timer 
in
C2 power state.
 
+   libata.dma= [LIBATA] DMA control
+   libata.dma=0  Disable all PATA and SATA DMA
+   libata.dma=1  PATA and SATA Disk DMA only
+   libata.dma=2  ATAPI (CDROM) DMA only
+   libata.dma=4  Compact Flash DMA only 
+   Combinations also work, so libata.dma=3 enables DMA
+   for disks and CDROMs, but not CFs.
+
libata.noacpi   [LIBATA] Disables use of ACPI in libata suspend/resume
when set.
Format: 
 


[PATCH] Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-06 Thread FD Cami
On Sun, 6 Jan 2008 13:36:09 +
Alan Cox <[EMAIL PROTECTED]> wrote:

> On Sun, 6 Jan 2008 08:03:31 +0300
> > > For now you can boot with libata.dma=1 to select DMA on disks but
> > > not CD
> > 
> > Great, but why isn't this in the documentation?
> 
> Send patches

patch attached.

Description : Add libata.dma= to Documentation/kernel-parameters.txt

Found documentation in :
http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg09849.html
http://www.redhat.com/archives/fedora-extras-commits/2007-October/msg04568.html

Signed-off-by: François Cami <[EMAIL PROTECTED]>
diff -rU2 linux-2.6.24-rc6/Documentation/kernel-parameters.txt 
linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt
--- linux-2.6.24-rc6/Documentation/kernel-parameters.txt2008-01-06 
15:58:54.0 +0100
+++ linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt   2008-01-06 
16:11:20.0 +0100
@@ -883,4 +883,11 @@
C2 power state.
 
+   libata.dma= [LIBATA] DMA control
+   libata.dma=0  Disable all PATA DMA like old IDE
+   libata.dma=1  Disk DMA only
+   libata.dma=2  ATAPI DMA only
+   libata.dma=3  CF DMA only 
+   libata.dma=0,1,3  Combinations also work.
+
libata.noacpi   [LIBATA] Disables use of ACPI in libata suspend/resume
when set.


Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-06 Thread Alan Cox
On Sun, 6 Jan 2008 08:03:31 +0300
> > For now you can boot with libata.dma=1 to select DMA on disks but not CD
> 
> Great, but why isn't this in the documentation?

Send patches
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-06 Thread Alan Cox
On Sun, 6 Jan 2008 08:03:31 +0300
  For now you can boot with libata.dma=1 to select DMA on disks but not CD
 
 Great, but why isn't this in the documentation?

Send patches
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-06 Thread FD Cami
On Sun, 6 Jan 2008 13:36:09 +
Alan Cox [EMAIL PROTECTED] wrote:

 On Sun, 6 Jan 2008 08:03:31 +0300
   For now you can boot with libata.dma=1 to select DMA on disks but
   not CD
  
  Great, but why isn't this in the documentation?
 
 Send patches

patch attached.

Description : Add libata.dma= to Documentation/kernel-parameters.txt

Found documentation in :
http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg09849.html
http://www.redhat.com/archives/fedora-extras-commits/2007-October/msg04568.html

Signed-off-by: François Cami [EMAIL PROTECTED]
diff -rU2 linux-2.6.24-rc6/Documentation/kernel-parameters.txt 
linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt
--- linux-2.6.24-rc6/Documentation/kernel-parameters.txt2008-01-06 
15:58:54.0 +0100
+++ linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt   2008-01-06 
16:11:20.0 +0100
@@ -883,4 +883,11 @@
C2 power state.
 
+   libata.dma= [LIBATA] DMA control
+   libata.dma=0  Disable all PATA DMA like old IDE
+   libata.dma=1  Disk DMA only
+   libata.dma=2  ATAPI DMA only
+   libata.dma=3  CF DMA only 
+   libata.dma=0,1,3  Combinations also work.
+
libata.noacpi   [LIBATA] Disables use of ACPI in libata suspend/resume
when set.


Re: [PATCH] Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-06 Thread FD Cami
On Sun, 6 Jan 2008 17:27:38 +0100
Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] wrote:

 On Sunday 06 January 2008, FD Cami wrote:
  On Sun, 6 Jan 2008 13:36:09 +
  Alan Cox [EMAIL PROTECTED] wrote:
  
   On Sun, 6 Jan 2008 08:03:31 +0300
 For now you can boot with libata.dma=1 to select DMA on disks
 but not CD

Great, but why isn't this in the documentation?
   
   Send patches
  
  patch attached.
  
  Description : Add libata.dma= to Documentation/kernel-parameters.txt
  
  Found documentation in :
  http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg09849.html
  http://www.redhat.com/archives/fedora-extras-commits/2007-October/msg04568.html
  
  Signed-off-by: François Cami [EMAIL PROTECTED]
 
 diff -rU2 linux-2.6.24-rc6/Documentation/kernel-parameters.txt 
 linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt
 ---
 linux-2.6.24-rc6/Documentation/kernel-parameters.txt2008-01-06
 15:58:54.0 +0100 +++
 linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt   2008-01-06
 16:11:20.0 +0100 @@ -883,4 +883,11 @@ C2 power state. 
 +   libata.dma= [LIBATA] DMA control
 +   libata.dma=0  Disable all PATA DMA like
 old IDE
 
 this doesn't seem entirely correct:
 
 * IDE has hdx=nodma so you can disable DMA on per-device basis

I think that libata.dma=1 is designed to behave like 
CONFIG_IDEDMA_ONLYDISK used to. hdx=nodma is more fine-grained than
this.

 * is this really limited to PATA?

Alan's original patch took care of PATA. SATA support was added
later by Jeff Garzik. Corrected documentation patch attached.

 +   libata.dma=1  Disk DMA only
 +   libata.dma=2  ATAPI DMA only
 +   libata.dma=3  CF DMA only 

This is also wrong, it should be libata.dma=4  CF DMA only
Thanks to Zoltan Boszormenyi [EMAIL PROTECTED] for catching this
mistake.

Revised patch attached.

Best,

François
diff -rU4 linux-2.6.24-rc6/Documentation/kernel-parameters.txt 
linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt
--- linux-2.6.24-rc6/Documentation/kernel-parameters.txt2008-01-06 
15:58:54.0 +0100
+++ linux-2.6.24-rc6-mine/Documentation/kernel-parameters.txt   2008-01-06 
18:46:49.0 +0100
@@ -881,8 +881,16 @@
 
lapic_timer_c2_ok   [X86-32,x86-64,APIC] trust the local apic timer 
in
C2 power state.
 
+   libata.dma= [LIBATA] DMA control
+   libata.dma=0  Disable all PATA and SATA DMA
+   libata.dma=1  PATA and SATA Disk DMA only
+   libata.dma=2  ATAPI (CDROM) DMA only
+   libata.dma=4  Compact Flash DMA only 
+   Combinations also work, so libata.dma=3 enables DMA
+   for disks and CDROMs, but not CFs.
+
libata.noacpi   [LIBATA] Disables use of ACPI in libata suspend/resume
when set.
Format: int
 


Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-05 Thread Al Boldi
Alan Cox wrote:
> Al Boldi <[EMAIL PROTECTED]> wrote:
> > What's hindering the ability to force a mode in libata, as is possible
> > with the normal ide-driver?
>
> We want it to be correct and race free. That means we have to synchronize
> all the devices on the controller, quiesce them and recompute the speeds
> for each device then turn them all back on and resume command processing.
>
> It is quite hairy although Tejun's EH work has provided the framework for
> all of this.
>
> For now you can boot with libata.dma=1 to select DMA on disks but not CD

Great, but why isn't this in the documentation?


Thanks!

--
Al

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-05 Thread Alan Cox
On Sat, 5 Jan 2008 16:41:03 +0300
Al Boldi <[EMAIL PROTECTED]> wrote:

> What's hindering the ability to force a mode in libata, as is possible with 
> the normal ide-driver?

We want it to be correct and race free. That means we have to synchronize
all the devices on the controller, quiesce them and recompute the speeds
for each device then turn them all back on and resume command processing.

It is quite hairy although Tejun's EH work has provided the framework for
all of this.

For now you can boot with libata.dma=1 to select DMA on disks but not CD
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-05 Thread Al Boldi
Alan Cox wrote:
> hdparm supports identify to read modes on drives with libata. The one
> thing you cannot do is force modes right now.

I have some AOpen 52x/32x CD-RWriter, that advertises itself as DMA capable, 
but has a hard time sustaining such access.  The only way to make access to 
this drive safe is by reducing it to PIO-3 even on XP,  which makes libata 
somewhat unusable on this drive, especially for writing.

What's hindering the ability to force a mode in libata, as is possible with 
the normal ide-driver?


Thanks!

--
Al

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-05 Thread Al Boldi
Alan Cox wrote:
 hdparm supports identify to read modes on drives with libata. The one
 thing you cannot do is force modes right now.

I have some AOpen 52x/32x CD-RWriter, that advertises itself as DMA capable, 
but has a hard time sustaining such access.  The only way to make access to 
this drive safe is by reducing it to PIO-3 even on XP,  which makes libata 
somewhat unusable on this drive, especially for writing.

What's hindering the ability to force a mode in libata, as is possible with 
the normal ide-driver?


Thanks!

--
Al

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Forcing modes in libata (was: SATA buffered read VERY slow)

2008-01-05 Thread Alan Cox
On Sat, 5 Jan 2008 16:41:03 +0300
Al Boldi [EMAIL PROTECTED] wrote:

 What's hindering the ability to force a mode in libata, as is possible with 
 the normal ide-driver?

We want it to be correct and race free. That means we have to synchronize
all the devices on the controller, quiesce them and recompute the speeds
for each device then turn them all back on and resume command processing.

It is quite hairy although Tejun's EH work has provided the framework for
all of this.

For now you can boot with libata.dma=1 to select DMA on disks but not CD
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/