On Sun, 2 Dec 2012, Andreas Mohr wrote:
> Hi,
>
> drivers/usb/host/ehci-dbg.c git HEAD has:
>
> if (strncmp(buf, "enable", 5) == 0) {
> if (strict_strtoul(buf + 7, 10, &port))
> return -EINVAL;
> params = ehci_readl(ehci, &ehci->caps->hcs_params);
> if (port > HCS_N_PORTS(params)) {
> ehci_dbg(ehci, "ERR: LPM on bad port %lu\n", port);
> return -ENODEV;
> }
> debug>>>>> ehci_dbg(ehci, "port is %d\n", port);
> portsc = &ehci->regs->port_status[port-1];
> temp = ehci_readl(ehci, portsc);
> if (!(temp & PORT_DEV_ADDR)) {
> ehci_dbg(ehci, "LPM: no device attached\n");
> return -ENODEV;
> }
>
>
> And I get:
>
> # echo "enable 0" > lpm
> bash: echo: Schreibfehler: Kein passendes Ger�t gefunden.
>
> # dmesg|tail
> ehci_hcd 0000:00:10.3: port is 0
> ehci_hcd 0000:00:10.3: LPM: no device attached
>
> Houston?
>
>
> Admittedly this debug file certainly is not exactly hotpath...
>
>
> [note that this broken access is repeated in "disable" branch, too]
>
>
> Found while trying to debug a failing (device descriptor ETIMEDOUT
> on EHCI 2.0 vs. WORKING with interim 1.1 passive hub) CnMemory USB3.0 2TB
> ASMedia, connected to VIA VT8235 USB2.0.
> Now going to attempt to hopefully tweak ehci-pci.c into submission,
> and some other tests.
That entire function has been removed in Greg's usb-next branch.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html