>From reading the UHCI spec, I don't see a way to change the polling rate.

My current thinking is to put the HC into Global Suspend when no devices are
connected. Entering and leaving global suspend is pretty easy, but I'm still
working on where in the code we should do this. If we've suspended, getting
out seems to be as easy as putting a call to wakeup_hc in uhci_interrupt(),
but we only want to go down when no devices are connected. We need to cover
the "never any devices connected" as well as "last device just disconnected"
cases.

static void suspend_hc(struct uhci *uhci)
{
        unsigned int io_addr = uhci->io_addr;

        dbg("suspend_hc");

        outw(USBCMD_EGSM, io_addr + USBCMD);
}

static void wakeup_hc(struct uhci *uhci)
{
        unsigned int io_addr = uhci->io_addr;
        unsigned int status;

        dbg("wakeup_hc");

        outw(0, io_addr + USBCMD);
        
        /* wait for EOP to be sent */
        status = inw(io_addr + USBCMD);
        while (status & USBCMD_FGR) {
                status = inw(io_addr + USBCMD);
        }
        
        /* Run and mark it configured with a 64-byte max packet */
        outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, io_addr + USBCMD);
}

Regards -- Andy

> From: Dan Taylor [mailto:[EMAIL PROTECTED]]

> When your USB KVM switch is on the bus, the polling rate is 
> at the normal
> value. The reduced polling rate only would apply when the bus 
> has nothing
> plugged into it.
> 
> I would, however point out that a whole second does seem awfully long
> when you are waiting to find out if the device you just 
> plugged in works,
> quarter to half second intervals seems about right.
> 
> -- 
> Daniel Taylor
> Universal Talkware
> [EMAIL PROTECTED]
> 
> On Fri, 9 Mar 2001, Mark McClelland wrote:
> 
> > As a user of a USB KVM (Keyboard/Video/Mouse switch), one 
> second would cause an
> > annoying pause in input device responsiveness after every 
> switch. Polling every
> > quarter-second would be much more acceptable.
> >
> > One second would be certainly better than the 15 or so 
> seconds that Win98 waits
> > under these circumstances though. I have to keep a dummy 
> device plugged in
> > directly at all times to get around this.
> >
> > Just wanted to throw in my 2 cents, as I'm probably the 
> only USB KVM / Linux
> > user :)
> >
> > "Grover, Andrew" wrote:
> >
> > > Alan mentioned doing less frequent polling when the bus 
> is empty -- how hard
> > > would it be to implement this? Would someone who knows 
> the USB code be
> > > willing to do it, or should I take a stab at it? I was 
> thinking that if all
> > > you are looking for is device insertion, you should only 
> have to poll -
> > > what? Once a second?
> >
> > --
> > Mark McClelland
> > [EMAIL PROTECTED]
> >
> >
> >
> > _______________________________________________
> > [EMAIL PROTECTED]
> > To unsubscribe, use the last form field at:
> > http://lists.sourceforge.net/lists/listinfo/linux-usb-devel
> >
> 
> 
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> http://lists.sourceforge.net/lists/listinfo/linux-usb-devel
> 


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to