From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 4 00:02:57 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B53D16A403 for ; Thu, 4 Jan 2007 00:02:57 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 293FB13C45B for ; Thu, 4 Jan 2007 00:02:56 +0000 (UTC) (envelope-from killing@multiplay.co.uk) X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on core6.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-24.7 required=6.0 tests=BAYES_00, USER_IN_WHITELIST, USER_IN_WHITELIST_TO autolearn=ham version=3.1.5 Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.5.4) with ESMTP id md50003356772.msg for ; Wed, 03 Jan 2007 23:58:42 +0000 Message-ID: <006301c72f93$0ffceb40$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: Date: Wed, 3 Jan 2007 23:58:20 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-Spam-Processed: multiplay.co.uk, Wed, 03 Jan 2007 23:58:42 +0000 X-MDAV-Processed: multiplay.co.uk, Wed, 03 Jan 2007 23:58:42 +0000 Subject: hptmv not compatible with WITNESS / INVARIANTS pointers required 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: Thu, 04 Jan 2007 00:02:57 -0000 I'm currently trying to debug an issue with Tyan s2892 based machine but when I enable WITNESS / INVARIANTS the Highpoint 182x driver panics the kernel with: panic: blocakble sleep lock ( sleep mutex ) 128 @ vm/uma_core.c: 1845 I believe this is due to the fact that you cant hold a spin mutex while using: bus_dma_tag_create, malloc bus_dmamem_alloc etc which the driver currently does, but I have no experience with drivers hence dont know what it should be doing instead. If someone's willing to give me some pointers I'd be willing to give creating a patch and testing it a go. Here's a snipet of what I think is causing the issue: /* This uses a mtx_lock_spin */ intrmask_t oldspl = lock_driver(); pAdapter->next = 0; if(gIal_Adapter == 0) { gIal_Adapter = pAdapter; pCurAdapter = gIal_Adapter; } else { pCurAdapter->next = pAdapter; pCurAdapter = pAdapter; } pAdapter->outstandingCommands = 0; pMvSataAdapter = &(pAdapter->mvSataAdapter); _vbus_p->OsExt = (void *)pAdapter; pMvSataAdapter->IALData = pAdapter; /* Errors due to lock_driver holding mtx_lock_spin?? */ if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, MV_MAX_SEGMENTS, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &pAdapter->parent_dmat) != 0) { MV_ERROR("RR182x: Failed to create busdma resources\n"); unlock_driver(oldspl); return (ENOMEM); } ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.