Re: libata passthru: support PIO multi commands

2007-06-13 Thread Jeff Garzik
Sergei Shtylyov wrote: This is generally a bad practice to guess protocol based on opcode. What if the code will have to handle a vendor unique command (or some other command not yet known to it but known to issuer)? Agreed -- we simply cannot rely on guessing protocol from opcode, we MUST

Re: libata passthru: support PIO multi commands

2007-06-13 Thread Sergei Shtylyov
Albert Lee wrote: Alan Cox wrote: ata_scsi_pass_thru() is not executed at ioctl submission time (block queue submission time), but rather immediately before it is issued to the drive. At that point you know the bus is idle, all other commands have finished executing, and dev->multi_count is

Re: libata passthru: support PIO multi commands

2007-06-13 Thread Mark Lord
Albert Lee wrote: .. It looks like the ATA passthru commands contain more information than what libata needs to execute a command. e.g. protocol number: libata could possibly infer the protocol from the command opcode. e.g. multi_count: libata caches dev->multi_count. Passing multi_co

Re: libata passthru: support PIO multi commands

2007-06-12 Thread Albert Lee
Alan Cox wrote: >>ata_scsi_pass_thru() is not executed at ioctl submission time (block >>queue submission time), but rather immediately before it is issued to >>the drive. At that point you know the bus is idle, all other commands >>have finished executing, and dev->multi_count is fresh not sta

Re: libata passthru: support PIO multi commands

2007-06-12 Thread Alan Cox
> ata_scsi_pass_thru() is not executed at ioctl submission time (block > queue submission time), but rather immediately before it is issued to > the drive. At that point you know the bus is idle, all other commands > have finished executing, and dev->multi_count is fresh not stale. The > code

Re: libata passthru: support PIO multi commands

2007-06-12 Thread Jeff Garzik
Alan Cox wrote: + if (multi_count != dev->multi_count) + ata_dev_printk(dev, KERN_WARNING, + "invalid multi_count %u ignored\n", + multi_count); + } What limits log spamming here ?

Re: libata passthru: support PIO multi commands

2007-06-12 Thread Alan Cox
> >> + if (multi_count != dev->multi_count) > >> + ata_dev_printk(dev, KERN_WARNING, > >> + "invalid multi_count %u ignored\n", > >> + multi_count); > >> + } > > > > What limits log spamming here ? > > Inte

Re: libata passthru: support PIO multi commands

2007-06-11 Thread Jeff Garzik
Alan Cox wrote: + if (is_multi_taskfile(tf)) { + unsigned int multi_count = 1 << (cdb[1] >> 5); + + /* compare the passed through multi_count +* with the cached multi_count of libata +*/ + if (multi_count != dev->mult

Re: libata passthru: support PIO multi commands

2007-06-11 Thread Alan Cox
> + if (is_multi_taskfile(tf)) { > + unsigned int multi_count = 1 << (cdb[1] >> 5); > + > + /* compare the passed through multi_count > + * with the cached multi_count of libata > + */ > + if (multi_count != dev->multi_count) > +