26 Nov, 2009

1 commit

  • Currently, ide_cmd_ioctl when invoked for setting DMA transfer mode calls
    ide_find_dma_mode with requested mode as XFER_UDMA_6. This prevents setting DMA
    mode to any other value than the default (maximum) supported by the device (or
    UDMA6, if supported) irrespective of the actual requested transfer mode and
    returns error.

    For example, setting mode to UDMA2 using hdparm, where UDMA4 is the default
    transfer mode gives following error:
    # ./hdparm -d1 -Xudma2 /dev/hda
    /dev/hda:hda: UDMA/66 mode selected
    setting using_dma to 1 (on)
    hda: UDMA/66 mode selected
    setting xfermode to 66 (UltraDMA mode2)
    HDIO_DRIVE_CMD(setxfermode) failed: Invalid argument
    using_dma = 1 (on)

    This patch fixes the issue.

    Signed-off-by: Hemant Pedanekar
    Acked-by: Bartlomiej Zolnierkiewicz
    Acked-by: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Hemant Pedanekar
     

08 Aug, 2009

1 commit

  • * Make cmd->tf_flags field 'u16' and add IDE_TFLAG_SET_XFER taskfile flag.

    * Update ide_finish_cmd() to set xfer / re-read id if the new flag is set.

    * Convert set_xfer_rate() (write handler for /proc/ide/hd?/current_speed)
    and ide_cmd_ioctl() (HDIO_DRIVE_CMD ioctl handler) to use the new flag.

    * Remove no longer needed disable_irq_nosync() + enable_irq() from
    ide_config_drive_speed().

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Bartlomiej Zolnierkiewicz
     

30 Jun, 2009

1 commit

  • …tl HDIO_OBSOLETE_IDENTITY

    This patch fixes a memory overrun in function ide_get_identity_ioctl() which
    chooses the size of a memory buffer depending on the ioctl command that led
    to the function call, however, passes that buffer to a function which needs the
    buffer size to be always chosen unconditionally.

    Due to conditional compilation the memory overrun can only happen on big endian
    machines. The error can be triggered using ioctl HDIO_OBSOLETE_IDENTITY. Usage
    of ioctl HDIO_GET_IDENTITY is safe.

    Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
    Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Christian Engelmayer
     

16 Jun, 2009

1 commit


19 Apr, 2009

1 commit


08 Apr, 2009

2 commits

  • 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
     

27 Mar, 2009

2 commits

  • * 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
     
  • 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
     

02 Jan, 2009

1 commit


30 Dec, 2008

2 commits


21 Oct, 2008

1 commit


14 Oct, 2008

1 commit

  • Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
    to IDE_DFLAG_* flags.

    While at it:
    - IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48
    - fixup some comments
    - remove needless g->flags zeroing from ide*_probe()

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

11 Oct, 2008

2 commits