Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Dec 2014 10:54:48 -0500
From:      Anish Mistry <amistry@am-productions.biz>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: urndis and umodem device collision for ue device
Message-ID:  <1993304.2n7h1o4Guv@bigguy.am-productions.biz>
In-Reply-To: <548C1361.6050304@selasky.org>
References:  <1580934.Kkj0kKdA3z@bigguy.am-productions.biz> <548C1361.6050304@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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--




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