Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jun 2011 08:52:16 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r223418 - stable/8/sys/dev/usb
Message-ID:  <201106220852.p5M8qG5f040394@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jun 22 08:52:16 2011
New Revision: 223418
URL: http://svn.freebsd.org/changeset/base/223418

Log:
  MFC r213852:
  - Add support for LibUSB in 32-bit compatibility mode.

Modified:
  stable/8/sys/dev/usb/usb_ioctl.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/usb/usb_ioctl.h
==============================================================================
--- stable/8/sys/dev/usb/usb_ioctl.h	Wed Jun 22 08:22:29 2011	(r223417)
+++ stable/8/sys/dev/usb/usb_ioctl.h	Wed Jun 22 08:52:16 2011	(r223418)
@@ -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;
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106220852.p5M8qG5f040394>