From owner-freebsd-usb@FreeBSD.ORG Sat Dec 13 15:54:57 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C6B17A9 for ; Sat, 13 Dec 2014 15:54:57 +0000 (UTC) Received: from mail.united-ware.com (mail.united-ware.com [66.11.3.56]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.united-ware.com", Issuer "*.united-ware.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C310D7B3 for ; Sat, 13 Dec 2014 15:54:56 +0000 (UTC) Received: from bigguy.am-productions.biz (75-23-197-233.lightspeed.wotnoh.sbcglobal.net [75.23.197.233]) (authenticated bits=0) by mail.united-ware.com (8.14.7/8.14.7) with ESMTP id sBDFsijw058720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Dec 2014 10:54:45 -0500 (EST) (envelope-from amistry@am-productions.biz) From: Anish Mistry To: Hans Petter Selasky Subject: Re: urndis and umodem device collision for ue device Date: Sat, 13 Dec 2014 10:54:48 -0500 Message-ID: <1993304.2n7h1o4Guv@bigguy.am-productions.biz> User-Agent: KMail/4.14.2 (FreeBSD/10.1-RELEASE; KDE/4.14.2; amd64; ; ) In-Reply-To: <548C1361.6050304@selasky.org> References: <1580934.Kkj0kKdA3z@bigguy.am-productions.biz> <548C1361.6050304@selasky.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart3625215.xXHlxubTSN" Content-Transfer-Encoding: 7Bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2014 15:54:57 -0000 This is a multi-part message in MIME format. --nextPart3625215.xXHlxubTSN Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Patches attached. This only work if umodem is not already loaded, otherwise it will grab the device. On Saturday, December 13, 2014 11:22:25 AM you wrote: > On 12/13/14 06:43, Anish Mistry wrote: > > I have a HP Pre3 (webos) which when switched into USB tethering mode with > > > > freetether exposes a RNDIS Ethernet Device. This should simply appear as > > ue0 and off to the races. Unfortunately it attached via umodem due to > > the usb.conf/devd usb_autoconf scripts and a device class overlap with > > if_urndis. After commenting out those manual attach lines for umodem and > > kldload if_urndis the device still didn't attach. After going into > > if_rndis.c and enabling the "umodem" conflict section on line > > ifrndis.c:173 (I'm running 10.1) and recompling the kernel module the > > device appears and > > functions, I'm using it to post this. > > > > How to I make this permenant (create a quirk?) so I don't have to hack > > > > usb.conf and if_rndis.c each time I upgrade? > > > > Thanks, > > Could you send the complete patch you are using? > > --HPS -- Anish Mistry --nextPart3625215.xXHlxubTSN Content-Disposition: attachment; filename="if_urndis.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="ISO-8859-1"; name="if_urndis.patch" --- sys/dev/usb/net/if_urndis.c.orig 2014-12-13 10:20:50.000000000 -0500 +++ sys/dev/usb/net/if_urndis.c 2014-12-13 10:21:19.000000000 -0500 @@ -170,7 +170,7 @@ }; static const STRUCT_USB_HOST_ID urndis_host_devs[] = { -#if 0 +#if 1 /* XXX this entry has a conflict an entry the umodem driver XXX */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xff)}, --nextPart3625215.xXHlxubTSN Content-Disposition: attachment; filename="usb.conf-pre3.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="ISO-8859-1"; name="usb.conf-pre3.patch" --- usb.conf.orig 2014-12-13 10:29:19.000000000 -0500 +++ usb.conf 2014-12-13 10:33:54.000000000 -0500 @@ -14,6 +14,14 @@ }; nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0830"; + match "product" "0x8056"; + action "kldload -n if_urndis"; +}; + +nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0123"; --nextPart3625215.xXHlxubTSN--