Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2009 19:34:20 +0900
From:      Weongyo Jeong <weongyo.jeong@gmail.com>
To:        Nikos Vassiliadis <nvass9573@gmx.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: ndis and USB wirelless ethernet
Message-ID:  <20090625103420.GD31161@weongyo.cdnetworks.kr>
In-Reply-To: <4A43386D.80500@gmx.com>
References:  <4A43386D.80500@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Jun 25, 2009 at 11:42:21AM +0300, Nikos Vassiliadis wrote:
> Hello,
> 
> I am trying to use a wireless ethernet USB thingy,
> but the ndis interface never appears. Any hints?
> 
> 
> ndis0: NDIS API version: 5.1
> lock order reversal:
>  1st 0xc0edc900 HAL preemption lock (HAL lock) @ 
> /usr/src/sys/compat/ndis/subr_hal.c:416
>  2nd 0xc23a61ec NDIS USB (network driver) @ 
> /usr/src/sys/compat/ndis/subr_usbd.c:802
> KDB: stack backtrace:
> db_trace_self_wrapper(c0c0f65b,c75527e4,c08af235,c08a015b,c0c1249e,...) 
> at db_trace_self_wrapper+0x26
> kdb_backtrace(c08a015b,c0c1249e,c2117a58,c2114040,c7552840,...) at 
> kdb_backtrace+0x29
> _witness_debugger(c0c1249e,c23a61ec,c0c3cf54,c2114040,c0c36d8d,...) at 
> _witness_debugger+0x25
> witness_checkorder(c23a61ec,9,c0c36d8d,322,0,...) at 
> witness_checkorder+0x839
> _mtx_lock_flags(c23a61ec,0,c0c36d8d,322,c27f2a00,...) at 
> _mtx_lock_flags+0xc4
> usbd_irpcancel(c26c3100,c27f2a00,c7552954,c75529a0,c0acfe2a,...) at 
> usbd_irpcancel+0x5c
> end(c27f2a00,c75529f8,c2980c80,0,40000,...) at 0xc220c2e1
> end(40000000,c2980c80,c23a5000,c2706000,0,...) at 0xc22036e1
> ndis_wg111v3_sys_drv_data_start(c2706000,0,5,ff44,0,...) at 
> ndis_wg111v3_sys_drv_data_start+0x768f
> ndis_wg111v3_sys_drv_data_start(c2706000,0,44,c7552a08,c2706000,...) at 
> ndis_wg111v3_sys_drv_data_start+0x3d86
> ndis_wg111v3_sys_drv_data_start(c2706000,44,c7552a2c,c26e077a,c2706000,...) 
> at ndis_wg111v3_sys_drv_data_start+0x4a73
> ndis_wg111v3_sys_drv_data_start(c2706000,c2706000,c7552a48,c26cf5d2,c2706000,...) 
> at 0xc26f24b2
> ndis_wg111v3_sys_drv_data_start(c2706000,c7552a68,c7552a94,c23a6000,c2706000,...) 
> at 0xc26e077a
> ndis_wg111v3_sys_drv_data_start(c7552ad4,c7552ad0,c23a5000,0,c2703000,...) 
> at ndis_wg111v3_sys_drv_data_start+0x65d2
> x86_stdcall_call(c23a6000,c220bac0,c2703000,1,c085f2ac,...) at 
> x86_stdcall_call+0x1e
> ndis_attach(c2460a80,c2460a80,c0bb64fd,0,c22bc864,...) at ndis_attach+0x33c
> ndisusb_attach(c2460a80,c221885c,c0cef938,c0bfc63d,80000000,...) at 
> ndisusb_attach+0xdb
> device_attach(c2460a80,4,c0c0ed75,9f1) at device_attach+0x36f
> device_probe_and_attach(c2460a80,c7552c1c,ffffffff,c23ae400,0,...) at 
> device_probe_and_attach+0x4e
> usb_probe_and_attach_sub(c23ae400,0,c0bf354f,4c4,c7552c18,...) at 
> usb_probe_and_attach_sub+0xde
> usb_probe_and_attach(c23ae400,ff,1e,c7552ca8,c07a4654,...) at 
> usb_probe_and_attach+0x1b3
> uhub_explore(c2399c00,0,c0bf1fec,cd,c228add4,...) at uhub_explore+0x766
> usb_bus_explore(c228add4,c228ae4c,c0bfb560,51,c0d5fec0,...) at 
> usb_bus_explore+0xbb
> usb_process(c228ad74,c7552d38,c0c079d2,334,c237d7f8,...) at usb_process+0xde
> fork_exit(c07a6de0,c228ad74,c7552d38) at fork_exit+0xb8
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0, eip = 0, esp = 0xc7552d70, ebp = 0 ---
> ndis0: warning: not enough write buffer space (1).
> ndis0: warning: not enough write buffer space (1).
> ndis0: warning: not enough write buffer space (1).
> ndis0: warning: not enough write buffer space (1).
> ndis0: warning: not enough write buffer space (1).
> 
> Then it goes on repeating the "ndis0: ..." message.
> 
> Thanks in advance for any hint,

Hello Nikos,

Could you please test with attached patch and show me the result?

regards,
Weongyo Jeong


--tKW2IUtsqtDRztdT
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="patch_ndisusb_20090625.diff"

Index: subr_usbd.c
===================================================================
--- subr_usbd.c	(revision 194936)
+++ subr_usbd.c	(working copy)
@@ -82,10 +82,11 @@
 #define	USBD_CTRL_WRITE_PIPE		1
 #define	USBD_CTRL_MAX_PIPE		2
 #define	USBD_CTRL_READ_BUFFER_SP	256
+#define	USBD_CTRL_WRITE_BUFFER_SP	256
 #define	USBD_CTRL_READ_BUFFER_SIZE	\
 	(sizeof(struct usb_device_request) + USBD_CTRL_READ_BUFFER_SP)
 #define	USBD_CTRL_WRITE_BUFFER_SIZE	\
-	(sizeof(struct usb_device_request))
+	(sizeof(struct usb_device_request) + USBD_CTRL_WRITE_BUFFER_SP)
 static struct usb_config usbd_default_epconfig[USBD_CTRL_MAX_PIPE] = {
 	[USBD_CTRL_READ_PIPE] = {
 		.type =		UE_CONTROL,
@@ -1065,7 +1066,7 @@
 				    vcreq->uvc_trans_buflen));
 			usbd_xfer_set_frames(xfer, 2);
 		} else {
-			if (nx->nx_urblen > 0)
+			if (nx->nx_urblen > USBD_CTRL_WRITE_BUFFER_SP)
 				device_printf(sc->ndis_dev,
 				    "warning: not enough write buffer space"
 				    " (%d).\n", nx->nx_urblen);

--tKW2IUtsqtDRztdT--



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