Messages in this thread | | | Date | Mon, 12 Mar 2007 10:47:28 -0400 | From | Mark Lord <> | Subject | Re: libata extension |
| |
Vitaliyi wrote: > Good Day > > Say i want to implement extended set of ATA commands available to > userspace for building diagnostic tools. > I need 0x40 -- read verify and 0x32 -- write long with error handling, > for example. I was trying ide driver through ioctl's, but seems it > lack of functionality and full of gotchas. Furthermore it oopses > sometimes.
Use the SCSI SG_IO ioctl() with opcode=ATA_16, which gives you access to the ATA Passthrough mechanism. This will work for most ATA commands.
I already use it in hdparm and in some other utilities for scanning/repairing drives.
A notable exeception are the READ/WRITE LONG opcodes, which require an extra kernel patch from me, awaiting merge into libata some year.
Cheers
-ml - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |