aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2010-10-14 20:38:18 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2010-10-14 20:38:18 +0000
commit51fd3d75feb1341e70c0e6a63db16ae2af4600f1 (patch)
treed4dbe756b857cc1d5d92c6a6cbe7950dc7456747 /sys
parenta1221549012ec947ce4b2a1fa8439e35bdbdeca0 (diff)
downloadsrc-51fd3d75feb1341e70c0e6a63db16ae2af4600f1.tar.gz
src-51fd3d75feb1341e70c0e6a63db16ae2af4600f1.zip
- Add support for LibUSB in 32-bit compatibility mode.
Approved by: thompsa (mentor)
Notes
Notes: svn path=/head/; revision=213852
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usb_ioctl.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_ioctl.h b/sys/dev/usb/usb_ioctl.h
index f9018e283ec7..8fe55e18bd2a 100644
--- a/sys/dev/usb/usb_ioctl.h
+++ b/sys/dev/usb/usb_ioctl.h
@@ -41,13 +41,21 @@
#define USB_GENERIC_NAME "ugen"
struct usb_read_dir {
+#ifdef COMPAT_32BIT
+ uint64_t urd_data;
+#else
void *urd_data;
+#endif
uint32_t urd_startentry;
uint32_t urd_maxlen;
};
struct usb_ctl_request {
+#ifdef COMPAT_32BIT
+ uint64_t ucr_data;
+#else
void *ucr_data;
+#endif
uint16_t ucr_flags;
uint16_t ucr_actlen; /* actual length transferred */
uint8_t ucr_addr; /* zero - currently not used */
@@ -60,7 +68,11 @@ struct usb_alt_interface {
};
struct usb_gen_descriptor {
+#ifdef COMPAT_32BIT
+ uint64_t ugd_data;
+#else
void *ugd_data;
+#endif
uint16_t ugd_lang_id;
uint16_t ugd_maxlen;
uint16_t ugd_actlen;
@@ -126,9 +138,14 @@ struct usb_fs_endpoint {
* NOTE: isochronous USB transfer only use one buffer, but can have
* multiple frame lengths !
*/
+#ifdef COMPAT_32BIT
+ uint64_t ppBuffer;
+ uint64_t pLength;
+#else
void **ppBuffer; /* pointer to userland buffers */
uint32_t *pLength; /* pointer to frame lengths, updated
* to actual length */
+#endif
uint32_t nFrames; /* number of frames */
uint32_t aFrames; /* actual number of frames */
uint16_t flags;
@@ -150,7 +167,11 @@ struct usb_fs_endpoint {
struct usb_fs_init {
/* userland pointer to endpoints structure */
+#ifdef COMPAT_32BIT
+ uint64_t pEndpoints;
+#else
struct usb_fs_endpoint *pEndpoints;
+#endif
/* maximum number of endpoints */
uint8_t ep_index_max;
};