Benoit PAPILLAULT wrote:
>
> Hi,
>
> I must admit I'm not a USB or PCI expert, but here is the pb:
>
> First machine:
> Athlon 800 Mhz
> Abit KT7 RAID mobo (VIA chipset)
> USB Controller: CMD Technology Inc USB0670 (rev 6)
> kernel 2.4.4
>
> Works perfect & great (used with the Alcatel SpeedTouch USB modem & a USB
> mouse).
>
> Second machine
> 486DX-4 100Mhz
> Unknown mobo (United Microelectronics?)
> USB Controller: CMD Technology Inc USB0670 (rev 6) [the same card as
> previous]
> kernel 2.4.4
>
> On this second machine, the first time I insert my USB mouse, the kernel
> panic in the OHCI interrupt handler (at the line BUG() in usb-ohci.h, what
> is this stupid line which just make a kernel panic?)
>
> So, I rewrite some stuff to handle this error. My conclusion was that the
> macro dma_to_td() was used with a value which does not exist in the list
> searched.
>
> Next, I recompile & tried again and that gave me (obviously) :
> usb.c: USB device not accepting new address=2 (error=-110).
>
> So, I investigated further and I understand that as soon as a USB
> peripheral is inserted, the khubd thread is awaken to initialize the new
> device. This initialization code first try to assign a USB addresse to the
> device by sending a specific USB control message.
>
> Normally, with this message is "done", an interrupt is generated and the
> ohci->hcca->done_head points to the TD. BUT here is the interesting parts,
> this TD does not match ANY of the TD send.
>
> Questions:
> - what is the use of the khubd thread? Why new device are not handled in
> hc_interrupt() when (ints & OHCI_INTR_RHSC) is true?
>
The initialisation of a USB device needs several ms and also needs some
interaction
with the HUB it is connected to, so it can't be
handled in hc_interrupt. In order to unify the interface to all HUBs the
host drivers include a 'virtual root hub' which lets the root hub look
like an
ordinary hub. All hubs are handled by the khubd thread.
Therefore I found it easier to use a polling timer (128 ms) for
detecting connects
and not use the HC interrupt (microseconds scale).
> - Is there a PCI stuff I'm missing? I've seen strange message about PCI in
> my logs (see at the end of this mail).
>
The recommented latency is 16 (OHCI manual).
> - Why invalid value of ohci->hcca->done_head are handled with the macro
> BUG()? I see no reason why a driver should trust value from its
> "outside" world.
>
> - And why ohci->hcca->done_head is wrong???
>
good question
- Roman
> - Lots of other USB questions which are unrelated to this one (they will
> came in the future :-)).
>
> Logs (on the 486 machine): I change some code to output lots of messages.
> I also add a 'correction' to catch invalid ohci->hcca->done_head value. I
> added a call to ohci_dump() at the beginning of hc_interrupt(). Else, it's
> the standard 2.4.4 kernel.
>
> Benoit.
>
[snip]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel