1. 20 7月, 2007 3 次提交
  2. 18 7月, 2007 1 次提交
  3. 16 7月, 2007 2 次提交
  4. 10 7月, 2007 5 次提交
  5. 16 6月, 2007 1 次提交
  6. 08 6月, 2007 1 次提交
    • L
      ide: HPA detect from resume · 0d2157f7
      Lee Trager 提交于
      Currently when system which have HPA require HPA to be detected and
      disabled upon resume from RAM or disk. The current IDE drivers do not do
      this nor does libata (obviously it since it doesn't support HPA yet).
      
      I have implemented this into the current IDE drivers and it has been
      tested by many others since 7/15/2006 in bug number 6840:
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=6840
      
      and it has been confirmed to work fine with no problems.
      
      bart: added drv != NULL check to generic_ide_suspend()
      
      From: Lee Trager <lt73@cs.drexel.edu>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0d2157f7
  7. 16 5月, 2007 1 次提交
  8. 10 5月, 2007 8 次提交
    • B
      ide: legacy PCI bus order probing fixes · 6d208b39
      Bartlomiej Zolnierkiewicz 提交于
      IDE PCI host drivers should register themselves with IDE core only when
      IDE driver is built-in, otherwise (IDE driver is modular and thus IDE PCI
      host drivers are also modular) the code has no effect and just complicates
      the probing.
      
      Fix it by adding new config option CONFIG_IDEPCI_PCIBUS (defined only when
      needed and invisible to the user) and covering by #ifdef/#endif the code
      in question.  It turned out that "ide=reverse" was silently accepted but did
      nothing in case when IDE driver was modular, this is fixed now.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6d208b39
    • B
      ide: add ide_proc_register_port() · 5cbf79cd
      Bartlomiej Zolnierkiewicz 提交于
      * create_proc_ide_interfaces() tries to add /proc entries for every probed
        and initialized IDE port, replace it by ide_proc_register_port() which does
        it only for the given port (also rename destroy_proc_ide_interface() to
        ide_proc_unregister_port() for consistency)
        
      * convert {create,destroy}_proc_ide_interface[s]() users to use new functions
      
      * pmac driver depended on proc_ide_create() to add /proc port entries, fix it
        
      * au1xxx-ide, swarm and cs5520 drivers depended indirectly on ide-generic
        driver (CONFIG_IDE_GENERIC=y) to add port /proc entries, fix them
      
      * there is now no need to add /proc entries for IDE ports in proc_ide_create()
        so don't do it
      
      * proc_ide_create() needs now to be called before drivers are probed - fix it,
        while at it make proc_ide_create() create /proc "ide" directory
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5cbf79cd
    • B
      ide: add "initializing" argument to ide_register_hw() · 869c56ee
      Bartlomiej Zolnierkiewicz 提交于
      Add "initializing" argument to ide_register_hw() and use it instead of ide.c
      wide variable of the same name.  Update all users of ide_register_hw()
      accordingly.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      869c56ee
    • B
      ide: move IDE settings handling to ide-proc.c · 7662d046
      Bartlomiej Zolnierkiewicz 提交于
      * move
      	__ide_add_setting()
      	ide_add_setting()
      	__ide_remove_setting()
      	auto_remove_settings()
      	ide_find_setting_by_name()
      	ide_read_setting()
      	ide_write_setting()
      	set_xfer_rate()
      	ide_add_generic_settings()
      	ide_register_subdriver()
      	ide_unregister_subdriver()
      
        from ide.c to ide-proc.c
      
      * set_{io_32bit,pio_mode,using_dma}() cannot be marked static now, fix it
      
      * rename ide_[un]register_subdriver() to ide_proc_[un]register_driver(),
        update device drivers to use new names
      
      * add CONFIG_IDE_PROC_FS=n versions of ide_proc_[un]register_driver()
        and ide_add_generic_settings()
      
      * make ide_find_setting_by_name(), ide_{read,write}_setting()
        and ide_{add,remove}_proc_entries() static
      
      * cover IDE settings code in device drivers with CONFIG_IDE_PROC_FS #ifdef,
        also while at it cover with CONFIG_IDE_PROC_FS #ifdef ide_driver_t.proc
      
      * remove bogus comment from ide.h
      
      * cover with CONFIG_IDE_PROC_FS #ifdef .proc and .settings in ide_drive_t
      
      Besides saner code this patch results in the IDE core smaller by ~2 kB
      (on x86-32) and IDE disk driver by ~1 kB (ditto) when CONFIG_IDE_PROC_FS=n.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7662d046
    • B
      ide: split off ioctl handling from IDE settings (v2) · 1497943e
      Bartlomiej Zolnierkiewicz 提交于
      * do write permission and min/max checks in ide_procset_t functions
      
      * ide-disk.c: drive->id is always available so cleanup "multcount" setting
        accordingly
      
      * ide-disk.c: "address" setting was incorrectly defined as type TYPE_INTA,
        fix it by using type TYPE_BYTE and updating ide_drive_t->adressing field,
        the bug didn't trigger because this IDE setting uses custom ->set function
      
      * ide.c: add set_ksettings() for handling HDIO_SET_KEEPSETTINGS ioctl
      
      * ide.c: add set_unmaskirq() for handling HDIO_SET_UNMASKINTR ioctl
      
      * handle ioctls directly in generic_ide_ioclt() and idedisk_ioctl()
        instead of using IDE settings to deal with them
      
      * remove no longer needed ide_find_setting_by_ioctl() and {read,write}_ioctl
        fields from ide_settings_t, also remove now unused TYPE_INTA handling
      
      v2:
      * add missing EXPORT_SYMBOL_GPL(ide_setting_sem) needed now for ide-disk
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1497943e
    • B
      ide: make /proc/ide/ optional · ecfd80e4
      Bartlomiej Zolnierkiewicz 提交于
      All important information/features should be already available through
      sysfs and ioctl interfaces.
      
      Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
      disabling it makes IDE driver ~5 kB smaller (on x86-32).
      
      While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
      and remove no longer needed #ifdefs.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ecfd80e4
    • B
      ide: rework the code for selecting the best DMA transfer mode (v3) · 2d5eaa6d
      Bartlomiej Zolnierkiewicz 提交于
      Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.
      
      * add ide_hwif_t.udma_filter hook for filtering UDMA mask
        (use it in alim15x3, hpt366, siimage and serverworks drivers)
      * add ide_max_dma_mode() for finding best DMA mode for the device
        (loosely based on some older libata-core.c code)
      * convert ide_dma_speed() users to use ide_max_dma_mode()
      * make ide_rate_filter() take "ide_drive_t *drive" as an argument instead
        of "u8 mode" and teach it to how to use UDMA mask to do filtering
      * use ide_rate_filter() in hpt366 driver
      * remove no longer needed ide_dma_speed() and *_ratemask()
      * unexport eighty_ninty_three()
      
      v2:
      * rename ->filter_udma_mask to ->udma_filter
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * updated for scc_pata driver (fixes XFER_UDMA_6 filtering for user-space
        originated transfer mode change requests when 100MHz clock is used)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2d5eaa6d
    • B
      ide: fix UDMA/MWDMA/SWDMA masks (v3) · 18137207
      Bartlomiej Zolnierkiewicz 提交于
      * use 0x00 instead of 0x80 to disable ->{ultra,mwdma,swdma}_mask
      * add udma_mask field to ide_pci_device_t and use it to initialize
        ->ultra_mask in aec62xx, cmd64x, pdc202xx_{new,old} and piix drivers
      * fix UDMA masks to match with chipset specific *_ratemask()
        (alim15x3, hpt366, serverworks and siimage drivers need UDMA mask
         filtering method - done in the next patch)
      
      v2:
      * piix: fix cable detection for 82801AA_1 and 82372FB_1
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * cmd64x: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * aec62xx: fix newly introduced bug - check DMA status not command register
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * piix: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      18137207
  9. 11 4月, 2007 1 次提交
  10. 27 3月, 2007 1 次提交
    • B
      ide: fix locking for manual DMA enable/disable ("hdparm -d") · 87996204
      Bartlomiej Zolnierkiewicz 提交于
      Since hwif->ide_dma_check and hwif->ide_dma_on never queue any commands
      (ide_config_drive_speed() sets transfer mode using polling and has no error
      recovery) we are safe with setting hwgroup->busy for the time while DMA
      setting for a drive is changed (so it won't race against I/O commands in fly).
      
      I audited briefly all ->ide_dma_check/->ide_dma_on/->tuneproc/->speedproc
      implementations and they all look OK wrt to this change.
      
      This patch finally allowed me to close kernel bugzilla bug #8169
      (once again thanks to Patrick Horn for reporting the issue & testing patches).
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      87996204
  11. 18 3月, 2007 1 次提交
    • B
      ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config options · 120b9cfd
      Bartlomiej Zolnierkiewicz 提交于
      All modern distributions have been setting these options to "y" for ages.
      (additionally "n" cases have been obsoleted for few years).  Therefore use
      DMA by default and remove CONFIG_IDEDMA_{ICS,PCI}_AUTO (also remove no longer
      needed CONFIG_IDEDMA_AUTO).  This fixes DMA support for rare configurations
      where CONFIG_IDEDMA_{ICS,PCI}_AUTO was set to "n" but "hdparm -d 1" was used
      to enable DMA support and which were forced to PIO mode by "ide: don't allow
      DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n" patch.  There is no
      functionality loss because "ide=nodma" kernel option is still available.
      
      Cc: Patrick Horn <phrh@yahoo.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Russell King <rmk+lkml@arm.linux.org.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      120b9cfd
  12. 04 3月, 2007 4 次提交
  13. 17 2月, 2007 7 次提交
  14. 08 2月, 2007 1 次提交
    • H
      ACPI support for IDE devices · e3a59b4d
      Hannes Reinecke 提交于
      This patch implements ACPI integration for generic IDE devices.
      The ACPI spec mandates that some methods are called during suspend and
      resume. And consequently there most modern Laptops cannot resume
      properly without it.
      
      According to the spec, we should call '_GTM' (Get Timing) upon suspend
      to store the current IDE adapter settings.
      Upon resume we should call '_STM' (Set Timing) to initialize the
      adapter with the stored settings; afterwards '_GTF' (Get Taskfile)
      should be called which returns a buffer with some IDE initialisation
      commands. Those commands should be passed to the drive.
      
      There are two module params which control the behaviour of this patch:
      
      'ide=noacpi'
      	Do not call any ACPI methods (Disables any ACPI method calls)
      'ide=acpigtf'
      	Enable execution of _GTF methods upon resume.
      	Has no effect if 'ide=noacpi' is set.
      'ide=acpionboot'
      	Enable execution of ACPI methods during boot.
      	This might be required on some machines if 'ide=acpigtf' is
      	selected as some machines modify the _GTF information
      	depending on the drive identification passed down with _STM.
      Signed-off-by: NHannes Reinecke <hare@suse.de>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e3a59b4d
  15. 02 2月, 2007 1 次提交
  16. 27 1月, 2007 1 次提交
  17. 08 12月, 2006 1 次提交
    • P
      [PATCH] lockdep: fix ide/proc interaction · 9a2239b1
      Peter Zijlstra 提交于
        rmmod/3080 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
         (proc_subdir_lock){--..}, at: [<c04a33b0>] remove_proc_entry+0x40/0x191
      
        and this task is already holding:
         (ide_lock){++..}, at: [<c05651a2>] ide_unregister_subdriver+0x39/0xc8
        which would create a new lock dependency:
         (ide_lock){++..} -> (proc_subdir_lock){--..}
      
        but this new dependency connects a hard-irq-safe lock:
         (ide_lock){++..}
        ... which became hard-irq-safe at:
          [<c043c458>] lock_acquire+0x4b/0x6b
          [<c06129d7>] _spin_lock_irqsave+0x22/0x32
          [<c0567870>] ide_intr+0x17/0x1a9
          [<c044eb31>] handle_IRQ_event+0x20/0x4d
          [<c044ebf2>] __do_IRQ+0x94/0xef
          [<c0406771>] do_IRQ+0x9e/0xbd
      
        to a hard-irq-unsafe lock:
         (proc_subdir_lock){--..}
        ... which became hard-irq-unsafe at:
        ...  [<c043c458>] lock_acquire+0x4b/0x6b
          [<c06126ab>] _spin_lock+0x19/0x28
          [<c04a32f2>] xlate_proc_name+0x1b/0x99
          [<c04a3547>] proc_create+0x46/0xdf
          [<c04a3642>] create_proc_entry+0x62/0xa5
          [<c07c1972>] proc_misc_init+0x1c/0x1d2
          [<c07c1844>] proc_root_init+0x4c/0xe9
          [<c07ad703>] start_kernel+0x294/0x3b3
      
      Move ide_remove_proc_entries() out from under ide_lock; there is nothing
      that indicates that this is needed.
      
      In specific, the call to ide_add_proc_entries() is unprotected, and there
      is nothing else in the file using the respective ->proc fields. Also the
      lock order around destroy_proc_ide_interface() suggests this.
      
      Alan sayeth:
      
        proc_ide_write_settings walks the setting list under ide_setting_sem, read
        ditto.  remove_proc_entry is doing proc side housekeeping.
      
        Looks fine to me, although that old code is such a mess anything could be
        going on.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9a2239b1