[PATCH] libata: add support for READ/WRITE LONG

2007-03-12 Thread Mark Lord
The READ/WRITE LONG commands are theoretically obsolete, but the majority of drives in existance still implement them. The WRITE_LONG and WRITE_LONG_ONCE commands are of particular interest for fault injection testing -- eg. creating "media errors" at specific locations on a disk. The fussy bit

[PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
(resending, again. why does this take months of wasted efforts?) The READ/WRITE LONG commands are theoretically obsolete, but the majority of drives in existance still implement them. The WRITE_LONG and WRITE_LONG_ONCE commands are of particular interest for fault injection testing -- eg. creat

[PATCH] libata: add support for READ/WRITE LONG commands

2007-02-12 Thread Mark Lord
The READ/WRITE LONG commands are theoretically obsolete, but most (all?) drives to date still implement them. Of these, WRITE_LONG and WRITE_LONG_ONCE are of particular interest for fault injection testing -- eg. creating "media errors" at specific locations on a disk. The fussy bit is that thes

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-12 Thread Mark Lord
Mark Lord wrote: The READ/WRITE LONG commands are theoretically obsolete, but the majority of drives in existance still implement them. The WRITE_LONG and WRITE_LONG_ONCE commands are of particular interest for fault injection testing -- eg. creating "media errors" at specific locations on a dis

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-12 Thread Alan Cox
On Mon, 12 Mar 2007 15:08:19 -0400 Mark Lord <[EMAIL PROTECTED]> wrote: > The READ/WRITE LONG commands are theoretically obsolete, > but the majority of drives in existance still implement them. > > The WRITE_LONG and WRITE_LONG_ONCE commands are of particular > interest for fault injection testi

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-12 Thread Mark Lord
Alan Cox wrote: On Mon, 12 Mar 2007 15:08:19 -0400 Mark Lord <[EMAIL PROTECTED]> wrote: The READ/WRITE LONG commands are theoretically obsolete, but the majority of drives in existance still implement them. The WRITE_LONG and WRITE_LONG_ONCE commands are of particular interest for fault inject

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-12 Thread Alan Cox
On Mon, 12 Mar 2007 18:23:22 -0400 Mark Lord <[EMAIL PROTECTED]> wrote: > Alan Cox wrote: > > On Mon, 12 Mar 2007 15:08:19 -0400 > > Mark Lord <[EMAIL PROTECTED]> wrote: > > > >> The READ/WRITE LONG commands are theoretically obsolete, > >> but the majority of drives in existance still implement

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-12 Thread Mark Lord
Alan Cox wrote: Umm... someone reported originally getting problems with R/W LONG and PIIX but not AHCI and we discussed whether we might need to turn the prefetch/postwrite off for it. Would have been about October last year. Ah, well, yes, they would have problems unless my patch had been ap

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-12 Thread Tejun Heo
Mark Lord wrote: > The READ/WRITE LONG commands are theoretically obsolete, > but the majority of drives in existance still implement them. > > The WRITE_LONG and WRITE_LONG_ONCE commands are of particular > interest for fault injection testing -- eg. creating "media errors" > at specific location

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-13 Thread Ric Wheeler
Tejun Heo wrote: Mark Lord wrote: The READ/WRITE LONG commands are theoretically obsolete, but the majority of drives in existance still implement them. The WRITE_LONG and WRITE_LONG_ONCE commands are of particular interest for fault injection testing -- eg. creating "media errors" at spec

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Alan Cox
> The fussy bit is that these commands require a non-standard > sector size, usually 520 bytes instead of 512. Do we always know the worst case here as this breaks my pending patch to use bounce buffers for PIO so we transfer with IRQ enabled and I need to know the correct new worst case size. >

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Sergei Shtylyov
Hello. Mark Lord wrote: The READ/WRITE LONG commands are theoretically obsolete, but the majority of drives in existance still implement them. The WRITE_LONG and WRITE_LONG_ONCE commands are of particular interest for fault injection testing -- eg. creating "media errors" at specific locatio

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Alan Cox
> Which requires from the drivers to be able to turn off IDE prefetch (and > maybe posting too). I don't see that in this patch (or are you expecting > them > to just "snoop' the commands and do it automagically?). We need to see which drivers have that problem and if its only the odd one

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Alan Cox wrote: The fussy bit is that these commands require a non-standard sector size, usually 520 bytes instead of 512. Do we always know the worst case here as this breaks my pending patch to use bounce buffers for PIO so we transfer with IRQ enabled and I need to know the correct new worst

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Sergei Shtylyov
Hello. Alan Cox wrote: Which requires from the drivers to be able to turn off IDE prefetch (and maybe posting too). I don't see that in this patch (or are you expecting them to just "snoop' the commands and do it automagically?). We need to see which drivers have that problem and if its

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Alan Cox
> Ugh. The drives default to 520 bytes (always), > but can specify a different, preferred, length in > the IDENTIFY data. A SETFEATURES command is required > to change the setting from the default of 520. Thats fine so long as we know the "worst case" length - or I can make it fall back if the w

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Sergei Shtylyov wrote: The fussy bit is that these commands require a non-standard sector size, usually 520 bytes instead of 512. Which requires from the drivers to be able to turn off IDE prefetch (and maybe posting too). I don't see that in this patch (or are you expecting them to just

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Sergei Shtylyov
Mark Lord wrote: Alan Cox wrote: The fussy bit is that these commands require a non-standard sector size, usually 520 bytes instead of 512. Do we always know the worst case here as this breaks my pending patch to use bounce buffers for PIO so we transfer with IRQ enabled and I need to know t

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Sergei Shtylyov wrote: Mark Lord wrote: Ugh. The drives default to 520 bytes (always), The old IDE drives used to have 4 and 7 byte ECC (seen in ancient Phoenix BIOS). Yes -- 4-bytes means a 520-byte transfer when using 16-bit words. The ATA standard specifies a default of 520 bytes,

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Sergei Shtylyov
Hello. Mark Lord wrote: The fussy bit is that these commands require a non-standard sector size, usually 520 bytes instead of 512. Which requires from the drivers to be able to turn off IDE prefetch (and maybe posting too). I don't see that in this patch (or are you expecting them to ju

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Sergei Shtylyov wrote: Hello. Mark Lord wrote: .. Again, ata_data_xfer() doesn't seem capable of performing ECC read/writes -- the ECC bytes must be transferred in 8-bit mode, AFAIR. ata_data_xfer() can oinly do that for optionally trailing odd byte. I have no idea what that was all ab

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Sergei Shtylyov wrote: Hello. Mark Lord wrote: .. Again, ata_data_xfer() doesn't seem capable of performing ECC read/writes -- the ECC bytes must be transferred in 8-bit mode, AFAIR. ata_data_xfer() can oinly do that for optionally trailing odd byte. I have no idea what that was all abou

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Sergei Shtylyov
Hello. Mark Lord wrote: Again, ata_data_xfer() doesn't seem capable of performing ECC read/writes -- the ECC bytes must be transferred in 8-bit mode, AFAIR. ata_data_xfer() can oinly do that for optionally trailing odd byte. I have no idea what that was all about. Care to explain again

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Sergei Shtylyov wrote: .. Well, those ATA specs have always been quite messy: for example, polling protocol had an unnoticed race for years (device was allowed to clear BSY before asserting INTRQ, so there was no guarantee that the host's reading of the status reg. will actually clear drive

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Sergei Shtylyov
Hello. Mark Lord wrote: But if we really want to be 100% compliant, we could consider dropping to PIO0 for the command. Not worth it, though, as in practice this is not necessary, and it would mess up libata far more than is worthwhile for this effort. I think it only requires the *host*

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
I think it only requires the *host* to drop to PIO0 timings. In which case it should be achievable w/o libata modification -- if the driver has to "snoop" command and turn off prefetch, why not switch to PIO0 temporarily? Because (1) it is not actually necessary in practice, and (2) see point (

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Alan Cox
> I think it only requires the *host* to drop to PIO0 timings. In which > case it should be achievable w/o libata modification -- if the driver has to > "snoop" command and turn off prefetch, why not switch to PIO0 temporarily? This isn't a big issue. Eventually we have to support sending s

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Jeff Garzik
Alan Cox wrote: I think it only requires the *host* to drop to PIO0 timings. In which case it should be achievable w/o libata modification -- if the driver has to "snoop" command and turn off prefetch, why not switch to PIO0 temporarily? This isn't a big issue. Eventually we have to suppo

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Jeff Garzik wrote: Alan Cox wrote: I think it only requires the *host* to drop to PIO0 timings. In which case it should be achievable w/o libata modification -- if the driver has to "snoop" command and turn off prefetch, why not switch to PIO0 temporarily? This isn't a big issue. Eventu

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Jeff Garzik
Mark Lord wrote: Jeff Garzik wrote: Alan Cox wrote: I think it only requires the *host* to drop to PIO0 timings. In which case it should be achievable w/o libata modification -- if the driver has to "snoop" command and turn off prefetch, why not switch to PIO0 temporarily? This isn't a

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Bartlomiej Zolnierkiewicz
On Friday 16 March 2007, Mark Lord wrote: > Jeff Garzik wrote: > > Alan Cox wrote: > >>> I think it only requires the *host* to drop to PIO0 timings. In > >>> which case it should be achievable w/o libata modification -- if the > >>> driver has to "snoop" command and turn off prefetch, why

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Sergei Shtylyov
Hello. Mark Lord wrote: I've tested ATA1 and newer PATA drives, and various SATA drives with these commands without bothering to drop to PIO0, and none of them had issues. Of course -- that PIO0 warning was for the sake of "some ATA-1 drives". :-) Cheers MBR, Sergei - To unsubscribe fr

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Mark Lord
Bartlomiej Zolnierkiewicz wrote: On Friday 16 March 2007, Mark Lord wrote: .. I've tested ATA1 and newer PATA drives, and various SATA drives with these commands without bothering to drop to PIO0, and none of them had issues. This is what really matters wrt libata READ/WRITE LONG support. Th

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-03-16 Thread Bartlomiej Zolnierkiewicz
On Friday 16 March 2007, Mark Lord wrote: > Bartlomiej Zolnierkiewicz wrote: > > On Friday 16 March 2007, Mark Lord wrote: > .. > >> I've tested ATA1 and newer PATA drives, and various SATA drives > >> with these commands without bothering to drop to PIO0, > >> and none of them had issues. > > >

Re: [PATCH] libata: add support for READ/WRITE LONG

2007-04-03 Thread Jeff Garzik
Mark Lord wrote: Sergei Shtylyov wrote: The fussy bit is that these commands require a non-standard sector size, usually 520 bytes instead of 512. Which requires from the drivers to be able to turn off IDE prefetch (and maybe posting too). I don't see that in this patch (or are you expec