USB: root hubs don't lie about their number of TTs
[linux-2.6-block.git] / drivers / usb / host / ehci-pci.c
index 3ba01664f82154b00bef518eea7c3e809566f63b..7c8a2ccf78f1df828b6ed72d3e21d369831394d1 100644 (file)
@@ -130,6 +130,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
        case PCI_VENDOR_ID_TDI:
                if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
                        ehci->is_tdi_rh_tt = 1;
+                       hcd->has_tt = 1;
                        tdi_reset(ehci);
                }
                break;
@@ -152,6 +153,20 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                        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);
@@ -315,7 +330,6 @@ static int ehci_pci_resume(struct usb_hcd *hcd)
 
        /* here we "know" root ports should always stay powered */
        ehci_port_power(ehci, 1);
-       ehci_handover_companion_ports(ehci);
 
        hcd->state = HC_STATE_SUSPENDED;
        return 0;