1. 01 4月, 2010 1 次提交
    • H
      ide: Requeue request after DMA timeout · 6072f749
      Herbert Xu 提交于
      I noticed that my KVM virtual machines were experiencing IDE
      issues resulting in processes stuck on waiting for buffers to
      complete.
      
      The root cause is of course race conditions in the ancient qemu
      backend that I'm using.  However, the fact that the guest isn't
      recovering is a bug.
      
      I've tracked it down to the change made last year to dequeue
      requests at the start rather than at the end in the IDE layer.
      
      commit 8f6205cd
      Author: Tejun Heo <tj@kernel.org>
      Date:   Fri May 8 11:53:59 2009 +0900
      
          ide: dequeue in-flight request
      
      The problem is that the function ide_dma_timeout_retry does not
      requeue the current request, causing one request to be lost for
      each DMA timeout.
      
      This patch fixes this by requeueing the request.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6072f749
  2. 24 6月, 2009 1 次提交
    • B
      ide: relax DMA info validity checking · 346c17a6
      Bartlomiej Zolnierkiewicz 提交于
      There are some broken devices that report multiple DMA xfer modes
      enabled at once (ATA spec doesn't allow it) but otherwise work fine
      with DMA so just delete ide_id_dma_bug().
      
      [ As discovered by detective work by Frans and Bart, due to how
        handling of the ID block was handled before commit c4199930
        ("ide-iops: only clear DMA words on setting DMA mode") this
        check was always seeing zeros in the fields or other similar
        garbage.  Therefore this check wasn't actually checking anything.
        Now that the tests actually check the real bits, all we see are
        devices that trigger the check yet work perfectly fine, therefore
        killing this useless check is the best thing to do. -DaveM ]
      Reported-by: NFrans Pop <elendil@planet.nl>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      346c17a6
  3. 10 6月, 2009 1 次提交
  4. 11 5月, 2009 1 次提交
  5. 28 4月, 2009 1 次提交
  6. 21 4月, 2009 1 次提交
  7. 01 4月, 2009 10 次提交
  8. 27 3月, 2009 7 次提交
    • B
      ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2) · 22117d6e
      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 <randy.dunlap@oracle.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      22117d6e
    • B
      ide: pass command to ide_map_sg() · 22981694
      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: NBorislav Petkov <petkovbb@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      22981694
    • B
      ide: remove ide_end_request() · 130e8867
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      130e8867
    • B
      ide: sanitize ide_finish_cmd() · 2230d90d
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2230d90d
    • B
      ide: move command related fields from ide_hwif_t to struct ide_cmd · b6308ee0
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b6308ee0
    • B
      ide: pass command instead of request to ide_pio_datablock() · adb1af98
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      adb1af98
    • B
      ide: call ide_build_sglist() prior to ->dma_setup (v2) · e6830a86
      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 <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e6830a86
  9. 25 3月, 2009 1 次提交
  10. 14 3月, 2009 1 次提交
  11. 07 1月, 2009 1 次提交
  12. 14 10月, 2008 12 次提交
  13. 11 10月, 2008 2 次提交
    • B
      ide: use ATA_* defines instead of *_STAT and *_ERR ones · 3a7d2484
      Bartlomiej Zolnierkiewicz 提交于
      * ERR_STAT   -> ATA_ERR
      * INDEX_STAT -> ATA_IDX
      * ECC_STAT   -> ATA_CORR
      * DRQ_STAT   -> ATA_DRQ
      * SEEK_STAT  -> ATA_DSC
      * WRERR_STAT -> ATA_DF
      * READY_STAT -> ATA_DRDY
      * BUSY_STAT  -> ATA_BUSY
      
      * MARK_ERR   -> ATA_AMNF
      * TRK0_ERR   -> ATA_TRK0NF
      * ABRT_ERR   -> ATA_ABORTED
      * MCR_ERR    -> ATA_MCR
      * ID_ERR     -> ATA_IDNF
      * MC_ERR     -> ATA_MC
      * ECC_ERR    -> ATA_UNC
      * ICRC_ERR   -> ATA_ICRC
      
      * BBD_ERR    -> ATA_BBK
      
      Also:
      
      * ILI_ERR    -> ATAPI_ILI
      * EOM_ERR    -> ATAPI_EOM
      * LFS_ERR    -> ATAPI_LFS
      
      * CD         -> ATAPI_COD
      * IO         -> ATAPI_IO
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3a7d2484
    • B
      ide: remove drive->driveid · 48fb2688
      Bartlomiej Zolnierkiewicz 提交于
      * Factor out HDIO_[OBSOLETE,GET]_IDENTITY ioctls handling
        to ide_get_identity_ioctl().
      
      * Use temporary buffer in ide_get_identity_ioctl() instead
        of accessing drive->id directly.
      
      * Add ide_id_to_hd_driveid() inline to convert raw id into
        struct hd_driveid format (needed on big-endian).
      
      * Use ide_id_to_hd_driveid() in ide_get_identity_ioctl(),
        cleanup ide_fix_driveid() and switch ide to use use raw id.
      
      * Remove no longer needed drive->driveid.
      
        This leaves us with 3 users of struct hd_driveid in tree:
        - arch/um/drivers/ubd_kern.c
        - drivers/block/xsysace.c
        - drivers/usb/storage/isd200.c
      
      While at it:
      
      * Use ata_id_u{32,64}() and ata_id_has_{dma,lba,iordy}() macros.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      48fb2688