11 Oct, 2008

5 commits

  • * Move ioctls handling to ide-ioctls.c
    (except HDIO_DRIVE_TASKFILE for now).

    * Make ide_{cmd,task}() static.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Just use SECTOR_SIZE instead.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    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: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Use ATA_CMD_* defines instead of WIN_* ones.

    While at it:

    * EXABYTE_ENABLE_NEXT -> ATA_EXABYTE_ENABLE_NEST

    * SETFEATURES_{EN,DIS}_WCACHE -> SETFEATURES_WC_{ON,OFF}

    * SETFEATURES_{EN,DIS}_AAM -> SETFEATURES_AAM_{ON,OFF}

    * SMART_* -> ATA_SMART_*

    * Remove stale comment from ide-proc.c.

    Partially based on earlier work by Chris Wedgwood.

    Acked-by: Chris Wedgwood
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Make drive->id an unnamed union so id can be accessed either by using
    'u16 *id' or 'struct hd_driveid *driveid'. Then convert all existing
    drive->id users accordingly (using 'u16 *id' when possible).

    This is an intermediate step to make ide 'struct hd_driveid'-free.

    While at it:

    - Add missing KERN_CONTs in it821x.c.

    - Use ATA_ID_WORDS and ATA_ID_*_LEN defines.

    - Remove unnecessary checks for drive->id.

    - s/drive_table/table/ in ide_in_drive_list().

    - Cleanup ide_config_drive_speed() a bit.

    - s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave().

    v2:
    Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell)

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

25 Jul, 2008

1 commit


24 Jul, 2008

4 commits

  • * Add struct ide_tp_ops for transport methods.

    * Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info
    and ide_hwif_t.

    * Set the default hwif->tp_ops in ide_init_port_data().

    * Set host driver specific hwif->tp_ops in ide_init_port().

    * Export ide_exec_command(), ide_read_status(), ide_read_altstatus(),
    ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}()
    and ata_{in,out}put_data().

    * Convert host drivers and core code to use struct ide_tp_ops.

    * Remove no longer needed default_hwif_transport().

    * Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops.

    While at it:

    * Use struct ide_port_info in falconide.c and q40ide.c.

    * Rename ata_{in,out}put_data() to ide_{in,out}put_data().

    v2:

    * Fix missing convertion in ns87415.c.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add ->set_irq method for setting nIEN bit of ATA Device Control
    register and use it instead of ide_set_irq().

    While at it:

    * Use ->set_irq in init_irq() and do_reset1().

    * Don't use HWIF() macro in ide_check_pm_state().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Remove ide_read_status() inline helper.

    * Add ->read_status method for reading ATA Status register
    and use it instead of ->INB.

    While at it:

    * Don't use HWGROUP() macro.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add ->exec_command method for writing ATA Command register
    and use it instead of ->OUTBSYNC.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

17 Jul, 2008

3 commits


16 Jul, 2008

3 commits


21 Jun, 2008

1 commit


29 Apr, 2008

6 commits

  • This converts ide to use blk_rq_init to initialize the request.

    This is a preparation for large command support, which needs to
    initialize the request in a proper way (that is, just doing a memset()
    will not work).

    Signed-off-by: FUJITA Tomonori
    Cc: Jens Axboe
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • * Add ->tf_load and ->tf_read methods to ide_hwif_t and set the default
    methods in default_hwif_transport().

    * Use ->tf_{load,read} instead o calling ide_tf_{load,read}() directly.

    * Make ide_tf_{load,read}() static.

    There should be no functional changes caused by this patch.

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

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Factor out debugging code from ide_tf_load() to ide_tf_dump() helper
    and update ide_tf_load() users accordingly.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Merge ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods
    into new ->{in,out}put_data methods which take number of bytes to
    transfer as an argument and always do padding.

    While at it:

    * Use 'hwif' or 'drive->hwif' instead of 'HWIF(drive)'.

    There should be no functional changes caused by this patch (all users
    of ->ata_{in,out}put_data methods were using multiply-of-4 word counts).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    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
    Cc: Michael Schmitz
    Cc: Roman Zippel
    Cc: Alan Cox
    Cc: Richard Zidlicky
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

27 Apr, 2008

4 commits

  • * 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: Bartlomiej Zolnierkiewicz

    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: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    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: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • __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: Harvey Harrison
    Cc: Andrew Morton
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Harvey Harrison
     

18 Apr, 2008

1 commit

  • * Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines.

    * Remove IDE_*_REG macros - this results in more readable
    and slightly smaller code.

    There should be no functional changes caused by this patch.

    Cc: Borislav Petkov
    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

19 Mar, 2008

1 commit

  • 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: Anders Eriksson
    Cc: Jens Axboe
    Cc: Ingo Molnar
    Acked-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 Feb, 2008

2 commits


03 Feb, 2008

2 commits


02 Feb, 2008

3 commits


27 Jan, 2008

4 commits