Am Mittwoch, 10. August 2005 16:48 schrieb Alan Stern:
First thanks for your reply .

> The driver doesn't utilize this buffer as much as it could.  It should set
> touchkit->irq->transfer_dma to touchkit->data_dma and
> touchkit->irq->transfer_flags to URB_NO_TRANSFER_DMA_MAP.  However, even
> without setting those things the transfer should still work okay.
So i did the following :

touchkit->irq = usb_alloc_urb(0, GFP_KERNEL);

touchkit->data = usb_buffer_alloc(udev, TOUCHKIT_REPORT_DATA_SIZE,
                                       SLAB_ATOMIC | URB_NO_TRANSFER_DMA_MAP,
                                        &touchkit->irq->transfer_dma);

usb_fill_int_urb(touchkit->irq, touchkit->udev,
                         usb_rcvintpipe(touchkit->udev, 0x81),
                         touchkit->data, TOUCHKIT_REPORT_DATA_SIZE,
                         touchkit_irq, touchkit, endpoint->bInterval);

But it still dont work like it should. :-(

> That's not a static array, because it's part of the dynamically-allocated
> touchkit structure. 
Ok you are right !

> I don't see how.  In both cases you told the driver where to put the data.
> In one case the data ended up where you wanted, in the other case it
> didn't.  It shouldn't matter how you got the data buffer in the first
> place -- unless dma_alloc_coherent for some reason returned memory that
> isn't accessible for DMA (which can't happen on x86).

Unfortunaterly i am not on ix86. So dma_alloc_coherent can fail !?
--------------------------------------------------------------
Jürgen Schindele            NENTEC Netzwerktechnologie GmbH
Entwicklung                 Greschbachstrasse 12
                            76229 Karlsruhe/Germany
eMail:[EMAIL PROTECTED]   Phone: +49(0)721 94249-<51>
Web:   www.nentec.de        Fax:   +49(0)721 94249-10
--------------------------------------------------------------



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to