Re: [PATCH] USB: Always map transfer_buffer (Fixes some musb_hdrc issues)

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Wed, 28 Mar 2007, Tony Lindgren wrote:

> Hi,
> 
> Here's a little patch to make sure tranfer_buffer is always if DMA
> is temporarily unavailable. I ran into this with tusb6010 that
> currently can only do limited DMA. This fixes a problem of connecting
> storage devices and doing mixed DMA/PIO access.

Your patch isn't correct, or at least, it is very misleading.  It calls 
page_address() in a situation where it cannot be certain that the page 
frame lies in accessible kernel memory.  On some systems the value it 
calculates will be garbage.

At a minimum you need to add a comment explaining that if the page isn't
accessible, the transfer_buffer value won't ever be used.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.