lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Nov 2006 22:01:50 +0300
From:	Evgeniy Polyakov <johnpol@....mipt.ru>
To:	Matthew Frost <artusemrys@...global.net>
Cc:	Arjan van de Ven <arjan@...radead.org>,
	Paul Sokolovsky <pmiscml@...il.com>,
	Jiri Slaby <jirislaby@...il.com>, linux-kernel@...r.kernel.org,
	Adrian Bunk <bunk@...sta.de>
Subject: Re: Where did find_bus() go in 2.6.18?

On Tue, Nov 21, 2006 at 12:29:15PM -0600, Matthew Frost (artusemrys@...global.net) wrote:
> So you have nested drivers.  The bottom driver (w1/slaves/w1_ds2760.c) talks to
> the hardware, and the top driver (misc/h2200_battery.c) interprets the output.
> You're dealing with a Dallas 1-Wire Bus protocol to talk to your battery
> management chip, which is a DS2760 High-Precision Li+ Battery Monitor.  You're
> telling us that h2200_battery uses find_bus() to locate the w1 bus and then the
> devices on that bus, so that it can use w1_ds2760 to read the chip.  So what is
> hanging you up here is that your top-level driver can't find the bus that the
> chip is on; once it can, everything should work?
> 
> The specific code:
> 
> void
> h2200_battery_probe_work(void *data)
> {
> 	struct bus_type *bus;
> 
> 	/* Get the battery w1 slave device. */
> 	bus = find_bus("w1");
> 	if (bus)
> 		ds2760_dev = bus_find_device(bus, NULL, NULL,
> 					     h2200_battery_match_callback);
> 
> 	if (!ds2760_dev) {
> 		/* No DS2760 device found; try again later. */
> 		queue_delayed_work(probe_q, &probe_work, HZ * 5);
> 		return;
> 	}
> }
> 
> What we need to do is help you find a better way to locate and identify a w1 device.
> 
> (cc: E. Polyakov for the w1 expertise)

Hello.

If find_bus() will not be resurrected, I can export w1_bus_type or
create special helpers to directly access w1 bus master devices.
But in that case there is no need to have all driver model in w1
subsystem at all...

> Matt

-- 
	Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ