<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/arcnet, branch v4.12</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>arcnet: com20020-pci: add missing pdev setup in netdev structure</title>
<updated>2017-06-29T19:18:37+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2017-06-28T16:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a0ea04c83ab82c3852c9171d2fa5cd9a1432c9b'/>
<id>2a0ea04c83ab82c3852c9171d2fa5cd9a1432c9b</id>
<content type='text'>
We add the pdev data to the pci devices netdev structure. This way
the interface get consistent device names in the userspace (udev).

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We add the pdev data to the pci devices netdev structure. This way
the interface get consistent device names in the userspace (udev).

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arcnet: com20020-pci: fix dev_id calculation</title>
<updated>2017-06-29T19:18:36+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2017-06-28T16:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cb108619f2fc77846bf7a7543517f3487f455b24'/>
<id>cb108619f2fc77846bf7a7543517f3487f455b24</id>
<content type='text'>
The dev_id was miscalculated. Only the two bits 4-5 are relevant for the
MA1 card. PCIARC1 and PCIFB2 use the four bits 4-7 for id selection.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dev_id was miscalculated. Only the two bits 4-5 are relevant for the
MA1 card. PCIARC1 and PCIFB2 use the four bits 4-7 for id selection.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arcnet: com20020: remove needless base_addr assignment</title>
<updated>2017-06-29T19:18:36+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2017-06-28T16:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0d494fcf867f95040b5b67e4bc5af739bcda37da'/>
<id>0d494fcf867f95040b5b67e4bc5af739bcda37da</id>
<content type='text'>
The assignment is superfluous.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The assignment is superfluous.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Trivial fix to spelling mistake in arc_printk message</title>
<updated>2017-06-29T19:18:36+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-06-28T16:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=06908d7aee8d62a80cabfd134d0354dc4d2794bc'/>
<id>06908d7aee8d62a80cabfd134d0354dc4d2794bc</id>
<content type='text'>
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arcnet: change irq handler to lock irqsave</title>
<updated>2017-06-29T19:18:35+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2017-06-28T16:28:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b85840320151f61e04d83a23ef2567a07094503'/>
<id>5b85840320151f61e04d83a23ef2567a07094503</id>
<content type='text'>
This patch prevents the arcnet driver from the following deadlock.

[   41.273910] ======================================================
[   41.280397] [ INFO: SOFTIRQ-safe -&gt; SOFTIRQ-unsafe lock order detected ]
[   41.287433] 4.4.0-00034-gc0ae784 #536 Not tainted
[   41.292366] ------------------------------------------------------
[   41.298863] arcecho/233 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
[   41.305628]  (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...}, at: [&lt;bf083bc8&gt;] arcnet_send_packet+0x60/0x1c0 [arcnet]
[   41.315199]
[   41.315199] and this task is already holding:
[   41.321324]  (_xmit_ARCNET#2){+.-...}, at: [&lt;c06b934c&gt;] packet_direct_xmit+0xfc/0x1c8
[   41.329593] which would create a new lock dependency:
[   41.334893]  (_xmit_ARCNET#2){+.-...} -&gt; (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...}
[   41.341801]
[   41.341801] but this new dependency connects a SOFTIRQ-irq-safe lock:
[   41.350108]  (_xmit_ARCNET#2){+.-...}
... which became SOFTIRQ-irq-safe at:
[   41.357539]   [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.362677]   [&lt;c063ab8c&gt;] dev_watchdog+0x5c/0x264
[   41.367723]   [&lt;c0094edc&gt;] call_timer_fn+0x6c/0xf4
[   41.372759]   [&lt;c00950b8&gt;] run_timer_softirq+0x154/0x210
[   41.378340]   [&lt;c0036b30&gt;] __do_softirq+0x144/0x298
[   41.383469]   [&lt;c0036fb4&gt;] irq_exit+0xcc/0x130
[   41.388138]   [&lt;c0085c50&gt;] __handle_domain_irq+0x60/0xb4
[   41.393728]   [&lt;c0014578&gt;] __irq_svc+0x58/0x78
[   41.398402]   [&lt;c0010274&gt;] arch_cpu_idle+0x24/0x3c
[   41.403443]   [&lt;c007127c&gt;] cpu_startup_entry+0x1f8/0x25c
[   41.409029]   [&lt;c09adc90&gt;] start_kernel+0x3c0/0x3cc
[   41.414170]
[   41.414170] to a SOFTIRQ-irq-unsafe lock:
[   41.419931]  (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...}
... which became SOFTIRQ-irq-unsafe at:
[   41.427996] ...  [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.433409]   [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.439646]   [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.445063]   [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   41.450661]   [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   41.455700]   [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   41.460649]   [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.465158]   [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.470207]
[   41.470207] other info that might help us debug this:
[   41.470207]
[   41.478627]  Possible interrupt unsafe locking scenario:
[   41.478627]
[   41.485763]        CPU0                    CPU1
[   41.490521]        ----                    ----
[   41.495279]   lock(&amp;(&amp;lp-&gt;lock)-&gt;rlock);
[   41.499414]                                local_irq_disable();
[   41.505636]                                lock(_xmit_ARCNET#2);
[   41.511967]                                lock(&amp;(&amp;lp-&gt;lock)-&gt;rlock);
[   41.518741]   &lt;Interrupt&gt;
[   41.521490]     lock(_xmit_ARCNET#2);
[   41.525356]
[   41.525356]  *** DEADLOCK ***
[   41.525356]
[   41.531587] 1 lock held by arcecho/233:
[   41.535617]  #0:  (_xmit_ARCNET#2){+.-...}, at: [&lt;c06b934c&gt;] packet_direct_xmit+0xfc/0x1c8
[   41.544355]
the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
[   41.552362] -&gt; (_xmit_ARCNET#2){+.-...} ops: 27 {
[   41.557357]    HARDIRQ-ON-W at:
[   41.560664]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.567445]                     [&lt;c063ba28&gt;] dev_deactivate_many+0x114/0x304
[   41.574866]                     [&lt;c063bc3c&gt;] dev_deactivate+0x24/0x38
[   41.581646]                     [&lt;c0630374&gt;] linkwatch_do_dev+0x40/0x74
[   41.588613]                     [&lt;c06305d8&gt;] __linkwatch_run_queue+0xec/0x140
[   41.596120]                     [&lt;c0630658&gt;] linkwatch_event+0x2c/0x34
[   41.602991]                     [&lt;c004af30&gt;] process_one_work+0x188/0x40c
[   41.610131]                     [&lt;c004b200&gt;] worker_thread+0x4c/0x480
[   41.616912]                     [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.623048]                     [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.629735]    IN-SOFTIRQ-W at:
[   41.633039]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.639820]                     [&lt;c063ab8c&gt;] dev_watchdog+0x5c/0x264
[   41.646508]                     [&lt;c0094edc&gt;] call_timer_fn+0x6c/0xf4
[   41.653190]                     [&lt;c00950b8&gt;] run_timer_softirq+0x154/0x210
[   41.660425]                     [&lt;c0036b30&gt;] __do_softirq+0x144/0x298
[   41.667201]                     [&lt;c0036fb4&gt;] irq_exit+0xcc/0x130
[   41.673518]                     [&lt;c0085c50&gt;] __handle_domain_irq+0x60/0xb4
[   41.680754]                     [&lt;c0014578&gt;] __irq_svc+0x58/0x78
[   41.687077]                     [&lt;c0010274&gt;] arch_cpu_idle+0x24/0x3c
[   41.693769]                     [&lt;c007127c&gt;] cpu_startup_entry+0x1f8/0x25c
[   41.701006]                     [&lt;c09adc90&gt;] start_kernel+0x3c0/0x3cc
[   41.707791]    INITIAL USE at:
[   41.711003]                    [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.717696]                    [&lt;c063ba28&gt;] dev_deactivate_many+0x114/0x304
[   41.725026]                    [&lt;c063bc3c&gt;] dev_deactivate+0x24/0x38
[   41.731718]                    [&lt;c0630374&gt;] linkwatch_do_dev+0x40/0x74
[   41.738593]                    [&lt;c06305d8&gt;] __linkwatch_run_queue+0xec/0x140
[   41.746011]                    [&lt;c0630658&gt;] linkwatch_event+0x2c/0x34
[   41.752789]                    [&lt;c004af30&gt;] process_one_work+0x188/0x40c
[   41.759847]                    [&lt;c004b200&gt;] worker_thread+0x4c/0x480
[   41.766541]                    [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.772596]                    [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.779198]  }
[   41.780945]  ... key      at: [&lt;c124d620&gt;] netdev_xmit_lock_key+0x38/0x1c8
[   41.788192]  ... acquired at:
[   41.791309]    [&lt;c007bed8&gt;] lock_acquire+0x70/0x90
[   41.796361]    [&lt;c06f9140&gt;] _raw_spin_lock_irqsave+0x40/0x54
[   41.802324]    [&lt;bf083bc8&gt;] arcnet_send_packet+0x60/0x1c0 [arcnet]
[   41.808844]    [&lt;c06b9380&gt;] packet_direct_xmit+0x130/0x1c8
[   41.814622]    [&lt;c06bc7e4&gt;] packet_sendmsg+0x3b8/0x680
[   41.820034]    [&lt;c05fe8b0&gt;] sock_sendmsg+0x14/0x24
[   41.825091]    [&lt;c05ffd68&gt;] SyS_sendto+0xb8/0xe0
[   41.829956]    [&lt;c05ffda8&gt;] SyS_send+0x18/0x20
[   41.834638]    [&lt;c000f780&gt;] ret_fast_syscall+0x0/0x1c
[   41.839954]
[   41.841514]
the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock:
[   41.850302] -&gt; (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...} ops: 5 {
[   41.855644]    HARDIRQ-ON-W at:
[   41.858945]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.865726]                     [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.873607]                     [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.880666]                     [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   41.887901]                     [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   41.894593]                     [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   41.901195]                     [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.907338]                     [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.914025]    SOFTIRQ-ON-W at:
[   41.917328]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.924106]                     [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.931981]                     [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.939028]                     [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   41.946264]                     [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   41.952954]                     [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   41.959548]                     [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.965689]                     [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.972379]    INITIAL USE at:
[   41.975595]                    [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.982283]                    [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.990063]                    [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.997027]                    [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   42.004172]                    [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   42.010766]                    [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   42.017267]                    [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   42.023314]                    [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   42.029903]  }
[   42.031648]  ... key      at: [&lt;bf0854cc&gt;] __key.42091+0x0/0xfffff0f8 [arcnet]
[   42.039255]  ... acquired at:
[   42.042372]    [&lt;c007bed8&gt;] lock_acquire+0x70/0x90
[   42.047413]    [&lt;c06f9140&gt;] _raw_spin_lock_irqsave+0x40/0x54
[   42.053364]    [&lt;bf083bc8&gt;] arcnet_send_packet+0x60/0x1c0 [arcnet]
[   42.059872]    [&lt;c06b9380&gt;] packet_direct_xmit+0x130/0x1c8
[   42.065634]    [&lt;c06bc7e4&gt;] packet_sendmsg+0x3b8/0x680
[   42.071030]    [&lt;c05fe8b0&gt;] sock_sendmsg+0x14/0x24
[   42.076069]    [&lt;c05ffd68&gt;] SyS_sendto+0xb8/0xe0
[   42.080926]    [&lt;c05ffda8&gt;] SyS_send+0x18/0x20
[   42.085601]    [&lt;c000f780&gt;] ret_fast_syscall+0x0/0x1c
[   42.090918]
[   42.092481]
[   42.092481] stack backtrace:
[   42.097065] CPU: 0 PID: 233 Comm: arcecho Not tainted 4.4.0-00034-gc0ae784 #536
[   42.104751] Hardware name: Generic AM33XX (Flattened Device Tree)
[   42.111183] [&lt;c0017ec8&gt;] (unwind_backtrace) from [&lt;c00139d0&gt;] (show_stack+0x10/0x14)
[   42.119337] [&lt;c00139d0&gt;] (show_stack) from [&lt;c02a82c4&gt;] (dump_stack+0x8c/0x9c)
[   42.126937] [&lt;c02a82c4&gt;] (dump_stack) from [&lt;c0078260&gt;] (check_usage+0x4bc/0x63c)
[   42.134815] [&lt;c0078260&gt;] (check_usage) from [&lt;c0078438&gt;] (check_irq_usage+0x58/0xb0)
[   42.142964] [&lt;c0078438&gt;] (check_irq_usage) from [&lt;c007aaa0&gt;] (__lock_acquire+0x1524/0x20b0)
[   42.151740] [&lt;c007aaa0&gt;] (__lock_acquire) from [&lt;c007bed8&gt;] (lock_acquire+0x70/0x90)
[   42.159886] [&lt;c007bed8&gt;] (lock_acquire) from [&lt;c06f9140&gt;] (_raw_spin_lock_irqsave+0x40/0x54)
[   42.168768] [&lt;c06f9140&gt;] (_raw_spin_lock_irqsave) from [&lt;bf083bc8&gt;] (arcnet_send_packet+0x60/0x1c0 [arcnet])
[   42.179115] [&lt;bf083bc8&gt;] (arcnet_send_packet [arcnet]) from [&lt;c06b9380&gt;] (packet_direct_xmit+0x130/0x1c8)
[   42.189182] [&lt;c06b9380&gt;] (packet_direct_xmit) from [&lt;c06bc7e4&gt;] (packet_sendmsg+0x3b8/0x680)
[   42.198059] [&lt;c06bc7e4&gt;] (packet_sendmsg) from [&lt;c05fe8b0&gt;] (sock_sendmsg+0x14/0x24)
[   42.206199] [&lt;c05fe8b0&gt;] (sock_sendmsg) from [&lt;c05ffd68&gt;] (SyS_sendto+0xb8/0xe0)
[   42.213978] [&lt;c05ffd68&gt;] (SyS_sendto) from [&lt;c05ffda8&gt;] (SyS_send+0x18/0x20)
[   42.221388] [&lt;c05ffda8&gt;] (SyS_send) from [&lt;c000f780&gt;] (ret_fast_syscall+0x0/0x1c)

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

   ---
   v1 -&gt; v2: removed unneeded zero assignment of flags
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch prevents the arcnet driver from the following deadlock.

[   41.273910] ======================================================
[   41.280397] [ INFO: SOFTIRQ-safe -&gt; SOFTIRQ-unsafe lock order detected ]
[   41.287433] 4.4.0-00034-gc0ae784 #536 Not tainted
[   41.292366] ------------------------------------------------------
[   41.298863] arcecho/233 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
[   41.305628]  (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...}, at: [&lt;bf083bc8&gt;] arcnet_send_packet+0x60/0x1c0 [arcnet]
[   41.315199]
[   41.315199] and this task is already holding:
[   41.321324]  (_xmit_ARCNET#2){+.-...}, at: [&lt;c06b934c&gt;] packet_direct_xmit+0xfc/0x1c8
[   41.329593] which would create a new lock dependency:
[   41.334893]  (_xmit_ARCNET#2){+.-...} -&gt; (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...}
[   41.341801]
[   41.341801] but this new dependency connects a SOFTIRQ-irq-safe lock:
[   41.350108]  (_xmit_ARCNET#2){+.-...}
... which became SOFTIRQ-irq-safe at:
[   41.357539]   [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.362677]   [&lt;c063ab8c&gt;] dev_watchdog+0x5c/0x264
[   41.367723]   [&lt;c0094edc&gt;] call_timer_fn+0x6c/0xf4
[   41.372759]   [&lt;c00950b8&gt;] run_timer_softirq+0x154/0x210
[   41.378340]   [&lt;c0036b30&gt;] __do_softirq+0x144/0x298
[   41.383469]   [&lt;c0036fb4&gt;] irq_exit+0xcc/0x130
[   41.388138]   [&lt;c0085c50&gt;] __handle_domain_irq+0x60/0xb4
[   41.393728]   [&lt;c0014578&gt;] __irq_svc+0x58/0x78
[   41.398402]   [&lt;c0010274&gt;] arch_cpu_idle+0x24/0x3c
[   41.403443]   [&lt;c007127c&gt;] cpu_startup_entry+0x1f8/0x25c
[   41.409029]   [&lt;c09adc90&gt;] start_kernel+0x3c0/0x3cc
[   41.414170]
[   41.414170] to a SOFTIRQ-irq-unsafe lock:
[   41.419931]  (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...}
... which became SOFTIRQ-irq-unsafe at:
[   41.427996] ...  [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.433409]   [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.439646]   [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.445063]   [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   41.450661]   [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   41.455700]   [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   41.460649]   [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.465158]   [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.470207]
[   41.470207] other info that might help us debug this:
[   41.470207]
[   41.478627]  Possible interrupt unsafe locking scenario:
[   41.478627]
[   41.485763]        CPU0                    CPU1
[   41.490521]        ----                    ----
[   41.495279]   lock(&amp;(&amp;lp-&gt;lock)-&gt;rlock);
[   41.499414]                                local_irq_disable();
[   41.505636]                                lock(_xmit_ARCNET#2);
[   41.511967]                                lock(&amp;(&amp;lp-&gt;lock)-&gt;rlock);
[   41.518741]   &lt;Interrupt&gt;
[   41.521490]     lock(_xmit_ARCNET#2);
[   41.525356]
[   41.525356]  *** DEADLOCK ***
[   41.525356]
[   41.531587] 1 lock held by arcecho/233:
[   41.535617]  #0:  (_xmit_ARCNET#2){+.-...}, at: [&lt;c06b934c&gt;] packet_direct_xmit+0xfc/0x1c8
[   41.544355]
the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
[   41.552362] -&gt; (_xmit_ARCNET#2){+.-...} ops: 27 {
[   41.557357]    HARDIRQ-ON-W at:
[   41.560664]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.567445]                     [&lt;c063ba28&gt;] dev_deactivate_many+0x114/0x304
[   41.574866]                     [&lt;c063bc3c&gt;] dev_deactivate+0x24/0x38
[   41.581646]                     [&lt;c0630374&gt;] linkwatch_do_dev+0x40/0x74
[   41.588613]                     [&lt;c06305d8&gt;] __linkwatch_run_queue+0xec/0x140
[   41.596120]                     [&lt;c0630658&gt;] linkwatch_event+0x2c/0x34
[   41.602991]                     [&lt;c004af30&gt;] process_one_work+0x188/0x40c
[   41.610131]                     [&lt;c004b200&gt;] worker_thread+0x4c/0x480
[   41.616912]                     [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.623048]                     [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.629735]    IN-SOFTIRQ-W at:
[   41.633039]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.639820]                     [&lt;c063ab8c&gt;] dev_watchdog+0x5c/0x264
[   41.646508]                     [&lt;c0094edc&gt;] call_timer_fn+0x6c/0xf4
[   41.653190]                     [&lt;c00950b8&gt;] run_timer_softirq+0x154/0x210
[   41.660425]                     [&lt;c0036b30&gt;] __do_softirq+0x144/0x298
[   41.667201]                     [&lt;c0036fb4&gt;] irq_exit+0xcc/0x130
[   41.673518]                     [&lt;c0085c50&gt;] __handle_domain_irq+0x60/0xb4
[   41.680754]                     [&lt;c0014578&gt;] __irq_svc+0x58/0x78
[   41.687077]                     [&lt;c0010274&gt;] arch_cpu_idle+0x24/0x3c
[   41.693769]                     [&lt;c007127c&gt;] cpu_startup_entry+0x1f8/0x25c
[   41.701006]                     [&lt;c09adc90&gt;] start_kernel+0x3c0/0x3cc
[   41.707791]    INITIAL USE at:
[   41.711003]                    [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.717696]                    [&lt;c063ba28&gt;] dev_deactivate_many+0x114/0x304
[   41.725026]                    [&lt;c063bc3c&gt;] dev_deactivate+0x24/0x38
[   41.731718]                    [&lt;c0630374&gt;] linkwatch_do_dev+0x40/0x74
[   41.738593]                    [&lt;c06305d8&gt;] __linkwatch_run_queue+0xec/0x140
[   41.746011]                    [&lt;c0630658&gt;] linkwatch_event+0x2c/0x34
[   41.752789]                    [&lt;c004af30&gt;] process_one_work+0x188/0x40c
[   41.759847]                    [&lt;c004b200&gt;] worker_thread+0x4c/0x480
[   41.766541]                    [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.772596]                    [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.779198]  }
[   41.780945]  ... key      at: [&lt;c124d620&gt;] netdev_xmit_lock_key+0x38/0x1c8
[   41.788192]  ... acquired at:
[   41.791309]    [&lt;c007bed8&gt;] lock_acquire+0x70/0x90
[   41.796361]    [&lt;c06f9140&gt;] _raw_spin_lock_irqsave+0x40/0x54
[   41.802324]    [&lt;bf083bc8&gt;] arcnet_send_packet+0x60/0x1c0 [arcnet]
[   41.808844]    [&lt;c06b9380&gt;] packet_direct_xmit+0x130/0x1c8
[   41.814622]    [&lt;c06bc7e4&gt;] packet_sendmsg+0x3b8/0x680
[   41.820034]    [&lt;c05fe8b0&gt;] sock_sendmsg+0x14/0x24
[   41.825091]    [&lt;c05ffd68&gt;] SyS_sendto+0xb8/0xe0
[   41.829956]    [&lt;c05ffda8&gt;] SyS_send+0x18/0x20
[   41.834638]    [&lt;c000f780&gt;] ret_fast_syscall+0x0/0x1c
[   41.839954]
[   41.841514]
the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock:
[   41.850302] -&gt; (&amp;(&amp;lp-&gt;lock)-&gt;rlock){+.+...} ops: 5 {
[   41.855644]    HARDIRQ-ON-W at:
[   41.858945]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.865726]                     [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.873607]                     [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.880666]                     [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   41.887901]                     [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   41.894593]                     [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   41.901195]                     [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.907338]                     [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.914025]    SOFTIRQ-ON-W at:
[   41.917328]                     [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.924106]                     [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.931981]                     [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.939028]                     [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   41.946264]                     [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   41.952954]                     [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   41.959548]                     [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   41.965689]                     [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   41.972379]    INITIAL USE at:
[   41.975595]                    [&lt;c06f8fc8&gt;] _raw_spin_lock+0x30/0x40
[   41.982283]                    [&lt;bf083d54&gt;] arcnet_interrupt+0x2c/0x800 [arcnet]
[   41.990063]                    [&lt;c0089120&gt;] handle_nested_irq+0x8c/0xec
[   41.997027]                    [&lt;c03c1170&gt;] regmap_irq_thread+0x190/0x314
[   42.004172]                    [&lt;c0087244&gt;] irq_thread_fn+0x1c/0x34
[   42.010766]                    [&lt;c0087548&gt;] irq_thread+0x13c/0x1dc
[   42.017267]                    [&lt;c0050f10&gt;] kthread+0xe4/0xf8
[   42.023314]                    [&lt;c000f810&gt;] ret_from_fork+0x14/0x24
[   42.029903]  }
[   42.031648]  ... key      at: [&lt;bf0854cc&gt;] __key.42091+0x0/0xfffff0f8 [arcnet]
[   42.039255]  ... acquired at:
[   42.042372]    [&lt;c007bed8&gt;] lock_acquire+0x70/0x90
[   42.047413]    [&lt;c06f9140&gt;] _raw_spin_lock_irqsave+0x40/0x54
[   42.053364]    [&lt;bf083bc8&gt;] arcnet_send_packet+0x60/0x1c0 [arcnet]
[   42.059872]    [&lt;c06b9380&gt;] packet_direct_xmit+0x130/0x1c8
[   42.065634]    [&lt;c06bc7e4&gt;] packet_sendmsg+0x3b8/0x680
[   42.071030]    [&lt;c05fe8b0&gt;] sock_sendmsg+0x14/0x24
[   42.076069]    [&lt;c05ffd68&gt;] SyS_sendto+0xb8/0xe0
[   42.080926]    [&lt;c05ffda8&gt;] SyS_send+0x18/0x20
[   42.085601]    [&lt;c000f780&gt;] ret_fast_syscall+0x0/0x1c
[   42.090918]
[   42.092481]
[   42.092481] stack backtrace:
[   42.097065] CPU: 0 PID: 233 Comm: arcecho Not tainted 4.4.0-00034-gc0ae784 #536
[   42.104751] Hardware name: Generic AM33XX (Flattened Device Tree)
[   42.111183] [&lt;c0017ec8&gt;] (unwind_backtrace) from [&lt;c00139d0&gt;] (show_stack+0x10/0x14)
[   42.119337] [&lt;c00139d0&gt;] (show_stack) from [&lt;c02a82c4&gt;] (dump_stack+0x8c/0x9c)
[   42.126937] [&lt;c02a82c4&gt;] (dump_stack) from [&lt;c0078260&gt;] (check_usage+0x4bc/0x63c)
[   42.134815] [&lt;c0078260&gt;] (check_usage) from [&lt;c0078438&gt;] (check_irq_usage+0x58/0xb0)
[   42.142964] [&lt;c0078438&gt;] (check_irq_usage) from [&lt;c007aaa0&gt;] (__lock_acquire+0x1524/0x20b0)
[   42.151740] [&lt;c007aaa0&gt;] (__lock_acquire) from [&lt;c007bed8&gt;] (lock_acquire+0x70/0x90)
[   42.159886] [&lt;c007bed8&gt;] (lock_acquire) from [&lt;c06f9140&gt;] (_raw_spin_lock_irqsave+0x40/0x54)
[   42.168768] [&lt;c06f9140&gt;] (_raw_spin_lock_irqsave) from [&lt;bf083bc8&gt;] (arcnet_send_packet+0x60/0x1c0 [arcnet])
[   42.179115] [&lt;bf083bc8&gt;] (arcnet_send_packet [arcnet]) from [&lt;c06b9380&gt;] (packet_direct_xmit+0x130/0x1c8)
[   42.189182] [&lt;c06b9380&gt;] (packet_direct_xmit) from [&lt;c06bc7e4&gt;] (packet_sendmsg+0x3b8/0x680)
[   42.198059] [&lt;c06bc7e4&gt;] (packet_sendmsg) from [&lt;c05fe8b0&gt;] (sock_sendmsg+0x14/0x24)
[   42.206199] [&lt;c05fe8b0&gt;] (sock_sendmsg) from [&lt;c05ffd68&gt;] (SyS_sendto+0xb8/0xe0)
[   42.213978] [&lt;c05ffd68&gt;] (SyS_sendto) from [&lt;c05ffda8&gt;] (SyS_send+0x18/0x20)
[   42.221388] [&lt;c05ffda8&gt;] (SyS_send) from [&lt;c000f780&gt;] (ret_fast_syscall+0x0/0x1c)

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;

   ---
   v1 -&gt; v2: removed unneeded zero assignment of flags
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Annotate hardware config module parameters in drivers/net/arcnet/</title>
<updated>2017-04-20T11:02:32+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2017-04-04T15:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=06a5128a29b3d67fadff5d9593d79b815d8b34d8'/>
<id>06a5128a29b3d67fadff5d9593d79b815d8b34d8</id>
<content type='text'>
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify.  The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.

Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.

This patch annotates drivers in drivers/net/arcnet/.

Suggested-by: Alan Cox &lt;gnomes@lxorguk.ukuu.org.uk&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
cc: netdev@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify.  The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.

Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.

This patch annotates drivers in drivers/net/arcnet/.

Suggested-by: Alan Cox &lt;gnomes@lxorguk.ukuu.org.uk&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
cc: netdev@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/vsprintf.c: remove %Z support</title>
<updated>2017-02-28T02:43:47+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2017-02-27T22:30:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b5e0928f742cfa853b2411400a1b19fa379d758'/>
<id>5b5e0928f742cfa853b2411400a1b19fa379d758</id>
<content type='text'>
Now that %z is standartised in C99 there is no reason to support %Z.
Unlike %L it doesn't even make format strings smaller.

Use BUILD_BUG_ON in a couple ATM drivers.

In case anyone didn't notice lib/vsprintf.o is about half of SLUB which
is in my opinion is quite an achievement.  Hopefully this patch inspires
someone else to trim vsprintf.c more.

Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that %z is standartised in C99 there is no reason to support %Z.
Unlike %L it doesn't even make format strings smaller.

Use BUILD_BUG_ON in a couple ATM drivers.

In case anyone didn't notice lib/vsprintf.o is about half of SLUB which
is in my opinion is quite an achievement.  Hopefully this patch inspires
someone else to trim vsprintf.c more.

Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arcnet: com90xx: add __init attribute</title>
<updated>2016-04-20T00:17:45+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2016-04-18T14:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=553bc087caf052458dc9f92bc42710027740caa9'/>
<id>553bc087caf052458dc9f92bc42710027740caa9</id>
<content type='text'>
Add __init attribute on a function that is only called from other __init
functions and that is not inlined, at least with gcc version 4.8.4 on an
x86 machine with allyesconfig.  Currently, the function is put in the
.text.unlikely segment.  Declaring it as __init will cause it to be put in
the .init.text and to disappear after initialization.

The result of objdump -x on the function before the change is as follows:

0000000000000000 l     F .text.unlikely 00000000000000bf check_mirror

And after the change it is as follows:

0000000000000000 l     F .init.text	00000000000000ba check_mirror

Done with the help of Coccinelle.  The semantic patch checks for local
static non-init functions that are called from an __init function and are
not called from any other function.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Michael Grzeschik &lt;mgr@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add __init attribute on a function that is only called from other __init
functions and that is not inlined, at least with gcc version 4.8.4 on an
x86 machine with allyesconfig.  Currently, the function is put in the
.text.unlikely segment.  Declaring it as __init will cause it to be put in
the .init.text and to disappear after initialization.

The result of objdump -x on the function before the change is as follows:

0000000000000000 l     F .text.unlikely 00000000000000bf check_mirror

And after the change it is as follows:

0000000000000000 l     F .init.text	00000000000000ba check_mirror

Done with the help of Coccinelle.  The semantic patch checks for local
static non-init functions that are called from an __init function and are
not called from any other function.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Michael Grzeschik &lt;mgr@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arcnet/com20020: add LEDS_CLASS dependency</title>
<updated>2015-11-03T16:29:56+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-11-03T13:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=754107e34165373b3696620cef344227b10eaa99'/>
<id>754107e34165373b3696620cef344227b10eaa99</id>
<content type='text'>
The newly added led trigger support in the com20020-pci driver causes
build errors when CONFIG_LEDS_CLASS is disabled:

drivers/built-in.o: In function `com20020pci_probe':
(.text+0x185dc4): undefined reference to `devm_led_classdev_register'
(.text+0x185dd8): undefined reference to `devm_led_classdev_register'

This adds a Kconfig dependency to prevent the invalid configurations.
Other drivers appear to be split 50:50 between 'select' and 'depends on'
for this symbol, I picked 'depends on' as I could not find a common
policy and it generally causes fewer problems.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 8890624a4e8c ("arcnet: com20020-pci: add led trigger support")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The newly added led trigger support in the com20020-pci driver causes
build errors when CONFIG_LEDS_CLASS is disabled:

drivers/built-in.o: In function `com20020pci_probe':
(.text+0x185dc4): undefined reference to `devm_led_classdev_register'
(.text+0x185dd8): undefined reference to `devm_led_classdev_register'

This adds a Kconfig dependency to prevent the invalid configurations.
Other drivers appear to be split 50:50 between 'select' and 'depends on'
for this symbol, I picked 'depends on' as I could not find a common
policy and it generally causes fewer problems.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 8890624a4e8c ("arcnet: com20020-pci: add led trigger support")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arcnet: add netif_carrier_on/off for reconnect</title>
<updated>2015-10-26T08:10:56+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2015-09-16T08:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59fbcbc61e1f0fd9acdf3efb09faca0320049718'/>
<id>59fbcbc61e1f0fd9acdf3efb09faca0320049718</id>
<content type='text'>
The arcnet device has no interrupt to detect if the link has changed
from disconnected to connected. This patch adds an timer to toggle the
link detection. The timer will get retriggered as long as the
reconnection interrupts accure. If the recon interrupts hold off
for &gt;1s we define the connection stable again.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The arcnet device has no interrupt to detect if the link has changed
from disconnected to connected. This patch adds an timer to toggle the
link detection. The timer will get retriggered as long as the
reconnection interrupts accure. If the recon interrupts hold off
for &gt;1s we define the connection stable again.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
