From owner-freebsd-stable@FreeBSD.ORG Thu Aug 16 20:12:42 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45E951065674 for ; Thu, 16 Aug 2012 20:12:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7D48FC15 for ; Thu, 16 Aug 2012 20:12:41 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6F065B95D for ; Thu, 16 Aug 2012 16:12:40 -0400 (EDT) From: John Baldwin To: stable@freebsd.org Date: Thu, 16 Aug 2012 16:11:11 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) MIME-Version: 1.0 Message-Id: <201208161611.11357.jhb@freebsd.org> X-Length: 1810 X-UID: 27365 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 16 Aug 2012 16:12:40 -0400 (EDT) Cc: Subject: [PATCH] Make ida(4) MPSAFE and a host of other fixes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2012 20:12:42 -0000 ida(4) is a driver for older Compaq RAID adapters (PCI and EISA). It is one of the few remaining non-MPSAFE storage drivers. I have a patch to add locking to it, but while doing that I fixed several other issues including incorrect bus_dma support (it didn't handle deferred callbacks and EINPROGRESS at all). It also did not pre-allocate dma maps but attempted to create them on the fly (despite a comment claiming that it did pre-allocate them). It now probes disks using a configintrhook rather than using polled commands. The drive number for each logical disk is passed to the child disk device via ivars. I've added bus_dma sync ops for the hardware QCB accesses. I've also reworked it's queuing mechanism so that it should now queue multiple commands to the controller (before it only queued one command at a time even though it had free QCBs). The patch compiles, but I have no hardware to test it. Given that this is an old driver, if I can't find anyone to test it, I will remove it from HEAD after committing the fixes (so if someone shows up in the future there is a better base to start from). http://www.FreeBSD.org/~jhb/patches/ida_locking_dma.patch -- John Baldwin