<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/block/ub.c, branch v2.6.29</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>USB: change interface to usb_lock_device_for_reset()</title>
<updated>2009-01-07T17:59:52+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2008-11-04T16:29:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=011b15df465745474e3ec85482633685933ed5a7'/>
<id>011b15df465745474e3ec85482633685933ed5a7</id>
<content type='text'>
This patch (as1161) changes the interface to
usb_lock_device_for_reset().  The existing interface is apparently not
very clear, judging from the fact that several of its callers don't
use it correctly.  The new interface always returns 0 for success and
it always requires the caller to unlock the device afterward.

The new routine will not return immediately if it is called while the
driver's probe method is running.  Instead it will wait until the
probe is over and the device has been unlocked.  This shouldn't cause
any problems; I don't know of any cases where drivers call
usb_lock_device_for_reset() during probe.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.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 (as1161) changes the interface to
usb_lock_device_for_reset().  The existing interface is apparently not
very clear, judging from the fact that several of its callers don't
use it correctly.  The new interface always returns 0 for success and
it always requires the caller to unlock the device afterward.

The new routine will not return immediately if it is called while the
driver's probe method is running.  Instead it will wait until the
probe is over and the device has been unlocked.  This shouldn't cause
any problems; I don't know of any cases where drivers call
usb_lock_device_for_reset() during probe.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ub: stub pre_reset and post_reset to fix oops</title>
<updated>2008-11-13T22:45:04+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2008-11-11T04:11:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d73b7aff28bc53c04e1f2e5ccaa5ea43089fb4a4'/>
<id>d73b7aff28bc53c04e1f2e5ccaa5ea43089fb4a4</id>
<content type='text'>
Due to recent changes to usb_reset_device, the following hang occurs:

events/0      D 0000000000000000     0     6      2
 ffff880037477cc0 0000000000000046 ffff880037477c50 ffffffff80237434
 ffffffff80574c80 00000001000a015c 0000000000000286 ffff8800374757d0
 ffff88002a31c860 ffff880037475a00 0000000036779140 ffff880037475a00
Call Trace:
 [&lt;ffffffff80237434&gt;] try_to_del_timer_sync+0x52/0x5b
 [&lt;ffffffff8026f86c&gt;] dma_pool_free+0x1a7/0x1ec
 [&lt;ffffffffa02a928a&gt;] ub_disconnect+0x8e/0x1ad [ub]
 [&lt;ffffffff802407c9&gt;] autoremove_wake_function+0x0/0x2e
 [&lt;ffffffff80378959&gt;] usb_unbind_interface+0x5c/0xb7
 [&lt;ffffffff8036ab70&gt;] __device_release_driver+0x95/0xbd
 [&lt;ffffffff8036ac70&gt;] device_release_driver+0x21/0x2d
 [&lt;ffffffff803789f8&gt;] usb_driver_release_interface+0x44/0x83
 [&lt;ffffffff80378ab9&gt;] usb_forced_unbind_intf+0x17/0x1d
 [&lt;ffffffff80371ba4&gt;] usb_reset_device+0x7d/0x114
 [&lt;ffffffffa02aaffd&gt;] ub_reset_task+0x0/0x293 [ub]
 [&lt;ffffffffa02ab1c1&gt;] ub_reset_task+0x1c4/0x293 [ub]
 [&lt;ffffffff8033dd1e&gt;] flush_to_ldisc+0x0/0x1cd
 [&lt;ffffffffa02aaffd&gt;] ub_reset_task+0x0/0x293 [ub]
 [&lt;ffffffff8023d302&gt;] run_workqueue+0x87/0x114
 [&lt;ffffffff8023d467&gt;] worker_thread+0xd8/0xe7
 [&lt;ffffffff802407c9&gt;] autoremove_wake_function+0x0/0x2e
 [&lt;ffffffff8023d38f&gt;] worker_thread+0x0/0xe7
 [&lt;ffffffff802404c1&gt;] kthread+0x47/0x73
 [&lt;ffffffff8022c8dd&gt;] schedule_tail+0x27/0x60
 [&lt;ffffffff8020c249&gt;] child_rip+0xa/0x11
 [&lt;ffffffff8024047a&gt;] kthread+0x0/0x73
 [&lt;ffffffff8020c23f&gt;] child_rip+0x0/0x11

This is because usb_reset_device now unbinds, and that calls disconnect,
which in case of ub waits until the reset completes... which deadlocks.
Worse, this deadlocks keventd and this takes whole box down.

I'm going to fix this properly later, but let's unbreak the driver
quickly for non-composite devices at least.

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&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>
Due to recent changes to usb_reset_device, the following hang occurs:

events/0      D 0000000000000000     0     6      2
 ffff880037477cc0 0000000000000046 ffff880037477c50 ffffffff80237434
 ffffffff80574c80 00000001000a015c 0000000000000286 ffff8800374757d0
 ffff88002a31c860 ffff880037475a00 0000000036779140 ffff880037475a00
Call Trace:
 [&lt;ffffffff80237434&gt;] try_to_del_timer_sync+0x52/0x5b
 [&lt;ffffffff8026f86c&gt;] dma_pool_free+0x1a7/0x1ec
 [&lt;ffffffffa02a928a&gt;] ub_disconnect+0x8e/0x1ad [ub]
 [&lt;ffffffff802407c9&gt;] autoremove_wake_function+0x0/0x2e
 [&lt;ffffffff80378959&gt;] usb_unbind_interface+0x5c/0xb7
 [&lt;ffffffff8036ab70&gt;] __device_release_driver+0x95/0xbd
 [&lt;ffffffff8036ac70&gt;] device_release_driver+0x21/0x2d
 [&lt;ffffffff803789f8&gt;] usb_driver_release_interface+0x44/0x83
 [&lt;ffffffff80378ab9&gt;] usb_forced_unbind_intf+0x17/0x1d
 [&lt;ffffffff80371ba4&gt;] usb_reset_device+0x7d/0x114
 [&lt;ffffffffa02aaffd&gt;] ub_reset_task+0x0/0x293 [ub]
 [&lt;ffffffffa02ab1c1&gt;] ub_reset_task+0x1c4/0x293 [ub]
 [&lt;ffffffff8033dd1e&gt;] flush_to_ldisc+0x0/0x1cd
 [&lt;ffffffffa02aaffd&gt;] ub_reset_task+0x0/0x293 [ub]
 [&lt;ffffffff8023d302&gt;] run_workqueue+0x87/0x114
 [&lt;ffffffff8023d467&gt;] worker_thread+0xd8/0xe7
 [&lt;ffffffff802407c9&gt;] autoremove_wake_function+0x0/0x2e
 [&lt;ffffffff8023d38f&gt;] worker_thread+0x0/0xe7
 [&lt;ffffffff802404c1&gt;] kthread+0x47/0x73
 [&lt;ffffffff8022c8dd&gt;] schedule_tail+0x27/0x60
 [&lt;ffffffff8020c249&gt;] child_rip+0xa/0x11
 [&lt;ffffffff8024047a&gt;] kthread+0x0/0x73
 [&lt;ffffffff8020c23f&gt;] child_rip+0x0/0x11

This is because usb_reset_device now unbinds, and that calls disconnect,
which in case of ub waits until the reset completes... which deadlocks.
Worse, this deadlocks keventd and this takes whole box down.

I'm going to fix this properly later, but let's unbreak the driver
quickly for non-composite devices at least.

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] switch ub</title>
<updated>2008-10-21T11:48:05+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-03-02T15:21:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4099a96693ab58a95b3ecf19704973cd0f1bdf9d'/>
<id>4099a96693ab58a95b3ecf19704973cd0f1bdf9d</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] beginning of methods conversion</title>
<updated>2008-10-21T11:47:32+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-03-02T14:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d4430d62fa77208824a37fe6f85ab2831d274769'/>
<id>d4430d62fa77208824a37fe6f85ab2831d274769</id>
<content type='text'>
To keep the size of changesets sane we split the switch by drivers;
to keep the damn thing bisectable we do the following:
	1) rename the affected methods, add ones with correct
prototypes, make (few) callers handle both.  That's this changeset.
	2) for each driver convert to new methods.  *ALL* drivers
are converted in this series.
	3) kill the old (renamed) methods.

Note that it _is_ a flagday; all in-tree drivers are converted and by the
end of this series no trace of old methods remain.  The only reason why
we do that this way is to keep the damn thing bisectable and allow per-driver
debugging if anything goes wrong.

New methods:
	open(bdev, mode)
	release(disk, mode)
	ioctl(bdev, mode, cmd, arg)		/* Called without BKL */
	compat_ioctl(bdev, mode, cmd, arg)
	locked_ioctl(bdev, mode, cmd, arg)	/* Called with BKL, legacy */

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To keep the size of changesets sane we split the switch by drivers;
to keep the damn thing bisectable we do the following:
	1) rename the affected methods, add ones with correct
prototypes, make (few) callers handle both.  That's this changeset.
	2) for each driver convert to new methods.  *ALL* drivers
are converted in this series.
	3) kill the old (renamed) methods.

Note that it _is_ a flagday; all in-tree drivers are converted and by the
end of this series no trace of old methods remain.  The only reason why
we do that this way is to keep the damn thing bisectable and allow per-driver
debugging if anything goes wrong.

New methods:
	open(bdev, mode)
	release(disk, mode)
	ioctl(bdev, mode, cmd, arg)		/* Called without BKL */
	compat_ioctl(bdev, mode, cmd, arg)
	locked_ioctl(bdev, mode, cmd, arg)	/* Called with BKL, legacy */

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] switch scsi_cmd_ioctl() to passing fmode_t</title>
<updated>2008-10-21T11:47:14+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2007-08-27T19:38:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74f3c8aff36ad6552ea609c8b20bfd588fa16f38'/>
<id>74f3c8aff36ad6552ea609c8b20bfd588fa16f38</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] eliminate use of -&gt;f_flags in block methods</title>
<updated>2008-10-21T11:47:08+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2007-08-26T23:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=86d434dede14108dd917b25af0f29c0cb28b8d18'/>
<id>86d434dede14108dd917b25af0f29c0cb28b8d18</id>
<content type='text'>
store needed information in f_mode

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
store needed information in f_mode

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ub: remove sg_stat</title>
<updated>2008-10-17T21:40:52+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2008-08-04T23:15:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dbcbe88b1495f778f56c742391e49f580dc101a'/>
<id>7dbcbe88b1495f778f56c742391e49f580dc101a</id>
<content type='text'>
Remove forgotten code related to sg_stat[].

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.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>
Remove forgotten code related to sg_stat[].

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ub: Cosmetics</title>
<updated>2008-05-02T17:25:52+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2008-04-19T21:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9029b174ba22918d0a0aa3b71859854bd50c39cc'/>
<id>9029b174ba22918d0a0aa3b71859854bd50c39cc</id>
<content type='text'>
Fix a few comments and printk statements.

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.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>
Fix a few comments and printk statements.

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ub: Ignore bad residue</title>
<updated>2008-05-02T17:25:52+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2008-04-19T21:42:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0da13c8c3dfb1ab6c56f2a70fadfddd57e0d7c42'/>
<id>0da13c8c3dfb1ab6c56f2a70fadfddd57e0d7c42</id>
<content type='text'>
I hoped to continue to ignore this problem or use libusual, but these
days it's simpler to work around than to deal with it. Let's attempt to
use bad residue devices and hope that upper level integrity checks catch
any problems (e.g. please use sha1sum on your backups).

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.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>
I hoped to continue to ignore this problem or use libusual, but these
days it's simpler to work around than to deal with it. Let's attempt to
use bad residue devices and hope that upper level integrity checks catch
any problems (e.g. please use sha1sum on your backups).

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ub: Tune retries</title>
<updated>2008-05-02T17:25:52+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2008-04-19T21:35:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=82fe26ba7a21d9bcc77e6142c941683eede32940'/>
<id>82fe26ba7a21d9bcc77e6142c941683eede32940</id>
<content type='text'>
Make ub to fail faster in hopeless cases.

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.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>
Make ub to fail faster in hopeless cases.

Signed-off-by: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
