1. 28 Apr, 2009 14 commits
    • Tejun Heo's avatar
      ide-cd: don't abuse rq->buffer · 1f181d2b
      Tejun Heo authored
      Impact: rq->buffer usage cleanup
      
      ide-cd uses rq->buffer to carry pointer to the original request when
      issuing REQUEST_SENSE.  Use rq->special instead.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      1f181d2b
    • Tejun Heo's avatar
      ide-atapi: don't abuse rq->buffer · ac0b0113
      Tejun Heo authored
      Impact: rq->buffer usage cleanup
      
      ide-atapi uses rq->buffer as private opaque value for internal special
      requests.  rq->special isn't used for these cases (the only case where
      rq->special is used is for ide-tape rw requests).  Use rq->special
      instead.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      ac0b0113
    • Tejun Heo's avatar
      ide-taskfile: don't abuse rq->buffer · d868ca24
      Tejun Heo authored
      Impact: rq->buffer usage cleanup
      
      ide_raw_taskfile() directly uses rq->buffer to carry pointer to the
      data buffer.  This complicates both block interface and ide backend
      request handling.  Use blk_rq_map_kern() instead and drop special
      handling for REQ_TYPE_ATA_TASKFILE from ide_map_sg().
      
      Note that REQ_RW setting is moved upwards as blk_rq_map_kern() uses it
      to initialize bio rw flag.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      d868ca24
    • Tejun Heo's avatar
      ide-floppy: block pc always uses bio · 8968932e
      Tejun Heo authored
      Impact: remove unnecessary code path
      
      Block pc requests always use bio and rq->data is always NULL.  No need
      to worry about !rq->bio cases in idefloppy_block_pc_cmd().  Note that
      ide-atapi uses ide_pio_bytes() for bio PIO transfer which handle sg
      fine.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      8968932e
    • Tejun Heo's avatar
      ide-cd: clear sense buffer before issuing request sense · 59a4f6f3
      Tejun Heo authored
      Impact: code simplification
      
      ide_cd_request_sense_fixup() clears the tail of the sense buffer if
      the device didn't completely fill it.  This patch makes
      cdrom_queue_request_sense() clear the sense buffer before issuing the
      command instead of clearing it afterwards.  This simplifies code and
      eases future changes.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      59a4f6f3
    • Tejun Heo's avatar
      ide kill unused ide_cmd->special · 214ae191
      Tejun Heo authored
      Impact: removal of unused field
      
      No one uses ide_cmd->special anymore.  Kill it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      214ae191
    • Tejun Heo's avatar
      ide: don't set REQ_SOFTBARRIER · b2963ac1
      Tejun Heo authored
      ide doesn't have to worry about REQ_SOFTBARRIER.  Don't set it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      b2963ac1
    • Tejun Heo's avatar
      ide: use blk_run_queue() instead of blk_start_queueing() · 220d06b5
      Tejun Heo authored
      blk_start_queueing() is being phased out in favor of
      [__]blk_run_queue().  Switch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      220d06b5
    • Tejun Heo's avatar
      ide-tape: remove back-to-back REQUEST_SENSE detection · 0de57fb9
      Tejun Heo authored
      Impact: fix an oops which always triggers
      
      ide_tape_issue_pc() assumed drive->pc isn't NULL on invocation when
      checking for back-to-back request sense issues but drive->pc can be
      NULL and even when it's not NULL, it's not safe to dereference it once
      the previous command is complete because pc could have been freed or
      was on stack.  Kill back-to-back REQUEST_SENSE detection.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      0de57fb9
    • Tejun Heo's avatar
      block: clear req->errors on bio completion only for fs requests · 924cec77
      Tejun Heo authored
      Impact: subtle behavior change
      
      For fs requests, rq is only carrier of bios and rq error status as a
      whole doesn't mean much.  This is the reason why rq->errors is being
      cleared on each partial completion of a request as on each partial
      completion the error status is transferred to the respective bios.
      
      For pc requests, rq->errors is used to carry error status to the
      issuer and thus __end_that_request_first() doesn't clear it on such
      cases.
      
      The condition was fine till now as only fs and pc requests have used
      bio and thus the bio completion path.  However, future changes will
      unify data accesses to bio and all non fs users care about rq error
      status.  Clear rq->errors on bio completion only for fs requests.
      
      In general, the implicit clearing is a bit too subtle especially as
      the meaning of rq->errors is completely dependent on low level
      drivers.  Unifying / cleaning up rq->errors usage and letting llds
      manage it would be better.  TODO comment added.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      924cec77
    • Akinobu Mita's avatar
      loop: use BIO list management functions · e686307f
      Akinobu Mita authored
      Now that the bio list management stuff is generic, convert loop to use
      bio lists instead of its own private bio list implementation.
      
      Cc:  Jens Axboe <axboe@kernel.dk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      e686307f
    • Tejun Heo's avatar
      hd: fix locking · e93b9fb7
      Tejun Heo authored
      hd dance around local irq and HD_IRQ enable without achieving much.
      It ends up transferring data from irq handler with both local irq and
      HD_IRQ disabled.  The only place it actually does something is while
      transferring the first block of a request which it does with HD_IRQ
      disabled but local irq enabled.
      
      Unfortunately, the dancing is horribly broken from locking POV.  IRQ
      and timeout handlers access block queue without grabbing the queue
      lock and running the driver in SMP configuration crashes the whole
      machine pretty quickly.
      
      Remove meaningless irq enable/disable dancing and add proper locking
      in issue, irq and timeout paths.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      e93b9fb7
    • Bartlomiej Zolnierkiewicz's avatar
      mg_disk: fix CONFIG_LBD=y warning · 7090a0a9
      Bartlomiej Zolnierkiewicz authored
      drivers/block/mg_disk.c: In function ‘mg_dump_status’:
      drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but
      argument 2 has type ‘sector_t’
      
      [ Impact: kill build warning ]
      
      Cc: unsik Kim <donari75@gmail.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      7090a0a9
    • Tejun Heo's avatar
      mg_disk: fix locking · ac2ff946
      Tejun Heo authored
      IRQ and timeout handlers call functions which expect locked queue lock
      without locking it.  Fix it.
      
      While at it, convert 0s used as null pointer constant to NULLs.
      
      [ Impact: fix locking, cleanup ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: unsik Kim <donari75@gmail.com>
      ac2ff946
  2. 26 Apr, 2009 11 commits
  3. 24 Apr, 2009 15 commits