From owner-freebsd-usb@FreeBSD.ORG Thu Jan 9 15:13:08 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 729E4706; Thu, 9 Jan 2014 15:13:08 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6481ED6; Thu, 9 Jan 2014 15:13:07 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id 4C08217FC61; Thu, 9 Jan 2014 16:13:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 800708F8571; Thu, 9 Jan 2014 16:13:51 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oxRZ8PNBFeyi; Thu, 9 Jan 2014 16:13:50 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 8ACDB8F8177; Thu, 9 Jan 2014 16:13:50 +0100 (CET) Message-ID: <52CEBCC4.605@bitfrost.no> Date: Thu, 09 Jan 2014 16:14:12 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd , "freebsd-usb@freebsd.org" Subject: Re: USB_DEV_BCD_LTEQ() doesn't work References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 15:13:08 -0000 On 01/09/14 16:02, Adrian Chadd wrote: > Hi, > > I'm trying to fix the atheros bluetooth USB matching to match the > ath3k rules and unfortunately I'm hitting a snag. > > eg, in the blacklist: > > - { USB_VPI(0x0cf3, 0x3004, 0) }, > + { USB_VPI(0x0cf3, 0x3004, 0), USB_DEV_BCD_LTEQ(1) }, > > Now, the rule is "if it's in the list, it's blacklisted", and in this > instance, these devices with a bcdDevice of <=1 are blacklisted. > > However, this doesn't at all work. The USB matching code that looks > like it's doing it isn't. > > Ideas? > > Hi, Use both GTEQ and LTEQ to make a range: #define USB_DEV_BCD_GTEQ(lo) /* greater than or equal */ \ .match_flag_dev_lo = 1, .bcdDevice_lo = (lo) #define USB_DEV_BCD_LTEQ(hi) /* less than or equal */ \ .match_flag_dev_hi = 1, .bcdDevice_hi = (hi) --HPS