Date: Sat, 17 Feb 2018 16:04:05 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Warner Losh <imp@bsdimp.com> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329458 - head/sbin/devmatch Message-ID: <90001804-e025-4981-6b77-350930310ceb@selasky.org> In-Reply-To: <CANCZdfrevbHxoRmV4HyjR9j%2B4%2BHbCU8H-aUhuhHjaySA=hwrsA@mail.gmail.com> References: <201802171434.w1HEYl8I063603@repo.freebsd.org> <CANCZdfrevbHxoRmV4HyjR9j%2B4%2BHbCU8H-aUhuhHjaySA=hwrsA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02/17/18 15:56, Warner Losh wrote: > The right fix there, I think, is to load them all at once, in one kldload > operation and not loop in /etc/rc.d/devmatch. Each driver will invoke the driver loaded device method, so this will race aswell! You have a point. But, that means devmatch should read ahead the nomatch events until the end, to make sure the correct driver is loaded. For example if first a driver is loaded for a generic device, uhid, then comes a long a ums device, we have a problem this way. Matching should then understand how to reduce the hints, maybe by stripping down the "mask" from least significant bit. It is then important that the order from devmatch is not messed up by "sort -u". BTW: The "sort" utility lives in usr/bin and is not suitable for /etc/rc.d/devmatch, like already pointed out. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90001804-e025-4981-6b77-350930310ceb>