1. 06 8月, 2008 1 次提交
    • 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
  2. 25 7月, 2008 1 次提交
  3. 24 7月, 2008 1 次提交
    • B
      ide: remove dead Virtual DMA support · ba4b2e60
      Bartlomiej Zolnierkiewicz 提交于
      Lets remove dead Virtual DMA support for now so it doesn't clutter
      core IDE code (it can be bring back when there is a need for it):
      
      * Remove IDE_HFLAG_VDMA host flag.
      
      * Remove ide_drive_t.vdma flag.
      
      * cs5520.c: remove stale FIXMEs, cs5520_dma_host_set() and cs5520_dma_ops
        (also there is no longer a need to set IDE_HFLAG_NO_ATAPI_DMA).
      
      There should be no functional changes caused by this patch.
      
      Cc: TAKADA Yoshihito <takada@mbf.nifty.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ba4b2e60
  4. 17 7月, 2008 1 次提交
  5. 16 7月, 2008 2 次提交
  6. 26 4月, 2008 2 次提交
  7. 27 2月, 2008 1 次提交
  8. 19 2月, 2008 1 次提交
  9. 11 2月, 2008 1 次提交
    • B
      ide-disk: fix flush requests (take 2) · 395d8ef5
      Bartlomiej Zolnierkiewicz 提交于
      commit 813a0eb2
      Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Date:   Fri Jan 25 22:17:10 2008 +0100
      
          ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests
      
      ...
      
      broke flush requests.
      
      Allocating IDE command structure on the stack for flush requests is not
      a very brilliant idea:
      
      - idedisk_prepare_flush() only prepares the request and it doesn't wait
        for it to be completed
      
      - there are can be multiple flush requests queued in the queue
      
      Fix the problem (per hints from James Bottomley) by:
      - dynamically allocating ide_task_t instance using kmalloc(..., GFP_ATOMIC)
      - adding new taskfile flag (IDE_TFLAG_DYN)
      - calling kfree() in ide_end_drive_command() if IDE_TFLAG_DYN is set
        (while at it rename 'args' to 'task' and fix whitespace damage)
      
      [ This will be fixed properly before 2.6.25 but this bug is rather
        critical and the proper solution requires some more work + testing. ]
      
      Thanks to Sebastian Siewior and Christoph Hellwig for reporting the
      problem and testing patches (extra thanks to Sebastian for bisecting
      it to the guilty commmit).
      Tested-by: NSebastian Siewior <ide-bug@ml.breakpoint.cc>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      395d8ef5
  10. 02 2月, 2008 2 次提交
  11. 27 1月, 2008 5 次提交
  12. 26 1月, 2008 20 次提交
  13. 13 12月, 2007 2 次提交
    • B
    • B
      ide: DMA reporting and validity checking fixes (take 3) · 3ab7efe8
      Bartlomiej Zolnierkiewicz 提交于
      * ide_xfer_verbose() fixups:
        - beautify returned mode names
        - fix PIO5 reporting
        - make it return 'const char *'
      
      * Change printk() level from KERN_DEBUG to KERN_INFO in ide_find_dma_mode().
      
      * Add ide_id_dma_bug() helper based on ide_dma_verbose() to check for invalid
        DMA info in identify block.
      
      * Use ide_id_dma_bug() in ide_tune_dma() and ide_driveid_update().
      
        As a result DMA won't be tuned or will be disabled after tuning if device
        reports inconsistent info about enabled DMA mode (ide_dma_verbose() does the
        same checks while the IDE device is probed by ide-{cd,disk} device driver).
      
      * Remove no longer needed ide_dma_verbose().
      
      This patch should fix the following problem with out-of-sync IDE messages
      reported by Nick Warne:
      
             hdd: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache<7>hdd:
             skipping word 93 validity check
              , UDMA(66)
      
      and later debugged by Mark Lord to be caused by:
      
              ide_dma_verbose()
                      printk( ... "2048kB Cache");
              eighty_ninty_three()
                      printk(KERN_DEBUG "%s: skipping word 93 validity check\n");
              ide_dma_verbose()
                      printk(", UDMA(66)"
      
      Please note that as a result ide-{cd,disk} device drivers won't report the
      DMA speed used but this is intended since now DMA mode being used is always
      reported by IDE core code.
      
      v2:
      * fixes suggested by Randy:
        - use KERN_CONT for printk()-s in ide-{cd,disk}.c
        - don't remove argument name from ide_xfer_verbose() declaration
      
      v3:
      * Remove incorrect check for (id->field_valid & 1) from ide_id_dma_bug()
        (spotted by Sergei).
      
      * "XFER SLOW" -> "PIO SLOW" in ide_xfer_verbose() (suggested by Sergei).
      
      * Fix ide_find_dma_mode() to report the correct mode ('mode' after being
        limited by 'req_mode').
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Nick Warne <nick@ukfsn.org>
      Cc: Mark Lord <lkml@rtr.ca>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ab7efe8