USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer
The following patch in the driver is required to avoid USB 1.1 device failures that may occur due to requests from USB OHCI controllers may be overwritten if the latency for any pending request by the USB controller is very long (in the range of milliseconds). Signed-off-by: Libin Yang <libin.yang@amd.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ac50e95078
commit
a1f17a872b
@ -177,6 +177,13 @@ static int ohci_quirk_amd700(struct usb_hcd *hcd)
|
||||
return 0;
|
||||
|
||||
pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
|
||||
|
||||
/* SB800 needs pre-fetch fix */
|
||||
if ((rev >= 0x40) && (rev <= 0x4f)) {
|
||||
ohci->flags |= OHCI_QUIRK_AMD_PREFETCH;
|
||||
ohci_dbg(ohci, "enabled AMD prefetch quirk\n");
|
||||
}
|
||||
|
||||
if ((rev > 0x3b) || (rev < 0x30)) {
|
||||
pci_dev_put(amd_smbus_dev);
|
||||
amd_smbus_dev = NULL;
|
||||
@ -262,6 +269,19 @@ static void amd_iso_dev_put(void)
|
||||
|
||||
}
|
||||
|
||||
static void sb800_prefetch(struct ohci_hcd *ohci, int on)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
u16 misc;
|
||||
|
||||
pdev = to_pci_dev(ohci_to_hcd(ohci)->self.controller);
|
||||
pci_read_config_word(pdev, 0x50, &misc);
|
||||
if (on == 0)
|
||||
pci_write_config_word(pdev, 0x50, misc & 0xfcff);
|
||||
else
|
||||
pci_write_config_word(pdev, 0x50, misc | 0x0300);
|
||||
}
|
||||
|
||||
/* List of quirks for OHCI */
|
||||
static const struct pci_device_id ohci_pci_quirks[] = {
|
||||
{
|
||||
|
Reference in New Issue
Block a user