From owner-cvs-all@FreeBSD.ORG Tue Feb 20 17:32:31 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 308B516A782; Tue, 20 Feb 2007 17:32:31 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2433E13C481; Tue, 20 Feb 2007 17:32:31 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l1KHWVpE080368; Tue, 20 Feb 2007 17:32:31 GMT (envelope-from luigi@repoman.freebsd.org) Received: (from luigi@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1KHWUuX080367; Tue, 20 Feb 2007 17:32:30 GMT (envelope-from luigi) Message-Id: <200702201732.l1KHWUuX080367@repoman.freebsd.org> From: Luigi Rizzo Date: Tue, 20 Feb 2007 17:32:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/iwi if_iwi.c if_iwivar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2007 17:32:31 -0000 luigi 2007-02-20 17:32:30 UTC FreeBSD src repository Modified files: sys/dev/iwi if_iwi.c if_iwivar.h Log: Rename IWI_LOCK_ASSERT to IWI_LOCK_CHECK per Sam's suggestion, and make it print under debug.iwi control same as other debugging stuff. Remove the device_printf() in iwi_ioctl() and replace with this: /* * wait until pending iwi_cmd() are completed, to avoid races * that could cause problems. */ while (sc->flags & IWI_FLAG_BUSY) msleep(sc, &sc->sc_mtx, 0, "iwiioctl", hz); This at least prevents what has become an almost systematic failure for my system, presumably due to a previous iwi_cmd() not complete yet by the time iwi_ioctl() is called. It has been pointed to my attention that the real problem could be calling ieee80211_ioctl() with the lock held. If that is true, there might still be a possibility for a race condition e.g. an interrupt coming while the ioctl is sleeping. Need to investigate further on what changes are required to release the lock before calling ieee80211_ioctl Revision Changes Path 1.48 +19 -22 src/sys/dev/iwi/if_iwi.c 1.14 +2 -3 src/sys/dev/iwi/if_iwivar.h