Am Donnerstag, 14. März 2002 12:49 schrieb Jens Axboe:
That wouldn't even be necessary, btw, just single pages will do. A packet is 64kB, ie 64kB >> PAGE_SHIFT == 16 segments (for x86). This is exactly what the adapter can handle. If the buffer strings always line up, then bhN and bhN + 1 will map to the same page in b_page (only b_data will be offset in bhN + 1).
I had the same problem with the aha1542 a few years back (I bought a different scsi card then...) and as far as I remember, back then I did not think this would be possible (at least not as easy as it may appear) because what happens when you write e.g. the second and third sector in a packet is that these are put in one bh. When the elevator reads the other sectors in order to write the packet, they are not page aligned wrt to the packet. The bh string you get is then: 2k 4k 4k (12 more) 4k 2k and you need to change every single bh in the packet to get the aha1542 compatible 4k 4k 4k (12 more) 4k However, in the report that Manfred sent, this problem does not happen because the 2k bh's always come in pairs and could be merged. If it is always this way (either because you changed the behavior or because it has always been like this and my memory is getting worse ;-), I would not expect other problems. With my old aha1542 setup, I could `dd' to and from the CD without trouble as long as I used a block size > 4k, while mounting the CD or reading smaller blocks gave the same effect that Manfred is seeing. Arnd <><