patch-2.3.99-pre2 linux/drivers/usb/uhci.c
Next file: linux/drivers/usb/usb-ohci.c
Previous file: linux/drivers/usb/serial/usb-serial.h
Back to the patch index
Back to the overall index
- Lines: 79
- Date:
Fri Mar 17 14:19:33 2000
- Orig file:
v2.3.99-pre1/linux/drivers/usb/uhci.c
- Orig date:
Tue Mar 14 19:10:40 2000
diff -u --recursive --new-file v2.3.99-pre1/linux/drivers/usb/uhci.c linux/drivers/usb/uhci.c
@@ -689,19 +689,18 @@
return 0;
td_error:
- /* Some debugging code */
- if (debug) {
+ if (status & TD_CTRL_STALLED)
+ /* endpoint has stalled - mark it halted */
+ usb_endpoint_halt(urb->dev, uhci_endpoint(td->info),
+ uhci_packetout(td->info));
+ else if (debug) {
+ /* Some debugging code */
dbg("uhci_result_control() failed with status %x", status);
/* Print the chain for debugging purposes */
uhci_show_queue(urbp->qh);
}
- if (status & TD_CTRL_STALLED)
- /* endpoint has stalled - mark it halted */
- usb_endpoint_halt(urb->dev, uhci_endpoint(td->info),
- uhci_packetout(td->info));
-
return uhci_map_status(status, uhci_packetout(td->info));
}
@@ -818,8 +817,12 @@
return 0;
td_error:
- /* Some debugging code */
- if (debug) {
+ if (status & TD_CTRL_STALLED)
+ /* endpoint has stalled - mark it halted */
+ usb_endpoint_halt(urb->dev, uhci_endpoint(td->info),
+ uhci_packetout(td->info));
+ else if (debug) {
+ /* Some debugging code */
dbg("uhci_result_interrupt/bulk() failed with status %x",
status);
@@ -830,11 +833,6 @@
uhci_show_td(td);
}
- if (status & TD_CTRL_STALLED)
- /* endpoint has stalled - mark it halted */
- usb_endpoint_halt(urb->dev, uhci_endpoint(td->info),
- uhci_packetout(td->info));
-
return uhci_map_status(status, uhci_packetout(td->info));
}
@@ -1251,12 +1249,14 @@
uhci_unlink_generic(urb);
if (urb->transfer_flags & USB_ASYNC_UNLINK) {
+ urb->status = -ECONNABORTED;
+
spin_lock_irqsave(&uhci->urb_remove_lock, flags);
list_add(&urb->urb_list, &uhci->urb_remove_list);
spin_unlock_irqrestore(&uhci->urb_remove_lock, flags);
-
- urb->status = -ECONNABORTED;
} else {
+ urb->status = -ENOENT;
+
if (in_interrupt()) { /* wait at least 1 frame */
static int errorcount = 10;
@@ -1268,8 +1268,6 @@
if (urb->complete)
urb->complete(urb);
-
- urb->status = -ENOENT;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)