PERFORCE change 126740 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Sep 23 08:18:14 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=126740
Change 126740 by hselasky at hselasky_laptop001 on 2007/09/23 15:17:12
FYI; The comments follow the P4 diff from top to bottom.
- we now need "sys/sx.h" included by default.
- update "USBD_CHECK_STATUS()" macro to use the bit-field
version instead of the masked version of USBD_XXX flags.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/usb_port.h#16 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/usb_port.h#16 (text+ko) ====
@@ -60,6 +60,7 @@
# include <sys/lockmgr.h>
# include <sys/module.h>
# include <sys/mutex.h>
+# include <sys/sx.h>
# include <sys/rman.h>
# include <sys/selinfo.h>
# include <sys/sysctl.h> /* SYSCTL_XXX() */
@@ -233,18 +234,12 @@
#define PRINTFN(n,x)
#endif
-#define USBD_CHECK_STATUS(xfer) \
-{ if((xfer)->flags & USBD_DEV_TRANSFERRING) \
- { \
- (xfer)->flags &= ~USBD_DEV_TRANSFERRING; \
- if( (xfer)->error ) \
- { goto tr_error; } \
- else \
- { goto tr_transferred; } \
- } \
- else \
- { goto tr_setup; } \
-} \
+#define USBD_CHECK_STATUS(xfer) do { \
+ if (!(xfer)->flags_int.transferring) goto tr_setup; \
+ (xfer)->flags_int.transferring = 0; \
+ if ((xfer)->error) goto tr_error; \
+ goto tr_transferred; \
+} while (0)
/**/
#define _MAKE_ENUM(enum,value,arg...) \
More information about the p4-projects
mailing list