Re: SATA Shutdown issue confuses (sda)

2007-11-27 Thread Tejun Heo
[cc'ing Henrique.] Hello, Dark Sylinc wrote: > 1) Like Scott James Remnant, Ubuntu's Development > Manager > (http://www.mail-archive.com/linux-ide@vger.kernel.org/msg06595.html) > said, in Debian (actually he referred to Ubuntu, but > looking at the code they make the same thing) shutdown > iter

Re: [PATCH] [libata] sata_mv: fix compilation error when enabling DEBUG

2007-11-27 Thread Tejun Heo
Saeed Bishara wrote: > From: Saeed Bishara <[EMAIL PROTECTED]> > > use sstatus instead status. > > Signed-off-by: Saeed Bishara <[EMAIL PROTECTED]> Acked-by: Tejun Heo <[EMAIL PROTECTED]> -- tejun - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message t

Re: [PATCH] pata_pcmcia: Minor cleanups and support for dual channel cards

2007-11-27 Thread Tejun Heo
Alan Cox wrote: > setup and it821x fixes can go to mainstream for 2.6.25 I think - no bad > reports yet. > > BTW so we don't duplicate work right now I'm working on a full DMA engine > based driver for the INIC162x. Dunno if I'll ever get it to work as the > docs are a bit minimal but we shall see

Re: Possibly SATA related freeze killed networking and RAID

2007-11-27 Thread Tejun Heo
Pavel Machek wrote: > Hi! > >>> kernel: [734344.717844] irq 21: nobody cared (try booting with the >>> "irqpoll" option) >>> kernel: [734344.717866] >> Your machine decided to emit interrupt 21 without an apparent reason. >> Whatever caused that made the kernel shut down IRQ 21 at which point th

Re: [PATCH] pata_ali: Lots of problems still showing up with small ATAPI DMA

2007-11-27 Thread Tejun Heo
Alan Cox wrote: > Hopefully there is a better long term solution but for now lets favour > reliability. I'm getting a lot of reports on pata_ali w/ misc ATAPI commands too. Do you know whether it's a controller problem or drive one? All the reports I got are laptops and I can't really ask them t

Re: SATA PMP support in 2.6.24-rc3?

2007-11-27 Thread Tejun Heo
Gaston, Jason D wrote: > Does 2.6.24-rc3 support SATA port multipliers? > > I am getting "ata6.03: COMRESET failed (errno=-5)" error messages with a > SiliconImage PMP connected to an Intel ICH9 SATA controller in AHCI > mode. Yeah, it should work. > Dmesg output attached. Eeek.. Can you plea

Re: sata_sil issue on 2.6.22

2007-11-27 Thread Tejun Heo
Hello, Mark Paulus wrote: > sata_sil :02:0b.0: version 2.2 > ACPI: PCI Interrupt :02:0b.0[A] -> GSI 22 (level, low) -> IRQ 18 > scsi0 : sata_sil > scsi1 : sata_sil > ata1: SATA max UDMA/100 cmd 0xe0812080 ctl 0xe081208a bmdma 0xe0812000 > irq 18 > ata2: SATA max UDMA/100 cmd 0xe08120c0 ctl

Re: [PATCH 6/8] libata: adjust speed down rules

2007-11-27 Thread Mark Lord
Tejun Heo wrote: Mark Lord wrote: Hi Tejun, Tejun Heo wrote: Mark Lord wrote: .. -- deliberate (or otherwise) errors via SG_IO will cause inappropriate speed-downs. No, only device errors issued via block layer are considered for speed down (ATA_QCFLAG_IO). SG_IO commands will never trigge

Re: laptop reboots right after hibernation

2007-11-27 Thread Tejun Heo
Kjartan Maraas wrote: > I get this exact error message on a normal first time boot here. I'm > using the latest fedora development kernel which is 2.6.24-rc2-git6 > based. And I have the latest BIOS from HP IIRC. > > This is an HP nc6400 intel based laptop: Care to post boot dmesg? Or does hardd

Re: [PATCH 2/3] [libata] pata_of_platform: OF-Platform PATA device driver

2007-11-27 Thread Stephen Rothwell
On Tue, 27 Nov 2007 18:39:08 +0300 Anton Vorontsov <[EMAIL PROTECTED]> wrote: > > +static int __devinit pata_of_platform_probe(struct of_device *ofdev, > + const struct of_device_id *match) > +{ > + uint32_t *prop; Make this "const uint32_t *prop" or (mo

Re: spurious completions during NCQ on rt kernel

2007-11-27 Thread Tejun Heo
Hello, Mark Lord wrote: > Mmmm.. that's interesting. I suppose a big difference between -rt and > vanilla > is in latency between interrupt signal and the interrupt handler > actually running. > > I think in -rt it is slightly *longer*, since the handler is run by a > scheduled > thread instead

Re: [PATCH 13/13] libata: use PIO for misc ATAPI commands

2007-11-27 Thread Tejun Heo
Mark Lord wrote: > Tejun Heo wrote: >> Alan Cox wrote: > .. >> Because we can't use DMA uniformly, I went the other way and tried to >> use PIO uniformly. Another important point is that the other OS which >> is probably the only platform most ATAPI device vendors test against use >> PIO for these

Re: [PATCH 6/6] ide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled

2007-11-27 Thread Benjamin Herrenschmidt
On Wed, 2007-11-28 at 00:00 +0100, Bartlomiej Zolnierkiewicz wrote: > Move setting hwif->sg_max_nents from pmac_ide_setup_device() > to pmac_ide_setup_dma(). > > Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]> > Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Ack. > --- > drivers/i

Re: [PATCH 13/13] libata: use PIO for misc ATAPI commands

2007-11-27 Thread Mark Lord
Mark Lord wrote: Tejun Heo wrote: Alan Cox wrote: .. Because we can't use DMA uniformly, I went the other way and tried to use PIO uniformly. Another important point is that the other OS which is probably the only platform most ATAPI device vendors test against use PIO for these commands. -

Re: [PATCH 6/8] libata: adjust speed down rules

2007-11-27 Thread Tejun Heo
Mark Lord wrote: > Hi Tejun, > > Tejun Heo wrote: >> Mark Lord wrote: > .. >>> -- deliberate (or otherwise) errors via SG_IO will cause inappropriate >>> speed-downs. >> >> No, only device errors issued via block layer are considered for speed >> down (ATA_QCFLAG_IO). SG_IO commands will never tr

Re: [PATCH 6/8] libata: adjust speed down rules

2007-11-27 Thread Mark Lord
Hi Tejun, Tejun Heo wrote: Mark Lord wrote: .. -- deliberate (or otherwise) errors via SG_IO will cause inappropriate speed-downs. No, only device errors issued via block layer are considered for speed down (ATA_QCFLAG_IO). SG_IO commands will never trigger speed down unless the error is HS

Re: [PATCH 13/13] libata: use PIO for misc ATAPI commands

2007-11-27 Thread Mark Lord
Tejun Heo wrote: Alan Cox wrote: .. Because we can't use DMA uniformly, I went the other way and tried to use PIO uniformly. Another important point is that the other OS which is probably the only platform most ATAPI device vendors test against use PIO for these commands. - Control over the

Re: [PATCH 6/8] libata: adjust speed down rules

2007-11-27 Thread Tejun Heo
Hello, Mark. Mark Lord wrote: > Tejun Heo wrote: >> Speed down rules were too conservative. Adjust them a bit. >> >> * More than 10 timeouts can't happen in 5 minutes as command timeout >> is 30secs. Lower the limit for rule #1 to 6. >> >> * 10 timeouts is too high for rule #3 too. Lower it t

Re: [PATCH 13/13] libata: use PIO for misc ATAPI commands

2007-11-27 Thread Tejun Heo
Hello, Alan. Alan Cox wrote: > On Wed, 28 Nov 2007 00:13:59 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> ATAPI devices come with plethora of bugs and many ATA controllers have >> trouble dealing with odd byte DMA transfers. The problem is currently >> somewhat masked by not allowing DMA tra

[PATCH 6/6] ide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled

2007-11-27 Thread Bartlomiej Zolnierkiewicz
Move setting hwif->sg_max_nents from pmac_ide_setup_device() to pmac_ide_setup_dma(). Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- drivers/ide/ppc/pmac.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: b/driv

[PATCH 5/6] rapide: remove write-only hwif->hwif_data

2007-11-27 Thread Bartlomiej Zolnierkiewicz
Cc: Russell King <[EMAIL PROTECTED]> Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- drivers/ide/arm/rapide.c |2 -- 1 file changed, 2 deletions(-) Index: b/drivers/ide/arm/rapide.c === --- a/drivers/ide/arm/rap

[PATCH 4/6] ide: use ide_init_port_hw() in setup-pci.c

2007-11-27 Thread Bartlomiej Zolnierkiewicz
* Move setting hwif->gendev.parent from ide_pci_setup_ports() to ide_hwif_configure(). * Always set hwif->io_ports in ide_hwif_configure(). * Use ide_init_port_hw() in ide_hwif_configure(). Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- drivers/ide/setup-pci.c | 33 ++

[PATCH 3/6] ide: always use ide_std_init_ports() in setup-pci.c

2007-11-27 Thread Bartlomiej Zolnierkiewicz
* ide_init_hwif_ports() call in setup-pci.c::ide_hwif_configure() doesn't depend on the default cotrol register offset, default IRQ or ppc_ide_md.ide_init_hwif implementations so ide_std_init_ports() can always be used. * Since 'base' is always non-zero and thus hwif->io_ports[IDE_DATA_OFFS

[PATCH 2/6] au1xxx-ide: use ide_init_port_hw()

2007-11-27 Thread Bartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- drivers/ide/mips/au1xxx-ide.c |8 1 file changed, 4 insertions(+), 4 deletions(-) Index: b/drivers/ide/mips/au1xxx-ide.c === --- a/drivers/ide/mips/au1xxx

[PATCH 1/6] au1xxx-ide: au_ide_probe() fixes

2007-11-27 Thread Bartlomiej Zolnierkiewicz
* hwif->hold is always set in au_ide_probe() (few lines earlier), no need to set it again * hwif->{channel,select_data,config_data} should be always zero * autotune PIO also if CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_BDMA is not defined Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> ---

Re: [PATCH 6/8] libata: adjust speed down rules

2007-11-27 Thread Mark Lord
Tejun Heo wrote: Speed down rules were too conservative. Adjust them a bit. * More than 10 timeouts can't happen in 5 minutes as command timeout is 30secs. Lower the limit for rule #1 to 6. * 10 timeouts is too high for rule #3 too. Lower it to 6. * SATAPI can benefit from falling back to

Re: [PATCH 1/3] [libata] pata_platform: make probe and remove functions device type neutral

2007-11-27 Thread Arnd Bergmann
On Tuesday 27 November 2007, Anton Vorontsov wrote: > Split pata_platform_{probe,remove} into two pieces: > 1. pata_platform_{probe,remove} -- platform_device-dependant bits; > 2. __ptata_platform_{probe,remove} -- device type neutral bits. > > This is done to not duplicate code for the OF-platfor

Re: [PATCH 2/3] [libata] pata_of_platform: OF-Platform PATA device driver

2007-11-27 Thread Arnd Bergmann
On Tuesday 27 November 2007, Olof Johansson wrote: > On Tue, Nov 27, 2007 at 06:39:08PM +0300, Anton Vorontsov wrote: > > This driver nicely wraps around pata_platform library functions, > > and provides OF platform bus bindings to the PATA devices. > > > +static struct of_device_id pata_of_platfo

Re: [PATCH 2/3] [libata] pata_of_platform: OF-Platform PATA device driver

2007-11-27 Thread Olof Johansson
On Tue, Nov 27, 2007 at 06:39:08PM +0300, Anton Vorontsov wrote: > This driver nicely wraps around pata_platform library functions, > and provides OF platform bus bindings to the PATA devices. > +static struct of_device_id pata_of_platform_match[] = { > + { .compatible = "pata-platform", }, >

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Kumar Gala
On Nov 27, 2007, at 9:49 AM, Sergei Shtylyov wrote: Hello. Anton Vorontsov wrote: This patch adds localbus and pata nodes to use CF IDE interface on MPC8349E-mITX boards. Patch also adds code to probe localbus. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dt

Re: [PATCH 2/2] ide-scsi: use print_hex_dump from

2007-11-27 Thread Bartlomiej Zolnierkiewicz
On Tuesday 27 November 2007, Bartlomiej Zolnierkiewicz wrote: > On Tuesday 27 November 2007, Andrew Morton wrote: > > On Mon, 26 Nov 2007 15:16:13 +0800 Denis Cheng <[EMAIL PROTECTED]> wrote: > > > > > these utilities implemented in lib/hexdump.c are more handy, please use > > > this. > > > > >

[git patches] IDE fixes

2007-11-27 Thread Bartlomiej Zolnierkiewicz
Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/ to receive the following updates: arch/cris/arch-v10/drivers/Kconfig | 39 - arch/cris/arch-v32/drivers/Kconfig | 12 - drivers/ide/Kconfig| 47

Re: [PATCH 2/2] ide-scsi: use print_hex_dump from

2007-11-27 Thread Bartlomiej Zolnierkiewicz
On Tuesday 27 November 2007, Andrew Morton wrote: > On Mon, 26 Nov 2007 15:16:13 +0800 Denis Cheng <[EMAIL PROTECTED]> wrote: > > > these utilities implemented in lib/hexdump.c are more handy, please use > > this. > > > > ... > > > > --- a/drivers/scsi/ide-scsi.c > > +++ b/drivers/scsi/ide-scsi.

SATA Shutdown issue confuses (sda)

2007-11-27 Thread Dark Sylinc
Hi, I have compiled my own 2.6.23 kernel for a friend, and worried to find out that his SATA disk reports the shutdown warning: http://linux-ata.org/shutdown.html I've digged into Debian's sysvinit 2.86.1 src and I got confused: 1) Like Scott James Remnant, Ubuntu's Development Manager (http://ww

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Anton Vorontsov
On Tue, Nov 27, 2007 at 09:07:14PM +0300, Sergei Shtylyov wrote: > Anton Vorontsov wrote: > > >2. "ioport" because shift^Wstride ;-) applies only to the io range > >(yes, it's obvious, but worth open-wording, no?). > > Contrarywise, to memory range. > > >>>By io range I meant "I/O b

Re: [PATCH 2/2] ide-scsi: use print_hex_dump from

2007-11-27 Thread Joe Perches
On Tue, 2007-11-27 at 01:31 -0800, Andrew Morton wrote: > Either way, perhaps a simple little front-end to print_hex_dump() is called > for. Perhaps an even simpler generic version of what's now used in crypto/tcrypt.c: void print_cont_hex_dump_bytes(const void *buf, size_t len) { print_h

Re: [PATCH 2/21] ide: merge ->fixup and ->quirkproc methods

2007-11-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: * Assign drive->quirk_list in ->quirkproc implementations: - hpt366.c::hpt3xx_quirkproc() - pdc202xx_new.c::pdcnew_quirkproc() - pdc202xx_old.c::pdc202xx_quirkproc() * Make ->quirkproc void. * Move calling ->quirkproc from do_identify() to probe_hwif(

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Sergei Shtylyov
Anton Vorontsov wrote: 2. "ioport" because shift^Wstride ;-) applies only to the io range (yes, it's obvious, but worth open-wording, no?). Contrarywise, to memory range. By io range I meant "I/O base", in contrast to "CTL base". There is no need to apply shifting for CTL. That's why io

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Anton Vorontsov
On Tue, Nov 27, 2007 at 08:34:11PM +0300, Sergei Shtylyov wrote: > Anton Vorontsov wrote: > > >>>2. "ioport" because shift^Wstride ;-) applies only to the io range > >>> (yes, it's obvious, but worth open-wording, no?). > > >> Contrarywise, to memory range. > > >By io range I meant "I/O base",

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Sergei Shtylyov
Anton Vorontsov wrote: 2. "ioport" because shift^Wstride ;-) applies only to the io range (yes, it's obvious, but worth open-wording, no?). Contrarywise, to memory range. By io range I meant "I/O base", in contrast to "CTL base". There is no need to apply shifting for CTL. That's why

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Anton Vorontsov
[ Had cut too much in the previous reply ] On Tue, Nov 27, 2007 at 07:46:13PM +0300, Sergei Shtylyov wrote: [...] > >2. "ioport" because shift^Wstride ;-) applies only to the io range > > (yes, it's obvious, but worth open-wording, no?). > >Contrarywise, to memory range. By io range I mean

Re: [PATCH 10/13] libata: add qc->dma_nbytes

2007-11-27 Thread Alan Cox
On Wed, 28 Nov 2007 00:13:56 +0900 Tejun Heo <[EMAIL PROTECTED]> wrote: > qc->nbytes doesn't include extra buffers setup by libata core layer > and my be odd. This patch adds qc->dma_nbytes which includes any > extra buffers setup by libata core layer and is guaranteed to be Seems sensible. Migh

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Sergei Shtylyov
Anton Vorontsov wrote: All I want is that "ioport-*" be renamed. I give up. Don't. :-) The final name is..? I can think out wrong one, so you'd better convoy me on that way. ;-) reg-shift sounds okay? Yes. Thanks, WBR, Sergei - To unsubscribe from this list: send the line "u

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Anton Vorontsov
On Tue, Nov 27, 2007 at 07:46:13PM +0300, Sergei Shtylyov wrote: [...] > >>>+ ioport-shift = <1>; > > >> Bleh... that shift again. And this is surely not a good name for a > >>property (where's I/O ports in your case?) -- why not call it "reg-shift" > >>(well, I'd call it "reg-

Re: [PATCH 13/13] libata: use PIO for misc ATAPI commands

2007-11-27 Thread Alan Cox
On Wed, 28 Nov 2007 00:13:59 +0900 Tejun Heo <[EMAIL PROTECTED]> wrote: > ATAPI devices come with plethora of bugs and many ATA controllers have > trouble dealing with odd byte DMA transfers. The problem is currently > somewhat masked by not allowing DMA transfers if the transfer size > isn't ali

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Sergei Shtylyov
Anton Vorontsov wrote: This patch adds localbus and pata nodes to use CF IDE interface on MPC8349E-mITX boards. Patch also adds code to probe localbus. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8349emitx.dts| 17 - arch/powerpc/pla

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Anton Vorontsov
On Tue, Nov 27, 2007 at 06:49:13PM +0300, Sergei Shtylyov wrote: > Hello. Hi Sergei, > Anton Vorontsov wrote: > > >This patch adds localbus and pata nodes to use CF IDE interface > >on MPC8349E-mITX boards. > > >Patch also adds code to probe localbus. > > >Signed-off-by: Anton Vorontsov <[EMAI

[PATCH] [libata] sata_mv: fix compilation error when enabling DEBUG

2007-11-27 Thread Saeed Bishara
From: Saeed Bishara <[EMAIL PROTECTED]> use sstatus instead status. Signed-off-by: Saeed Bishara <[EMAIL PROTECTED]> --- drivers/ata/sata_mv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index a43f64d..97c3e11 100644 ---

Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Sergei Shtylyov
Hello. Anton Vorontsov wrote: This patch adds localbus and pata nodes to use CF IDE interface on MPC8349E-mITX boards. Patch also adds code to probe localbus. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8349emitx.dts| 17 - arch/p

[PATCH] [libata] sata_mv: fix compilation error when enabling DEBUG

2007-11-27 Thread Saeed Bishara
From: Saeed Bishara <[EMAIL PROTECTED]> use sstatus instead status. Signed-off-by: Saeed Bishara <[EMAIL PROTECTED]> --- drivers/ata/sata_mv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index a43f64d..97c3e11 100644 ---

[PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

2007-11-27 Thread Anton Vorontsov
This patch adds localbus and pata nodes to use CF IDE interface on MPC8349E-mITX boards. Patch also adds code to probe localbus. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8349emitx.dts| 17 - arch/powerpc/platforms/83xx/mpc834x_itx.c |

[PATCH 1/3] [libata] pata_platform: make probe and remove functions device type neutral

2007-11-27 Thread Anton Vorontsov
Split pata_platform_{probe,remove} into two pieces: 1. pata_platform_{probe,remove} -- platform_device-dependant bits; 2. __ptata_platform_{probe,remove} -- device type neutral bits. This is done to not duplicate code for the OF-platform driver. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>

[PATCH 2/3] [libata] pata_of_platform: OF-Platform PATA device driver

2007-11-27 Thread Anton Vorontsov
This driver nicely wraps around pata_platform library functions, and provides OF platform bus bindings to the PATA devices. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- drivers/ata/Kconfig| 10 + drivers/ata/Makefile |1 + drivers/ata/pata_of_platform.c |

[PATCH 0/3] OF-platform PATA driver

2007-11-27 Thread Anton Vorontsov
Hi all, Here is the second spin of the OF-platform PATA driver and related patches. Changes since RFC: - nuked drivers/ata/pata_platform.h; - powerpc bits: proper localbus node added. Thanks for the previous review! This time I'm collecting acks, don't be shy to give 'em generously. ;-) Good

program to test various ATAPI transfer lengths (and brasero bugs)

2007-11-27 Thread Tejun Heo
Hello, all. Here's the program I used to test various ATAPI transfer lengths based on the sample code Daniel Drake posted a while ago. The code Daniel Drake posted was taken from brasero and had the following bug. Byte 7 is high byte of alloc size not low and the whole CDB should be ten bytes lo

[PATCH 12/13] libata: implement ATAPI per-command-type DMA horkages

2007-11-27 Thread Tejun Heo
ATAPI DMA is filled with mines. Sector aligned READ transfers usually work but many other commands transfer non-sector aligned or variable number of bytes, and there are devices and controllers which have problems dealing with such non-aligned DMA transactions. This patch implement ATAPI per-comm

[PATCH 09/13] libata: convert to chained sg

2007-11-27 Thread Tejun Heo
libata used private sg iterator to handle padding sg. Now that sg can be chained, padding can be handled using standard sg ops. Convert to chained sg. * s/qc->__sg/qc->sg/ * s/qc->pad_sgent/qc->extra_sg[]/. Because chaining consumes one sg entry. There need to be two extra sg entries. The

[PATCH 13/13] libata: use PIO for misc ATAPI commands

2007-11-27 Thread Tejun Heo
ATAPI devices come with plethora of bugs and many ATA controllers have trouble dealing with odd byte DMA transfers. The problem is currently somewhat masked by not allowing DMA transfers if the transfer size isn't aligned to 16 bytes plus partial masking in problematic LLDs. This masking is taken

[PATCH 07/13] libata: kill non-sg DMA interface

2007-11-27 Thread Tejun Heo
With atapi_request_sense() converted to use sg, there's no user of non-sg interface. Kill non-sg interface. * ATA_QCFLAG_SINGLE and ATA_QCFLAG_SG are removed. ATA_QCFLAG_DMAMAP is used instead. (this way no LLD change is necessary) * qc->buf_virt is removed. * ata_sg_init_one() and ata_sg_s

[PATCH 11/13] libata: implement ATAPI drain buffer

2007-11-27 Thread Tejun Heo
Misc ATAPI commands may try to transfer more bytes than requested. For PIO which is performed by libata HSM, this is worked around by draining extra bytes from __atapi_pio_bytes(). This patch implements drain buffer to perform draining for DMA and PIO-over-DMA cases. One page is allocated w/ GFP_

[PATCH 05/13] libata: improve ATAPI draining

2007-11-27 Thread Tejun Heo
For misc ATAPI commands which transfer variable length data to the host, overflow can occur due to application or hardware bug. Such overflows can be ignored safely as long as overflow data is properly drained. libata HSM implementation has this implemented in __atapi_pio_bytes() but it isn't eno

[PATCH 06/13] libata: make atapi_request_sense() use sg

2007-11-27 Thread Tejun Heo
atapi_request_sense() is now the only left user of ata_sg_init_one(). Convert it to use sg interface. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Rusty Russel <[EMAIL PROTECTED]> --- drivers/ata/libata-scsi.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers

[PATCH 08/13] libata: change ATA_QCFLAG_DMAMAP semantics

2007-11-27 Thread Tejun Heo
ATA_QCFLAG_DMAMAP was a bit peculiar in that it got set during qc initialization and cleared if DMA mapping wasn't necessary. Make it more straight forward by making the following changes. * Don't set it during initialization. Set it after DMA is actually mapped. * Add BUG_ON() to guarantee t

[PATCH 10/13] libata: add qc->dma_nbytes

2007-11-27 Thread Tejun Heo
qc->nbytes doesn't include extra buffers setup by libata core layer and my be odd. This patch adds qc->dma_nbytes which includes any extra buffers setup by libata core layer and is guaranteed to be aligned on 4 byte boundary. This value is to be used to program the host controller. As this repre

[PATCH 02/13] cdrom: add more GPCMD_* constants

2007-11-27 Thread Tejun Heo
Add GPCMD_* constants for READ_BUFFER, WRITE_12 and WRITE_BUFFER for completeness. These will be used by libata. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Jens Axboe <[EMAIL PROTECTED]> --- include/linux/cdrom.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/in

[PATCH 04/13] libata: add ATAPI_* cmd types and implement atapi_cmd_type()

2007-11-27 Thread Tejun Heo
Add ATAPI command types - ATAPI_READ, WRITE, RW_BUF, READ_CD and MISC, and implement atapi_cmd_type() which takes SCSI opcode and returns to which class the opcode belongs. This will be used later to improve ATAPI handling. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- include/linux/libata.h

[PATCHSET] libata: improve ATAPI data transfer handling

2007-11-27 Thread Tejun Heo
Hello guys, This patchset improves ATAPI PIO/DMA data transfer handling and contains the following thirteen patches. 0001-libata-update-atapi_eh_request_sense-such-that-lb.patch 0002-cdrom-add-more-GPCMD_-constants.patch 0003-libata-rename-ATA_PROT_ATAPI_-to-ATAPI_PROT_.patch 0004-libata-add

[PATCH 03/13] libata: rename ATA_PROT_ATAPI_* to ATAPI_PROT_*

2007-11-27 Thread Tejun Heo
ATA_PROT_ATAPI_* are ugly and naming schemes between ATA_PROT_* and ATA_PROT_ATAPI_* are inconsistent causing confusion. Rename them to ATAPI_PROT_* and make them consistent with ATA counterpart. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 24

[PATCH 01/13] libata: update atapi_eh_request_sense() such that lbam/lbah contains buffer size

2007-11-27 Thread Tejun Heo
While updating lbam/h for ATAPI commands, atapi_eh_request_sense() was left out. Update it. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-eh.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index

Re: [PATCH 04/12] libata: kill ata_id_to_dma_mode()

2007-11-27 Thread Tejun Heo
Alan Cox wrote: > On Tue, 27 Nov 2007 19:43:41 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> ata_id_to_dma_mode() isn't quite generic. The function is basically >> privately implemented ata_id_xfermask() combined with hardcoded mode >> printing and configuration which are specific to ata_gene

Re: [PATCH 16/21] ide: add ide_init_port_hw() helper

2007-11-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: * Add ide_init_port_hw() helper. * rapide.c: convert rapide_locate_hwif() to rapide_setup_ports() and use ide_init_port_hw(). * ide_platform.c: convert plat_ide_locate_hwif() to plat_ide_setup_ports() and use ide_init_port_hw(). * sgiioc4.c: use ide_

RE: [PATCH 7/21] ide-cris: don't override ide_register_hw() result

2007-11-27 Thread Mikael Starvik
Acked-by: Mikael Starvik <[EMAIL PROTECTED]> -Original Message- From: Sergei Shtylyov [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 27, 2007 1:58 PM To: Bartlomiej Zolnierkiewicz Cc: linux-ide@vger.kernel.org; Mikael Starvik Subject: Re: [PATCH 7/21] ide-cris: don't override ide_regis

Re: [PATCH 19/21] cmd640: fix dependency on IDE_GENERIC

2007-11-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: Make BLK_DEV_CMD640 select IDE_GENERIC. Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]> MBR, Sergei - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message t

Re: [PATCH 7/21] ide-cris: don't override ide_register_hw() result

2007-11-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: * Don't override ide_register_hw() result and check if there is a hwif available to use. * MAX_HWIFS is user configurable nowadays so replace it by hard-coded value. * Remove the comment about ide_hwifs[]. Cc: Mikael Starvik <[EMAIL PROTECTED]> Signed-

Re: [PATCH 15/21] sgiioc4: always init hwif->io_ports

2007-11-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: 'if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base)' is always true. Cc: Jeremy Higdon <[EMAIL PROTECTED]> Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]> MBR, Sergei - To unsubscribe from this list:

Re: [PATCH 13/21] ide: add hwif->chipset fixup to ide_device_add()

2007-11-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: Add hwif->chipset fixup identical to the one in ideprobe_init() to ide_device_add(). Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]> MBR, Sergei - To unsubscribe from this list: send the line "unsub

Re: [PATCH 11/21] rapide: set hwif->chipset

2007-11-27 Thread Sergei Shtylyov
Bartlomiej Zolnierkiewicz wrote: hwif->chipset should be set if the hwif is claimed by host driver. Cc: Russell King <[EMAIL PROTECTED]> Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]> MBR, Sergei - To unsubscribe from this list: s

Re: [PATCH 04/12] libata: kill ata_id_to_dma_mode()

2007-11-27 Thread Alan Cox
On Tue, 27 Nov 2007 19:43:41 +0900 Tejun Heo <[EMAIL PROTECTED]> wrote: > ata_id_to_dma_mode() isn't quite generic. The function is basically > privately implemented ata_id_xfermask() combined with hardcoded mode > printing and configuration which are specific to ata_generic. > > Kill the functi

Re: [PATCH 12/12] pata_amd: update mode selection for NV PATAs

2007-11-27 Thread Alan Cox
On Tue, 27 Nov 2007 19:43:49 +0900 Tejun Heo <[EMAIL PROTECTED]> wrote: > Cable detection on NV PATA hosts isn't implemented and the CBLID- > cable isn't wired according to the sepc either, so both host-side and > generic drive-side cable detections are broken. Till now, > nv_cable_detect() relie

[PATCH 03/12] libata: clean up xfermode / PATA timing related stuff

2007-11-27 Thread Tejun Heo
* s/ATA_BITS_(PIO|MWDMA|UDMA)/ATA_NR_\1_MODES/g * Consistently use 0xff to indicate invalid transfer mode (0x00 is valid for PIO_SLOW). * Make ata_xfer_mode2mask() return proper mode mask instead of just the highest bit. * Sort ata_timing table in increasing xfermode order and update ata_t

[PATCH 11/12] libata: add ATA_CBL_PATA_IGN

2007-11-27 Thread Tejun Heo
ATA_CBL_PATA_UNK indicates that the cable type can't be determined from the host side and might be either 80c or 40c. libata applies drive or other generic limit in this case. However, there are controllers where both host and drive side detections are misimplemented and the driver has to rely so

[PATCH 12/12] pata_amd: update mode selection for NV PATAs

2007-11-27 Thread Tejun Heo
Cable detection on NV PATA hosts isn't implemented and the CBLID- cable isn't wired according to the sepc either, so both host-side and generic drive-side cable detections are broken. Till now, nv_cable_detect() relied on peeking BIOS and ACPI configurations to upgrade to 80C but this often result

[PATCH 10/12] libata: reimplement ata_acpi_cbl_80wire() using ata_acpi_gtm_xfermask()

2007-11-27 Thread Tejun Heo
Reimplement ata_acpi_cbl_80wire() using ata_acpi_gtm_xfermask() and while at it relocate the function below ata_acpi_gtm_xfermask(). New ata_acpi_cbl_80wire() implementation takes @gtm, in both pata_via and pata_amd, use the initial GTM value. Both are trying to peek initial BIOS configuration, s

[PATCH 09/12] libata: implement ata_acpi_init_gtm()

2007-11-27 Thread Tejun Heo
Add dev->__acpi_init_gtm and store initial GTM values on host initialization. If the field is valid, ata_acpi_init_gtm() returns pointer to the saved GTM structure; otherwise, NULL. This is to remember BIOS/firmware programmed initial timing for later use before reset and mode configuration modif

[PATCH 07/12] libata: fix ata_acpi_gtm_xfermask()

2007-11-27 Thread Tejun Heo
ata_acpi_gtm_xfermask() as separated out from pacpi_discover_modes() has various bugs. Fix them. * The wrong comparison operator is used when finding for matching cycle resulting totally bogus result. * With the comparion operator fixed, boundary condtion handling is clumsy. * Setting of an

[PATCH 08/12] libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi

2007-11-27 Thread Tejun Heo
libata-acpi is using separate timing tables for transfer modes although libata-core has the complete ata_timing table. Implement ata_timing_cycle2mode() to look for matching mode given transfer type and cycle duration and use it in libata-acpi and pata_acpi to replace private timing tables. Signe

[PATCH 04/12] libata: kill ata_id_to_dma_mode()

2007-11-27 Thread Tejun Heo
ata_id_to_dma_mode() isn't quite generic. The function is basically privately implemented ata_id_xfermask() combined with hardcoded mode printing and configuration which are specific to ata_generic. Kill the function and open code it in generic_set_mode() using generic xfermode handling functions

[PATCH 06/12] libata: separate out ata_acpi_gtm_xfermask() from pacpi_discover_modes()

2007-11-27 Thread Tejun Heo
Finding out matching transfer mode from ACPI GTM values is useful for other purposes too. Separate out the function and timing tables from pata_acpi::pacpi_discover_modes(). Other than checking shared-configuration bit after doing ata_acpi_gtm() in pacpi_discover_modes() which should be safe, thi

[PATCHSET] libata: improve timing code and fix pata_amd transfer mode selection, take #2

2007-11-27 Thread Tejun Heo
Hello, This is the second take of improve-timing-code-and-fix-pata_amd patchset. Changes from the last take [L] are... * 0005-libata-xfer_mask-is-unsigned-int-not-unsigned-long.patch is reversed such that xfer_mask is consistently unsigned long. This patchset is against #upstream (51a7ee

[PATCH 05/12] libata: xfer_mask is unsigned long not unsigned int

2007-11-27 Thread Tejun Heo
Jeff says xfer_mask is unsigned long not unsigned int. Convert all xfermask fields and handling functions to deal with unsigned longs. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 29 ++- include/linux/libata.h| 46 +

[PATCH 02/12] libata: export xfermode / PATA timing related functions

2007-11-27 Thread Tejun Heo
Export the following xfermode related functions. * ata_pack_xfermask() * ata_unpack_xfermask() * ata_xfer_mask2mode() * ata_xfer_mode2mask() * ata_xfer_mode2shift() * ata_mode_string() * ata_id_xfermask() * ata_timing_find_mode() These functions will be used later by LLD updates. While at it, ch

[PATCH 01/12] ata_generic: unindent loop in generic_set_mode()

2007-11-27 Thread Tejun Heo
Unindent loop body in generic_set_mode(). This is to ease future change. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/ata_generic.c | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata

[PATCH 7/8] libata: implement ATA_DFLAG_DUBIOUS_XFER

2007-11-27 Thread Tejun Heo
ATA_DFLAG_DUBIOUS_XFER is set whenever data transfer speed or method changes and gets cleared when data transfer command succeeds in the newly configured transfer mode. This will be used to improve speed down logic. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]< --- drivers/ata/libata-core.c | 1

[PATCH 6/8] libata: adjust speed down rules

2007-11-27 Thread Tejun Heo
Speed down rules were too conservative. Adjust them a bit. * More than 10 timeouts can't happen in 5 minutes as command timeout is 30secs. Lower the limit for rule #1 to 6. * 10 timeouts is too high for rule #3 too. Lower it to 6. * SATAPI can benefit from falling back to PIO too. Allow SA

[PATCH 8/8] libata: implement fast speed down for unverified data transfer mode

2007-11-27 Thread Tejun Heo
It's very likely that the configured data transfer mode is the wrong one if device fails data transfers right after initial data transfer mode configuration (including NCQ on/off and xfermode). libata EH needs to speed down fast before upper layers give up on probing. This patch implement fast sp

[PATCH 4/8] libata: move ata_set_mode() to libata-eh.c

2007-11-27 Thread Tejun Heo
Move ata_set_mode() to libata-eh.c. ata_set_mode() is surely an EH action and will be more tightly coupled with the rest of error handling. Move it to libata-eh.c. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 25 - drivers/ata/libata-eh.

[PATCH 5/8] libata: clean up EH speed down implementation

2007-11-27 Thread Tejun Heo
Clean up EH speed down implementation. * is_io boolean variable is replaced eflags. is_io is ATA_EFLAG_IS_IO. * Error categories now have names. * Better comments. * Reorder 5min and 10min rules in ata_eh_speed_down_verdict() * Use local variable @link to cache @dev->link in ata_eh_speed_down

[PATCH 1/8] libata: rearrange ATA_DFLAG_*

2007-11-27 Thread Tejun Heo
Area for DFLAGs which are cleared on INIT is full. Extend it by 8 bits. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- include/linux/libata.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/libata.h b/include/linux/libata.h index ef52a07..9cd06dd 100

[PATCH 2/8] libata: implement protocol tests

2007-11-27 Thread Tejun Heo
Implement protocol tests - ata_is_atapi(), ata_is_nodata(), ata_is_pio(), ata_is_dma(), ata_is_ncq() and ata_is_data() and use them to replace is_atapi_taskfile() and hard coded protocol tests. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/ahci.c|2 +- drivers/ata/l

[PATCH 3/8] libata: factor out ata_eh_schedule_probe()

2007-11-27 Thread Tejun Heo
Factor out ata_eh_schedule_probe() from ata_eh_handle_dev_fail() and ata_eh_recover(). This is to improve maintainability and make future changes easier. In the previous revision, ata_dev_enabled() test was accidentally dropped while factoring out. This problem was spotted by Bartlomiej. Signed

  1   2   >