lkml.org 
[lkml]   [2007]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 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/

    \
     
     \ /
      Last update: 2007-03-12 15:49    [W:0.020 / U:47.536 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site