Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Jul 2001 04:28:58 +0900
From:      Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
To:        sos@freebsd.dk
Cc:        current@FreeBSD.ORG
Subject:   Re: Problems with ata probing twice.
Message-ID:  <20010708042858L.matusita@jp.FreeBSD.org>
In-Reply-To: <200106221627.f5MGRJh55632@freebsd.dk>
References:  <20010623002021Z.matusita@jp.FreeBSD.org> <200106221627.f5MGRJh55632@freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010708042858L.matusita>