From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 29 14:43:09 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 618) id 63DA637B401; Sat, 29 Mar 2003 14:43:09 -0800 (PST) In-Reply-To: <20030328220521.GP23168@cicely9.cicely.de> from Bernd Walter at "Mar 28, 2003 11:05:22 pm" To: ticso@cicely.de Date: Sat, 29 Mar 2003 14:43:09 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20030329224309.63DA637B401@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) cc: hackers@FreeBSD.ORG Subject: Re: Ax88172 vs FreeBSD USB stack X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2003 22:43:10 -0000 Ok, I figured it out. Turns out the AX88172 only has one interface after all, in spite of what the manual says. Maybe the info about the second interface was a holdover from the AX88170 datasheet which they forgot to expunge. Or maybe ASIX is on crack. Anyway, I discovered I was doing two things wrong: 1) The RX control register has to be set correctly to enable the RX filter on the MAC. The AX88172 datasheet doesn't tell you what the bits in the RX control byte mean. The AX88170 datasheet does, but only documents bits 0 through 4. It forgets to mention that you must also turn on bit 7. If you don't set this bit, you don't receive any packets. 2) For transmission, you must initialize the three inter-packet gap (IPG) registers correctly. They are unset by default, and until they are set, the MAC won't send any frames. Now that I fixed these two things, the driver works. In fact, I'm using it to type this e-mail right now. :) I uploaded a copy to: http://www.freebsd.org/~wpaul/ASIX/USB All it really needs is for me to fix the multicast filtering. Right now, it defaults to all multicast mode. I need to fill in the axe_setmulti() function so that it sets up the hash table correctly. I think I also need to fix promisc mode. This code is for 5.0-RELEASE or better. -Bill -- ============================================================================= -Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu wpaul@windriver.com | Wind River Systems ============================================================================= "If stupidity were a handicap, you'd have the best parking spot." =============================================================================