From owner-cvs-src@FreeBSD.ORG Tue Feb 20 15:46:10 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0FC4E16A931; Tue, 20 Feb 2007 15:46:00 +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 F3CB913C4AC; Tue, 20 Feb 2007 15:45:59 +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 l1KFjxxx052101; Tue, 20 Feb 2007 15:45:59 GMT (envelope-from luigi@repoman.freebsd.org) Received: (from luigi@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1KFjxF8052100; Tue, 20 Feb 2007 15:45:59 GMT (envelope-from luigi) Message-Id: <200702201545.l1KFjxF8052100@repoman.freebsd.org> From: Luigi Rizzo Date: Tue, 20 Feb 2007 15:45:59 +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-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2007 15:46:10 -0000 luigi 2007-02-20 15:45:59 UTC FreeBSD src repository Modified files: sys/dev/iwi if_iwi.c if_iwivar.h Log: Address a few issues with the iwi driver, namely: + do not release the dma-ble region used for downloading firmware. This should fix the problems that some people were seeing, due to memory becoming too fragmented which prevented subsequent allocations of a suitable contiguous region of memory; + document the firmware format and usage in if_iwivar.h + use a loop to allocate the four tx rings, instead of replicating the body of the loop. + add debugging code IWI_LOCK_ASSERT() to detect missing locks. These only do a printf, and should go away once we figure out why the driver sometimes freezes the system due to a (yet unidentified) race condition. + add a device_printf() in iwi_ioctl() in certain conditions (see comment in the code). This helps preventing the race condition mentioned above, and makes the system survive. This printf will also go away once fixing this bug is completed. + change iwi_getfw() to return 0 on success, 1 on error, consistently with other functions. + fix the argument of a sizeof() in iwi_get_firmware() + use le32toh() to access little-endian fields + simplify error handling in iwi_load_firmware() and iwi_init_locked() The bugs fixed by this commit (the freezing one especially) are serious enough to call for a quick MFC MFC after: 3 days Revision Changes Path 1.47 +127 -78 src/sys/dev/iwi/if_iwi.c 1.13 +20 -0 src/sys/dev/iwi/if_iwivar.h