On Fri, 7 Nov 2003, Jens Axboe wrote:

> I've lost the original mail in the thread, but I'm quite sure it listed
> sg[0].page as being valid. Maybe the driver cleared it somewhere too
> early? page_address() will not have returned NULL for a valid page.
> Unless it's a highmem page, in that case you have to map it and unmap
> after use. For drivers like this that aren't performance critical and
> are by no means highmem ready, it's easier just to set your dma mask low
> enough that you wont be handed such pages.

I think you may have put your finger on the problem.  Our difficulty is
that we have no control over where these sg pages are allocated; that
depends on the capabilities of the USB host controller that our device
happens to be plugged into.  Probably all the spots in the usb-storage
driver that directly access those sg pages will have to be rewritten to
take into account that they may not be located in mapped memory.

So I will need to learn the proper way of doing that.  Is it as simple as 
calling page_address(), and if the result is 0 then calling kmap() 
followed by kunmap()?

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to