1. 05 3月, 2009 2 次提交
  2. 03 2月, 2009 1 次提交
  3. 07 1月, 2009 13 次提交
  4. 02 1月, 2009 6 次提交
    • B
      5317464d
    • B
      ide: use per-device request queue locks (v2) · 201bffa4
      Bartlomiej Zolnierkiewicz 提交于
      * Move hack for flush requests from choose_drive() to do_ide_request().
      
      * Add ide_plug_device() helper and convert core IDE code from using
        per-hwgroup lock as a request lock to use the ->queue_lock instead.
      
      * Remove no longer needed:
        - choose_drive() function
        - WAKEUP() macro
        - 'sleeping' flag from ide_hwif_t
        - 'service_{start,time}' fields from ide_drive_t
      
      This patch results in much simpler and more maintainable code
      (besides being a scalability improvement).
      
      v2:
      * Fixes/improvements based on review from Elias:
        - take as many requests off the queue as possible
        - remove now redundant BUG_ON()
      
      Cc: Elias Oltmanns <eo@nebensachen.de>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      201bffa4
    • B
      ide: add ide_[un]lock_hwgroup() helpers · 631de370
      Bartlomiej Zolnierkiewicz 提交于
      Add ide_[un]lock_hwgroup() inline helpers for obtaining exclusive
      access to the given hwgroup and update the core code accordingly.
      
      [ This change besides making code saner results in more efficient
        use of ide_{get,release}_lock(). ]
      
      Cc: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Elias Oltmanns <eo@nebensachen.de>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      631de370
    • B
      ide: remove "paranoia" checks for hwgroup->busy · b2cfb05a
      Bartlomiej Zolnierkiewicz 提交于
      Remove "paranoia" checks for hwgroup->busy from ide_timer_expiry()
      and ide_intr().  This is a preparation for future changes.
      
      Cc: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Elias Oltmanns <eo@nebensachen.de>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b2cfb05a
    • B
      ide: remove IDE PM hack from do_ide_request() · 2fb21150
      Bartlomiej Zolnierkiewicz 提交于
      We now tell block layer that there is still work to do using
      blk_plug_device() so hack for IDE Power Management can be removed
      (it was buggy for hwgroups having more than 4 devices anyway).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2fb21150
    • B
      ide: don't execute the next queued command from the hard-IRQ context (v2) · 295f0004
      Bartlomiej Zolnierkiewicz 提交于
      * Tell the block layer that we are not done handling requests by using
        blk_plug_device() in ide_do_request() (request handling function)
        and ide_timer_expiry() (timeout handler) if the queue is not empty.
      
      * Remove optimization which directly calls ide_do_request() for the next
        queued command from the ide_intr() (IRQ handler) and ide_timer_expiry().
      
      * Remove no longer needed IRQ masking from ide_do_request() - in case of
        IDE ports needing serialization disable_irq_nosync()/enable_irq() was
        used for the (possibly shared) IRQ of the other IDE port.
      
      * Put the misplaced comment in the right place in ide_do_request().
      
      * Drop no longer needed 'int masked_irq' argument from ide_do_request().
      
      * Merge ide_do_request() into do_ide_request().
      
      * Remove no longer needed IDE_NO_IRQ define.
      
      While at it:
      
      * Don't use HWGROUP() macro in do_ide_request().
      
      * Use __func__ in ide_intr().
      
      This patch reduces IRQ hadling latency for IDE and improves the system-wide
      handling of shared IRQs (which should result in more timeout resistant and
      stable IDE systems).  It also makes it possible to do some further changes
      later (i.e. replace some busy-waiting delays with sleeping equivalents).
      
      v2:
      Changes per review from Elias Oltmanns:
      - fix wrong goto statement in 'if (startstop == ide_stopped)' block
      - use spin_unlock_irq()
      - don't use obsolete HWIF() macro
      
      Cc: Elias Oltmanns <eo@nebensachen.de>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      295f0004
  5. 30 12月, 2008 11 次提交
  6. 09 12月, 2008 1 次提交
  7. 03 12月, 2008 3 次提交
  8. 17 10月, 2008 1 次提交
  9. 14 10月, 2008 2 次提交
    • E
      ide: Implement disk shock protection support (v4) · 4abdc6ee
      Elias Oltmanns 提交于
      On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
      FEATURE as specified in ATA-7 is issued to the device and processing of
      the request queue is stopped thereafter until the specified timeout
      expires or user space asks to resume normal operation. This is supposed
      to prevent the heads of a hard drive from accidentally crashing onto the
      platter when a heavy shock is anticipated (like a falling laptop expected
      to hit the floor). Port resets are deferred whenever a device on that
      port is in the parked state.
      
      v3:
      Elias Oltmanns <eo@nebensachen.de> wrote:
      [...]
      > >> 1. Make sure that no negative value is being passed to
      > >>    jiffies_to_msecs() in ide_park_show().
      > >> 2. Drop the superfluous variable hwif in ide_special_rq().
      > >> 3. Skip initialisation of task and tf in ide_special_rq() if we are not
      > >>    handling a (un)park request.
      > >
      > > Well, #3 should have been done differently because we donn't want to
      > > check for REQ_(UN)?PARK_HEADS more often than is necessary.
      > 
      > While preparing the backport to 2.6.27, it has just occurred to me that
      > we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset()
      > because this flag must not be set after *any* sort of access to the
      > device.
      
      v4:
      Fix a memory leak due to a missing blk_put_request() in
      issue_park_cmd(). Additionally, we should plug the queue when enqueueing
      the unpark request because there is no guarantee that the park timeout
      has not expired by then. Even though the chance for that to happen is
      very slim, the request might end up hanging in the queue until the next
      I/O operation is queued up. While at it, clean up the code a little:
      - make issue_park_cmd() a function of type void since nobody cares for
        the return value anyway;
      - use blk_start_queueing() instead of __blk_run_queue() since we don't
        have to worry about recursion;
      - remove a superfluous pointer deference in task_no_data_intr().
      Signed-off-by: NElias Oltmanns <eo@nebensachen.de>
      Cc: Jeff Garzik <jeff@garzik.org>,
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4abdc6ee
    • E
      ide: Two fixes regarding memory allocation · e415e495
      Elias Oltmanns 提交于
      In function ide_devset_execute() we should use __GFP_WAIT rather than
      GFP_KERNEL. Also, the allocation cannot possibly fail at that point.
      More importantly, there is a potential memory leak in the device probing
      code. The infrastructure seems rather complex and I hope I haven't messed
      anything up by trying to fix this.
      Signed-off-by: NElias Oltmanns <eo@nebensachen.de>
      [bart: remove superfluous ide_lock taking]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e415e495