diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2014-05-30 13:45:20 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2014-05-30 13:45:20 +0000 |
commit | ce19294c0eb1dfe57c9c4c1757a2d36d3fbd5a88 (patch) | |
tree | 9107e4e0bfdf333c95b251d814578839aea54cc3 /sys/dev/usb | |
parent | 74c1f36628642437020cd7dc422b7a572f0c5ca0 (diff) | |
download | src-ce19294c0eb1dfe57c9c4c1757a2d36d3fbd5a88.tar.gz src-ce19294c0eb1dfe57c9c4c1757a2d36d3fbd5a88.zip |
Make driver detach code in USB mass storage test optional.
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/head/; revision=266884
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb_freebsd.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/usb_freebsd_loader.h | 3 | ||||
-rw-r--r-- | sys/dev/usb/usb_msctest.c | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_freebsd.h b/sys/dev/usb/usb_freebsd.h index 0c483e5a273b..cda4e694589b 100644 --- a/sys/dev/usb/usb_freebsd.h +++ b/sys/dev/usb/usb_freebsd.h @@ -41,6 +41,7 @@ #define USB_HAVE_TT_SUPPORT 1 #define USB_HAVE_POWERD 1 #define USB_HAVE_MSCTEST 1 +#define USB_HAVE_MSCTEST_DETACH 1 #define USB_HAVE_PF 1 #define USB_HAVE_ROOT_MOUNT_HOLD 1 #define USB_HAVE_ID_SECTION 1 diff --git a/sys/dev/usb/usb_freebsd_loader.h b/sys/dev/usb/usb_freebsd_loader.h index 68343d229517..bd082187707c 100644 --- a/sys/dev/usb/usb_freebsd_loader.h +++ b/sys/dev/usb/usb_freebsd_loader.h @@ -40,7 +40,8 @@ #define USB_HAVE_MBUF 0 #define USB_HAVE_TT_SUPPORT 1 #define USB_HAVE_POWERD 1 -#define USB_HAVE_MSCTEST 0 +#define USB_HAVE_MSCTEST 1 +#define USB_HAVE_MSCTEST_DETACH 0 #define USB_HAVE_PF 0 #define USB_HAVE_ROOT_MOUNT_HOLD 0 #define USB_HAVE_ID_SECTION 0 diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index 3181acdcef61..f0cb1a560fce 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -507,6 +507,8 @@ bbb_attach(struct usb_device *udev, uint8_t iface_index) struct usb_interface_descriptor *id; struct bbb_transfer *sc; usb_error_t err; + +#if USB_HAVE_MSCTEST_DETACH uint8_t do_unlock; /* Prevent re-enumeration */ @@ -520,6 +522,7 @@ bbb_attach(struct usb_device *udev, uint8_t iface_index) if (do_unlock) usbd_enum_unlock(udev); +#endif iface = usbd_get_iface(udev, iface_index); if (iface == NULL) |