On Wed, 2005-03-16 at 08:58 +0100, Jens Axboe wrote: > Guys, who reviewed this? It looks completely bogus, using kmap() for tha > entire sg list is just wrong and can deadlock easily. The proper way is > of course to skip the virtual address requirement and dma map the sg > array properly.
I suppose ultimately, the responsibility is mine. The problem with this particular card (at least as I read the comments in the driver) is that most of the time, it can actually do DMA on its own. However, when something unexpected occurs (Like a SCSI device disconnections), the DMA engine halts and the last pieces of data have to be read in manually using PIO. I agree the kmap is inefficient. The efficient alternative is to do dma_map_sg() and use kmap_atomic() in the interrupt routine where we do the PIO cleanup---I'm afraid I just passed on explaining how to do this ... unless you care to do the honours ? James - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html