13 Jun, 2009

1 commit

  • * 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (29 commits)
    ide: re-implement ide_pci_init_one() on top of ide_pci_init_two()
    ide: unexport ide_find_dma_mode()
    ide: fix PowerMac bootup oops
    ide: skip probe if there are no devices on the port (v2)
    sl82c105: add printk() logging facility
    ide-tape: fix proc warning
    ide: add IDE_DFLAG_NIEN_QUIRK device flag
    ide: respect quirk_drives[] list on all controllers
    hpt366: enable all quirks for devices on quirk_drives[] list
    hpt366: sync quirk_drives[] list with pdc202xx_{new,old}.c
    ide: remove superfluous SELECT_MASK() call from do_rw_taskfile()
    ide: remove superfluous SELECT_MASK() call from ide_driveid_update()
    icside: remove superfluous ->maskproc method
    ide-tape: fix IDE_AFLAG_* atomic accesses
    ide-tape: change IDE_AFLAG_IGNORE_DSC non-atomically
    pdc202xx_old: kill resetproc() method
    pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout
    pdc202xx_old: use ide_dma_test_irq()
    ide: preserve Host Protected Area by default (v2)
    ide-gd: implement block device ->set_capacity method (v2)
    ...

    Linus Torvalds
     

07 Jun, 2009

1 commit


18 May, 2009

1 commit


11 May, 2009

1 commit

  • ide doesn't manipulate request fields anymore and thus all hard and
    their soft equivalents are always equal. Convert all references to
    accessors.

    [ Impact: use pos and nr_sectors accessors ]

    Signed-off-by: Tejun Heo
    Acked-by: Bartlomiej Zolnierkiewicz
    Cc: Borislav Petkov
    Cc: Sergei Shtylyov
    Signed-off-by: Jens Axboe

    Tejun Heo
     

28 Apr, 2009

1 commit

  • Impact: rq->buffer usage cleanup

    ide_raw_taskfile() directly uses rq->buffer to carry pointer to the
    data buffer. This complicates both block interface and ide backend
    request handling. Use blk_rq_map_kern() instead and drop special
    handling for REQ_TYPE_ATA_TASKFILE from ide_map_sg().

    Note that REQ_RW setting is moved upwards as blk_rq_map_kern() uses it
    to initialize bio rw flag.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe

    Tejun Heo
     

19 Apr, 2009

1 commit

  • Impact: rq->buffer usage cleanup

    ide_raw_taskfile() directly uses rq->buffer to carry pointer to the
    data buffer. This complicates both block interface and ide backend
    request handling. Use blk_rq_map_kern() instead and drop special
    handling for REQ_TYPE_ATA_TASKFILE from ide_map_sg().

    Note that REQ_RW setting is moved upwards as blk_rq_map_kern() uses it
    to initialize bio rw flag.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe

    Tejun Heo
     

08 Apr, 2009

5 commits

  • Simplify tf_read() method, making it deal only with 'struct ide_taskfile' and
    the validity flags that the upper layer passes, and factoring out the code that
    deals with the high order bytes into ide_tf_readback() to be called from the
    only two functions interested, ide_complete_cmd() and ide_dump_sector().

    This should stop the needless code duplication in this method and so make
    it about twice smaller than it was; along with simplifying the setup for
    the method call, this should save both time and space...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Simplify tf_load() method, making it deal only with 'struct ide_taskfile' and
    the validity flags that the upper layer passes, and moving the code that deals
    with the high order bytes into the only function interested, do_rw_taskfile().

    This should stop the needless code duplication in this method and so make
    it about twice smaller than it was; along with simplifying the setup for the
    method call, this should save both time and space...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Move device register masking (and setting drive->select) out of tf_load() method
    and into the only function that needs to use this code, do_rw_taskfile()...

    Signed-off-by: Sergei Shtylyov
    [bart: fix whitespace error]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Make 'struct ide_taskfile' cover only 8 register values and thus put two such
    fields ('tf' and 'hob') into 'struct ide_cmd', dropping unnecessary 'tf_array'
    field from it.

    This required changing the prototype of ide_get_lba_addr() and ide_tf_dump().

    Signed-off-by: Sergei Shtylyov
    [bart: fix setting of ATA_LBA bit for LBA48 commands in __ide_do_rw_disk()]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Replace IDE_TFLAG_{IN|OUT}_* flags meaning to the taskfile register validity on
    input/output by the IDE_VALID_* flags and introduce 4 symmetric 8-bit register
    validity indicator subfields, 'valid.{input/output}.{tf|hob}', into the 'struct
    ide_cmd' instead of using the 'tf_flags' field for that purpose (this field can
    then be turned from 32-bit into 8-bit one).

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     

01 Apr, 2009

6 commits


27 Mar, 2009

23 commits

  • * Pass number of bytes instead of sectors to ide_init_sg_cmd().

    * Pass number of bytes to process to ide_pio_sector() and rename
    it to ide_pio_bytes().

    * Rename ->nsect field to ->nbytes in struct ide_cmd and use
    ->nbytes, ->nleft and ->cursg_ofs to keep track of number of
    bytes instead of sectors.

    There should be no functional changes caused by this patch.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Pass command structure to ide_execute_command() and skip
    __ide_set_handler() for ATAPI protocols on non-DRQ devices.

    * Convert ide_issue_pc() to always use ide_execute_command()
    and remove no longer needed ide_execute_pkt_cmd().

    v2:
    * Fix for non-DRQ devices (based on report from Borislav).

    There should be no functional changes caused by this patch.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it.

    * Add ->dma_timer_expiry method and use it to set hwif->expiry for
    ATA_PROT_DMA protocol in do_rw_taskfile().

    * Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts.

    * Move setting hwif->expiry from ide_execute_command() to its users and drop
    'expiry' argument.

    * Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile().

    * Remove ->dma_exec_cmd method and its implementations.

    * Unexport ide_execute_command() and ide_dma_intr().

    v2:
    * Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap).

    * Fix *dma_expiry naming (suggested by Sergei Shtylyov).

    There should be no functional changes caused by this patch.

    Cc: Randy Dunlap
    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Set hwif->expiry prior to calling [__]ide_set_handler()
    and drop 'expiry' argument.

    * Set hwif->expiry to NULL in ide_{timer_expiry,intr}()
    and remove 'hwif->expiry = NULL' assignments.

    There should be no functional changes caused by this patch.

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Pass command to ide_issue_pc() and update ->do_request methods
    in ide-{cd,floppy,tape}.c accordingly.

    * Convert ide_pktcmd_tf_load() to ide_init_packet_cmd() which
    just initializes command structure and use do_rw_taskfile()
    to load ATA_CMD_PACKET commands.

    While at it:

    * Rename ide{floppy,tape}_issue_pc() to ide_{floppy,tape}_issue_pc().

    There should be no functional changes caused by this patch.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET
    commands.

    * Pass command to ->dma_setup method and update all its
    implementations accordingly.

    * Pass command instead of request to ide_build_sglist(),
    *_build_dmatable() and ide_map_sg().

    While at it:

    * Fix scc_dma_setup() documentation + use ATA_DMA_WR define.

    * Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(),
    change return value type to 'int' and drop unused 'ddir'
    argument.

    * Do some minor cleanups in [tx4939]ide_dma_setup().

    There should be no functional changes caused by this patch.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add ide_rq_bytes() helper.

    * Add blk_noretry_request() quirk to ide_complete_rq() (currently only fs
    requests can be marked as "noretry" so there is no change in behavior).

    * Switch current ide_end_request() users to use ide_complete_rq().

    [ No need to check for rq->nr_sectors == 0 in {ide_dma,task_pio}_intr(),
    nsectors == 0 in cdrom_end_request() and err == 0 in ide_do_devset(). ]

    * Remove no longer needed ide_end_request().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Set rq->errors at ide_complete_rq() call sites and then pass
    error value to ide_complete_rq().

    [ Some rq->errors assignments look really wrong but this patch
    leaves them alone to not introduce too many changes at once. ]

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Move ide_end_request() call out from ide_finish_cmd() to its users.

    * Use ide_finish_cmd() in task_no_data_intr().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Fixup ->tf_flags in ide_do_park_unpark() to match their current use.

    * Use ide_complete_cmd() for REQ_UNPARK_HEADS.

    While at it:

    * No need to read Error register for PM requests in task_no_data_intr().

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Move handling of head unload commands from task_no_data_intr()
    to ide_complete_cmd() and then use ide_complete_cmd() also for
    head unload commands.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Move ide_error() call from task_error() to task_pio_intr()
    (the only user).

    * Drop no longer used arguments from task_error().

    * Rename task_error() to ide_error_cmd().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • task_in_unexpected() is only used by task_pio_intr() so inline it there.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Merge task_out_intr() with task_in_intr().

    * Rename task_in_intr() to task_pio_intr().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add IDE_TFLAG_MULTI_PIO taskfile flag and set it for commands
    using multi-PIO protocol.

    * Use ata_tf_protocols enums instead of TASKFILE_* defines to
    denote command's protocol and then rename ->data_phase field
    to ->protocol.

    * Remove no longer needed includes.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Also take care of fixing up incorrect TASKFILE_IN_DMA[Q] data phase when
    IDE_DRIVE_TASK_RAW_WRITE is requested (no need to do it for TASKFILE_NO_DATA
    and TASKFILE_[MULTI]_IN -- it had no chance of working previously).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Move command related fields from ide_hwif_t to struct ide_cmd.

    * Make ide_init_sg_cmd() take command and sectors number as arguments.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add IDE_TFLAG_FS taskfile flag and set it for REQ_TYPE_FS requests.

    * Convert ->{in,out}put_data methods to take command instead of request
    as an argument. Then convert pre_task_out_intr(), task_end_request(),
    task_error(), task_in_unexpected(), ide_pio_sector(), ide_pio_multi()
    and ide_pio_datablock() in similar way.

    * Rename task_end_request() to ide_finish_cmd().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • While at it:
    - rename struct ide_task_s to struct ide_cmd
    - remove stale comments from idedisk_{read_native,set}_max_address()
    - drop unused 'cmd' argument from ide_{cmd,task}_ioctl()
    - drop unused 'task' argument from tx4939ide_tf_load_fixup()
    - rename ide_complete_task() to ide_complete_cmd()
    - use consistent naming for struct ide_cmd variables

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Re-map sg table if needed in ide_build_sglist().

    * Move ide_build_sglist() call from ->dma_setup to its users.

    * Un-export ide_build_sglist().

    v2:
    * Build fix for CONFIG_BLK_DEV_IDEDMA=n (noticed by Randy Dunlap).

    There should be no functional changes caused by this patch.

    Cc: Randy Dunlap
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Use blk_fs_request() in ide-taskfile.c instead of checking for:
    - rq->bio in ide_pio_datablock() and task_error()
    - rq->cmd_type == REQ_TYPE_ATA_TASKFILE in task_end_request()

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz