From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 05:14:44 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35EE5106566B for ; Thu, 30 Jul 2009 05:14:44 +0000 (UTC) (envelope-from matheusber@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id D6EE98FC13 for ; Thu, 30 Jul 2009 05:14:43 +0000 (UTC) (envelope-from matheusber@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so651960qwe.7 for ; Wed, 29 Jul 2009 22:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:received :message-id:in-reply-to:references:date:subject:from:to:user-agent :mime-version:content-type:content-transfer-encoding:x-priority :importance; bh=F/jo++VoEXhDGW2y8sXEQ/LAu2PobokIIqs0JWQUWVM=; b=PcUfdtSM425mOP8bkmWG/u6POpGCMn4mM9odT1o07GlFWU7lDHVWNvLlJEHtSqF2G6 Cbd3SK2RN5x8xmZTe/ynadQ0KULs35Y5G0bKv95mDnBAS4AFqQ4mhfIfcbTUR7dGk0J4 mxM/qg8laMAOyEdPA/pGE732PDu5DsgZpzBXw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:in-reply-to:references:date:subject:from:to :user-agent:mime-version:content-type:content-transfer-encoding :x-priority:importance; b=AOQ0V+W7z3hnNU7y6BQHiqdZ8l66znryK4kIcVVL74LgBpzd+QvGY2UFDQLXpjKw23 razca8yVV7LQsZmP71urCwDpRGZttg0ewF7KOOl0acwZSLSZ/ah0mTyqBm4W1QmtH0a8 py/N+3celCXyIR3vB0F2m+0ASa7hm0ZxPM2M8= Received: by 10.224.54.5 with SMTP id o5mr422573qag.314.1248929070280; Wed, 29 Jul 2009 21:44:30 -0700 (PDT) Received: from cygnus.homeunix.com ([189.71.108.65]) by mx.google.com with ESMTPS id 2sm2282025qwi.23.2009.07.29.21.44.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 29 Jul 2009 21:44:29 -0700 (PDT) Sender: Nenhum_de_Nos Received: by cygnus.homeunix.com (Postfix, from userid 80) id ACC16B80A3; Thu, 30 Jul 2009 01:44:23 -0300 (BRT) Received: from 10.1.1.100 (SquirrelMail authenticated user matheus) by 10.1.1.10 with HTTP; Thu, 30 Jul 2009 01:44:23 -0300 (BRT) Message-ID: <6441f6846fc499093ff2e025632c8630.squirrel@10.1.1.10> In-Reply-To: <4A711D7C.2060100@sandstorm.net> References: <4A711D7C.2060100@sandstorm.net> Date: Thu, 30 Jul 2009 01:44:23 -0300 (BRT) From: "Nenhum_de_Nos" To: freebsd-usb@freebsd.org User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: bug fix for aue driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 05:14:44 -0000 On Thu, July 30, 2009 01:11, john hood wrote: > I have a D-Link DSB-650 USB ethernet adapter, which uses an ADMtek AN986 > USB MAC, a Broadcom BCM5201 PHY device, and the aue driver. > > Recent versions of FreeBSD (7.1, 7.2, 8 beta 2) all get stuck on "aue0: > MII read timed out" errors after you try and bring the interface up. > (The system continues to run, but you get long waits performing ioctls > on the device, and no actual packets.) > > I think I've found the problem; the device is getting mis-initialized, > and has been ever since the early days of the driver. The old code > mis-sets a power-down configuration line on the PHY just as it's > resetting it. > > I think I have a fix; it 1) does the right thing for ADMtek's reference > design, 2) matches (better) what the Linux driver does (successfully, > for me), 3) matches the actual circuit of the DSB-650, 4) makes sense > when you read it. I suspect it will improve the situation for most > users of Pegasus-based Ethernet adapters, and probably resolve most of > the weird media- and PHY-related issues the driver's had for its entire > life. > > Would people try the attached patch? (If anyone cares much about an > obsolete Ethernet adapter-- I used this mostly as an excuse to wade into > the USB stack and understand it a little better...) If you get > debugging spew, please forward it to me. If it just works (or not), > tell me that too. > > The patch is against 8.0-beta2. It won't apply to the old, pre-USB2 > driver in sys/dev/usb/if_aue.c, but the significant change is the reset > code in the last hunk of the patch; trying that on whatever version of > FreeBSD you're using is worthwhile. > > Thanks, > > --jh I had problems using some aue in anything prior to 8-current. when I used usb from hps, all worked fine. I filed a PR for 7-stable in that time. my aue on 7.x didn't work at all. matheus -- We will call you cygnus, The God of balance you shall be A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? http://en.wikipedia.org/wiki/Posting_style