The dma hooks whereby EHCI can pass 64bit DMA support up the driver stack (to avoid buffer copies) turn out to broken on most architectures(*). This patch just disables them all, since it looks like those mechanisms won't get fixed before 2.6.0-final. For now it'd only matter on a few big Intel boxes anyway.
Please merge.
- Dave
(*) On x86, mips, and arm dma_supported() doesn't even compare with the device's mask. On several other architectures (reported on ppc, alpha, and sparc64), asking that question for non-PCI devices will just BUG() -- even though all info needed to answer the question is right at hand.
--- 1.60/drivers/usb/host/ehci-hcd.c Fri Aug 29 11:21:44 2003 +++ edited/drivers/usb/host/ehci-hcd.c Mon Nov 3 13:06:51 2003 @@ -426,8 +426,11 @@ */ if (HCC_64BIT_ADDR (hcc_params)) { writel (0, &ehci->regs->segment); +#if 0 +// this is deeply broken on almost all architectures if (!pci_set_dma_mask (ehci->hcd.pdev, 0xffffffffffffffffULL)) ehci_info (ehci, "enabled 64bit PCI DMA\n"); +#endif } /* help hc dma work well with cachelines */ --- 1.51/drivers/usb/net/kaweth.c Tue Aug 19 20:56:01 2003 +++ edited/drivers/usb/net/kaweth.c Mon Nov 3 13:05:33 2003 @@ -1120,8 +1120,11 @@ usb_set_intfdata(intf, kaweth); +#if 0 +// dma_supported() is deeply broken on almost all architectures if (dma_supported (&intf->dev, 0xffffffffffffffffULL)) kaweth->net->features |= NETIF_F_HIGHDMA; +#endif SET_NETDEV_DEV(netdev, &intf->dev); if (register_netdev(netdev) != 0) { --- 1.75/drivers/usb/net/usbnet.c Thu Sep 18 20:41:39 2003 +++ edited/drivers/usb/net/usbnet.c Mon Nov 3 13:05:44 2003 @@ -2969,9 +2969,12 @@ strcpy (net->name, "usb%d"); memcpy (net->dev_addr, node_id, sizeof node_id); +#if 0 +// dma_supported() is deeply broken on almost all architectures // possible with some EHCI controllers if (dma_supported (&udev->dev, 0xffffffffffffffffULL)) net->features |= NETIF_F_HIGHDMA; +#endif net->change_mtu = usbnet_change_mtu; net->get_stats = usbnet_get_stats;