From owner-freebsd-stable Wed Jan 30 0:14:18 2002 Delivered-To: freebsd-stable@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id E3F4D37B400 for ; Wed, 30 Jan 2002 00:14:10 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g0U8E9o28240; Wed, 30 Jan 2002 01:14:10 -0700 (MST) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g0U8E8x22576; Wed, 30 Jan 2002 01:14:08 -0700 (MST) (envelope-from imp@village.org) Date: Wed, 30 Jan 2002 01:13:51 -0700 (MST) Message-Id: <20020130.011351.13523788.imp@village.org> To: brooks@one-eyed-alien.net Cc: eliedtke@apogeetelecom.com, freebsd-stable@FreeBSD.ORG Subject: Re: Another Linksys WDT11 problem From: "M. Warner Losh" In-Reply-To: <20020129150921.A7477@Odin.AC.HMC.Edu> References: <20020129025206.GC31653@apogeetelecom.com> <20020129150921.A7477@Odin.AC.HMC.Edu> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020129150921.A7477@Odin.AC.HMC.Edu> Brooks Davis writes: : On Mon, Jan 28, 2002 at 08:52:06PM -0600, Eric Liedtke wrote: : > Ok, from my last mail I got the card working fine. So it was time to : > tranfer it to a 3rd machine, my home router, as it's final resting place : > and I have run into a new problem....I am getting a error message of : > : > wi0: mac read failed 5 : > : > I poked around in the code a little bit, but couldn't come up with : > anything of use. I am not sure how to go about troubleshooting this from : > here, so any advice would be great. Thanks : : Ok, this is a bit of a shot in the dark, but what the heck. If you look : for that error message in the driver, you'll find this comment: : : /* : * Read the station address. : * And do it twice. I've seen PRISM-based cards that return : * an error when trying to read it the first time, which causes : * the probe to fail. : */ : : My guess is that in some circumstances this hack isn't enough. The : first thing to try would be stuffing a delay in between the two reads : like so: : : wi_read_record(sc, (struct wi_ltv_gen *)&mac); : ---> DELAY(50); : if ((error = wi_read_record(sc, (struct wi_ltv_gen *)&mac)) != 0) { : device_printf(dev, "mac read failed %d\n", error); : wi_free(dev); : return (error); : } : : Try playing with the delay value a bit if that doesn't work. Actaully, it should loop a few times reading it with a small delay between each time. But this code seems very fragile. somethine else in the system changes and it goes from working to non working. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message