1. 28 Jan, 2008 4 commits
    • James Bottomley's avatar
      block: implement drain buffers · fa0ccd83
      James Bottomley authored
      These DMA drain buffer implementations in drivers are pretty horrible
      to do in terms of manipulating the scatterlist.  Plus they're being
      done at least in drivers/ide and drivers/ata, so we now have code
      duplication.
      
      The one use case for this, as I understand it is AHCI controllers doing
      PIO mode to mmc devices but translating this to DMA at the controller
      level.
      
      So, what about adding a callback to the block layer that permits the
      adding of the drain buffer for the problem devices.  The idea is that
      you'd do this in slave_configure after you find one of these devices.
      
      The beauty of doing it in the block layer is that it quietly adds the
      drain buffer to the end of the sg list, so it automatically gets mapped
      (and unmapped) without anything unusual having to be done to the
      scatterlist in driver/scsi or drivers/ata and without any alteration to
      the transfer length.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      fa0ccd83
    • Jens Axboe's avatar
      __bio_clone: don't calculate hw/phys segment counts · 5d84070e
      Jens Axboe authored
      If the users sets a new ->bi_bdev on the bio after __bio_clone() has
      returned it, the "segment counts valid" flag still remains even though
      it may be different with the new target. So don't calculate segment
      counts in __bio_clone().
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      5d84070e
    • Pete Wyckoff's avatar
      block: allow queue dma_alignment of zero · 482eb689
      Pete Wyckoff authored
      Let queue_dma_alignment return 0 if it was specifically set to 0.
      This permits devices with no particular alignment restrictions to
      use arbitrary user space buffers without copying.
      Signed-off-by: default avatarPete Wyckoff <pw@osc.edu>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      482eb689
    • Christof Schmitt's avatar
      blktrace: Add blktrace ioctls to SCSI generic devices · 6da127ad
      Christof Schmitt authored
      Since the SCSI layer uses the request queues from the block layer, blktrace can
      also be used to trace the requests to all SCSI devices (like SCSI tape drives),
      not only disks. The only missing part is the ioctl interface to start and stop
      tracing.
      
      This patch adds the SETUP, START, STOP and TEARDOWN ioctls from blktrace to the
      sg device files. With this change, blktrace can be used for SCSI devices like
      for disks, e.g.: blktrace -d /dev/sg1 -o - | blkparse -i -
      Signed-off-by: default avatarChristof Schmitt <christof.schmitt@de.ibm.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      6da127ad
  2. 27 Jan, 2008 36 commits