11 Oct, 2008

29 commits

  • * Set IDE_AFLAG_NO_DOORLOCK in idetape_get_mode_sense_result(), check it
    in ide_tape_set_media_lock() and cleanup idetape_create_prevent_cmd().

    * Set IDE_AFLAG_NO_DOORLOCK in ide_floppy_create_read_capacity_cmd() and
    check it instead of IDE_AFLAG_CLIK_DRIVE in ide_floppy_set_media_lock().

    * Add ide_set_media_lock() helper and convert ide-{floppy,tape}.c to use it.

    * Remove no longer used ide*_create_prevent_cmd()/ide*_set_media_lock().

    * Update comment in accordingly.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add IDE_AFLAG_{SRFP,WP} drive->atapi_flags and use them
    instead of ->{srfp,wp} struct ide_floppy_obj fields.

    There should be no functional changes caused by this patch.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add ide_queue_pc_tail() and convert ide-{floppy,tape}.c to use it
    instead of ide*_queue_pc_tail().

    * Remove no longer used ide*_queue_pc_tail().

    There should be no functional changes caused by this patch.

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

    Bartlomiej Zolnierkiewicz
     
  • * Move REQ_IDETAPE_* enums to .

    * Add ide_queue_pc_head() and convert ide-{floppy,tape}.c to use it
    instead of ide*_queue_pc_head().

    * Remove no longer used ide*_queue_pc_head().

    There should be no functional changes caused by this patch.

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

    Bartlomiej Zolnierkiewicz
     
  • * Add IDE_PC_BUFFER_SIZE define.

    * Add ide_init_pc() and convert ide-{floppy,tape}.c to use it
    instead of ide*_init_pc().

    * Remove no longer used IDE*_PC_BUFFER_SIZE and ide*_init_pc().

    There should be no functional changes caused by this patch.

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

    Bartlomiej Zolnierkiewicz
     
  • * Make ->io_buffers method return number of bytes transferred.

    * Use ide_end_request() instead of idefloppy_end_request()
    in ide_floppy_io_buffers() and then move the call out to
    ide_pc_intr().

    * Add ide_io_buffers() helper and convert ide-{floppy,scsi}.c
    to use it instead of ide*_io_buffers().

    There should be no functional changes caused by this patch.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add ide_check_atapi_device() to ide-atapi.c and convert
    ide-{floppy,tape}.c to use it instead of ide*_identify_device().

    While at it:

    * Add DRV_NAME defines to ide-{floppy,tape}.c.

    Cc: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * 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
     
  • * Add struct ide_ioctl_devset representing ioctl device setting.

    * Add ide_setting_ioctl() helper for matching given ioctl
    and its parameters against table of ioctl device settings.

    * Convert ide_setting_ioctl() and idedisk_ioctl() to use
    ide_setting_ioctl().

    * Un-export ide_setting_mtx.

    While at it:

    * {get,set}_lba_addressing() -> {get,set}_addressing()

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • It is always set to BUSSTATE_ON.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Keep pointer to ->init_chipset method also in
    struct ide_host and set it in ide_host_alloc_all().

    * Add ide_pci_suspend() and ide_pci_resume() helpers
    (default ->suspend and ->resume implementations).

    * ->init_chipset can no longer be marked __devinit.

    * Add proper PCI PM support to IDE PCI host drivers
    (rz1000.c and tc86c001.c are skipped for now since
    they need to be converted from using ->init_hwif
    to use ->init_chipset instead).

    v2:
    * Cleanup CONFIG_PM #ifdef-s per akpm's suggestion.

    Cc: Andrew Morton
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add ata_id_flush_ext_enabled() inline helper to .

    * ide_id_has_flush_cache_ext() -> ata_id_flush_ext_enabled()

    The latter one also checks if the command is marked as
    supported in word 83 and validity of words 83 & 86.

    Cc: Jeff Garzik
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add ata_id_flush_enabled() inline helper to .

    * ide_id_has_flush_cache() -> ata_id_flush_enabled()

    The latter one also checks if the command is marked as
    supported in word 83 and validity of words 83 & 86.

    Cc: Jeff Garzik
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • All devices supporting CACHE FLUSH EXT command should also support
    CACHE FLUSH command so it is sufficient to check only for CACHE FLUSH
    in ide_id_has_flush_cache().

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Use optimized ATA version check from Sergei in ata_id_is_sata().

    * ide_dev_is_sata() -> ata_id_is_sata()

    Cc: Jeff Garzik
    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Remove (id[ATA_ID_FIELD_VALID] & 2) check from ide_dev_has_iordy()
    (it is for validity of words 64-70, IORDY is in word 49).

    * ide_dev_has_iordy() -> ata_id_has_iordy()

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

    Bartlomiej Zolnierkiewicz
     
  • * Use drive->media and drive->scsi to check if ->dsc_overlap
    can be set by HDIO_SET_NICE ioctl in generic_ide_ioctl().

    * Remove unused ->supports_dsc_overlap field from ide_driver_t.

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Just use SECTOR_SIZE instead.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add struct ide_devset, S_* flags, *DEVSET() & ide*_devset_*() macros.

    * Add 'const struct ide_devset **settings' to ide_driver_t.

    * Use 'const struct ide_devset **settings' in ide_drive_t instead of
    'struct ide_settings_s *settings'. Then convert core code and device
    drivers to use struct ide_devset and co.:

    - device settings are no longer allocated dynamically for each device
    but instead there is an unique struct ide_devset instance per setting

    - device driver keeps the pointer to the table of pointers to its
    settings in ide_driver_t.settings

    - generic settings are kept in ide_generic_setting[]

    - ide_proc_[un]register_driver(), ide_find_setting_by_name(),
    ide_{read,write}_setting() and proc_ide_{read,write}_settings()
    are updated accordingly

    - ide*_add_settings() are removed

    * Remove no longer used __ide_add_setting(), ide_add_setting(),
    __ide_remove_setting() and auto_remove_settings().

    * Remove no longer used TYPE_*, SETTING_*, ide_procset_t
    and ide_settings_t.

    * ->keep_settings, ->using_dma, ->unmask, ->noflush, ->dsc_overlap,
    ->nice1, ->addressing, ->wcache and ->nowerr ide_drive_t fields
    can now be bitfield flags.

    While at it:

    * Rename ide_find_setting_by_name() to ide_find_setting().

    * Rename write_wcache() to set_wcache().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • After rework settings will be no longer created dynamically
    for each device so we need to make some fixups first.

    * Use set_[ksettings,unmaskirq]() as a set function for
    ["keepsettings","unmaskirq"] setting.

    * Allow writes to ["io_32bit","unmaskirq"] settings also when
    drive->no_[io_32bit,unmask] is set (this is checked later inside
    set_[io_32bit,unmaskirq]() anywyay and keeps consistency with
    the corresponding HDIO_SET_[32BIT,UNMASKINTR] ioctls).

    * Use max possible multi sectors value (16) as an allowed max for
    "multcount" setting. set_multcount() set function checks against
    device's max possbile value anyway and it makes the proc setting
    consistent with the corresponding HDIO_SET_MULTCOUNT ioctl.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Include directly in
    instead of through .

    * Include only when needed.

    Cc: Christoph Hellwig
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Change ide_get_paired_drive() to return NULL if peer device
    is not present and update all users accordingly.

    While at it:

    * ide_get_paired_drive() -> ide_get_pair_dev()

    * Use ide_get_pair_dev() in cs5530.c, sc1200.c and via82cxxx.c.

    There should be no functional changes caused by this patch.

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

    Bartlomiej Zolnierkiewicz
     
  • They just obfuscate the code.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Make ide_busy_sleep() take timeout value as a parameter
    and also allow use of AltStatus Register if requested with
    altstatus parameter. Update existing users accordingly.

    * Convert ide_driveid_update() and actual_try_to_identify()
    to use ide_busy_sleep().

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Remove ->remap_0_to_1 and ->sect0 (they are always zero now).

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

06 Oct, 2008

1 commit

  • This one fixes http://bugzilla.kernel.org/show_bug.cgi?id=11602.

    A more generic fix for drives which cannot autoclose tray will follow.

    Signed-off-by: Borislav Petkov
    Cc: Jens Axboe
    [bart: add an extra parentheses for consistency with the rest of kernel code]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Borislav Petkov
     

03 Sep, 2008

2 commits

  • hwif_to_node() incorrectly assumes that hwif->dev always belongs to
    a PCI device. This results in ide-cs oopsing in init_irq() after
    commit c56c5648a3bd15ff14c50f284b261140cd5b5472 accidentally fixed
    device tree registration for ide-cs. Fix it by using dev_to_node().

    Thanks to Martin Michlmayr and Larry Finger for help with debugging
    the issue.

    Reported-by: Martin Michlmayr
    Tested-by: Martin Michlmayr
    Cc: Larry Finger
    Cc: Dominik Brodowski
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • The sff_dma_ops struct should be wrapped by BLK_DEV_IDEDMA_SFF instead
    of BLK_DEV_IDEDMA_PCI.

    Signed-off-by: Kevin Hilman
    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Kevin Hilman
     

06 Aug, 2008

2 commits


25 Jul, 2008

6 commits