Yeah it's a request for data, what else could it be? That's the only
place where we call blk_rq_map_sg().
Stephen, please provoke with this patch applied. I hope it works, it's
untested :-)
--- drivers/ide/pcidma.c~ 2002-08-02 14:32:14.000000000 +0200
+++ drivers/ide/pcidma.c 2002-08-02 14:39:21.000000000 +0200
@@ -58,6 +58,24 @@
return ata_error(drive, rq, __FUNCTION__);
}
+static void rq_dump(struct request *rq, int build_segments)
+{
+ struct bio_vec *bvec;
+ struct bio *bio;
+ int i = 0, ibio = 0;
+
+ printk("pcidma: build %d segments, supplied %d/%d, sectors %ld/%d\n", build_segments, rq->nr_phys_segments, rq->nr_hw_segments, rq->nr_sectors, rq->current_nr_sectors);
+
+ rq_for_each_bio(bio, rq) {
+ bio->bi_flags &= ~(1 << BIO_SEG_VALID);
+ printk("bio %d: phys %d, hw %d\n", ibio, bio_phys_segments(rq->q, bio), bio_hw_segments(rq->q, bio));
+ bio_for_each_segment(bvec, bio, i) {
+ printk("segment %d: phys %lu, size %u\n", i, bvec_to_phys(bvec), bvec->bv_len);
+ }
+ ibio++;
+ }
+}
+
/*
* FIXME: taskfiles should be a map of pages, not a long virt address... /jens
* FIXME: I agree with Jens --mdcki!
@@ -107,7 +125,7 @@
nents = blk_rq_map_sg(&drive->queue, rq, ch->sg_table);
if (rq->q && nents > rq->nr_phys_segments)
- printk("ide-dma: received %d phys segments, build %d\n", rq->nr_phys_segments, nents);
+ rq_dump(rq, nents);
if (rq_data_dir(rq) == READ)
ch->sg_dma_direction = PCI_DMA_FROMDEVICE;
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/