[lkml]   [2005]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[PATCH 2.6.11-rc3 00/08] ide: taskfile cleanup

    Hello, Bartlomiej.
    Hello, Jeff.

    These eight patches

    * define ATA_TFLAG_{OUT|IN}_* flags
    * unify/generalize taskfile transport
    * cleanup ide driver accordingly

    For behavior changes by #03. I don't think defining a special flag
    to handle the TASKFILE case is necessary. The change isn't
    user-visible. And for the TASK ioctl, I think we should modify all
    ioctls to disallow changing the upper nibble of the DEVICE register
    except for the LBA bit. What do you think?

    I tried hard not to break things and tested changes but I'm pretty
    sure that I've missed something. So, please comment. :-)

    [ Start of patch descriptions ]

    : add individual ATA_TFLAG_{OUT|IN}_* flags

    This patch replaces ide_task_t->tf_{out|in}_flags handling
    with newly defined individual ATA_TFLAG_{OUT|IN}_* flags and
    helper functions ide_{load|read}_taskfile(). To ease
    transition of the IDE code, temporary flags
    This patch is tit-for-tat and shouldn't change any behavior.

    : convert __ide_do_rw_disk() to use ide_load_taskfile()

    Reimplements __ide_do_rw_disk() using ide_load_taskfile().
    While at it, clean up the function a little bit.

    : remove flagged_taskfile() and unify taskfile paths

    This patch removes flagged_taskfile(). All taskfile command
    issuing goes through do_rw_taskfile(). do_rw_taskfile()
    doesn't modify mangle with load flags anymore. It's now
    caller's responsibility to set appropriate flags. Likewise,
    ide_end_drive_cmd() is modified not to mangle with read flags,
    and ide_dma_intr() now also finishes commands with
    task_end_request(). Above changes make taskfile path unified
    & generic.

    As all ioctl subtleties are now responsibility of respective
    ioctl functions. TASKFILE and TASK ioctl functions are
    updated to set flags according to old behaviors. The
    following two behavior changes occur.

    * TASKFILE ioctl: taskfile registers are read back whether or
    not the command fails. As copying back to user doesn't
    happen in cases where reading back didn't occur before, this
    change isn't user-visible. Defining & using a flag like
    ATA_TFLAG_READ_ON_ERROR will remove this issue.
    * TASK ioctl: drive->select.all & ~ATA_LBA is OR'd to device
    value. Previously, only ATA_DEV bit was OR'd.

    Also, all ide_{raw|diag}_taskfile(), do_rw_taskfile() users
    are converted to use the new individual OUT/IN flags. As
    results, the following behavior changes occur.

    * idedisk_read_native_max_address(): ADDR/LBA48 regs are not
    loaded. LBA48/DEVICE registers are not read back unless
    * idedisk_set_max_address(): DEVICE register is not read
    unless necessary.
    * smart_enable(): DEVICE register is not loaded. Registers
    are not read back.
    * smart_disable(): ditto
    * get_smart_threshold(): DEVICE register is not loaded.
    * ide_task_init_flush(): ADDR/LBA48/DEVICE registers are not
    * ide_init_specify_cmd(): Register aren't read back.
    * ide_init_restore_cmd(): DEVICE register not loaded. No read back.
    * ide_init_setmult_cmd(): ditto

    : remove unused fields ide_drive_t->rq and ide_task_t->special

    Remove unused fields ide_drive_t->rq and ide_task_t->special

    : use ide_task_t->tf.protocol instead of ide_task_t->data_phase

    Remove ide_task_t->{data_phase,command_type,prehandler,rq} and
    use tf->protocol instead. Now the protocol value wholey
    defines how to drive a taskfile except for NODATA cases where
    a caller can optionally specify handler (for special
    commands). The following behavior changes occur.

    * ide_taskfile_ioctl(): req_task->command_type is ignored.
    This doesn't make any difference except for error/crash
    cases in the original code.

    : convert set_xfer_rate() to use taskfile ioctl

    Convert set_xfer_rate() to use taskfile ioctl.

    : reimplement ide_cmd_ioctl() using taskfile

    Reimplement ide_cmd_ioctl() using taskfile.

    : remove REQ_DRIVE_CMD handling

    Remove REQ_DRIVE_CMD handling. ide_init_drive_cmd() now
    defaults to REQ_DRIVE_TASKFILE (now the only drive command :-).

    [ End of patch descriptions ]


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:10    [W:0.026 / U:8.132 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site