2004-09-02 20:35:37

by Aleksey Gorelov

[permalink] [raw]
Subject: RE: [PATCH] Early USB handoff

>> Basically, in a case of legacy free BIOS, HC is not in
>> SMM mode, and USB IRQ is routed to PCI IRQ line and generates
>> interrupts. When this IRQ is enabled in PIC (by driver that
>> starts before HC driver), system is flooded with interrupts.
>
>The BIOS should not be leaving the device generating
>interrupts surely ?
>If that IRQ line ends up shared we are in trouble at boot time.
Well, this is what happened on Motion tablet.
While still in real mode, BIOS takes care of interrupts from
devices. But once OS takes control over and goes to protected
mode, there is no easy way for BIOS to detect that and disable HC.
So, one should either avoid 'sharing' it with other devices (at
IRQ routing stage), or reprogram HC in native OS mode first (at
least disable interrupts).

>We don't always want to hand off. Some setups only work in USB legacy
>mode because of other bugs. That's why the SMM fixup I did for E750x is
>triggered in specific cases. We can do such things with DMI table
>blacklists easily enough.
I was not aware of this. However, there is an option and handoff
is disabled by default. DMI table may be Ok if there are only
a few such machines. Unfortunately, I personally had USB legacy
problems on several laptops, plus saw some reports on the web.
But I guess it is not for me to decide ;)

Aleks.


2004-09-03 00:59:41

by David Brownell

[permalink] [raw]
Subject: Re: [linux-usb-devel] RE: [PATCH] Early USB handoff

On Thursday 02 September 2004 1:26 pm, Aleksey Gorelov wrote:

> While still in real mode, BIOS takes care of interrupts from
> devices. But once OS takes control over and goes to protected
> mode, there is no easy way for BIOS to detect that and disable HC.

I find myself a bit unsettled at the notion of not really being
able to blame this behavior on BIOS bugs. What's the world
coming to any more?!


> So, one should either avoid 'sharing' it with other devices (at
> IRQ routing stage), or reprogram HC in native OS mode first (at
> least disable interrupts).

That sounds like it could explain lots of the init/irq problems we've
had on various systems. Makes me a lot more interested in seeing
this fix go in ... :)

For backwards compatibility, the early reset should not be the
default. There aren't many systems where it's a problem.

- Dave