To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 17094
17093  |  17095
Subject: 
One shot interrupt urb issue - usb-uhci.c
Newsgroups: 
lugnet.robotics
Date: 
Fri, 18 Jan 2002 21:47:18 GMT
Original-From: 
PC CHAN <{pc.chan@alcatel.com}AntiSpam{}>
Viewed: 
627 times
  
Dear USB development team,

In integrating of nqc and the legousbtower under linux,  I found the
usb-uhci module could only message to transmit one single interrupt usb
with interval=0 (i.e. single-shot) to the usbtower.  Then the tower
would stop flashing (transmitting)  until it is unpluged or until the
usb-uhci module is removed and reinstalled.

The same application works with the uhci module.

Apparantly there is an issue on terminating single-shot interrupt urb,
further single -shot interrupt urb would stop passing even though other
types (like control urbs) still work fine.

I have made the following temporary patch. (also enclosed.)  to work
around the issue by routing the termination through the regular status
handling stuff.

Would you please look into it.

Thank you,
P.C. Chan
=============================================================================
--- usb-uhci.c.1.273    Fri Jan 18 00:03:21 2002
+++ usb-uhci.c  Thu Jan 17 23:48:38 2002
@@ -2494,7 +2494,7 @@
                        urb->status = -EINPROGRESS;

                        // Recycle INT-TD if interval!=0, else mark TD
as one-sh
ot
-                       if (urb->interval) {
+       /*              if (urb->interval) { */

                                desc->hw.td.info &= cpu_to_le32(~(1 <<
TD_TOKEN_
TOGGLE));
                                if (status==0) {
@@ -2509,8 +2509,9 @@
                                desc->hw.td.status=
cpu_to_le32((urb->pipe & TD_
CTRL_LS) | TD_CTRL_ACTIVE | TD_CTRL_IOC |
                                        (urb->transfer_flags &
USB_DISABLE_SPD ?
0 : TD_CTRL_SPD) | (3 << 27));
                                mb();
-                       }
-                       else {
+/*                     }
+                       else { */
+         if (!urb->interval) {
                                uhci_unlink_urb_async(s, urb,
UNLINK_ASYNC_STORE
_URB);
                                clr_td_ioc(desc); // inactivate TD
                        }
pcpcchan:/usr/src/linux# !!
cat /opt/store/usb-uhci*diff
--- usb-uhci.c.1.273    Fri Jan 18 00:03:21 2002
+++ usb-uhci.c  Thu Jan 17 23:48:38 2002
@@ -2494,7 +2494,7 @@
                        urb->status = -EINPROGRESS;

                        // Recycle INT-TD if interval!=0, else mark TD
as one-shot
-                       if (urb->interval) {
+       /*              if (urb->interval) { */

                                desc->hw.td.info &= cpu_to_le32(~(1 <<
TD_TOKEN_TOGGLE));
                                if (status==0) {
@@ -2509,8 +2509,9 @@
                                desc->hw.td.status=
cpu_to_le32((urb->pipe & TD_CTRL_LS) | TD_CTRL_ACTIVE | TD_CTRL_IOC |
                                        (urb->transfer_flags &
USB_DISABLE_SPD ? 0 : TD_CTRL_SPD) | (3 << 27));
                                mb();
-                       }
-                       else {
+/*                     }
+                       else { */
+         if (!urb->interval) {
                                uhci_unlink_urb_async(s, urb,
UNLINK_ASYNC_STORE_URB);
                                clr_td_ioc(desc); // inactivate TD
                        }


--
MIME ATTACHMENTS DISCARDED:

1.  Content-Type: text/plain;
     name="usb-uhci.c.1.273.diff"
    Content-Transfer-Encoding: 7bit
    Content-Disposition: inline;
     filename="usb-uhci.c.1.273.diff"
    Content-Length: 736



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR