Re: USB and DMA on Alpha with 2.6.0-test7

From: Ivan Kokshaysky
Date: Fri Oct 10 2003 - 05:48:18 EST


On Fri, Oct 10, 2003 at 11:22:06AM +0200, Måns Rullgård wrote:
> Yesterday, I compiled 2.6.0-test7 for one of my Alpha boxes. I have
> an AX8817X based USB ethernet adaptor connected to it (it's short on
> PCI slots), so I compiled the usbnet module. When I loaded usbnet, I
> got a BUG at include/asm-generic/dma-mapping.h:19. Apparently, DMA
> setup only works with PCI here. How should this be fixed? It worked
> with -test4, albeit slowly, for other reasons.

Well, the usage of dma_supported() in usbnet.c is wrong even for i386.
USB device doesn't do DMA, it's USB controller what does. The driver should
check dma_mask of the parent device instead, something like this:

// possible with some EHCI controllers
if (*udev->dev->parent->dma_mask == 0xffffffffffffffffULL)
net->features |= NETIF_F_HIGHDMA;

Ivan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/