Please try this, and check for oops and "jens was right" in dmesg. Let
me know how it goes, thanks.
--- /opt/kernel/linux-2.5.1-pre3/drivers/scsi/ide-scsi.c Thu Nov 29 06:07:21 2001
+++ drivers/scsi/ide-scsi.c Thu Nov 29 13:44:04 2001
@@ -708,16 +708,30 @@
printk ("ide-scsi: %s: building DMA table, %d segments, %dkB total\n", drive->name, segments, pc->request_transfer >> 10);
#endif /* IDESCSI_DEBUG_LOG */
while (segments--) {
- bh->bi_io_vec[0].bv_page = sg->page;
+ struct page *page = sg->page;
+ int offset = sg->offset;
+ static int foo;
+
+ if (!page) {
+ BUG_ON(!sg->address);
+ if (!foo) {
+ printk("jens was right\n");
+ foo = 1;
+ }
+ page = virt_to_page(sg->address);
+ offset = (unsigned long) sg->address & ~PAGE_MASK;
+ }
+
+ bh->bi_io_vec[0].bv_page = page;
bh->bi_io_vec[0].bv_len = sg->length;
- bh->bi_io_vec[0].bv_offset = sg->offset;
+ bh->bi_io_vec[0].bv_offset = offset;
bh->bi_size = sg->length;
bh = bh->bi_next;
/*
* just until scsi_merge is fixed up...
*/
- BUG_ON(PageHighMem(sg->page));
- sg->address = page_address(sg->page) + sg->offset;
+ BUG_ON(PageHighMem(page));
+ sg->address = page_address(page) + offset;
sg++;
}
} else {
-- 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/