Skip to contentSkip to conversation

2.5.69 Interrupt Latency

DISCUSSION Arnd Bergmann 2 participants 2 messages May 9, 2003 7 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 4 lines · Paul Fulghum

One machine (server) was using usb-uhci and
the other (laptop) was using usb-ohci.

So it looks like something with USB in 2.5.68-bk11

The change below was part of 2.5.68-bk11, and adds a 20ms delay to the uhci interrupt handler. Could that be the culprit?

        Arnd <><

ChangeSet 1.1042.1.129 2003/04/29 15:30:31 [email protected]
[PATCH] USB: Minor patch for uhci-hcd.c

drivers/usb/host/uhci-hcd.c Fri Apr 18 13:37:24 2003 renamed from drivers/usb/host/uhci-hcd.c Mon Apr 14 11:51:40 2003 +9 -4
@@ -1283,7 +1283,8 @@
        }
 
        if (last_urb) {
-               *end = (last_urb->start_frame + last_urb->number_of_packets) & 1023;
+               *end = (last_urb->start_frame + last_urb->number_of_packets *
+                               last_urb->interval) & (UHCI_NUMFRAMES-1);
                ret = 0;
        } else
                ret = -1;       /* no previous urb found */
@@ -1933,9 +1934,10 @@
 
        dbg("%x: suspend_hc", io_addr);
 
-       outw(USBCMD_EGSM, io_addr + USBCMD);
-
        uhci->is_suspended = 1;
+       smp_wmb();
+
+       outw(USBCMD_EGSM, io_addr + USBCMD);
 }
 
 static void wakeup_hc(struct uhci_hcd *uhci)
@@ -1945,6 +1947,9 @@
 
        dbg("%x: wakeup_hc", io_addr);
 
+       /* Global resume for 20ms */
+       outw(USBCMD_FGR | USBCMD_EGSM, io_addr + USBCMD);
+       wait_ms(20);
        outw(0, io_addr + USBCMD);
        
        /* wait for EOP to be sent */
@@ -1965,7 +1970,7 @@
        int i;
 
        for (i = 0; i < uhci->rh_numports; i++)
-               connection |= (inw(io_addr + USBPORTSC1 + i * 2) & 0x1);
+               connection |= (inw(io_addr + USBPORTSC1 + i * 2) & USBPORTSC_CCS);
 
        return connection;
 }
#8 lore raw
Quoted 10 lines · Arnd Bergmann
Quoted 4 lines · Paul Fulghum

One machine (server) was using usb-uhci and
the other (laptop) was using usb-ohci.

So it looks like something with USB in 2.5.68-bk11

The change below was part of 2.5.68-bk11, and adds a 20ms delay to the uhci interrupt handler. Could that be the culprit?

Possibly, I can try backing out just that part.

To complicate matters, this is happening on 2 machines:
a server and a laptop.

I disabled USB on the laptop (2.5.69) and the problem is still there :-(

I am confident about these results:
1. On the server, bk10 and earlier works, bk11 and later breaks.
2. On the server, bk11 with USB breaks, bk11 without USB works.
3. On the laptop, 2.5.68 and earlier works, 2.5.69 breaks

I need to test the laptop with the bk10/bk11 sets to see if this follows the results on the server.

Maybe disabling/enabling USB is just triggering something else in the configuration file.

I'm leaving for the weekend now, and will try
to get back to this on Monday.

Signature · 8 lines
Paul Fulghum, [email protected]
Microgate Corporation, http://www.microgate.com



-- 
Paul Fulghum, [email protected]
Microgate Corporation, http://www.microgate.com