1. 29 8月, 2008 1 次提交
    • F
      remove blk_register_filter and blk_unregister_filter in gendisk · bb23b431
      FUJITA Tomonori 提交于
      This patch remove blk_register_filter and blk_unregister_filter in
      gendisk, and adds them to sd.c, sr.c. and ide-cd.c
      
      The commit abf54393 moved cmdfilter
      from gendisk to request_queue. It turned out that in some subsystems
      multiple gendisks share a single request_queue. So we get:
      
      Using physmap partition information
      Creating 3 MTD partitions on "physmap-flash":
      0x00000000-0x01c00000 : "User FS"
      0x01c00000-0x01c40000 : "booter"
      kobject (8511c410): tried to init an initialized object, something is seriously wrong.
      Call Trace:
      [<8036644c>] dump_stack+0x8/0x34
      [<8021f050>] kobject_init+0x50/0xcc
      [<8021fa18>] kobject_init_and_add+0x24/0x58
      [<8021d20c>] blk_register_filter+0x4c/0x64
      [<8021c194>] add_disk+0x78/0xe0
      [<8027d14c>] add_mtd_blktrans_dev+0x254/0x278
      [<8027c8f0>] blktrans_notify_add+0x40/0x78
      [<80279c00>] add_mtd_device+0xd0/0x150
      [<8027b090>] add_mtd_partitions+0x568/0x5d8
      [<80285458>] physmap_flash_probe+0x2ac/0x334
      [<802644f8>] driver_probe_device+0x12c/0x244
      [<8026465c>] __driver_attach+0x4c/0x84
      [<80263c64>] bus_for_each_dev+0x58/0xac
      [<802633ec>] bus_add_driver+0xc4/0x24c
      [<802648e0>] driver_register+0xcc/0x184
      [<80100460>] _stext+0x60/0x1bc
      
      In the long term, we need to fix such subsystems but we need a quick
      fix now. This patch add the command filter support to only sd and sr
      though it might be useful for other SG_IO users (such as cciss).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Reported-by: NManuel Lauss <mano@roarinelk.homelinux.net>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      bb23b431
  2. 19 8月, 2008 1 次提交
  3. 06 8月, 2008 2 次提交
    • P
      ide-cd: fix endianity for the error message in cdrom_read_capacity · 938bb03d
      Petr Tesarik 提交于
      Aesthetic regards aside, commit e8e7b9eb
      still leaves a bug in the error message, because it uses the unconverted
      big-endian value for printk.
      
      Fix this by using a local variable in machine byte order. The result is
      correct, more readable, and also produces slightly shorter code on i386.
      Signed-off-by: NPetr Tesarik <ptesarik@suse.cz>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: <stable@kernel.org>
      Acked-by: NBorislav Petkov <petkovbb@gmail.com>
      [bart: __u32 -> u32]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      938bb03d
    • B
      ide: fix regression caused by ide_device_{get,put}() addition (take 2) · d3e33ff5
      Bartlomiej Zolnierkiewicz 提交于
      On Monday 28 July 2008, Benjamin Herrenschmidt wrote:
      
      [...]
      
      > Vector: 300 (Data Access) at [c58b7b80]
      >     pc: c014f264: elv_may_queue+0x10/0x44
      >     lr: c0152750: get_request+0x2c/0x2c0
      >     sp: c58b7c30
      >    msr: 1032
      >    dar: c
      >  dsisr: 40000000
      >   current = 0xc58aaae0
      >     pid   = 854, comm = media-bay
      > enter ? for help
      > mon> t
      > [c58b7c40] c0152750 get_request+0x2c/0x2c0
      > [c58b7c70] c0152a08 get_request_wait+0x24/0xec
      > [c58b7cc0] c0225674 ide_cd_queue_pc+0x58/0x1a0
      > [c58b7d40] c022672c ide_cdrom_packet+0x9c/0xdc
      > [c58b7d70] c0261810 cdrom_get_disc_info+0x60/0xd0
      > [c58b7dc0] c026208c cdrom_mrw_exit+0x1c/0x11c
      > [c58b7e30] c0260f7c unregister_cdrom+0x84/0xe8
      > [c58b7e50] c022395c ide_cd_release+0x80/0x84
      > [c58b7e70] c0163650 kref_put+0x54/0x6c
      > [c58b7e80] c0223884 ide_cd_put+0x40/0x5c
      > [c58b7ea0] c0211100 generic_ide_remove+0x28/0x3c
      > [c58b7eb0] c01e9d34 __device_release_driver+0x78/0xb4
      > [c58b7ec0] c01e9e44 device_release_driver+0x28/0x44
      > [c58b7ee0] c01e8f7c bus_remove_device+0xac/0xd8
      > [c58b7f00] c01e7424 device_del+0x104/0x198
      > [c58b7f20] c01e74d0 device_unregister+0x18/0x30
      > [c58b7f40] c02121c4 __ide_port_unregister_devices+0x6c/0x88
      > [c58b7f60] c0212398 ide_port_unregister_devices+0x38/0x80
      > [c58b7f80] c0208ca4 media_bay_step+0x1cc/0x5c0
      > [c58b7fb0] c0209124 media_bay_task+0x8c/0xcc
      > [c58b7fd0] c00485c0 kthread+0x48/0x84
      > [c58b7ff0] c0011b20 kernel_thread+0x44/0x60
      
      The guilty commit turned out to be 08da591e
      ("ide: add ide_device_{get,put}() helpers").  ide_device_put() is called
      before kref_put() in ide_cd_put() so IDE device is already gone by the time
      ide_cd_release() is reached.
      
      Fix it by calling ide_device_get() before kref_get() and ide_device_put()
      after kref_put() in all affected device drivers.
      
      v2:
      Brown paper bag time.  In v1 cd->drive was referenced after dropping last
      reference on cd object (which could result in OOPS in ide_device_put() as
      reported/debugged by Mariusz Kozlowski).  Fix it by caching cd->drive in
      the local variable (fix other device drivers too).
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reported-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Borislav Petkov <petkovbb@gmail.com>
      Tested-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Tested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d3e33ff5
  4. 25 7月, 2008 2 次提交
  5. 24 7月, 2008 5 次提交
  6. 17 7月, 2008 13 次提交
  7. 16 7月, 2008 7 次提交
  8. 29 4月, 2008 5 次提交
  9. 27 4月, 2008 4 次提交
    • 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=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: 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-cd: fix remaining checkpatch.pl issues · e5e076a3
      Borislav Petkov 提交于
      Some of them are:
      WARNING: braces {} are not necessary for single statement blocks
      CHECK: multiple assignments should be avoided
      WARNING: printk() should include KERN_ facility level
      WARNING: no space between function name and open parenthesis '('
      
      [bart: minor fixups]
      Signed-off-by: NBorislav Petkov <petkovbb@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e5e076a3