From owner-freebsd-mobile Wed Mar 13 21:35:53 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by hub.freebsd.org (Postfix) with ESMTP id C315237B404 for ; Wed, 13 Mar 2002 21:35:50 -0800 (PST) Received: from pacbell.net ([63.193.114.253]) by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GSY00KKI7JQLS@mta7.pltn13.pbi.net> for mobile@FreeBSD.ORG; Wed, 13 Mar 2002 21:35:50 -0800 (PST) Date: Wed, 13 Mar 2002 21:32:53 -0800 From: Thomas Skibo Subject: Re: patch for Lucent command timeouts To: "M. Warner Losh" Cc: brooks@one-eyed-alien.net, mobile@FreeBSD.ORG Message-id: <3C903605.CD338474@pacbell.net> Organization: College Avenue Surf Shop MIME-version: 1.0 X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en References: <20020313113313.B11290@Odin.AC.HMC.Edu> <20020313143226.A18204@Odin.AC.HMC.Edu> <20020313.210139.85419419.imp@village.org> Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hmmmmmm. The patch I came up with and tested counted down to zero. The timeout check was "i<0". To wit: =================================================================== RCS file: RCS/if_wi.c,v retrieving revision 1.16 diff -r1.16 if_wi.c 1086c1086 < int i, s; --- > int i, s=0; 1105c1105 < for (i = 0; i < WI_TIMEOUT; i++) { --- > for (i= (cmd==WI_CMD_INI) ? WI_TIMEOUT_INI : WI_TIMEOUT; i>=0; i--) { 1127c1127 < if (i == WI_TIMEOUT) { --- > if (i < 0 && (sc->wi_prism2 || (cmd != WI_CMD_INQUIRE))) { 1129c1129 < "timeout in wi_cmd %x; event status %x\n", cmd, s); --- > "timeout in wi_cmd 0x%04x; event status 0x%04x\n", cmd, s); =================================================================== RCS file: RCS/if_wireg.h,v retrieving revision 1.12 diff -r1.12 if_wireg.h 160c160,161 < #define WI_TIMEOUT (500000/WI_DELAY) /* 500 ms */ --- > #define WI_TIMEOUT (10000/WI_DELAY) /* 10 ms */ > #define WI_TIMEOUT_INI (100000/WI_DELAY) /* 100 ms */ -- ------------------------------------------------------------------------ Thomas Skibo skibo@pacbell.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message