1. 24 7月, 2008 13 次提交
  2. 17 7月, 2008 4 次提交
  3. 16 7月, 2008 4 次提交
  4. 09 7月, 2008 1 次提交
  5. 06 7月, 2008 1 次提交
    • B
      ide: fix hwif->gendev refcounting · 7cd95f56
      Bartlomiej Zolnierkiewicz 提交于
      class->dev_release is called by device_release() iff dev->release
      is not present so ide_port_class_release() is never called and the
      last hwif->gendev reference is not dropped.
      
      Fix it by removing ide_port_class_release() and get_device() call
      from ide_register_port() (device_create_drvdata() takes a hwif->gendev
      reference anyway).
      
      This patch fixes hang on wait_for_completion(&hwif->gendev_rel_comp)
      in ide_unregister() reported by Pavel Machek.
      
      Cc: Pavel Machek <pavel@suse.cz>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7cd95f56
  6. 11 6月, 2008 2 次提交
  7. 21 5月, 2008 1 次提交
  8. 04 5月, 2008 1 次提交
  9. 01 5月, 2008 1 次提交
    • B
      ide: fix early setup of hwif->host_flags · 23f8e4bf
      Bartlomiej Zolnierkiewicz 提交于
      On Thursday 01 May 2008, Jeremy Kerr wrote:
      > Hi all,
      > 
      > On QS20 Cell machines, Linus' current git tree explodes on boot:
      > 
      > SiI680: IDE controller (0x1095:0x0680 rev 0x02) at  PCI slot 
      > 0000:00:0a.0
      > SiI680: BASE CLOCK == 133
      > SiI680: 100% native mode on irq 51
      >     ide0: MMIO-DMA
      >     ide1: MMIO-DMA
      > Unable to handle kernel paging request for data at address 
      > 0xa000100081220080
      > Faulting instruction address: 0xc000000000024748
      > cpu 0x2: Vector: 300 (Data Access) at [c00000001e143420]
      >     pc: c000000000024748: ._insw_ns+0x10/0x30
      >     lr: c000000000037fc4: .spiderpci_readsw+0x24/0x6c
      >     sp: c00000001e1436a0
      >    msr: 9000000000001032
      >    dar: a000100081220080
      >  dsisr: 40000000
      >   current = 0xc00000003d060000
      >   paca    = 0xc000000000623880
      >     pid   = 1, comm = swapper
      > enter ? for help
      > [link register   ] c000000000037fc4 .spiderpci_readsw+0x24/0x6c
      > [c00000001e1436a0] c00000000062ce63 (unreliable)
      > [c00000001e143730] c0000000000379d4 .iowa_readsw+0x78/0xa8
      > [c00000001e1437c0] c000000000037a98 .iowa_insw+0x94/0xd4
      > [c00000001e143850] c00000000022a190 .ata_input_data+0x298/0x2ec
      > [c00000001e143910] c00000000022b600 .try_to_identify+0x2c0/0x6d4
      > [c00000001e1439d0] c00000000022bb54 .do_probe+0x140/0x35c
      > [c00000001e143a80] c00000000022bfbc .ide_probe_port+0x24c/0x670
      > [c00000001e143b50] c00000000022d09c .ide_device_add_all+0x2ec/0x690
      > [c00000001e143c00] c00000000022d4a4 .ide_device_add+0x64/0x74
      > [c00000001e143c90] c00000000022f834 .ide_setup_pci_device+0x58/0x7c
      > [c00000001e143d30] c00000000038bdf8
      > [c00000001e143e10] c000000000486fb0 .ide_scan_pcibus+0x8c/0x178
      > [c00000001e143ea0] c000000000460c00 .kernel_init+0x1c4/0x344
      > [c00000001e143f90] c000000000024a1c .kernel_thread+0x4c/0x68
      > 
      > It looks like we're trying to do PIO accesses (which appear to be 
      > broken, but that's another issue) to this MMIO device. In 
      > ata_input_data, we see that:
      > 
      > 	u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
      > 
      > Gives mmio == 0.
      > 
      > (what's the difference between hwif->mmio and ID_HFLAG_MMIO?)
      > 
      > In the siimage driver, hwif->host flags is initially set up correctly 
      > (host_flags includes IDE_HFLAG_MMIO), but we then *clear* this bit in 
      > ide_init_port: 
      > 
      > 	hwif->host_flags = d->host_flags;
      > 
      > where d is the struct ide_port_info for this chipset. In my case, 
      > d->host_flags is 0x0. It looks like this will be the same for all of 
      > the siimage chipsets.
      
      Don't over-write hwif->host_flags in ide_init_port(), some host drivers
      set IDE_HFLAG_MMIO or IDE_HFLAG_NO_IO_32BIT host flag early.
      
      Thanks to Jeremy Kerr for the excellent analysis of the bug.
      Reported-by: NJeremy Kerr <jk@ozlabs.org>
      Tested-by: NJeremy Kerr <jk@ozlabs.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Ben Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      23f8e4bf
  10. 29 4月, 2008 3 次提交
  11. 27 4月, 2008 9 次提交
    • B
      ide: add struct ide_io_ports (take 3) · 4c3032d8
      Bartlomiej Zolnierkiewicz 提交于
      * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
        in ide_hwif_t.
      
      * Rename io_ports[] in hw_regs_t to io_ports_array[].
      
      * Use un-named union for 'unsigned long io_ports_array[]' and 'struct
        ide_io_ports io_ports' in hw_regs_t.
      
      * Remove IDE_*_OFFSET defines.
      
      v2:
      * scc_pata.c build fix from Stephen Rothwell.
      
      v3:
      * Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
        (Noticed by Andrew Morton)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4c3032d8
    • B
      ide: remove obsoleted "hdx=autotune" kernel parameter · 207daeaa
      Bartlomiej Zolnierkiewicz 提交于
      * Remove obsoleted "hdx=autotune" kernel parameter
        (we always auto-tune PIO if possible nowadays).
      
      * Remove no longer needed ide_drive_t.autotune flag.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      207daeaa
    • B
      ide: remove IDE_HFLAG_NO_AUTOTUNE host flag · e160124f
      Bartlomiej Zolnierkiewicz 提交于
      * Don't set IDE_HFLAG_NO_AUTOTUNE host flag in sgiioc4 and icside
        host drivers - there is no need for it as they don't implement
        ->set_pio_mode method.
      
      * Remove no longer needed IDE_HFLAG_NO_AUTOTUNE host flag.
      
      There should be no functional changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e160124f
    • B
      ide: remove obsoleted "hdx=noautotune" kernel parameter · cc12175f
      Bartlomiej Zolnierkiewicz 提交于
      Remove obsoleted "hdx=noautotune" kernel parameter
      (it has been obsoleted since 1 Nov 2004).
      
      Then make ide_hwif_t.autotune a single bit flag
      and remove no longer needed IDE_TUNE_* defines.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      cc12175f
    • B
      ide: remove obsoleted "idex=reset" kernel parameter · e460a597
      Bartlomiej Zolnierkiewicz 提交于
      Remove obsoleted "idex=reset" kernel parameter
      (it has been obsoleted since 1 Nov 2004).
      
      Then remove corresponding code from ide_probe_port()
      and no longer used ->reset field from ide_hwif_t.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e460a597
    • B
      ide: add "ignore_cable" parameter (take 2) · 9fd91d95
      Bartlomiej Zolnierkiewicz 提交于
      Add "ignore_cable" parameter:
      
      * "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in
        (i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1")
      
      * "ignore_cable=[interface_number]" module parameter (for ide_core module)
        if IDE is compiled as module
      
      v2:
      * Add ide_port_apply_params() helper
        - use it in ide_device_add_all() and ide_scan_port().
      
      * Make it possible to later disable ignoring cable detection by passing
        "[interface_number]:0" to /sys/module/ide_core/parameters/ignore_cable
        (however sysfs interface is not enabled yet since it needs some other
         IDE changes to make it work reliable).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9fd91d95
    • B
      ide: add struct ide_dma_ops (take 3) · 5e37bdc0
      Bartlomiej Zolnierkiewicz 提交于
      Add struct ide_dma_ops and convert core code + drivers to use it.
      
      While at it:
      
      * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods.
      
      * Drop "ide_" "infixes" from DMA methods.
      
      * au1xxx-ide.c:
        - use auide_dma_{test_irq,end}() directly in auide_dma_timeout()
      
      * pdc202xx_old.c:
        - drop "old_" "infixes" from DMA methods
      
      * siimage.c:
        - add siimage_dma_test_irq() helper
        - print SATA warning in siimage_init_one()
      
      * Remove no longer needed ->init_hwif implementations.
      
      v2:
      * Changes based on review from Sergei:
        - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/
        - s/drive->hwif/hwif/ in idefloppy_pc_intr().
        - fix patch description w.r.t. au1xxx-ide changes
        - fix au1xxx-ide build
        - fix naming for cmd64*_dma_ops
        - drop "ide_" and "old_" infixes
        - s/hpt3xxx_dma_ops/hpt37x_dma_ops/
        - s/hpt370x_dma_ops/hpt370_dma_ops/
        - use correct DMA ops for HPT302/N, HPT371/N and HPT374
        - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/
      
      v3:
      * Two bugs slipped in v2 (noticed by Sergei):
        - use correct DMA ops for HPT374 (for real this time)
        - handle HPT370/HPT370A properly
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5e37bdc0
    • B
      ide: add IDE_HFLAG_SERIALIZE_DMA host flag · 1fd18905
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_HFLAG_SERIALIZE_DMA host flag to serialize ports
        if DMA is available and handle it in ide_init_port().
      
      * Convert sl82c105 host driver to use this new flag.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1fd18905
    • B
      ide: do complete DMA setup in ->init_dma method (take 2) · b123f56e
      Bartlomiej Zolnierkiewicz 提交于
      * Make ide_hwif_setup_dma() return an error value.
      
      * Pass 'const struct ide_port_info *d' instead of 'unsigned long dmabase'
        to ->init_dma method and make it return an error value.
      
      * Rename ide_get_or_set_dma_base() to ide_pci_dma_base(),
        change ordering of its arguments and then export it.
      
      * Export ide_pci_set_master().
      
      * Do complete DMA setup inside ->init_dma method and update ->init_dma
        users accordingly.
      
      * Sanitize code for DMA setup in ide_init_port().
      
      v2:
      * Fix for CONFIG_BLK_DEV_IDEDMA_PCI=n configs
        (from Jiri Slaby <jirislaby@gmail.com>):
      
        Fix following compiler warning by returning EINVAL:
      
        In file included from ANYTHING-INCLUDING-IDE.H:45:
        include/linux/ide.h: In function ‘ide_hwif_setup_dma’:
        include/linux/ide.h:1022: warning: no return statement in function returning non-void
      
      Cc: Jiri Slaby <jirislaby@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b123f56e