Commit 055b93c9 authored by Rene Herman's avatar Rene Herman Committed by Greg Kroah-Hartman

USB: ehci: stop vt6212 bus hogging

The VIA VT6212 defaults to only waiting 1us between passes over EHCI's
async ring, which hammers PCI badly ... and by preventing other devices
from accessing the bus, causes problems like drops in IDE throughput,
a problem that's been bugging users of those chips for several years.

A (partial) datasheet for this chip eventually turned up, letting us
see how to make it use a VIA-specific register to switch over to the
the normal 10us value instead, as suggested by the EHCI specification
Solution noted by Lev A. Melnikovsky.

It's not clear whether this register exists on other VIA chips; we
know that it's ineffective on the vt8235.  So this patch only applies
to chips that seem to be incarnations of the (discrete) vt6212.
Signed-off-by: default avatarRene Herman <rene.herman@gmail.com>
Tested-by: default avatarLev A. Melnikovsky <melnikovsky@mail.ru>
Tested-by: default avatarAlessandro Suardi <alessandro.suardi@gmail.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7f170a63
...@@ -152,6 +152,20 @@ static int ehci_pci_setup(struct usb_hcd *hcd) ...@@ -152,6 +152,20 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
break; break;
} }
break; break;
case PCI_VENDOR_ID_VIA:
if (pdev->device == 0x3104 && (pdev->revision & 0xf0) == 0x60) {
u8 tmp;
/* The VT6212 defaults to a 1 usec EHCI sleep time which
* hogs the PCI bus *badly*. Setting bit 5 of 0x4B makes
* that sleep time use the conventional 10 usec.
*/
pci_read_config_byte(pdev, 0x4b, &tmp);
if (tmp & 0x20)
break;
pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
}
break;
} }
ehci_reset(ehci); ehci_reset(ehci);
......
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