Re: SL811 problem on mach-pxa

From: David Brownell
Date: Thu Feb 17 2005 - 13:13:45 EST


On Wednesday 16 February 2005 7:51 pm, Frank Buss wrote:
>
> http://www.frank-buss.de/tmp/sl811-hcd.c-patch.txt

Some of that looks reasonable, not all. In particular, don't
change the convention on resources (memory to i/o), or expect
that the two regions involve more than one byte each ... the
hardware only has two single-byte registers!

I'll look at the ep->hep stuff ... I could believe rc1 got a
bug added there. The urb->hcpriv bit looks wrong though.
It may take a little time for me to check it out though.


> There is still an important error: When a device is plugged, then opened and
> then unplugged while open, it looks like the process freezes, which opened
> the device (I've tried "cat /dev/input/mice" and I can't break it after
> unplugged). After plugging the device again, it is not recognized any more.
> When the device is not open or after closing the device, unlugging and
> plugging again is no problem.

That seems pretty odd; I certainly tested that (on 2.6.almost-10)
as part of the initial development, and nothing in that area should
have changed either in the sl811 driver or usbcore. I suspect the
issue is one of the other changes you made.


> -// #define QUIRK2
> -#define QUIRK3
> +/* with other QUIRK combinations it crashes */
> +#define QUIRK2
> +//#define QUIRK3

Also very odd. It was tested with _both_ workarounds for IRQ issues;
and nobody else has reported any need for #2 any more (now that the
IRQs are acked selectively, unlike the predecessors to this driver).

If there's a crash there, don't paper it over like this.


> @@ -1580,6 +1591,14 @@
> if (sl811->board && sl811->board->power)
> hub_set_power_budget(udev, sl811->board->power * 2);
>
> + // enable power and interupts
> + port_power(sl811, 1);
> +
> + /* reset USB (without this the devices were not detected at boot,
> only after plugging) */
> + sl811_write(sl811, SL11H_CTLREG1, 0x08);
> + mdelay(20);
> + sl811_write(sl811, SL11H_CTLREG1, 0);
> +
> return 0;
> }
>

Hmm, what platform were you using? I've had reports that one of the
KARO boards has that issue. That looks like the sort of thing that
should be done in the reset() routine rather than start(); and it should
certainly use a symbolic constant not 0x08.

- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/