From owner-freebsd-usb@FreeBSD.ORG Sat Apr 30 16:09:41 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DCCD16A4CF; Sat, 30 Apr 2005 16:09:41 +0000 (GMT) Received: from graf.pompo.net (graf.pompo.net [81.56.186.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E91143D41; Sat, 30 Apr 2005 16:09:40 +0000 (GMT) (envelope-from thierry@pompo.net) Received: by graf.pompo.net (Postfix, from userid 1001) id 1D47C7512; Sat, 30 Apr 2005 18:06:50 +0200 (CEST) Date: Sat, 30 Apr 2005 18:06:50 +0200 From: Thierry Thomas To: Lonnie Mendez Message-ID: <20050430160650.GC95709@graf.pompo.net> References: <20050427055531.07B7D60FB@gnome.dnsalias.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="m51xatjYGsM+13rf" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050427055531.07B7D60FB@gnome.dnsalias.net> X-Face: (hRbQnK~Pt7$ct`!fupO(`y_WL4^-Iwn4@ly-.,[4xC4xc; y=\ipKMNm<1J>lv@PP~7Z<.t KjAnXLs: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 4.11-STABLE i386 Organization: Kabbale Eros X-PGP: 0xC71405A2 cc: FreeBSD-gnats-submit@FreeBSD.org cc: freebsd-usb@freebsd.org Subject: Re: kern/80383: [PATCH] Add quirk for uhid to ignore certain usb devices (blacklist) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2005 16:09:41 -0000 --m51xatjYGsM+13rf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Le Mer 27 avr 05 à 7:55:31 +0200, Lonnie Mendez écrivait : > > >Number: 80383 > >Category: kern > >Synopsis: [PATCH] Add quirk for uhid to ignore certain usb devices (blacklist) > >Description: > > This patch allows uhid to leave alone devices that identify themselves as hid based, but are indeed > used via another interface. This is very simliar in concept to the hid blacklist table found in hid-core.c > in the linux kernel. Fine! I also need this to use the new MGE UPS devices (with nut, libusb and the newhidups driver). I have applied the submitted patch on a 5.4-STABLE, and it's OK. To add the MGE UPS devices, I need the attached patches. -- Th. Thomas. --m51xatjYGsM+13rf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="usb_quirks.diff" --- src/sys/dev/usb/usb_quirks.c.orig Sat Feb 5 16:05:51 2005 +++ src/sys/dev/usb/usb_quirks.c Sat Apr 30 09:27:35 2005 @@ -101,6 +101,13 @@ ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS64LX, 0x100, { UQ_ASSUME_CM_OVER_DATA }}, + /* Devices which should be ignored by uhid */ + { USB_VENDOR_DELORME, USB_PRODUCT_DELORME_EARTHMATE, + ANY, { UQ_HID_IGNORE }}, + { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS1, + ANY, { UQ_HID_IGNORE }}, + { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2, + ANY, { UQ_HID_IGNORE }}, { 0, 0, 0, { 0 } } }; --m51xatjYGsM+13rf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="usbdevs.diff" --- src/sys/dev/usb/usbdevs.orig Sun Apr 3 16:37:47 2005 +++ src/sys/dev/usb/usbdevs Sat Apr 30 16:00:53 2005 @@ -90,6 +90,7 @@ vendor DIAMOND2 0x045a Diamond (Supra) vendor MICROSOFT 0x045e Microsoft vendor PRIMAX 0x0461 Primax Electronics +vendor MGE 0x0463 MGE UPS Systems vendor AMP 0x0464 AMP vendor CHERRY 0x046a Cherry Mikroschalter vendor MEGATRENDS 0x046b American Megatrends @@ -962,6 +963,10 @@ /* Metricom products */ product METRICOM RICOCHET_GS 0x0001 Ricochet GS + +/* MGE UPS Systems */ +product MGE UPS1 0x0001 MGEUPS newhidups 1 +product MGE UPS2 0xffff MGEUPS newhidups 2 /* Microsoft products */ product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro --m51xatjYGsM+13rf--