From owner-freebsd-current Sat Jul 7 12:29:27 2001 Delivered-To: freebsd-current@freebsd.org Received: from updraft.jp.freebsd.org (updraft.jp.FreeBSD.ORG [210.157.158.42]) by hub.freebsd.org (Postfix) with ESMTP id 884F337B405 for ; Sat, 7 Jul 2001 12:29:22 -0700 (PDT) (envelope-from matusita@jp.FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by updraft.jp.freebsd.org (8.11.3+3.4W/8.11.3) with ESMTP/inet id f67JT9a73029; Sun, 8 Jul 2001 04:29:10 +0900 (JST) (envelope-from matusita@jp.FreeBSD.org) Cc: current@FreeBSD.ORG In-Reply-To: <200106221627.f5MGRJh55632@freebsd.dk> References: <20010623002021Z.matusita@jp.FreeBSD.org> <200106221627.f5MGRJh55632@freebsd.dk> X-Face: '*aj"d@ijeQ:/X}]oM5c5Uz{ZZZk90WPt>a^y4$cGQp8:!H\W=hSM;PuNiidkc]/%,;6VGu e+`&APmz|P;F~OL/QK%;P2vU>\j4X.8@i%j6[%DTs_3J,Fff0)*oHg$A.cDm&jc#pD24WK@{,"Ef!0 P\):.2}8jo-BiZ?X&t$V X-User-Agent: Mew/1.94.2 XEmacs/21.5 (alfalfa) X-FaceAnim: (-O_O-)(O_O- )(_O- )(O- )(- -)( -O)( -O_)( -O_O)(-O_O-) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Dispatcher: imput version 20000228(IM140) Lines: 43 From: Makoto MATSUSHITA To: sos@freebsd.dk Subject: Re: Problems with ata probing twice. Date: Sun, 08 Jul 2001 04:28:58 +0900 Message-Id: <20010708042858L.matusita@jp.FreeBSD.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG sos> Well, sortof, the ata driver doesn't allow for sharing irq14&15 sos> since lots of boards doesn't work that way. However if you need sos> it you can try to add the shared flag in the driver and see if sos> it works on yours. Hmm, maybe I should make this tunable... It this patch OK? I've tested a kernel with this patch and it works. This patch simply adds a new kernel MIB (hw.ata.shareable in this patch, but I have no idea about its name), and if this MIB value is non-zero, ata driver doesn't drop RF_SHAREABLE bit for BUS_ALLOC_RESOURCE(). -- - Makoto `MAR' MATSUSHITA --- ata-pci.c.dist Fri Jun 8 18:51:33 2001 +++ ata-pci.c Fri Jul 6 16:35:43 2001 @@ -61,6 +61,15 @@ int irqcnt; }; +/* internal vars */ +static int ata_shareable = 0; +TUNABLE_INT("hw.ata.shareable", &ata_shareable); + +/* sysctl vars */ +SYSCTL_DECL(_hw_ata); +SYSCTL_INT(_hw_ata, OID_AUTO, shareable, CTLFLAG_RD, &ata_shareable, 0, + "ATA pci-bus shareable IRQs"); + int ata_find_dev(device_t dev, u_int32_t type, u_int32_t revid) { @@ -515,7 +524,8 @@ return BUS_ALLOC_RESOURCE(device_get_parent(dev), child, SYS_RES_IRQ, rid, - irq, irq, 1, flags & ~RF_SHAREABLE); + irq, irq, 1, (ata_shareable ? + flags : flags & ~RF_SHAREABLE)); #endif } else { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message