From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 10 17:12:51 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D37E71065670; Tue, 10 Nov 2009 17:12:51 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 74D608FC0C; Tue, 10 Nov 2009 17:12:49 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA19720; Tue, 10 Nov 2009 19:12:48 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4AF99F10.8020703@icyb.net.ua> Date: Tue, 10 Nov 2009 19:12:48 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Gavin Atkinson References: <4AD6067E.2010503@icyb.net.ua> <20091109195045.Q13027@ury.york.ac.uk> <4AF95461.2030700@icyb.net.ua> In-Reply-To: <4AF95461.2030700@icyb.net.ua> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, freebsd-acpi@FreeBSD.org, Robert Noland Subject: Re: heci: a new driver for review and testing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 17:12:51 -0000 on 10/11/2009 13:54 Andriy Gapon said the following: > on 09/11/2009 22:34 Gavin Atkinson said the following: >> Secondly, I get a panic on module unlaod. I haven't spent any time >> looking at this, if you haven't fixed it yet let me know and I'll look >> into it further. > > To my shame I still haven't got around to testing the driver with head tree and > diagnostics enabled. I do not see any problems on stable/7 without diagnostics. > Robert Noland has reported that he had a lockup on module unload with head > sources. I will investigate this. > BTW, 0xdeadc0dedeadc0de as arg to device_detach() looks really strange (if > debugger reports it correctly). This looks like the memory was already freed. I think I've found one bug in the heci code that could cause this - SLIST element was first freed and then removed from the list. I've uploaded updated sources (that should include your PCI ID too), could you please re-test? >> I'm not even sure how it's getting that far into the detach routine >> before panicing, if dev really does = 0xdeadc0dedeadc0de >> >> #8 0xffffffff808580d3 in calltrap () >> at /usr/src/sys/amd64/amd64/exception.S:224 >> #9 0xffffffff8057ac3c in mtx_destroy (m=0xdeadc0dedeadc10e) >> at /usr/src/sys/kern/kern_mutex.c:827 >> #10 0xffffffff812221c6 in heci_detach () >> from /usr/src/sys/modules/heci/heci.ko >> #11 0xffffffff805b44d4 in device_detach (dev=0xdeadc0dedeadc0de) >> at device_if.h:212 >> #12 0xffffffff805b4ac0 in driver_module_handler (mod=0xffffff0002d0f800, >> what=Variable "what" is not available. >> ) at /usr/src/sys/kern/subr_bus.c:1156 >> #13 0xffffffff80578fc5 in module_unload (mod=0xffffff0002d0f800) >> at /usr/src/sys/kern/kern_module.c:266 >> #14 0xffffffff8056fc0b in linker_file_unload (file=0xffffff0002c9c200, >> flags=0) at /usr/src/sys/kern/kern_linker.c:633 >> #15 0xffffffff805707c3 in kern_kldunload (td=0xffffff0002950380, >> fileid=Variable "fileid" is not available. >> ) at /usr/src/sys/kern/kern_linker.c:1092 >> >> Let me know if there's anything else I can test. >> >> Thanks, > > Nothing else I can think of right now. OK, I came up with something :) Could you please send me verbose version of driver attachment messages (debug.bootverbose=1)? Thank you! BTW, Robert, you also promised me those :) -- Andriy Gapon