Re: [PATCH] libata error handling fixes (ATAPI)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejun Heo wrote:
Jeff Garzik wrote:


The port stops, when any error occurs. For device errors, set PORT_CS_INIT bit in PORT_CTRL_STAT, then wait for Port Ready (bit 31, see above).


Yeap, this did the trick. I'm working on SRST/init stuff and I think I can post patches later today. What workload do you use for testing a ATAPI device? I'm currently thinking of the following...

* mounting & tarr'ing cdrom & unmount
* repeat above with eject/load
* burning a cdrom
* ripping a music cd with cdparanoia

Any other thing I can try?

I burn Fedora Core CDs and DVDs, and then run
	/usr/lib/anaconda-runtime/checkisomd5 --verbose /dev/scd0

FC ISOs, and probably many others as well, appear to contain embedded checksums. This is a really good test, I've found. I'll burn CDs/DVDs, then use that to validate them on another machine. Or I'll use checkisomd5 simply as a test of libata ATAPI itself.

On a side note:

As a scan through tons of operating system code and vendor drivers shows, as well as behavior I'm seeing on my AHCI + Plextor setup, it is probably helpful for the OS driver to issue internal retries, if the command returns NOT READY.

My setup works without it, successfully burning CDs and DVDs, but has problems with really long commands, and such those which occur when cdrecord(1) finishes a CD burn, and performs its "fixating" step.

It may also be helpful to issue TUR until NOT READY goes away, in ata_bus_probe() after ata_set_mode() completes.

	Jeff


-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux