Date: Tue, 30 Oct 2001 10:16:43 +0600 (NOVT) From: nnd@mail.nsk.ru (Nickolay Dudorov) To: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern subr_bus.c Message-ID: <200110300416.f9U4Ghw00476@wint.itfs.nsk.su> In-Reply-To: <200110282332.f9SNWZN19161@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <200110282332.f9SNWZN19161@freefall.freebsd.org> "Andrey A. Chernov" <ache@FreeBSD.ORG> wrote: > ache 2001/10/28 15:32:35 PST > > Modified files: > sys/kern subr_bus.c > Log: > 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. > > 2) In make_device(), detect when devclass_add_device() fails, free dev and > return. I.e. add missing error checking. This part needed to finish fix in 1), > but must be done this way in anycase, with old variant too. > > Revision Changes Path > 1.92 +9 -9 src/sys/kern/subr_bus.c After this commit I have the problem with the HighPoint's HPT366 controller on the ABIT's BP6 mobo. In fact the problem is in the 'sys/dev/ata/ata-pci.c' where devices for non-master controllers was maked with the fixed unit-number 2. This works before this commit due to "allocating next" free unit and now I have no 'ata3' controller with my ad6 disk :-(. The next patch fixed the problem to me. I hope that Soeren(?) Schmidt <sos@FreeBSD.org> can check it. N.Dudorov Index: sys/dev/ata/ata-pci.c =================================================================== RCS file: /scratch/CVS/src/sys/dev/ata/ata-pci.c,v retrieving revision 1.16 diff -b -u -r1.16 ata-pci.c --- sys/dev/ata/ata-pci.c 23 Oct 2001 09:57:49 -0000 1.16 +++ sys/dev/ata/ata-pci.c 30 Oct 2001 03:54:39 -0000 @@ -271,7 +271,7 @@ return ENOMEM; } else { - if (!(child = device_add_child(dev, "ata", 2))) + if (!(child = device_add_child(dev, "ata", -1))) return ENOMEM; } return 0; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110300416.f9U4Ghw00476>