1. 11 10月, 2008 8 次提交
    • B
      ide: remove ->supports_dsc_overlap field from ide_driver_t · 02d599a3
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      02d599a3
    • B
      ide: /proc/ide/hd*/settings rework · 8185d5aa
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8185d5aa
    • B
      ide: call ide_proc_register_driver() later · 1e874f44
      Bartlomiej Zolnierkiewicz 提交于
      Call ide_proc_register_driver() in ide*_setup() (just before
      ide*_add_settings() call) instead of in ->probe method.
      
      Despite being basically a preparation for /proc/ide/hd*/settings
      rework this is a nice cleanup in itself.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1e874f44
    • B
      ide: include <linux/hdreg.h> only when needed · 3ceca727
      Bartlomiej Zolnierkiewicz 提交于
      * Include <linux/ata.h> directly in <linux/ide.h>
        instead of through <linux/hdreg.h>.
      
      * Include <linux/hdreg.h> only when needed.
      
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ceca727
    • B
      ide: remove needless drive->present checks from device drivers · 2a924662
      Bartlomiej Zolnierkiewicz 提交于
      Remove needless drive->present checks from ->probe methods
      (device model takes care of that).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2a924662
    • 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: WIN_* -> ATA_CMD_* · aaaade3f
      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: NChris Wedgwood <cw@f00f.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      aaaade3f
    • B
      ide: make drive->id an union (take 2) · 4dde4492
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4dde4492
  2. 09 10月, 2008 22 次提交
  3. 04 10月, 2008 10 次提交