<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb/gadget/inode.c, branch v3.3.3</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: gadgetfs: return number of bytes on ep0 read request</title>
<updated>2012-04-02T17:31:34+00:00</updated>
<author>
<name>Thomas Faber</name>
<email>thfabba@gmx.de</email>
</author>
<published>2012-03-02T08:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5c9e6ce0ca99917cda4a9a07b5442c793f98cfea'/>
<id>5c9e6ce0ca99917cda4a9a07b5442c793f98cfea</id>
<content type='text'>
commit 85b4b3c8c189e0159101f7628a71411af072ff69 upstream.

A read from GadgetFS endpoint 0 during the data stage of a control
request would always return 0 on success (as returned by
wait_event_interruptible) despite having written data into the user
buffer.
This patch makes it correctly set the return value to the number of
bytes read.

Signed-off-by: Thomas Faber &lt;thfabba@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 85b4b3c8c189e0159101f7628a71411af072ff69 upstream.

A read from GadgetFS endpoint 0 during the data stage of a control
request would always return 0 on success (as returned by
wait_event_interruptible) despite having written data into the user
buffer.
This patch makes it correctly set the return value to the number of
bytes read.

Signed-off-by: Thomas Faber &lt;thfabba@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb</title>
<updated>2012-01-09T20:09:47+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-09T20:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=55b81e6f2795484ea8edf5805c95c007cacfa736'/>
<id>55b81e6f2795484ea8edf5805c95c007cacfa736</id>
<content type='text'>
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits)
  USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
  xhci: Clean up 32-bit build warnings.
  USB: update documentation for usbmon
  usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops
  drivers/usb/class/cdc-acm.c: clear dangling pointer
  drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree
  drivers/usb/host/isp1760-if.c: introduce missing kfree
  usb: option: add ZD Incorporated HSPA modem
  usb: ch9: fix up MaxStreams helper
  USB: usb-skeleton.c: cleanup open_count
  USB: usb-skeleton.c: fix open/disconnect race
  xhci: Properly handle COMP_2ND_BW_ERR
  USB: remove dead code from suspend/resume path
  USB: add quirk for another camera
  drivers: usb: wusbcore: Fix dependency for USB_WUSB
  xhci: Better debugging for critical host errors.
  xhci: Be less verbose during URB cancellation.
  xhci: Remove debugging about ring structure allocation.
  xhci: Remove debugging about toggling cycle bits.
  xhci: Remove debugging for individual transfers.
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits)
  USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
  xhci: Clean up 32-bit build warnings.
  USB: update documentation for usbmon
  usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops
  drivers/usb/class/cdc-acm.c: clear dangling pointer
  drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree
  drivers/usb/host/isp1760-if.c: introduce missing kfree
  usb: option: add ZD Incorporated HSPA modem
  usb: ch9: fix up MaxStreams helper
  USB: usb-skeleton.c: cleanup open_count
  USB: usb-skeleton.c: fix open/disconnect race
  xhci: Properly handle COMP_2ND_BW_ERR
  USB: remove dead code from suspend/resume path
  USB: add quirk for another camera
  drivers: usb: wusbcore: Fix dependency for USB_WUSB
  xhci: Better debugging for critical host errors.
  xhci: Be less verbose during URB cancellation.
  xhci: Remove debugging about ring structure allocation.
  xhci: Remove debugging about toggling cycle bits.
  xhci: Remove debugging for individual transfers.
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>... and the same for gadgetfs</title>
<updated>2012-01-09T01:18:50+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-01-08T20:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=87da5b3264c8514b85c6c6e8ef51b9440eee2030'/>
<id>87da5b3264c8514b85c6c6e8ef51b9440eee2030</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>usb: gadget: rename usb_gadget_driver::speed to max_speed</title>
<updated>2011-12-12T09:45:12+00:00</updated>
<author>
<name>Michal Nazarewicz</name>
<email>mina86@mina86.com</email>
</author>
<published>2011-11-19T17:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7177aed44f515d949f587170e0e177ce17e74793'/>
<id>7177aed44f515d949f587170e0e177ce17e74793</id>
<content type='text'>
This commit renames the “speed” field of the usb_gadget_driver
structure to “max_speed”.  This is so that to make it more
apparent that the field represents the maximum speed gadget
driver can support.

This also make the field look more like fields with the same
name in usb_gadget and usb_composite_driver structures.  All
of those represent the *maximal* speed given entity supports.

After this commit, there are the following fields in various
structures:
* usb_gadget::speed - the current connection speed,
* usb_gadget::max_speed - maximal speed UDC supports,
* usb_gadget_driver::max_speed - maximal speed gadget driver
  supports, and
* usb_composite_driver::max_speed - maximal speed composite
  gadget supports.

Signed-off-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit renames the “speed” field of the usb_gadget_driver
structure to “max_speed”.  This is so that to make it more
apparent that the field represents the maximum speed gadget
driver can support.

This also make the field look more like fields with the same
name in usb_gadget and usb_composite_driver structures.  All
of those represent the *maximal* speed given entity supports.

After this commit, there are the following fields in various
structures:
* usb_gadget::speed - the current connection speed,
* usb_gadget::max_speed - maximal speed UDC supports,
* usb_gadget_driver::max_speed - maximal speed gadget driver
  supports, and
* usb_composite_driver::max_speed - maximal speed composite
  gadget supports.

Signed-off-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: gadgetfs: gadgetfs_disconnect: fix inconsistent lock state</title>
<updated>2011-11-14T19:51:26+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2011-10-10T16:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=001428e4871d6c62f5e16c62df681624d8b480c1'/>
<id>001428e4871d6c62f5e16c62df681624d8b480c1</id>
<content type='text'>
Under certain circumstances lockdep finds an inconsistent lock state in
gadgetfs. The problem can be reproduced with a hardware using the
ci13xxx_udc driver and the gadgetfs test program (needs a patch to support
the ci13xxx_udc, though):
	http://www.linux-usb.org/gadget/usb.c
Start the test program, wait to initialize, then press Ctrl+c.

This patch fixes the following problem by using spin_lock_irqsave()
instead of spin_lock().

=================================
[ INFO: inconsistent lock state ]
3.1.0-rc6+ #158
---------------------------------
inconsistent {IN-HARDIRQ-W} -&gt; {HARDIRQ-ON-W} usage.
usb/113 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;(&amp;dev-&gt;lock)-&gt;rlock){?.....}, at: [&lt;bf000340&gt;] gadgetfs_disconnect+0x14/0x80 [gadgetfs]
{IN-HARDIRQ-W} state was registered at:
  [&lt;c00596b8&gt;] mark_irqflags+0x14c/0x1ac
  [&lt;c0059bf8&gt;] __lock_acquire+0x4e0/0x8f0
  [&lt;c005a698&gt;] lock_acquire+0x98/0x1a8
  [&lt;c02f10e0&gt;] _raw_spin_lock+0x54/0x8c
  [&lt;bf000340&gt;] gadgetfs_disconnect+0x14/0x80 [gadgetfs]
  [&lt;c0229104&gt;] _gadget_stop_activity+0xd4/0x154
  [&lt;c022b130&gt;] isr_reset_handler+0x34/0x1c0
  [&lt;c022c320&gt;] udc_irq+0x204/0x228
  [&lt;c0069018&gt;] handle_irq_event_percpu+0x64/0x3a0
  [&lt;c0069390&gt;] handle_irq_event+0x3c/0x5c
  [&lt;c006ae5c&gt;] handle_level_irq+0x8c/0x10c
  [&lt;c0068a34&gt;] generic_handle_irq+0x30/0x44
  [&lt;c0009b2c&gt;] handle_IRQ+0x30/0x84
  [&lt;c0008ef8&gt;] __irq_svc+0x38/0x60
  [&lt;c0009c58&gt;] default_idle+0x30/0x34
  [&lt;c0009e30&gt;] cpu_idle+0x9c/0xd8
  [&lt;c04056f4&gt;] start_kernel+0x278/0x2bc
irq event stamp: 6412
hardirqs last  enabled at (6412): [&lt;c02f1cd0&gt;] _raw_spin_unlock_irqrestore+0x30/0x5c
hardirqs last disabled at (6411): [&lt;c02f1278&gt;] _raw_spin_lock_irqsave+0x20/0xa0
softirqs last  enabled at (6381): [&lt;c002833c&gt;] irq_exit+0xa0/0xa8
softirqs last disabled at (6372): [&lt;c002833c&gt;] irq_exit+0xa0/0xa8

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;dev-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;dev-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

1 lock held by usb/113:
 #0:  (udc_lock#2){+.+.+.}, at: [&lt;c02286c0&gt;] usb_gadget_unregister_driver+0x34/0x88

stack backtrace:
[&lt;c000d41c&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c0058e98&gt;] (print_usage_bug+0x144/0x1c4)
[&lt;c0058e98&gt;] (print_usage_bug+0x144/0x1c4) from [&lt;c0059144&gt;] (mark_lock_irq+0x22c/0x274)
[&lt;c0059144&gt;] (mark_lock_irq+0x22c/0x274) from [&lt;c00592d4&gt;] (mark_lock+0x148/0x3e0)
[&lt;c00592d4&gt;] (mark_lock+0x148/0x3e0) from [&lt;c0059668&gt;] (mark_irqflags+0xfc/0x1ac)
[&lt;c0059668&gt;] (mark_irqflags+0xfc/0x1ac) from [&lt;c0059bf8&gt;] (__lock_acquire+0x4e0/0x8f0)
[&lt;c0059bf8&gt;] (__lock_acquire+0x4e0/0x8f0) from [&lt;c005a698&gt;] (lock_acquire+0x98/0x1a8)
[&lt;c005a698&gt;] (lock_acquire+0x98/0x1a8) from [&lt;c02f10e0&gt;] (_raw_spin_lock+0x54/0x8c)
[&lt;c02f10e0&gt;] (_raw_spin_lock+0x54/0x8c) from [&lt;bf000340&gt;] (gadgetfs_disconnect+0x14/0x80 [gadgetfs])
[&lt;bf000340&gt;] (gadgetfs_disconnect+0x14/0x80 [gadgetfs]) from [&lt;c0229104&gt;] (_gadget_stop_activity+0xd4/0x154)
[&lt;c0229104&gt;] (_gadget_stop_activity+0xd4/0x154) from [&lt;c0229240&gt;] (ci13xxx_stop+0xbc/0x17c)
[&lt;c0229240&gt;] (ci13xxx_stop+0xbc/0x17c) from [&lt;c022867c&gt;] (usb_gadget_remove_driver+0x88/0x98)
[&lt;c022867c&gt;] (usb_gadget_remove_driver+0x88/0x98) from [&lt;c02286f4&gt;] (usb_gadget_unregister_driver+0x68/0x88)
[&lt;c02286f4&gt;] (usb_gadget_unregister_driver+0x68/0x88) from [&lt;bf0003e8&gt;] (dev_release+0x14/0x48 [gadgetfs])
[&lt;bf0003e8&gt;] (dev_release+0x14/0x48 [gadgetfs]) from [&lt;c00cc158&gt;] (__fput+0xa4/0x1f0)
[&lt;c00cc158&gt;] (__fput+0xa4/0x1f0) from [&lt;c00c7f28&gt;] (filp_close+0x5c/0x74)
[&lt;c00c7f28&gt;] (filp_close+0x5c/0x74) from [&lt;c00c7fe8&gt;] (sys_close+0xa8/0x150)
[&lt;c00c7fe8&gt;] (sys_close+0xa8/0x150) from [&lt;c00092a0&gt;] (ret_fast_syscall+0x0/0x38)

Tested-by: Pavankumar Kondeti &lt;pkondeti@codeaurora.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.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>
Under certain circumstances lockdep finds an inconsistent lock state in
gadgetfs. The problem can be reproduced with a hardware using the
ci13xxx_udc driver and the gadgetfs test program (needs a patch to support
the ci13xxx_udc, though):
	http://www.linux-usb.org/gadget/usb.c
Start the test program, wait to initialize, then press Ctrl+c.

This patch fixes the following problem by using spin_lock_irqsave()
instead of spin_lock().

=================================
[ INFO: inconsistent lock state ]
3.1.0-rc6+ #158
---------------------------------
inconsistent {IN-HARDIRQ-W} -&gt; {HARDIRQ-ON-W} usage.
usb/113 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;(&amp;dev-&gt;lock)-&gt;rlock){?.....}, at: [&lt;bf000340&gt;] gadgetfs_disconnect+0x14/0x80 [gadgetfs]
{IN-HARDIRQ-W} state was registered at:
  [&lt;c00596b8&gt;] mark_irqflags+0x14c/0x1ac
  [&lt;c0059bf8&gt;] __lock_acquire+0x4e0/0x8f0
  [&lt;c005a698&gt;] lock_acquire+0x98/0x1a8
  [&lt;c02f10e0&gt;] _raw_spin_lock+0x54/0x8c
  [&lt;bf000340&gt;] gadgetfs_disconnect+0x14/0x80 [gadgetfs]
  [&lt;c0229104&gt;] _gadget_stop_activity+0xd4/0x154
  [&lt;c022b130&gt;] isr_reset_handler+0x34/0x1c0
  [&lt;c022c320&gt;] udc_irq+0x204/0x228
  [&lt;c0069018&gt;] handle_irq_event_percpu+0x64/0x3a0
  [&lt;c0069390&gt;] handle_irq_event+0x3c/0x5c
  [&lt;c006ae5c&gt;] handle_level_irq+0x8c/0x10c
  [&lt;c0068a34&gt;] generic_handle_irq+0x30/0x44
  [&lt;c0009b2c&gt;] handle_IRQ+0x30/0x84
  [&lt;c0008ef8&gt;] __irq_svc+0x38/0x60
  [&lt;c0009c58&gt;] default_idle+0x30/0x34
  [&lt;c0009e30&gt;] cpu_idle+0x9c/0xd8
  [&lt;c04056f4&gt;] start_kernel+0x278/0x2bc
irq event stamp: 6412
hardirqs last  enabled at (6412): [&lt;c02f1cd0&gt;] _raw_spin_unlock_irqrestore+0x30/0x5c
hardirqs last disabled at (6411): [&lt;c02f1278&gt;] _raw_spin_lock_irqsave+0x20/0xa0
softirqs last  enabled at (6381): [&lt;c002833c&gt;] irq_exit+0xa0/0xa8
softirqs last disabled at (6372): [&lt;c002833c&gt;] irq_exit+0xa0/0xa8

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;dev-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;dev-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

1 lock held by usb/113:
 #0:  (udc_lock#2){+.+.+.}, at: [&lt;c02286c0&gt;] usb_gadget_unregister_driver+0x34/0x88

stack backtrace:
[&lt;c000d41c&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c0058e98&gt;] (print_usage_bug+0x144/0x1c4)
[&lt;c0058e98&gt;] (print_usage_bug+0x144/0x1c4) from [&lt;c0059144&gt;] (mark_lock_irq+0x22c/0x274)
[&lt;c0059144&gt;] (mark_lock_irq+0x22c/0x274) from [&lt;c00592d4&gt;] (mark_lock+0x148/0x3e0)
[&lt;c00592d4&gt;] (mark_lock+0x148/0x3e0) from [&lt;c0059668&gt;] (mark_irqflags+0xfc/0x1ac)
[&lt;c0059668&gt;] (mark_irqflags+0xfc/0x1ac) from [&lt;c0059bf8&gt;] (__lock_acquire+0x4e0/0x8f0)
[&lt;c0059bf8&gt;] (__lock_acquire+0x4e0/0x8f0) from [&lt;c005a698&gt;] (lock_acquire+0x98/0x1a8)
[&lt;c005a698&gt;] (lock_acquire+0x98/0x1a8) from [&lt;c02f10e0&gt;] (_raw_spin_lock+0x54/0x8c)
[&lt;c02f10e0&gt;] (_raw_spin_lock+0x54/0x8c) from [&lt;bf000340&gt;] (gadgetfs_disconnect+0x14/0x80 [gadgetfs])
[&lt;bf000340&gt;] (gadgetfs_disconnect+0x14/0x80 [gadgetfs]) from [&lt;c0229104&gt;] (_gadget_stop_activity+0xd4/0x154)
[&lt;c0229104&gt;] (_gadget_stop_activity+0xd4/0x154) from [&lt;c0229240&gt;] (ci13xxx_stop+0xbc/0x17c)
[&lt;c0229240&gt;] (ci13xxx_stop+0xbc/0x17c) from [&lt;c022867c&gt;] (usb_gadget_remove_driver+0x88/0x98)
[&lt;c022867c&gt;] (usb_gadget_remove_driver+0x88/0x98) from [&lt;c02286f4&gt;] (usb_gadget_unregister_driver+0x68/0x88)
[&lt;c02286f4&gt;] (usb_gadget_unregister_driver+0x68/0x88) from [&lt;bf0003e8&gt;] (dev_release+0x14/0x48 [gadgetfs])
[&lt;bf0003e8&gt;] (dev_release+0x14/0x48 [gadgetfs]) from [&lt;c00cc158&gt;] (__fput+0xa4/0x1f0)
[&lt;c00cc158&gt;] (__fput+0xa4/0x1f0) from [&lt;c00c7f28&gt;] (filp_close+0x5c/0x74)
[&lt;c00c7f28&gt;] (filp_close+0x5c/0x74) from [&lt;c00c7fe8&gt;] (sys_close+0xa8/0x150)
[&lt;c00c7fe8&gt;] (sys_close+0xa8/0x150) from [&lt;c00092a0&gt;] (ret_fast_syscall+0x0/0x38)

Tested-by: Pavankumar Kondeti &lt;pkondeti@codeaurora.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb gadget: clean up FSF boilerplate text</title>
<updated>2011-09-09T23:00:09+00:00</updated>
<author>
<name>Klaus Schwarzkopf</name>
<email>schwarzkopf@sensortherm.de</email>
</author>
<published>2011-09-09T14:10:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=28c9fc68ebd32d473a8787d05c74e3f39c6c866b'/>
<id>28c9fc68ebd32d473a8787d05c74e3f39c6c866b</id>
<content type='text'>
remove the following two paragraphs as they are not needed:

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,59
Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Signed-off-by: Klaus Schwarzkopf &lt;schwarzkopf@sensortherm.de&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 the following two paragraphs as they are not needed:

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,59
Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Signed-off-by: Klaus Schwarzkopf &lt;schwarzkopf@sensortherm.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: defer setting maxpacket till -&gt;setup()</title>
<updated>2011-07-01T21:31:12+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2011-06-23T12:26:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=765f5b830e547229bb752e7b232ee83e2b3d49d5'/>
<id>765f5b830e547229bb752e7b232ee83e2b3d49d5</id>
<content type='text'>
maxpacket is set by the udc driver for ep0 very early. This value is
copied by the function gadget used later for the USB_DT_DEVICE and
USB_DT_DEVICE_QUALIFIER query. This seems to work fine so far. For USB3
we need set a different value here. In SS speed it is 2^x with x=9 and
in HS we set something &lt;= 64. If the UDC starts in SS and continues in
HS after the cable has been plugged it will report a too small value.
There setting of this value is defered and taken automaticly from the
ep0 pointer where the UDC driver can update it according to the speed it
detected _after_ a cable has been plugged.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.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>
maxpacket is set by the udc driver for ep0 very early. This value is
copied by the function gadget used later for the USB_DT_DEVICE and
USB_DT_DEVICE_QUALIFIER query. This seems to work fine so far. For USB3
we need set a different value here. In SS speed it is 2^x with x=9 and
in HS we set something &lt;= 64. If the UDC starts in SS and continues in
HS after the cable has been plugged it will report a too small value.
There setting of this value is defered and taken automaticly from the
ep0 pointer where the UDC driver can update it according to the speed it
detected _after_ a cable has been plugged.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: add usb_endpoint_descriptor to struct usb_ep</title>
<updated>2011-06-28T18:14:36+00:00</updated>
<author>
<name>Tatyana Brokhman</name>
<email>tlinder@codeaurora.org</email>
</author>
<published>2011-06-28T13:33:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=72c973dd2b01b212a159faa330a2bc641a3ed809'/>
<id>72c973dd2b01b212a159faa330a2bc641a3ed809</id>
<content type='text'>
Change usb_ep_enable() prototype to use endpoint
descriptor from usb_ep.

This optimization spares the FDs from saving the
endpoint chosen descriptor. This optimization is
not full though. To fully exploit this change, one
needs to update all the UDCs as well since in the
current implementation each of them saves the
endpoint descriptor in it's internal (and extended)
endpoint structure.

Signed-off-by: Tatyana Brokhman &lt;tlinder@codeaurora.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.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>
Change usb_ep_enable() prototype to use endpoint
descriptor from usb_ep.

This optimization spares the FDs from saving the
endpoint chosen descriptor. This optimization is
not full though. To fully exploit this change, one
needs to update all the UDCs as well since in the
current implementation each of them saves the
endpoint descriptor in it's internal (and extended)
endpoint structure.

Signed-off-by: Tatyana Brokhman &lt;tlinder@codeaurora.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb-gadget: unlock data-&gt;lock mutex on error path in ep_write()</title>
<updated>2011-06-06T22:59:40+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2011-05-27T04:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3898115896c7f18cb7009de691c43cb3d92bb82a'/>
<id>3898115896c7f18cb7009de691c43cb3d92bb82a</id>
<content type='text'>
ep_write() acquires data-&gt;lock mutex in get_ready_ep() and releases it
on all paths except for one: when usb_endpoint_xfer_isoc() failed. The
patch adds mutex_unlock(&amp;data-&gt;lock) at that path.

It is similar to commit 00cc7a5 ("usb-gadget: unlock data-&gt;lock mutex on error path in ep_read()"),
it was not fixed at that time by accident.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&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>
ep_write() acquires data-&gt;lock mutex in get_ready_ep() and releases it
on all paths except for one: when usb_endpoint_xfer_isoc() failed. The
patch adds mutex_unlock(&amp;data-&gt;lock) at that path.

It is similar to commit 00cc7a5 ("usb-gadget: unlock data-&gt;lock mutex on error path in ep_read()"),
it was not fixed at that time by accident.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: usb-gadget: unlock data-&gt;lock mutex on error path in ep_read()</title>
<updated>2011-04-13T22:43:59+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2011-03-16T19:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=00cc7a5faf25b3ba5cf30fcffc62249bdd152006'/>
<id>00cc7a5faf25b3ba5cf30fcffc62249bdd152006</id>
<content type='text'>
ep_read() acquires data-&gt;lock mutex in get_ready_ep() and releases it on
all paths except for one: when usb_endpoint_xfer_isoc() failed. The
patch adds mutex_unlock(&amp;data-&gt;lock) at that path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&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>
ep_read() acquires data-&gt;lock mutex in get_ready_ep() and releases it on
all paths except for one: when usb_endpoint_xfer_isoc() failed. The
patch adds mutex_unlock(&amp;data-&gt;lock) at that path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
