1. 29 4月, 2008 1 次提交
    • B
      falconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods (take 2) · 92d3ab27
      Bartlomiej Zolnierkiewicz 提交于
      * Add ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods to
        falconide and q40ide host drivers (->ata_* methods are implemented on
        top of ->atapi_* methods so they also do byte-swapping now).
      
      * Cleanup atapi_{in,out}put_bytes().
      
      v2:
      * Add 'struct request *rq' argument to ->ata_{in,out}put_data methods
        and don't byte-swap disk fs requests (we shouldn't un-swap fs requests
        because fs itself is stored byte-swapped on the disk) - this is how
        things were done before the patch (ideally device mapper should be
        used instead but it would break existing setups and would have some
        performance impact).
      
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michael Schmitz <schmitz@debian.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Richard Zidlicky <rz@linux-m68k.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      92d3ab27
  2. 27 4月, 2008 4 次提交
    • B
      ide: add struct ide_io_ports (take 3) · 4c3032d8
      Bartlomiej Zolnierkiewicz 提交于
      * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
        in ide_hwif_t.
      
      * Rename io_ports[] in hw_regs_t to io_ports_array[].
      
      * Use un-named union for 'unsigned long io_ports_array[]' and 'struct
        ide_io_ports io_ports' in hw_regs_t.
      
      * Remove IDE_*_OFFSET defines.
      
      v2:
      * scc_pata.c build fix from Stephen Rothwell.
      
      v3:
      * Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
        (Noticed by Andrew Morton)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4c3032d8
    • B
      ide: constify struct ide_dma_ops · f37afdac
      Bartlomiej Zolnierkiewicz 提交于
      * Export ide_dma_exec_cmd() and __ide_dma_test_irq().
      
      * Constify struct ide_dma_ops.
      
      * Always set hwif->dma_ops to &sff_dma_ops in ide_setup_dma()
        (it is later overriden by ide_init_port() if needed) and drop
        'const struct ide_port_info *d' argument.
      
      While at it:
      
      * Rename __ide_dma_test_irq() to ide_dma_test_irq().
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f37afdac
    • B
      ide: add struct ide_dma_ops (take 3) · 5e37bdc0
      Bartlomiej Zolnierkiewicz 提交于
      Add struct ide_dma_ops and convert core code + drivers to use it.
      
      While at it:
      
      * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods.
      
      * Drop "ide_" "infixes" from DMA methods.
      
      * au1xxx-ide.c:
        - use auide_dma_{test_irq,end}() directly in auide_dma_timeout()
      
      * pdc202xx_old.c:
        - drop "old_" "infixes" from DMA methods
      
      * siimage.c:
        - add siimage_dma_test_irq() helper
        - print SATA warning in siimage_init_one()
      
      * Remove no longer needed ->init_hwif implementations.
      
      v2:
      * Changes based on review from Sergei:
        - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/
        - s/drive->hwif/hwif/ in idefloppy_pc_intr().
        - fix patch description w.r.t. au1xxx-ide changes
        - fix au1xxx-ide build
        - fix naming for cmd64*_dma_ops
        - drop "ide_" and "old_" infixes
        - s/hpt3xxx_dma_ops/hpt37x_dma_ops/
        - s/hpt370x_dma_ops/hpt370_dma_ops/
        - use correct DMA ops for HPT302/N, HPT371/N and HPT374
        - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/
      
      v3:
      * Two bugs slipped in v2 (noticed by Sergei):
        - use correct DMA ops for HPT374 (for real this time)
        - handle HPT370/HPT370A properly
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5e37bdc0
    • H
      ide: replace remaining __FUNCTION__ occurrences · eb63963a
      Harvey Harrison 提交于
      __FUNCTION__ is gcc-specific, use __func__
      
      [bart: fix checkpatch.pl errors in ide-lib.c and ppc/mpc8xx.c while at it]
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      eb63963a
  3. 18 4月, 2008 1 次提交
  4. 19 3月, 2008 1 次提交
    • L
      IDE: Make taskfile interface more robust wrt unexpected end-of-command · 6c3c3158
      Linus Torvalds 提交于
      Now that we handle all the special commands using REQ_TYPE_ATA_TASKFILE
      rather than using the old REQ_TYPE_ATA_CMD model, we need to also
      emulate the lack of full taskfile data that comes with the old command
      model (ie when commands are generated with the HDIO_DRIVE_CMD ioctl
      rather than using the HDIO_DRIVE_TASK[FILE] ioctls).
      
      In particular, this means that we should handle command completion the
      more relaxed way that the old drive_cmd_intr() code did.  It allows
      commands to finish early even if they don't use up all the data that we
      thought we had for them.
      
      This fixes a regression seen by Anders Eriksson where some SMART
      commands sent by smartd would cause a boot-time system hang on his
      machine because the IDE command handling code didn't realize that the
      command had completed.
      Tested-by: NAnders Eriksson <aeriksson@fastmail.fm>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Acked-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6c3c3158
  5. 06 2月, 2008 2 次提交
  6. 03 2月, 2008 2 次提交
  7. 02 2月, 2008 3 次提交
  8. 27 1月, 2008 15 次提交
  9. 26 1月, 2008 11 次提交
    • B
      ide-disk: use do_rw_taskfile() (take 2) · f6e29e35
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_TFLAG_DMA_PIO_FALLBACK taskfile flag to indicate the need
        to skip loading taskfile registers in do_rw_taskfile().
      
      * Export do_rw_taskfile().
      
      * Convert __ide_do_rw_disk() to use do_rw_taskfile().
      
      * Unexport ide_tf_load().
      
      * Unexport {pre_task_out,task_in}_intr() and make it static.
      
      * Remove incorrect comment about do_rw_taskfile() from <linux/ide.h>.
      
      There should be no functionality changes caused by this patch.
      
      v2:
      * Add missing blk_fs_request() check to task_dma_ok() (for VDMA).
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f6e29e35
    • B
      ide: remove 'handler' field from ide_task_t (take 2) · 57d7366b
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_TFLAG_CUSTOM_HANDLER taskfile flag and use it for internal requests
        which require custom handlers.  Check the flag in do_rw_taskfile() and set
        handler accordingly.
      
      * Cleanup ide_init_{specify,restore,setmult}_cmd() and rename it to
        ide_tf_set_{specify,restore,setmult}_cmd().
      
      * Make {set_geometry,recal,set_multmode}_intr() static.
      
      * Remove no longer needed 'handler' field from ide_task_t.
      
      v2:
      * 'handler' in do_rw_taskfile() must be set to NULL initially.
      
      There should be no functionality changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      57d7366b
    • B
      ide: use ->data_phase to set ->handler in do_rw_taskfile() · 1192e528
      Bartlomiej Zolnierkiewicz 提交于
      * Use ->data_phase to set ->handler in do_rw_taskfile() instead of
        setting ->handler in callers of ide_raw_taskfile()/do_rw_taskfile().
      
      * Unexport task_no_data_intr() and make it static.
      
      There should be no functionality changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1192e528
    • B
      ide: convert do_rw_taskfile() to use ->data_phase · 10d90157
      Bartlomiej Zolnierkiewicz 提交于
      * Use task->data_phase in do_rw_taskfile() to decide what to do.
      
      * task->prehandler is only used by TASKFILE[_MULTI]_OUT so just
        use pre_task_out_intr() directly and remove no longer needed
        'prehandler' field from ide_task_t.
      
      * Remove no longer needed ide_pre_handler_t type.
      
      There should be no functionality changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      10d90157
    • B
      ide: merge flagged_taskfile() into do_rw_taskfile() · 1edee60e
      Bartlomiej Zolnierkiewicz 提交于
      Based on the earlier work by Tejun Heo.
      
      task->data_phase == TASKFILE_MULTI_{IN,OUT} vs drive->mult_count == 0
      check is needed also for ide_taskfile_ioctl() requests that don't have
      IDE_TFLAG_FLAGGED taskfile flag set.
      
      Cc: Tejun Heo <htejun@gmail.com>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1edee60e
    • B
      ide: remove 'tf_in_flags' field from ide_task_t · 866e2ec9
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_TFLAG_IN_DATA taskfile flag to indicate the need of reading
        IDE_DATA_REG in ide_end_drive_cmd().
      
        Set the new flag in ide_taskfile_ioctl() if ->in_flags.b.data is set.
      
      * Add IDE_TFLAG_FLAGGED_SET_IN_FLAGS taskfile flag to indicate the
        need of modifying ->in_flags in ide_taskfile_ioctl().
      
        Set the new flag in flagged_taskfile() and move the code modifying
        ->tf_in_flags to ide_taskfile_ioctl().
      
        While at it remove the bogus comment: ->tf_in_flags (except .b.data)
        have no effect on selection of registers to read.
      
      * Remove no longer needed 'tf_in_flags' field from ide_task_t.
      
      As the result we finally have the internals of HDIO_DRIVE_TASKFILE ioctl
      separated from the core IDE code.
      
      There should be no functionality changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      866e2ec9
    • B
      ide: remove 'command_type' field from ide_task_t · ac026ff2
      Bartlomiej Zolnierkiewicz 提交于
      * Add 'data_buf' and 'nsect' variables in ide_taskfile_ioctl()
        to cache data buffer pointer and number of sectors to transfer
        (this allows us to have only one ide_diag_taskfile() call).
      
      * Add IDE_TFLAG_WRITE taskfile flag and use it to check whether
        the REQ_RW request flag should be set.
      
      * Move ->command_type handling from ide_diag_taskfile() to
        ide_taskfile_ioctl() and use ->req_cmd instead of ->command_type.
      
      * Add 'nsect' parameter to ide_raw_taskfile().
      
      * Merge ide_diag_taskfile() into ide_raw_taskfile().
      
      * Initialize ->data_phase explicitly in idedisk_prepare_flush(),
        ide_start_power_step() and ide_disk_special().
      
      * Remove no longer needed 'command_type' field from ide_task_t.
      
      * Add #ifndef/#endif __KERNEL__ to <linux/hdreg.h> around no
        longer used by kernel IDE_DRIVE_TASK_* and TASKFILE_* defines.
      
      There should be no functionality changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ac026ff2
    • B
      ide: switch ide_task_ioctl() to use REQ_TYPE_ATA_TASKFILE requests · 14b89ef9
      Bartlomiej Zolnierkiewicz 提交于
      Based on the earlier work by Tejun Heo.
      
      There should be no functionality changes caused by this patch.
      
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      14b89ef9
    • B
      ide: remove unnecessary writes to HOB taskfile registers · a3bbb9d8
      Bartlomiej Zolnierkiewicz 提交于
      * Set taskfile flags for REQ_TYPE_ATA_TASKFILE requests before
        adding the request to the queue.
      
      * Cleanup execute_drive_cmd().
      
      * Remove unnecessary writes to HOB taskfile registers when using
        LBA48 disk for the following cases:
      
        - Power Management requests
          (WIN_FLUSH_CACHE[_EXT], WIN_STANDBYNOW1, WIN_IDLEIMMEDIATE commands)
      
        - special commands (WIN_SPECIFY, WIN_RESTORE, WIN_SETMULT)
      
        - Host Protected Area support (WIN_READ_NATIVE_MAX, WIN_SET_MAX)
      
        - /proc/ide/ SMART support (WIN_SMART with SMART_ENABLE,
          SMART_READ_VALUES and SMART_READ_THRESHOLDS subcommands)
      
        - write cache enabling/disabling in ide-disk
          (WIN_SETFEATURES with SETFEATURES_{EN,DIS}_WCACHE)
      
        - write cache flushing in ide-disk (WIN_FLUSH_CACHE[_EXT])
      
        - acoustic management in ide-disk
          (WIN_SETFEATURES with SETFEATURES_{EN,DIS}_AAM)
      
        - door (un)locking in ide-disk (WIN_DOORLOCK, WIN_DOORUNLOCK)
      
        - /proc/ide/hd?/identify support (WIN_IDENTIFY)
      
        - ACPI _GTF taskfiles
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      a3bbb9d8
    • B
      ide: use ide_tf_load() in execute_drive_cmd() · 807e35d6
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_TFLAG_OUT_DEVICE taskfile flag to indicate the need of writing
        the Device register and handle it in ide_tf_load().
      
        Update ide_tf_load() and {do_rw,flagged}_taskfile() users accordingly.
      
      * Use struct ide_taskfile and ide_tf_load() in execute_drive_cmd().
      
      * Make the debugging code dump all taskfile registers for both
        REQ_ATA_TYPE_{CMD,TASK} requests and move it to ide_tf_load()
        so it also covers REQ_ATA_TYPE_TASKFILE requests.
      
      There should be no functionality changes caused by this patch
      (unless DEBUG is defined).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      807e35d6
    • B
      ide: use do_rw_taskfile() in flagged_taskfile() · 74095a91
      Bartlomiej Zolnierkiewicz 提交于
      Based on the earlier work by Tejun Heo.
      
      * Move setting IDE_TFLAG_LBA48 taskfile flag from do_rw_taskfile()
        function to the callers.
      
      * Add IDE_TFLAG_FLAGGED taskfile flag for flagged taskfiles coming
        from ide_taskfile_ioctl().  Check it instead of ->tf_out_flags.all.
      
      * Add IDE_TFLAG_OUT_DATA taskfile flag to indicate the need to load
        IDE data register in ide_tf_load().
      
      * Add IDE_TFLAG_OUT_* taskfile flags to indicate the need to load
        particular IDE taskfile registers in ide_tf_load().
      
      * Update do_rw_taskfile() and ide_tf_load() users to set respective
        IDE_TFLAG_OUT_* taksfile flags.
      
      * Add task_dma_ok() helper.
      
      * Use IDE_TFLAG_FLAGGED taskfile flag to select HIHI mask in ide_tf_load().
      
      * Use do_rw_taskfile() in flagged_taskfile().
      
      * Remove no longer needed 'tf_out_flags' field from ide_task_t.
      
      There should be no functionality changes caused by this patch.
      
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      74095a91