mtip32xx: Correctly handle bio->bi_idx != 0 conditions
authorSam Bradshaw <sbradshaw@micron.com>
Wed, 15 May 2013 08:09:05 +0000 (10:09 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 May 2013 08:09:05 +0000 (10:09 +0200)
commit093c959307f2f5af72b24fdc4af7d4d0263f6eea
tree1ec8fc2b23452790a9ee4bdf14dd442d2ca97fb7
parent974a51a245c2c8bece21cf2d3cbfc8261260f729
mtip32xx: Correctly handle bio->bi_idx != 0 conditions

Stacking drivers may append bvecs to existing bio's, resulting
in non-zero bi_idx conditions.  This patch counts the loops of
bio_for_each_segment() rather than inheriting the bi_idx value
to pass as a segment count to the hardware submission routine.

Signed-off-by: Sam Bradshaw <sbradshaw@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/mtip32xx/mtip32xx.c