Date: Tue, 30 Oct 2001 14:57:17 -0800 From: Peter Wemm <peter@wemm.org> To: Mikhail Teterin <mi@aldan.algebra.com> Cc: current@freebsd.org, sos@freebsd.org, ache@freebsd.org Subject: Re: ouch -- the second controller on Promise-66 is not detected! Message-ID: <20011030225717.87F2339F0@overcee.netplex.com.au> In-Reply-To: <200110302149.f9ULnpW04142@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011030225717.87F2339F0>