From owner-svn-src-head@freebsd.org Tue Dec 29 11:53:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65715A55D0C; Tue, 29 Dec 2015 11:53:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 238211397; Tue, 29 Dec 2015 11:53:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBTBrELB009706; Tue, 29 Dec 2015 11:53:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBTBrETu009704; Tue, 29 Dec 2015 11:53:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512291153.tBTBrETu009704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 29 Dec 2015 11:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292865 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2015 11:53:15 -0000 Author: hselasky Date: Tue Dec 29 11:53:13 2015 New Revision: 292865 URL: https://svnweb.freebsd.org/changeset/base/292865 Log: Update metadata for "tools/tools/bus_autoconf" after r292080. Use BYTE_ORDER instead of _BYTE_ORDER due to 3rd party USB software for now. Modified: head/sys/dev/usb/usb_lookup.c head/sys/dev/usb/usbdi.h Modified: head/sys/dev/usb/usb_lookup.c ============================================================================== --- head/sys/dev/usb/usb_lookup.c Tue Dec 29 11:24:41 2015 (r292864) +++ head/sys/dev/usb/usb_lookup.c Tue Dec 29 11:53:13 2015 (r292865) @@ -154,28 +154,10 @@ usbd_lookup_id_by_uaa(const struct usb_d /*------------------------------------------------------------------------* * Export the USB device ID format we use to userspace tools. *------------------------------------------------------------------------*/ -#if BYTE_ORDER == BIG_ENDIAN -#define U16_XOR "8" -#define U32_XOR "12" -#define U64_XOR "56" -#define U8_BITFIELD_XOR "7" -#define U16_BITFIELD_XOR "15" -#define U32_BITFIELD_XOR "31" -#define U64_BITFIELD_XOR "63" -#else +#if BYTE_ORDER == LITTLE_ENDIAN #define U16_XOR "0" -#define U32_XOR "0" -#define U64_XOR "0" -#define U8_BITFIELD_XOR "0" -#define U16_BITFIELD_XOR "0" -#define U32_BITFIELD_XOR "0" -#define U64_BITFIELD_XOR "0" -#endif - -#if USB_HAVE_COMPAT_LINUX -#define MFL_SIZE "1" #else -#define MFL_SIZE "0" +#define U16_XOR "8" #endif #if defined(KLD_MODULE) && (USB_HAVE_ID_SECTION != 0) @@ -189,20 +171,19 @@ static const char __section("bus_autocon /* List size of fields in the usb_device_id structure */ -#if ULONG_MAX >= 0xFFFFFFFFUL - "unused{0,8}" - "unused{0,8}" - "unused{0,8}" - "unused{0,8}" -#if ULONG_MAX >= 0xFFFFFFFFFFFFFFFFULL - "unused{0,8}" - "unused{0,8}" - "unused{0,8}" - "unused{0,8}" -#endif -#else -#error "Please update code." -#endif + "mf_vendor{" U16_XOR ",1}" + "mf_product{" U16_XOR ",1}" + "mf_dev_lo{" U16_XOR ",1}" + "mf_dev_hi{" U16_XOR ",1}" + + "mf_dev_class{" U16_XOR ",1}" + "mf_dev_subclass{" U16_XOR ",1}" + "mf_dev_protocol{" U16_XOR ",1}" + "mf_int_class{" U16_XOR ",1}" + + "mf_int_subclass{" U16_XOR ",1}" + "mf_int_protocol{" U16_XOR ",1}" + "unused{" U16_XOR ",6}" "idVendor[0]{" U16_XOR ",8}" "idVendor[1]{" U16_XOR ",8}" @@ -220,38 +201,20 @@ static const char __section("bus_autocon "bInterfaceSubClass{0,8}" "bInterfaceProtocol{0,8}" - "mf_vendor{" U8_BITFIELD_XOR ",1}" - "mf_product{" U8_BITFIELD_XOR ",1}" - "mf_dev_lo{" U8_BITFIELD_XOR ",1}" - "mf_dev_hi{" U8_BITFIELD_XOR ",1}" - - "mf_dev_class{" U8_BITFIELD_XOR ",1}" - "mf_dev_subclass{" U8_BITFIELD_XOR ",1}" - "mf_dev_protocol{" U8_BITFIELD_XOR ",1}" - "mf_int_class{" U8_BITFIELD_XOR ",1}" - - "mf_int_subclass{" U8_BITFIELD_XOR ",1}" - "mf_int_protocol{" U8_BITFIELD_XOR ",1}" - "unused{" U8_BITFIELD_XOR ",6}" - - "mfl_vendor{" U16_XOR "," MFL_SIZE "}" - "mfl_product{" U16_XOR "," MFL_SIZE "}" - "mfl_dev_lo{" U16_XOR "," MFL_SIZE "}" - "mfl_dev_hi{" U16_XOR "," MFL_SIZE "}" - - "mfl_dev_class{" U16_XOR "," MFL_SIZE "}" - "mfl_dev_subclass{" U16_XOR "," MFL_SIZE "}" - "mfl_dev_protocol{" U16_XOR "," MFL_SIZE "}" - "mfl_int_class{" U16_XOR "," MFL_SIZE "}" - - "mfl_int_subclass{" U16_XOR "," MFL_SIZE "}" - "mfl_int_protocol{" U16_XOR "," MFL_SIZE "}" - "unused{" U16_XOR "," MFL_SIZE "}" - "unused{" U16_XOR "," MFL_SIZE "}" - - "unused{" U16_XOR "," MFL_SIZE "}" - "unused{" U16_XOR "," MFL_SIZE "}" - "unused{" U16_XOR "," MFL_SIZE "}" - "unused{" U16_XOR "," MFL_SIZE "}" +#if USB_HAVE_COMPAT_LINUX + "mfl_vendor{" U16_XOR ",1}" + "mfl_product{" U16_XOR ",1}" + "mfl_dev_lo{" U16_XOR ",1}" + "mfl_dev_hi{" U16_XOR ",1}" + + "mfl_dev_class{" U16_XOR ",1}" + "mfl_dev_subclass{" U16_XOR ",1}" + "mfl_dev_protocol{" U16_XOR ",1}" + "mfl_int_class{" U16_XOR ",1}" + + "mfl_int_subclass{" U16_XOR ",1}" + "mfl_int_protocol{" U16_XOR ",1}" + "unused{" U16_XOR ",6}" +#endif }; #endif Modified: head/sys/dev/usb/usbdi.h ============================================================================== --- head/sys/dev/usb/usbdi.h Tue Dec 29 11:24:41 2015 (r292864) +++ head/sys/dev/usb/usbdi.h Tue Dec 29 11:53:13 2015 (r292865) @@ -267,7 +267,7 @@ struct usb_config { struct usb_device_id { /* Select which fields to match against */ -#if _BYTE_ORDER == _LITTLE_ENDIAN +#if BYTE_ORDER == LITTLE_ENDIAN uint16_t match_flag_vendor:1, match_flag_product:1, @@ -315,13 +315,6 @@ struct usb_device_id { uint8_t bInterfaceSubClass; uint8_t bInterfaceProtocol; - /* Hook for driver specific information */ - unsigned long driver_info; - -/* - * XXX can't currently participate in auto driver loading - * XXX making it a union with the match_flag_* above messes up init - */ #if USB_HAVE_COMPAT_LINUX /* which fields to match against */ uint16_t match_flags; @@ -336,6 +329,9 @@ struct usb_device_id { #define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100 #define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 #endif + + /* Hook for driver specific information */ + unsigned long driver_info; } __aligned(32); #define USB_STD_PNP_INFO "M16:mask;U16:vendor;U16:product;L16:product;G16:product;" \