02 Apr, 2009

4 commits


05 Mar, 2009

1 commit


18 Apr, 2008

1 commit

  • hdparm explicitely marks HDIO_[UNREGISTER,SCAN]_HWIF ioctls as DANGEROUS
    and given the number of bugs we can assume that there are no real users:

    * DMA has no chance of working because DMA resources are released by
    ide_unregister() and they are never allocated again.

    * Since ide_init_hwif_ports() is used for ->io_ports[] setup the ioctls
    don't work for almost all hosts with "non-standard" (== non ISA-like)
    layout of IDE taskfile registers (there is a lot of such host drivers).

    * ide_port_init_devices() is not called when probing IDE devices so:
    - drive->autotune is never set and IDE host/devices are not programmed
    for the correct PIO/DMA transfer modes (=> possible data corruption)
    - host specific I/O 32-bit and IRQ unmasking settings are not applied
    (=> possible data corruption)
    - host specific ->port_init_devs method is not called (=> no luck with
    ht6560b, qd65xx and opti621 host drivers)

    * ->rw_disk method is not preserved (=> no HPT3xxN chipsets support).

    * ->serialized flag is not preserved (=> possible data corruption when
    using icside, aec62xx (ATP850UF chipset), cmd640, cs5530, hpt366
    (HPT3xxN chipsets), rz1000, sc1200, dtc2278 and ht6560b host drivers).

    * ->ack_intr method is not preserved (=> needed by ide-cris, buddha,
    gayle and macide host drivers).

    * ->sata_scr[] and sata_misc[] is cleared by ide_unregister() and it
    isn't initialized again (SiI3112 support needs them).

    * To issue an ioctl() there need to be at least one IDE device present
    in the system.

    * ->cable_detect method is not preserved + it is not called when probing
    IDE devices so cable detection is broken (however since DMA support is
    also broken it doesn't really matter ;-).

    * Some objects which may have already been freed in ide_unregister()
    are restored by ide_hwif_restore() (i.e. ->hwgroup).

    * ide_register_hw() may unregister unrelated IDE ports if free ide_hwifs[]
    slot cannot be found.

    * When IDE host drivers are modular unregistered port may be re-used by
    different host driver that owned it first causing subtle bugs.

    Since we now have a proper warm-plug support remove these ioctls,
    then remove no longer needed:
    - ide_register_hw() and ide_hwif_restore() functions
    - 'init_default' and 'restore' arguments of ide_unregister()
    - zeroeing of hwif->{dma,extra}_* fields in ide_unregister()

    As an added bonus IDE core code size shrinks by ~3kB (x86-32).

    v2:
    * fix ide_unregister() arguments in cleanup_module() (Andrew Morton).

    v3:
    * fix ide_unregister() arguments in palm_bk3710.c.

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

    Bartlomiej Zolnierkiewicz
     

03 Feb, 2008

2 commits


26 Jan, 2008

4 commits

  • * 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 around no
    longer used by kernel IDE_DRIVE_TASK_* and TASKFILE_* defines.

    There should be no functionality changes caused by this patch.

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

    Bartlomiej Zolnierkiewicz
     
  • Remove atapi_error_t.

    While at it:
    * replace 'HWIF(drive)' by 'drive->hwif'

    v2:
    * Add {ILI,EOM,LFS}_ERR defines to .

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

    Bartlomiej Zolnierkiewicz
     
  • * Don't set write-only ide_task_t.hobRegister[6] and ide_task_t.hobRegister[7]
    in idedisk_set_max_address_ext().

    * Add struct ide_taskfile and use it in ide_task_t instead of tfRegister[]
    and hobRegister[].

    * Remove no longer needed IDE_CONTROL_OFFSET_HOB define.

    * Add #ifndef/#endif __KERNEL__ around definitions of {task,hob}_struct_t.

    While at it:

    * Use ATA_LBA define for LBA bit (0x40) as suggested by Tejun Heo.

    v2:
    * Add missing newlines. (Noticed by Sergei)

    * Use ~ATA_LBA instead of 0xBF. (Noticed by Sergei)

    * Use unnamed unions for error/feature and status/command.
    (Suggested by Sergei).

    There should be no functionality changes caused by this patch.

    Acked-by: Sergei Shtylyov
    Cc: Tejun Heo
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Remove task_ioreg_t typedef from the kernel code (but leave it
    in for #ifndef/#endif __KERNEL__ case).

    While at it also move sata_ioreg_t typedef under #ifndef/#endif __KERNEL__.

    v2:
    Remove name of the second parameter from ide_execute_command() declaration.
    (Noticed by Sergei).

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

    Bartlomiej Zolnierkiewicz
     

31 Jan, 2007

1 commit


20 Nov, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds