Commit 8e4f4255 authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] umem and DAC960 bio_endio()

update DAC960 and umem to new bio_endio() completions
parent fad5529e
......@@ -2909,10 +2909,8 @@ static void DAC960_RequestFunction(RequestQueue_T *RequestQueue)
static inline void DAC960_ProcessCompletedBuffer(BufferHeader_T *BufferHeader,
boolean SuccessfulIO)
{
if (SuccessfulIO)
set_bit(BIO_UPTODATE, &BufferHeader->bi_flags);
bio_endio(BufferHeader, BufferHeader->bi_size, SuccessfulIO ? 0 : -EIO);
blk_finished_io(bio_sectors(BufferHeader));
BufferHeader->bi_end_io(BufferHeader);
}
static inline int DAC960_PartitionByCommand(DAC960_Command_T *Command)
......
......@@ -544,9 +544,16 @@ static void process_page(unsigned long data)
while(return_bio) {
struct bio *bio = return_bio;
int bytes = bio->bi_size;
return_bio = bio->bi_next;
bio->bi_next = NULL;
bio->bi_end_io(bio);
/* should use bio_endio(), however already cleared
* BIO_UPTODATE. so set bio->bi_size = 0 manually to indicate
* completely done
*/
bio->bi_size = 0;
bio->bi_end_io(bio, bytes, 0);
}
}
......@@ -560,8 +567,6 @@ static int mm_make_request(request_queue_t *q, struct bio *bio)
struct cardinfo *card = q->queuedata;
PRINTK("mm_make_request %ld %d\n", bh->b_rsector, bh->b_size);
/* set uptodate now, and clear it if there are any errors */
set_bit(BIO_UPTODATE, &bio->bi_flags);
bio->bi_phys_segments = bio->bi_idx; /* count of completed segments*/
spin_lock_bh(&card->lock);
*card->biotail = bio;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment