Commit 4f428f01 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: usb ignores 64bit dma

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.
parent a816ee81
...@@ -426,8 +426,11 @@ static int ehci_start (struct usb_hcd *hcd) ...@@ -426,8 +426,11 @@ static int ehci_start (struct usb_hcd *hcd)
*/ */
if (HCC_64BIT_ADDR (hcc_params)) { if (HCC_64BIT_ADDR (hcc_params)) {
writel (0, &ehci->regs->segment); writel (0, &ehci->regs->segment);
#if 0
// this is deeply broken on almost all architectures
if (!pci_set_dma_mask (ehci->hcd.pdev, 0xffffffffffffffffULL)) if (!pci_set_dma_mask (ehci->hcd.pdev, 0xffffffffffffffffULL))
ehci_info (ehci, "enabled 64bit PCI DMA\n"); ehci_info (ehci, "enabled 64bit PCI DMA\n");
#endif
} }
/* help hc dma work well with cachelines */ /* help hc dma work well with cachelines */
......
...@@ -1120,8 +1120,11 @@ static int kaweth_probe( ...@@ -1120,8 +1120,11 @@ static int kaweth_probe(
usb_set_intfdata(intf, kaweth); usb_set_intfdata(intf, kaweth);
#if 0
// dma_supported() is deeply broken on almost all architectures
if (dma_supported (&intf->dev, 0xffffffffffffffffULL)) if (dma_supported (&intf->dev, 0xffffffffffffffffULL))
kaweth->net->features |= NETIF_F_HIGHDMA; kaweth->net->features |= NETIF_F_HIGHDMA;
#endif
SET_NETDEV_DEV(netdev, &intf->dev); SET_NETDEV_DEV(netdev, &intf->dev);
if (register_netdev(netdev) != 0) { if (register_netdev(netdev) != 0) {
......
...@@ -2972,9 +2972,12 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) ...@@ -2972,9 +2972,12 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
strcpy (net->name, "usb%d"); strcpy (net->name, "usb%d");
memcpy (net->dev_addr, node_id, sizeof node_id); 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 // possible with some EHCI controllers
if (dma_supported (&udev->dev, 0xffffffffffffffffULL)) if (dma_supported (&udev->dev, 0xffffffffffffffffULL))
net->features |= NETIF_F_HIGHDMA; net->features |= NETIF_F_HIGHDMA;
#endif
net->change_mtu = usbnet_change_mtu; net->change_mtu = usbnet_change_mtu;
net->get_stats = usbnet_get_stats; net->get_stats = usbnet_get_stats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment