From owner-freebsd-net@FreeBSD.ORG Thu Jun 25 10:34:27 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 706BD1065673 for ; Thu, 25 Jun 2009 10:34:27 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from mail-px0-f191.google.com (mail-px0-f191.google.com [209.85.216.191]) by mx1.freebsd.org (Postfix) with ESMTP id 377228FC1D for ; Thu, 25 Jun 2009 10:34:26 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: by pxi29 with SMTP id 29so971158pxi.3 for ; Thu, 25 Jun 2009 03:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:organization:x-operation-sytem; bh=OUYaGJQrJaro03/y0b/IcKMjzH7O1H9bE/Lx1FJyLAQ=; b=hO9FnJaFuD4716bAbmMlz83st/aDC/XWtsBII9JoqhU/Kr4v40aDQCPznDSnEvZIRW erRaFlG8Nff9fTKA00KraaXJd69BenDT2FWGNKO9vnunAvucfDaW8bLymWFR8cyAOMjh GbJQYtkFxNubW86m89RjoTZQzOzlrC1aC0IkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:organization:x-operation-sytem; b=ntf4kJvMX4oxiKSjN4pr2fNfQP8ZM4sjVvfHou0FnutNTrgtu4rHAPKKl9uyqNskvs clYSwrIb6si8XLAmxGbbyGDabPLasjGHgjfA/9bEeE6pjjmD6y65q9DeyH+zmuilZIoN SfLRlra5YaETcuShlG7koDbJ0gCTyGBwNsNMA= Received: by 10.141.26.19 with SMTP id d19mr2113267rvj.84.1245926066768; Thu, 25 Jun 2009 03:34:26 -0700 (PDT) Received: from weongyo ([114.111.62.249]) by mx.google.com with ESMTPS id g14sm2120729rvb.54.2009.06.25.03.34.24 (version=SSLv3 cipher=RC4-MD5); Thu, 25 Jun 2009 03:34:26 -0700 (PDT) Received: by weongyo (sSMTP sendmail emulation); Thu, 25 Jun 2009 19:34:20 +0900 From: Weongyo Jeong Date: Thu, 25 Jun 2009 19:34:20 +0900 To: Nikos Vassiliadis Message-ID: <20090625103420.GD31161@weongyo.cdnetworks.kr> Mail-Followup-To: Nikos Vassiliadis , freebsd-net@freebsd.org References: <4A43386D.80500@gmx.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <4A43386D.80500@gmx.com> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: freebsd-net@freebsd.org Subject: Re: ndis and USB wirelless ethernet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2009 10:34:27 -0000 --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--