<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/device.h, branch v2.6.13-rc7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[ACPI] merge acpi-2.6.12 branch into latest Linux 2.6.13-rc...</title>
<updated>2005-07-12T21:21:56+00:00</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2005-07-12T21:21:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5028770a42e7bc4d15791a44c28f0ad539323807'/>
<id>5028770a42e7bc4d15791a44c28f0ad539323807</id>
<content type='text'>
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ACPI] Bind PCI devices with ACPI devices</title>
<updated>2005-07-12T03:28:24+00:00</updated>
<author>
<name>David Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2005-03-18T23:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4e10d12a3d88c88fba3258809aa42d14fd8cf1d1'/>
<id>4e10d12a3d88c88fba3258809aa42d14fd8cf1d1</id>
<content type='text'>
Implement the framework for binding physical devices
with ACPI devices. A physical bus like PCI bus
should create a 'acpi_bus_type', with:

.find_device:
        For device which has parent such as normal PCI devices.

.find_bridge:
        It's for special devices, such as PCI root bridge
	or IDE controller.  Such devices generally haven't a
	parent or -&gt;bus. We use the special method
	to get an ACPI handle.

Uses new field in struct device: firmware_data

http://bugzilla.kernel.org/show_bug.cgi?id=4277

Signed-off-by: David Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement the framework for binding physical devices
with ACPI devices. A physical bus like PCI bus
should create a 'acpi_bus_type', with:

.find_device:
        For device which has parent such as normal PCI devices.

.find_bridge:
        It's for special devices, such as PCI root bridge
	or IDE controller.  Such devices generally haven't a
	parent or -&gt;bus. We use the special method
	to get an ACPI handle.

Uses new field in struct device: firmware_data

http://bugzilla.kernel.org/show_bug.cgi?id=4277

Signed-off-by: David Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] driver core: change bus_rescan_devices to return void</title>
<updated>2005-06-30T05:48:04+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-06-22T23:09:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=23d3d602cb96addd3c1158424fb01a49ea5e81b1'/>
<id>23d3d602cb96addd3c1158424fb01a49ea5e81b1</id>
<content type='text'>
No one was looking at the return value of bus_rescan_devices, and it
really wasn't anything that anyone in the kernel would ever care about.
So change it which enabled some counting code to be removed also.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No one was looking at the return value of bus_rescan_devices, and it
really wasn't anything that anyone in the kernel would ever care about.
So change it which enabled some counting code to be removed also.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] driver core: add bus_find_device &amp; driver_find_device functions</title>
<updated>2005-06-30T05:48:03+00:00</updated>
<author>
<name>Cornelia Huck</name>
<email>cohuck@de.ibm.com</email>
</author>
<published>2005-06-22T14:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0edb586049e57c56e625536476931117a57671e9'/>
<id>0edb586049e57c56e625536476931117a57671e9</id>
<content type='text'>
Add bus_find_device() and driver_find_device() which allow searching for a
device in the bus's resp. the driver's klist and obtain a reference on it.

Signed-off-by: Cornelia Huck &lt;cohuck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add bus_find_device() and driver_find_device() which allow searching for a
device in the bus's resp. the driver's klist and obtain a reference on it.

Signed-off-by: Cornelia Huck &lt;cohuck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Driver core: change device_attribute callbacks</title>
<updated>2005-06-20T22:15:31+00:00</updated>
<author>
<name>Yani Ioannou</name>
<email>yani.ioannou@gmail.com</email>
</author>
<published>2005-05-17T10:39:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=54b6f35c99974e99e64c05c2895718355123c55f'/>
<id>54b6f35c99974e99e64c05c2895718355123c55f</id>
<content type='text'>
This patch adds the device_attribute paramerter to the
device_attribute store and show sysfs callback functions, and passes a
reference to the attribute when the callbacks are called.

Signed-off-by: Yani Ioannou &lt;yani.ioannou@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the device_attribute paramerter to the
device_attribute store and show sysfs callback functions, and passes a
reference to the attribute when the callbacks are called.

Signed-off-by: Yani Ioannou &lt;yani.ioannou@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Driver Core: fix bk-driver-core kills ppc64</title>
<updated>2005-06-20T22:15:27+00:00</updated>
<author>
<name>Patrick Mochel</name>
<email>mochel@digitalimplant.org</email>
</author>
<published>2005-04-06T06:46:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0d3e5a2e39b6ba2974e9e7c2a429018c45de8e76'/>
<id>0d3e5a2e39b6ba2974e9e7c2a429018c45de8e76</id>
<content type='text'>
There's no check to see if the device is already bound to a driver, which
could do bad things.  The first thing to go wrong is that it will try to match
a driver with a device already bound to one.  In some cases (it appears with
USB with drivers/usb/core/usb.c::usb_match_id()), some drivers will match a
device based on the class type, so it would be common (especially for HID
devices) to match a device that is already bound.

The fun comes when -&gt;probe() is called, it fails, then
driver_probe_device() does this:

	dev-&gt;driver = NULL;

Later on, that pointer could be be dereferenced without checking and cause
hell to break loose.

This problem could be nasty. It's very hardware dependent, since some
devices could have a different set of matching qualifiers than others.

Now, I don't quite see exactly where/how you were getting that crash.
You're dereferencing bad memory, but I'm not sure which pointer was bad
and where it came from, but it could have come from a couple of different
places.

The patch below will hopefully fix it all up for you. It's against
2.6.12-rc2-mm1, and does the following:

- Move logic to driver_probe_device() and comments uncommon returns:
  1 - If device is bound
  0 - If device not bound, and no error
  error - If there was an error.

- Move locking to caller of that function, since we want to lock a
  device for the entire time we're trying to bind it to a driver (to
  prevent against a driver being loaded at the same time).

- Update __device_attach() and __driver_attach() to do that locking.

- Check if device is already bound in __driver_attach()

- Update the converse device_release_driver() so it locks the device
  around all of the operations.

- Mark driver_probe_device() as static and remove export. It's an
  internal function, it should stay that way, and there are no other
  callers. If there is ever a need to export it, we can audit it as
  necessary.

Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no check to see if the device is already bound to a driver, which
could do bad things.  The first thing to go wrong is that it will try to match
a driver with a device already bound to one.  In some cases (it appears with
USB with drivers/usb/core/usb.c::usb_match_id()), some drivers will match a
device based on the class type, so it would be common (especially for HID
devices) to match a device that is already bound.

The fun comes when -&gt;probe() is called, it fails, then
driver_probe_device() does this:

	dev-&gt;driver = NULL;

Later on, that pointer could be be dereferenced without checking and cause
hell to break loose.

This problem could be nasty. It's very hardware dependent, since some
devices could have a different set of matching qualifiers than others.

Now, I don't quite see exactly where/how you were getting that crash.
You're dereferencing bad memory, but I'm not sure which pointer was bad
and where it came from, but it could have come from a couple of different
places.

The patch below will hopefully fix it all up for you. It's against
2.6.12-rc2-mm1, and does the following:

- Move logic to driver_probe_device() and comments uncommon returns:
  1 - If device is bound
  0 - If device not bound, and no error
  error - If there was an error.

- Move locking to caller of that function, since we want to lock a
  device for the entire time we're trying to bind it to a driver (to
  prevent against a driver being loaded at the same time).

- Update __device_attach() and __driver_attach() to do that locking.

- Check if device is already bound in __driver_attach()

- Update the converse device_release_driver() so it locks the device
  around all of the operations.

- Mark driver_probe_device() as static and remove export. It's an
  internal function, it should stay that way, and there are no other
  callers. If there is ever a need to export it, we can audit it as
  necessary.

Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Use a klist for device child lists.</title>
<updated>2005-06-20T22:15:23+00:00</updated>
<author>
<name>mochel@digitalimplant.org</name>
<email>mochel@digitalimplant.org</email>
</author>
<published>2005-03-25T03:08:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=36239577cfb6b9a7c111209536b54200b0252ebf'/>
<id>36239577cfb6b9a7c111209536b54200b0252ebf</id>
<content type='text'>
- Use klist iterator in device_for_each_child(), making it safe to use for
  removing devices.
- Remove unused list_to_dev() function.
- Kills all usage of devices_subsys.rwsem.

Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Use klist iterator in device_for_each_child(), making it safe to use for
  removing devices.
- Remove unused list_to_dev() function.
- Kills all usage of devices_subsys.rwsem.

Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Remove struct device::driver_list.</title>
<updated>2005-06-20T22:15:18+00:00</updated>
<author>
<name>mochel@digitalimplant.org</name>
<email>mochel@digitalimplant.org</email>
</author>
<published>2005-03-24T21:08:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=63c4f204ffc8219696bda88eb20c9873d007a2fc'/>
<id>63c4f204ffc8219696bda88eb20c9873d007a2fc</id>
<content type='text'>
Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Remove struct device::bus_list.</title>
<updated>2005-06-20T22:15:18+00:00</updated>
<author>
<name>mochel@digitalimplant.org</name>
<email>mochel@digitalimplant.org</email>
</author>
<published>2005-03-24T21:03:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dc35cdf69149a7f2b5216ada9bafe359746ac1c'/>
<id>7dc35cdf69149a7f2b5216ada9bafe359746ac1c</id>
<content type='text'>
Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Remove the unused device_find().</title>
<updated>2005-06-20T22:15:16+00:00</updated>
<author>
<name>mochel@digitalimplant.org</name>
<email>mochel@digitalimplant.org</email>
</author>
<published>2005-03-24T18:48:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cb85b6f1cc811ecb9ed4b950206d8941ba710e68'/>
<id>cb85b6f1cc811ecb9ed4b950206d8941ba710e68</id>
<content type='text'>
Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Patrick Mochel &lt;mochel@digitalimplant.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
