PERFORCE change 131617 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Dec 25 12:57:43 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131617
Change 131617 by hselasky at hselasky_laptop001 on 2007/12/25 20:57:07
Factor out clearing of "stall_pipe" flag,
for sake of convenience. The "stall_pipe"
flag is mostly used in USB Device Side Mode.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/README#31 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#90 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/README#31 (text+ko) ====
@@ -380,7 +380,9 @@
started. The transfer is started at the moment the host issues
a clear-stall command on the STALL'ed endpoint. This flag can
be changed during operation. This flag does only have effect
- in USB device mode except for control endpoints.
+ in USB device side mode except for control endpoints. This
+ flag is cleared before the callback is called in case the USB
+ transfer state is "USBD_ST_TRANSFERRED".
- The "bufsize" field sets the total buffer size in bytes. If
this field is zero, "wMaxPacketSize" will be used, multiplied by the
==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#90 (text+ko) ====
@@ -2388,6 +2388,8 @@
(!xfer->flags_int.bdma_no_post_sync)) {
usbd_bdma_post_sync(xfer);
}
+ /* clear any previous stall command */
+ xfer->flags.stall_pipe = 0;
callback:
/* call processing routine */
(xfer->callback) (xfer);
@@ -3336,7 +3338,6 @@
xfer->flags.manual_status = 0;
xfer->frlengths[1] = 0;
}
- xfer->flags.stall_pipe = 0; /* do not stall pipe */
PRINTFN(0, ("success\n"));
return (0); /* success */
More information about the p4-projects
mailing list