From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 18 11:39:55 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AF2F2912 for ; Fri, 18 Jan 2013 11:39:55 +0000 (UTC) (envelope-from olgeni@olgeni.com) Received: from olgeni.olgeni.com (olgeni.olgeni.com [31.171.246.156]) by mx1.freebsd.org (Postfix) with ESMTP id 7909971 for ; Fri, 18 Jan 2013 11:39:55 +0000 (UTC) Received: from backoffice.colby.local (93-62-141-58.ip22.fastwebnet.it [93.62.141.58]) by olgeni.olgeni.com (Postfix) with ESMTPSA id 0B7B71751EE for ; Fri, 18 Jan 2013 12:39:48 +0100 (CET) Date: Fri, 18 Jan 2013 12:39:47 +0100 (CET) From: Jimmy Olgeni X-X-Sender: olgeni@backoffice.colby.local To: freebsd-hackers@freebsd.org Subject: [GIANT-LOCKED] even without D_NEEDGIANT Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2013 11:39:55 -0000 Hello list, At $DAILY_JOB I got involved with an ASI board that didn't have any kind of FreeBSD support, so I ended up writing a driver for it. If you try to ignore the blatant style(9) violations (of which there are many, hopefully on the way to be cleaned up) it seems to work fine. However, I noticed that when loading the driver I always get a message about the giant lock being used, even if D_NEEDGIANT is not specified anywhere. The actual output when loading is this (FreeBSD 9-STABLE i386): dektec0: mem 0xfeaff800-0xfeafffff irq 16 at device 13.0 on pci0 dektec0: [GIANT-LOCKED] dektec0: [ITHREAD] dektec0: board model 145, firmware version 2 (tx: 0, rx: 2), tx fifo 16384 MB Source code here: https://github.com/olgeni/freebsd-dektec/blob/master/dektec.c Can anybody offer a clue about what could be triggering the GIANT requirement? Could I be doing something that has this, and possibly other, unintended side effects? -- jimmy