<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/gadget, branch v3.17</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>usb: gadget: f_fs: fix the redundant ep files problem</title>
<updated>2014-09-03T14:15:59+00:00</updated>
<author>
<name>Robert Baldyga</name>
<email>r.baldyga@samsung.com</email>
</author>
<published>2014-08-25T09:16:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6d5c1c77bbf98b2cc5373af02bb7b3b27584ee4a'/>
<id>6d5c1c77bbf98b2cc5373af02bb7b3b27584ee4a</id>
<content type='text'>
Up to now, when endpoint addresses in descriptors were non-consecutive,
there were created redundant files, which could cause problems in kernel,
when user tried to read/write to them. It was result of fact that maximum
endpoint address was taken as total number of endpoints in function.

This patch adds endpoint descriptors counting and storing their addresses
in eps_addrmap to verify their cohesion in each speed.

Endpoint address map would be also useful for further features, just like
vitual endpoint address mapping.

Signed-off-by: Robert Baldyga &lt;r.baldyga@samsung.com&gt;
Acked-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>
Up to now, when endpoint addresses in descriptors were non-consecutive,
there were created redundant files, which could cause problems in kernel,
when user tried to read/write to them. It was result of fact that maximum
endpoint address was taken as total number of endpoints in function.

This patch adds endpoint descriptors counting and storing their addresses
in eps_addrmap to verify their cohesion in each speed.

Endpoint address map would be also useful for further features, just like
vitual endpoint address mapping.

Signed-off-by: Robert Baldyga &lt;r.baldyga@samsung.com&gt;
Acked-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: gadget: fusb300_udc.h: Fix typo in include guard</title>
<updated>2014-09-03T14:15:57+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2014-08-25T08:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f0798d6a04867ad8db8b41ddea45627d2c8cffe3'/>
<id>f0798d6a04867ad8db8b41ddea45627d2c8cffe3</id>
<content type='text'>
Clearly this was meant to be an include guard, but a trailing
underscore was missing. It has been this way since the file was
introduced in 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver").

Fixes: 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clearly this was meant to be an include guard, but a trailing
underscore was missing. It has been this way since the file was
introduced in 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver").

Fixes: 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: net2280: Fix invalid handling of Reset irq</title>
<updated>2014-09-03T14:15:57+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2014-08-26T16:00:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ac9d032e739f13ca04bfe6e0fd04bd114f72c6e2'/>
<id>ac9d032e739f13ca04bfe6e0fd04bd114f72c6e2</id>
<content type='text'>
Without this patch, some hosts keep restarting indefinitely the target.

Fixes: ae8e530 (usb: gadget: net2280: Code Cleanup)
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.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>
Without this patch, some hosts keep restarting indefinitely the target.

Fixes: ae8e530 (usb: gadget: net2280: Code Cleanup)
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: remove $(PWD) in ccflags-y</title>
<updated>2014-08-20T16:16:02+00:00</updated>
<author>
<name>Philippe Reynes</name>
<email>tremyfr@gmail.com</email>
</author>
<published>2014-08-17T22:08:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5d19703822da2a8e9161302aa918c8e45a4c5eee'/>
<id>5d19703822da2a8e9161302aa918c8e45a4c5eee</id>
<content type='text'>
The variable $(PWD) is useless, and it may break the compilation.
For example, it breaks the kernel compilation when it's done with
buildroot :

  /home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/ccache
/home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc
-Wp,-MD,drivers/usb/gadget/legacy/.hid.o.d  -nostdinc -isystem
/home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.7.3/include
-I./arch/arm/include -Iarch/arm/include/generated  -Iinclude
-I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi
-I./include/uapi -Iinclude/generated/uapi -include
./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
-funwind-tables -marm -D__LINUX_ARM_ARCH__=5 -march=armv5te
-mtune=arm9tdmi -msoft-float -Uarm -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -Wframe-larger-than=1024
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer
-fno-var-tracking-assignments -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack
-Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/udc/
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/function/
-DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hid)"
-D"KBUILD_MODNAME=KBUILD_STR(g_hid)" -c -o
drivers/usb/gadget/legacy/hid.o drivers/usb/gadget/legacy/hid.c
drivers/usb/gadget/epautoconf.c:23:26: erreur fatale: gadget_chips.h :
Aucun fichier ou dossier de ce type

This compilation line include :
..../buildroot/driver/usb/gadget
but the real path is :
..../buildroot/output/build/linux-3.17-rc1/driver/usb/gadget

Signed-off-by: Philippe Reynes &lt;tremyfr@gmail.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>
The variable $(PWD) is useless, and it may break the compilation.
For example, it breaks the kernel compilation when it's done with
buildroot :

  /home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/ccache
/home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc
-Wp,-MD,drivers/usb/gadget/legacy/.hid.o.d  -nostdinc -isystem
/home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.7.3/include
-I./arch/arm/include -Iarch/arm/include/generated  -Iinclude
-I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi
-I./include/uapi -Iinclude/generated/uapi -include
./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
-funwind-tables -marm -D__LINUX_ARM_ARCH__=5 -march=armv5te
-mtune=arm9tdmi -msoft-float -Uarm -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -Wframe-larger-than=1024
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer
-fno-var-tracking-assignments -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack
-Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/udc/
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/function/
-DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hid)"
-D"KBUILD_MODNAME=KBUILD_STR(g_hid)" -c -o
drivers/usb/gadget/legacy/hid.o drivers/usb/gadget/legacy/hid.c
drivers/usb/gadget/epautoconf.c:23:26: erreur fatale: gadget_chips.h :
Aucun fichier ou dossier de ce type

This compilation line include :
..../buildroot/driver/usb/gadget
but the real path is :
..../buildroot/output/build/linux-3.17-rc1/driver/usb/gadget

Signed-off-by: Philippe Reynes &lt;tremyfr@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: pch_udc: usb gadget device support for Intel Quark X1000</title>
<updated>2014-08-20T14:53:45+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@intel.com</email>
</author>
<published>2014-08-04T17:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a68df7066a6f974db6069e0b93c498775660a114'/>
<id>a68df7066a6f974db6069e0b93c498775660a114</id>
<content type='text'>
This patch is to enable the USB gadget device for Intel Quark X1000

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@intel.com&gt;
Signed-off-by: Bing Niu &lt;bing.niu@intel.com&gt;
Signed-off-by: Alvin (Weike) Chen &lt;alvin.chen@intel.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 patch is to enable the USB gadget device for Intel Quark X1000

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@intel.com&gt;
Signed-off-by: Bing Niu &lt;bing.niu@intel.com&gt;
Signed-off-by: Alvin (Weike) Chen &lt;alvin.chen@intel.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: uvc: fix possible lockup in uvc gadget</title>
<updated>2014-08-19T19:34:18+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2014-08-08T15:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bd52b813a999e44d2e35c2390d02fa4d0f61d08a'/>
<id>bd52b813a999e44d2e35c2390d02fa4d0f61d08a</id>
<content type='text'>
If the pending buffers in the queue could not be pushed to the udc
endpoint we have to cancel the uvc_queue. Otherwise the gadget will get
stuck on this error. This patch calls uvc_queue_cancel if usb_ep_queue
failed.

Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the pending buffers in the queue could not be pushed to the udc
endpoint we have to cancel the uvc_queue. Otherwise the gadget will get
stuck on this error. This patch calls uvc_queue_cancel if usb_ep_queue
failed.

Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "usb: gadget: u_ether: synchronize with transmit when stopping queue"</title>
<updated>2014-08-19T14:51:19+00:00</updated>
<author>
<name>Li RongQing</name>
<email>roy.qing.li@gmail.com</email>
</author>
<published>2014-07-25T06:22:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7166c32d9a6b8655ce13b0844482526734ac41b3'/>
<id>7166c32d9a6b8655ce13b0844482526734ac41b3</id>
<content type='text'>
This reverts commit a9232076374334ca2bc2a448dfde96d38a54349a.

It introduced a dead lock, and did not fix anything.

it made netif_tx_lock() be called in IRQ context, but in softirq context,
the same lock is locked without disabling IRQ. In fact, the commit a923207637
did not fix anything, since netif_stop_queue did not free the any resource

[   10.154920] =================================
[   10.156026] [ INFO: inconsistent lock state ]
[   10.156026] 3.16.0-rc5+ #13 Not tainted
[   10.156026] ---------------------------------
[   10.156026] inconsistent {IN-HARDIRQ-W} -&gt; {HARDIRQ-ON-W} usage.
[   10.156026] swapper/1/0 [HC0[0]:SC1[5]:HE1:SE0] takes:
[   10.156026]  (_xmit_ETHER){?.-...}, at: [&lt;80948b6a&gt;] sch_direct_xmit+0x7a/0x250
[   10.156026] {IN-HARDIRQ-W} state was registered at:
[   10.156026]   [&lt;804811f0&gt;] __lock_acquire+0x800/0x17a0
[   10.156026]   [&lt;804828ba&gt;] lock_acquire+0x6a/0xf0
[   10.156026]   [&lt;809ed477&gt;] _raw_spin_lock+0x27/0x40
[   10.156026]   [&lt;8088d508&gt;] gether_disconnect+0x68/0x280
[   10.156026]   [&lt;8088e777&gt;] eem_set_alt+0x37/0xc0
[   10.156026]   [&lt;808847ce&gt;] composite_setup+0x30e/0x1240
[   10.156026]   [&lt;8088b8ae&gt;] pch_udc_isr+0xa6e/0xf50
[   10.156026]   [&lt;8048abe8&gt;] handle_irq_event_percpu+0x38/0x1e0
[   10.156026]   [&lt;8048adc1&gt;] handle_irq_event+0x31/0x50
[   10.156026]   [&lt;8048d94b&gt;] handle_fasteoi_irq+0x6b/0x140
[   10.156026]   [&lt;804040a5&gt;] handle_irq+0x65/0x80
[   10.156026]   [&lt;80403cfc&gt;] do_IRQ+0x3c/0xc0
[   10.156026]   [&lt;809ee6ae&gt;] common_interrupt+0x2e/0x34
[   10.156026]   [&lt;804668c5&gt;] finish_task_switch+0x65/0xd0
[   10.156026]   [&lt;809e89df&gt;] __schedule+0x20f/0x7d0
[   10.156026]   [&lt;809e94aa&gt;] schedule_preempt_disabled+0x2a/0x70
[   10.156026]   [&lt;8047bf03&gt;] cpu_startup_entry+0x143/0x410
[   10.156026]   [&lt;809e2e61&gt;] rest_init+0xa1/0xb0
[   10.156026]   [&lt;80ce2a3b&gt;] start_kernel+0x336/0x33b
[   10.156026]   [&lt;80ce22ab&gt;] i386_start_kernel+0x79/0x7d
[   10.156026] irq event stamp: 52070
[   10.156026] hardirqs last  enabled at (52070): [&lt;809375de&gt;] neigh_resolve_output+0xee/0x2a0
[   10.156026] hardirqs last disabled at (52069): [&lt;809375a8&gt;] neigh_resolve_output+0xb8/0x2a0
[   10.156026] softirqs last  enabled at (52020): [&lt;8044401f&gt;] _local_bh_enable+0x1f/0x50
[   10.156026] softirqs last disabled at (52021): [&lt;80404036&gt;] do_softirq_own_stack+0x26/0x30
[   10.156026]
[   10.156026] other info that might help us debug this:
[   10.156026]  Possible unsafe locking scenario:
[   10.156026]
[   10.156026]        CPU0
[   10.156026]        ----
[   10.156026]   lock(_xmit_ETHER);
[   10.156026]   &lt;Interrupt&gt;
[   10.156026]     lock(_xmit_ETHER);
[   10.156026]
[   10.156026]  *** DEADLOCK ***
[   10.156026]
[   10.156026] 4 locks held by swapper/1/0:
[   10.156026]  #0:  (((&amp;idev-&gt;mc_ifc_timer))){+.-...}, at: [&lt;8044b100&gt;] call_timer_fn+0x0/0x190
[   10.156026]  #1:  (rcu_read_lock){......}, at: [&lt;a0577c40&gt;] mld_sendpack+0x0/0x590 [ipv6]
[   10.156026]  #2:  (rcu_read_lock_bh){......}, at: [&lt;a055680c&gt;] ip6_finish_output2+0x4c/0x7f0 [ipv6]
[   10.156026]  #3:  (rcu_read_lock_bh){......}, at: [&lt;8092e510&gt;] __dev_queue_xmit+0x0/0x5f0
[   10.156026]
[   10.156026] stack backtrace:
[   10.156026] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.16.0-rc5+ #13
[   10.156026]  811dbb10 00000000 9e919d10 809e6785 9e8b8000 9e919d3c 809e561e 80b95511
[   10.156026]  80b9545a 80b9543d 80b95450 80b95441 80b957e4 9e8b84e0 00000002 8047f7b0
[   10.156026]  9e919d5c 8048043b 00000002 00000000 9e8b8000 00000001 00000004 9e8b8000
[   10.156026] Call Trace:
[   10.156026]  [&lt;809e6785&gt;] dump_stack+0x48/0x69
[   10.156026]  [&lt;809e561e&gt;] print_usage_bug+0x18f/0x19c
[   10.156026]  [&lt;8047f7b0&gt;] ? print_shortest_lock_dependencies+0x170/0x170
[   10.156026]  [&lt;8048043b&gt;] mark_lock+0x53b/0x5f0
[   10.156026]  [&lt;804810cf&gt;] __lock_acquire+0x6df/0x17a0
[   10.156026]  [&lt;804828ba&gt;] lock_acquire+0x6a/0xf0
[   10.156026]  [&lt;80948b6a&gt;] ? sch_direct_xmit+0x7a/0x250
[   10.156026]  [&lt;809ed477&gt;] _raw_spin_lock+0x27/0x40
[   10.156026]  [&lt;80948b6a&gt;] ? sch_direct_xmit+0x7a/0x250
[   10.156026]  [&lt;80948b6a&gt;] sch_direct_xmit+0x7a/0x250
[   10.156026]  [&lt;8092e6bf&gt;] __dev_queue_xmit+0x1af/0x5f0
[   10.156026]  [&lt;80947fc0&gt;] ? ether_setup+0x80/0x80
[   10.156026]  [&lt;8092eb0f&gt;] dev_queue_xmit+0xf/0x20
[   10.156026]  [&lt;8093764c&gt;] neigh_resolve_output+0x15c/0x2a0
[   10.156026]  [&lt;a0556927&gt;] ip6_finish_output2+0x167/0x7f0 [ipv6]
[   10.156026]  [&lt;a0559b05&gt;] ip6_finish_output+0x85/0x1c0 [ipv6]
[   10.156026]  [&lt;a0559cb7&gt;] ip6_output+0x77/0x240 [ipv6]
[   10.156026]  [&lt;a0578163&gt;] mld_sendpack+0x523/0x590 [ipv6]
[   10.156026]  [&lt;80480501&gt;] ? mark_held_locks+0x11/0x90
[   10.156026]  [&lt;a057947d&gt;] mld_ifc_timer_expire+0x15d/0x280 [ipv6]
[   10.156026]  [&lt;8044b168&gt;] call_timer_fn+0x68/0x190
[   10.156026]  [&lt;a0579320&gt;] ? igmp6_group_added+0x150/0x150 [ipv6]
[   10.156026]  [&lt;8044b3fa&gt;] run_timer_softirq+0x16a/0x240
[   10.156026]  [&lt;a0579320&gt;] ? igmp6_group_added+0x150/0x150 [ipv6]
[   10.156026]  [&lt;80444984&gt;] __do_softirq+0xd4/0x2f0
[   10.156026]  [&lt;804448b0&gt;] ? tasklet_action+0x100/0x100
[   10.156026]  [&lt;80404036&gt;] do_softirq_own_stack+0x26/0x30
[   10.156026]  &lt;IRQ&gt;  [&lt;80444d05&gt;] irq_exit+0x65/0x70
[   10.156026]  [&lt;8042d758&gt;] smp_apic_timer_interrupt+0x38/0x50
[   10.156026]  [&lt;809ee91f&gt;] apic_timer_interrupt+0x2f/0x34
[   10.156026]  [&lt;8048007b&gt;] ? mark_lock+0x17b/0x5f0
[   10.156026]  [&lt;8040a912&gt;] ? default_idle+0x22/0xf0
[   10.156026]  [&lt;8040b13e&gt;] arch_cpu_idle+0xe/0x10
[   10.156026]  [&lt;8047bfc6&gt;] cpu_startup_entry+0x206/0x410
[   10.156026]  [&lt;8042bfbd&gt;] start_secondary+0x19d/0x1e0

Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jeff Westfahl &lt;jeff.westfahl@ni.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: &lt;linux-usb@vger.kernel.org&gt;
Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.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 reverts commit a9232076374334ca2bc2a448dfde96d38a54349a.

It introduced a dead lock, and did not fix anything.

it made netif_tx_lock() be called in IRQ context, but in softirq context,
the same lock is locked without disabling IRQ. In fact, the commit a923207637
did not fix anything, since netif_stop_queue did not free the any resource

[   10.154920] =================================
[   10.156026] [ INFO: inconsistent lock state ]
[   10.156026] 3.16.0-rc5+ #13 Not tainted
[   10.156026] ---------------------------------
[   10.156026] inconsistent {IN-HARDIRQ-W} -&gt; {HARDIRQ-ON-W} usage.
[   10.156026] swapper/1/0 [HC0[0]:SC1[5]:HE1:SE0] takes:
[   10.156026]  (_xmit_ETHER){?.-...}, at: [&lt;80948b6a&gt;] sch_direct_xmit+0x7a/0x250
[   10.156026] {IN-HARDIRQ-W} state was registered at:
[   10.156026]   [&lt;804811f0&gt;] __lock_acquire+0x800/0x17a0
[   10.156026]   [&lt;804828ba&gt;] lock_acquire+0x6a/0xf0
[   10.156026]   [&lt;809ed477&gt;] _raw_spin_lock+0x27/0x40
[   10.156026]   [&lt;8088d508&gt;] gether_disconnect+0x68/0x280
[   10.156026]   [&lt;8088e777&gt;] eem_set_alt+0x37/0xc0
[   10.156026]   [&lt;808847ce&gt;] composite_setup+0x30e/0x1240
[   10.156026]   [&lt;8088b8ae&gt;] pch_udc_isr+0xa6e/0xf50
[   10.156026]   [&lt;8048abe8&gt;] handle_irq_event_percpu+0x38/0x1e0
[   10.156026]   [&lt;8048adc1&gt;] handle_irq_event+0x31/0x50
[   10.156026]   [&lt;8048d94b&gt;] handle_fasteoi_irq+0x6b/0x140
[   10.156026]   [&lt;804040a5&gt;] handle_irq+0x65/0x80
[   10.156026]   [&lt;80403cfc&gt;] do_IRQ+0x3c/0xc0
[   10.156026]   [&lt;809ee6ae&gt;] common_interrupt+0x2e/0x34
[   10.156026]   [&lt;804668c5&gt;] finish_task_switch+0x65/0xd0
[   10.156026]   [&lt;809e89df&gt;] __schedule+0x20f/0x7d0
[   10.156026]   [&lt;809e94aa&gt;] schedule_preempt_disabled+0x2a/0x70
[   10.156026]   [&lt;8047bf03&gt;] cpu_startup_entry+0x143/0x410
[   10.156026]   [&lt;809e2e61&gt;] rest_init+0xa1/0xb0
[   10.156026]   [&lt;80ce2a3b&gt;] start_kernel+0x336/0x33b
[   10.156026]   [&lt;80ce22ab&gt;] i386_start_kernel+0x79/0x7d
[   10.156026] irq event stamp: 52070
[   10.156026] hardirqs last  enabled at (52070): [&lt;809375de&gt;] neigh_resolve_output+0xee/0x2a0
[   10.156026] hardirqs last disabled at (52069): [&lt;809375a8&gt;] neigh_resolve_output+0xb8/0x2a0
[   10.156026] softirqs last  enabled at (52020): [&lt;8044401f&gt;] _local_bh_enable+0x1f/0x50
[   10.156026] softirqs last disabled at (52021): [&lt;80404036&gt;] do_softirq_own_stack+0x26/0x30
[   10.156026]
[   10.156026] other info that might help us debug this:
[   10.156026]  Possible unsafe locking scenario:
[   10.156026]
[   10.156026]        CPU0
[   10.156026]        ----
[   10.156026]   lock(_xmit_ETHER);
[   10.156026]   &lt;Interrupt&gt;
[   10.156026]     lock(_xmit_ETHER);
[   10.156026]
[   10.156026]  *** DEADLOCK ***
[   10.156026]
[   10.156026] 4 locks held by swapper/1/0:
[   10.156026]  #0:  (((&amp;idev-&gt;mc_ifc_timer))){+.-...}, at: [&lt;8044b100&gt;] call_timer_fn+0x0/0x190
[   10.156026]  #1:  (rcu_read_lock){......}, at: [&lt;a0577c40&gt;] mld_sendpack+0x0/0x590 [ipv6]
[   10.156026]  #2:  (rcu_read_lock_bh){......}, at: [&lt;a055680c&gt;] ip6_finish_output2+0x4c/0x7f0 [ipv6]
[   10.156026]  #3:  (rcu_read_lock_bh){......}, at: [&lt;8092e510&gt;] __dev_queue_xmit+0x0/0x5f0
[   10.156026]
[   10.156026] stack backtrace:
[   10.156026] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.16.0-rc5+ #13
[   10.156026]  811dbb10 00000000 9e919d10 809e6785 9e8b8000 9e919d3c 809e561e 80b95511
[   10.156026]  80b9545a 80b9543d 80b95450 80b95441 80b957e4 9e8b84e0 00000002 8047f7b0
[   10.156026]  9e919d5c 8048043b 00000002 00000000 9e8b8000 00000001 00000004 9e8b8000
[   10.156026] Call Trace:
[   10.156026]  [&lt;809e6785&gt;] dump_stack+0x48/0x69
[   10.156026]  [&lt;809e561e&gt;] print_usage_bug+0x18f/0x19c
[   10.156026]  [&lt;8047f7b0&gt;] ? print_shortest_lock_dependencies+0x170/0x170
[   10.156026]  [&lt;8048043b&gt;] mark_lock+0x53b/0x5f0
[   10.156026]  [&lt;804810cf&gt;] __lock_acquire+0x6df/0x17a0
[   10.156026]  [&lt;804828ba&gt;] lock_acquire+0x6a/0xf0
[   10.156026]  [&lt;80948b6a&gt;] ? sch_direct_xmit+0x7a/0x250
[   10.156026]  [&lt;809ed477&gt;] _raw_spin_lock+0x27/0x40
[   10.156026]  [&lt;80948b6a&gt;] ? sch_direct_xmit+0x7a/0x250
[   10.156026]  [&lt;80948b6a&gt;] sch_direct_xmit+0x7a/0x250
[   10.156026]  [&lt;8092e6bf&gt;] __dev_queue_xmit+0x1af/0x5f0
[   10.156026]  [&lt;80947fc0&gt;] ? ether_setup+0x80/0x80
[   10.156026]  [&lt;8092eb0f&gt;] dev_queue_xmit+0xf/0x20
[   10.156026]  [&lt;8093764c&gt;] neigh_resolve_output+0x15c/0x2a0
[   10.156026]  [&lt;a0556927&gt;] ip6_finish_output2+0x167/0x7f0 [ipv6]
[   10.156026]  [&lt;a0559b05&gt;] ip6_finish_output+0x85/0x1c0 [ipv6]
[   10.156026]  [&lt;a0559cb7&gt;] ip6_output+0x77/0x240 [ipv6]
[   10.156026]  [&lt;a0578163&gt;] mld_sendpack+0x523/0x590 [ipv6]
[   10.156026]  [&lt;80480501&gt;] ? mark_held_locks+0x11/0x90
[   10.156026]  [&lt;a057947d&gt;] mld_ifc_timer_expire+0x15d/0x280 [ipv6]
[   10.156026]  [&lt;8044b168&gt;] call_timer_fn+0x68/0x190
[   10.156026]  [&lt;a0579320&gt;] ? igmp6_group_added+0x150/0x150 [ipv6]
[   10.156026]  [&lt;8044b3fa&gt;] run_timer_softirq+0x16a/0x240
[   10.156026]  [&lt;a0579320&gt;] ? igmp6_group_added+0x150/0x150 [ipv6]
[   10.156026]  [&lt;80444984&gt;] __do_softirq+0xd4/0x2f0
[   10.156026]  [&lt;804448b0&gt;] ? tasklet_action+0x100/0x100
[   10.156026]  [&lt;80404036&gt;] do_softirq_own_stack+0x26/0x30
[   10.156026]  &lt;IRQ&gt;  [&lt;80444d05&gt;] irq_exit+0x65/0x70
[   10.156026]  [&lt;8042d758&gt;] smp_apic_timer_interrupt+0x38/0x50
[   10.156026]  [&lt;809ee91f&gt;] apic_timer_interrupt+0x2f/0x34
[   10.156026]  [&lt;8048007b&gt;] ? mark_lock+0x17b/0x5f0
[   10.156026]  [&lt;8040a912&gt;] ? default_idle+0x22/0xf0
[   10.156026]  [&lt;8040b13e&gt;] arch_cpu_idle+0xe/0x10
[   10.156026]  [&lt;8047bfc6&gt;] cpu_startup_entry+0x206/0x410
[   10.156026]  [&lt;8042bfbd&gt;] start_secondary+0x19d/0x1e0

Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jeff Westfahl &lt;jeff.westfahl@ni.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: &lt;linux-usb@vger.kernel.org&gt;
Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: Fix return value check in r8a66597_probe()</title>
<updated>2014-08-19T14:27:24+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2014-07-20T03:41:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4b11f88821aff3e780cb3eac3a48270551e41167'/>
<id>4b11f88821aff3e780cb3eac3a48270551e41167</id>
<content type='text'>
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Acked-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Acked-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: gadget: Fix return value check in ep_write()</title>
<updated>2014-08-19T14:27:24+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2014-07-20T03:42:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7042e8f2f6f5c76b6173748570312bbeb044c7dd'/>
<id>7042e8f2f6f5c76b6173748570312bbeb044c7dd</id>
<content type='text'>
In case of error, the function memdup_user() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of error, the function memdup_user() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: atmel_usba_udc: fix it to deal with final dma channel</title>
<updated>2014-08-19T14:24:41+00:00</updated>
<author>
<name>Bo Shen</name>
<email>voice.shen@atmel.com</email>
</author>
<published>2014-08-07T03:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bcabdc24dff2d65dcc5bec093f30302283e5fdf4'/>
<id>bcabdc24dff2d65dcc5bec093f30302283e5fdf4</id>
<content type='text'>
As, the interrupt for DMA is counted from 1, so need to checked
the USBA_NR_DMAS, in old way, it only check (USBA_NR_DMAS - 1),
so fix it.

Reported-by: Max Liao &lt;liaops@embest-tech.com&gt;
Signed-off-by: Bo Shen &lt;voice.shen@atmel.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>
As, the interrupt for DMA is counted from 1, so need to checked
the USBA_NR_DMAS, in old way, it only check (USBA_NR_DMAS - 1),
so fix it.

Reported-by: Max Liao &lt;liaops@embest-tech.com&gt;
Signed-off-by: Bo Shen &lt;voice.shen@atmel.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
