From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 16:05:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F6831065727; Thu, 15 Jan 2009 16:05:58 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 56A638FC19; Thu, 15 Jan 2009 16:05:58 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 9F24458241; Thu, 15 Jan 2009 10:05:57 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id uwAw8j518SQn; Thu, 15 Jan 2009 10:05:57 -0600 (CST) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-223-165.icecube.wisc.edu [172.16.223.165]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 7FC055823A; Thu, 15 Jan 2009 10:05:57 -0600 (CST) Message-ID: <496F5ED6.6070608@freebsd.org> Date: Thu, 15 Jan 2009 10:05:42 -0600 From: Nathan Whitehorn User-Agent: Thunderbird 2.0.0.19 (X11/20090112) MIME-Version: 1.0 To: John Baldwin References: <200901061723.n06HNbgY037287@svn.freebsd.org> <200901151029.27357.jhb@freebsd.org> In-Reply-To: <200901151029.27357.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186833 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2009 16:05:59 -0000 John Baldwin wrote: > 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. > This is done to allow use of BUS_PROBE_NOWILDCARD, since this device is fake and has no actual probe logic. Setting -1 instead of 0 causes the device's wildcard bit to be set, and will make it not attach at all. Changing the probe method's return value to something else will make iicbus/iic attach to every unknown device on the bus on I2C buses that attach children like the OFW I2C bus layer. Since the people using the OFW I2C layer are mostly me for now, I'll happily revert the change to this file in its entirety. But this breaks other things, and I don't know of a good solution here. >> 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). > Yes, exactly. I'll update them both today. Thanks for pointing this out. -Nathan