Date: Thu, 15 Jan 2009 10:29:26 -0500 From: John Baldwin <jhb@freebsd.org> To: Nathan Whitehorn <nwhitehorn@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186833 - head/sys/dev/iicbus Message-ID: <200901151029.27357.jhb@freebsd.org> In-Reply-To: <200901061723.n06HNbgY037287@svn.freebsd.org> References: <200901061723.n06HNbgY037287@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 06 January 2009 12:23:37 pm Nathan Whitehorn wrote:
> Modified: head/sys/dev/iicbus/iic.c
> ===========================================================================
>=== --- head/sys/dev/iicbus/iic.c Tue Jan 6 17:05:44 2009 (r186832)
> +++ head/sys/dev/iicbus/iic.c Tue Jan 6 17:23:37 2009 (r186833)
> @@ -110,14 +110,14 @@ iic_identify(driver_t *driver, device_t
> {
>
> if (device_find_child(parent, "iic", -1) == NULL)
> - BUS_ADD_CHILD(parent, 0, "iic", -1);
> + BUS_ADD_CHILD(parent, 0, "iic", 0);
> }
This change is wrong, it always tries to add iic0 instead of letting new-bus
pick the unit number. Basically, if you have a system with iicbus0 and
iicbus1, this will try to add a second iic0 child to iicbus1 instead of iic1.
Please revert.
> Modified: head/sys/dev/iicbus/iicbus.c
> ===========================================================================
>=== --- head/sys/dev/iicbus/iicbus.c Tue Jan 6 17:05:44 2009 (r186832) +++
> head/sys/dev/iicbus/iicbus.c Tue Jan 6 17:23:37 2009 (r186833) @@ -53,7
> +53,9 @@ iicbus_probe(device_t dev)
> {
>
> device_set_desc(dev, "Philips I2C bus");
> - return (0);
> +
> + /* Allow other subclasses to override this driver. */
> + return (-1000);
I think BUS_PROBE_GENERIC is what you want here. pci(4) probably needs to be
updated to use BUS_PROBE_GENERIC as well (which is what you copied this from
I'm guessing).
--
John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901151029.27357.jhb>
