From owner-freebsd-current Tue Oct 30 14:57:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 04B6E37B405; Tue, 30 Oct 2001 14:57:18 -0800 (PST) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f9UMvHM63756; Tue, 30 Oct 2001 14:57:17 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 87F2339F0; Tue, 30 Oct 2001 14:57:17 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Mikhail Teterin Cc: current@freebsd.org, sos@freebsd.org, ache@freebsd.org Subject: Re: ouch -- the second controller on Promise-66 is not detected! In-Reply-To: <200110302149.f9ULnpW04142@aldan.algebra.com> Date: Tue, 30 Oct 2001 14:57:17 -0800 From: Peter Wemm Message-Id: <20011030225717.87F2339F0@overcee.netplex.com.au> 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 Mikhail Teterin wrote: > Hi! > > The kernel from Oct 14 has no troubles seeing it as ata-3. Todays > kernel sees ata-0, ata-1, ata-2, but not ata-3. > > In fact, there is a message about ata-2 already present (and as such > being skipped) in dmesg, so, may be, it is skipping the (real) ata-2, > and reports ata-3 as ata-2. > > I have two identical drives (ad4 and ad6) on both of the card's > controllers -- with all the source code there (on a ccd array), so I > can not do meaningful debugging in this situation... Most likely it is caused by this commit to kern/subr_bus.c: ==== revision 1.92 date: 2001/10/28 23:32:35; author: ache; state: Exp; lines: +9 -9 1) In devclass_alloc_unit(), skip duplicated wired devices (i.e. with fixed number) instead of allocating next free unit for them. If someone needs fixed place, he must specify it correctly. "Allocating next" is especially bad because leads to double device detection and to "repeat make_dev panic" as result. This can happens if the same devices present somewhere on PCI bus, hints and ACPI. Making them present in one place only not always possible, "sc" f.e. can't be removed from hints, it results to no console at all. ==== @@ -353,13 +353,10 @@ if (unit != -1) { if (unit >= 0 && unit < dc->maxunit && dc->devices[unit] != NULL) { - /* find the next available slot */ - while (++unit < dc->maxunit && - dc->devices[unit] != NULL) - continue; if (bootverbose) Soren originally added this in rev 1.66: ==== revision 1.66 date: 2000/05/26 13:59:05; author: sos; state: Exp; lines: +8 -13 If devclass_alloc_unit() is called with a wired unit #, and this is buzy, only search upwards for a free slot to use.. This broke unit numbering on ATA systems where PCI attached controllers come before the mainboard ones... ==== Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message