diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-05-30 13:45:20 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-05-30 13:45:20 +0000 |
commit | b66cd7ed715f39d8072d3e15f86ac7e583c98489 (patch) | |
tree | 9107e4e0bfdf333c95b251d814578839aea54cc3 | |
parent | 6047bb70d6dab19632142e7e40345c723a460deb (diff) | |
download | FreeBSD-src-b66cd7ed715f39d8072d3e15f86ac7e583c98489.zip FreeBSD-src-b66cd7ed715f39d8072d3e15f86ac7e583c98489.tar.gz |
Make driver detach code in USB mass storage test optional.
Sponsored by: DARPA, AFRL
-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 0c483e5..cda4e69 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 68343d2..bd08218 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 3181acd..f0cb1a5 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) |