<feed xmlns='http://www.w3.org/2005/Atom'>
<title>litmus-rt-imx6.git/drivers/net/ethernet/marvell, branch master</title>
<subtitle>LITMUS^RT and MC^2 V1 support for the i.MX6 processor family.</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/'/>
<entry>
<title>net: ethernet: remove unnecessary platform_set_drvdata()</title>
<updated>2014-04-16T13:00:58+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-05-27T19:01:12+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=02bc78392ad28562b0ce8f84a2cfd85f7b0b6890'/>
<id>02bc78392ad28562b0ce8f84a2cfd85f7b0b6890</id>
<content type='text'>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Roland Stigge &lt;stigge@antcom.de&gt;
Acked-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Reviewed-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Roland Stigge &lt;stigge@antcom.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 driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Roland Stigge &lt;stigge@antcom.de&gt;
Acked-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Reviewed-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Roland Stigge &lt;stigge@antcom.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: mv643xx_eth: fix orphaned statistics timer crash</title>
<updated>2013-11-04T12:31:00+00:00</updated>
<author>
<name>Sebastian Hesselbarth</name>
<email>sebastian.hesselbarth@gmail.com</email>
</author>
<published>2013-10-02T10:57:21+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=b24b4a82fc96f74d848275c8f1b33df66cbef061'/>
<id>b24b4a82fc96f74d848275c8f1b33df66cbef061</id>
<content type='text'>
[ Upstream commit f564412c935111c583b787bcc18157377b208e2e ]

The periodic statistics timer gets started at port _probe() time, but
is stopped on _stop() only. In a modular environment, this can cause
the timer to access already deallocated memory, if the module is unloaded
without starting the eth device. To fix this, we add the timer right
before the port is started, instead of at _probe() time.

Signed-off-by: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Acked-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit f564412c935111c583b787bcc18157377b208e2e ]

The periodic statistics timer gets started at port _probe() time, but
is stopped on _stop() only. In a modular environment, this can cause
the timer to access already deallocated memory, if the module is unloaded
without starting the eth device. To fix this, we add the timer right
before the port is started, instead of at _probe() time.

Signed-off-by: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Acked-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: mv643xx_eth: update statistics timer from timer context only</title>
<updated>2013-11-04T12:31:00+00:00</updated>
<author>
<name>Sebastian Hesselbarth</name>
<email>sebastian.hesselbarth@gmail.com</email>
</author>
<published>2013-10-02T10:57:20+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=85cd02136ded01747a7959567aa1626627f1877e'/>
<id>85cd02136ded01747a7959567aa1626627f1877e</id>
<content type='text'>
[ Upstream commit 041b4ddb84989f06ff1df0ca869b950f1ee3cb1c ]

Each port driver installs a periodic timer to update port statistics
by calling mib_counters_update. As mib_counters_update is also called
from non-timer context, we should not reschedule the timer there but
rather move it to timer-only context.

Signed-off-by: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Acked-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit 041b4ddb84989f06ff1df0ca869b950f1ee3cb1c ]

Each port driver installs a periodic timer to update port statistics
by calling mib_counters_update. As mib_counters_update is also called
from non-timer context, we should not reschedule the timer there but
rather move it to timer-only context.

Signed-off-by: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Acked-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: mvneta: properly disable HW PHY polling and ensure adjust_link() works</title>
<updated>2013-09-14T13:54:56+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2013-09-04T14:21:18+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=4c54b9db01842eb0f4eb54af6949b7606ea39e7a'/>
<id>4c54b9db01842eb0f4eb54af6949b7606ea39e7a</id>
<content type='text'>
[ Upstream commit 714086029116b6b0a34e67ba1dd2f0d1cf26770c ]

This commit fixes a long-standing bug that has been reported by many
users: on some Armada 370 platforms, only the network interface that
has been used in U-Boot to tftp the kernel works properly in
Linux. The other network interfaces can see a 'link up', but are
unable to transmit data. The reports were generally made on the Armada
370-based Mirabox, but have also been given on the Armada 370-RD
board.

The network MAC in the Armada 370/XP (supported by the mvneta driver
in Linux) has a functionality that allows it to continuously poll the
PHY and directly update the MAC configuration accordingly (speed,
duplex, etc.). The very first versions of the driver submitted for
review were using this hardware mechanism, but due to this, the driver
was not integrated with the kernel phylib. Following reviews, the
driver was changed to use the phylib, and therefore a software based
polling. In software based polling, Linux regularly talks to the PHY
over the MDIO bus, and sees if the link status has changed. If it's
the case then the adjust_link() callback of the driver is called to
update the MAC configuration accordingly.

However, it turns out that the adjust_link() callback was not
configuring the hardware in a completely correct way: while it was
setting the speed and duplex bits correctly, it wasn't telling the
hardware to actually take into account those bits rather than what the
hardware-based PHY polling mechanism has concluded. So, in fact the
adjust_link() callback was basically a no-op.

However, the network happened to be working because on the network
interfaces used by U-Boot for tftp on Armada 370 platforms because the
hardware PHY polling was enabled by the bootloader, and left enabled
by Linux. However, the second network interface not used for tftp (or
both network interfaces if the kernel is loaded from USB, NAND or SD
card) didn't had the hardware PHY polling enabled.

This patch fixes this situation by:

 (1) Making sure that the hardware PHY polling is disabled by clearing
     the MVNETA_PHY_POLLING_ENABLE bit in the MVNETA_UNIT_CONTROL
     register in the driver -&gt;probe() function.

 (2) Making sure that the duplex and speed selections made by the
     adjust_link() callback are taken into account by clearing the
     MVNETA_GMAC_AN_SPEED_EN and MVNETA_GMAC_AN_DUPLEX_EN bits in the
     MVNETA_GMAC_AUTONEG_CONFIG register.

This patch has been tested on Armada 370 Mirabox, and now both network
interfaces are usable after boot.

[ Problem introduced by commit c5aff18 ("net: mvneta: driver for
  Marvell Armada 370/XP network unit") ]

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Jochen De Smet &lt;jochen.armkernel@leahnim.org&gt;
Cc: Peter Sanford &lt;psanford@nearbuy.io&gt;
Cc: Ethan Tuttle &lt;ethan@ethantuttle.com&gt;
Cc: Chény Yves-Gael &lt;yves@cheny.fr&gt;
Cc: Ryan Press &lt;ryan@presslab.us&gt;
Cc: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Cc: vdonnefort@lacie.com
Cc: stable@vger.kernel.org
Acked-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Tested-by: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Tested-by: Yves-Gael Cheny &lt;yves@cheny.fr&gt;
Tested-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit 714086029116b6b0a34e67ba1dd2f0d1cf26770c ]

This commit fixes a long-standing bug that has been reported by many
users: on some Armada 370 platforms, only the network interface that
has been used in U-Boot to tftp the kernel works properly in
Linux. The other network interfaces can see a 'link up', but are
unable to transmit data. The reports were generally made on the Armada
370-based Mirabox, but have also been given on the Armada 370-RD
board.

The network MAC in the Armada 370/XP (supported by the mvneta driver
in Linux) has a functionality that allows it to continuously poll the
PHY and directly update the MAC configuration accordingly (speed,
duplex, etc.). The very first versions of the driver submitted for
review were using this hardware mechanism, but due to this, the driver
was not integrated with the kernel phylib. Following reviews, the
driver was changed to use the phylib, and therefore a software based
polling. In software based polling, Linux regularly talks to the PHY
over the MDIO bus, and sees if the link status has changed. If it's
the case then the adjust_link() callback of the driver is called to
update the MAC configuration accordingly.

However, it turns out that the adjust_link() callback was not
configuring the hardware in a completely correct way: while it was
setting the speed and duplex bits correctly, it wasn't telling the
hardware to actually take into account those bits rather than what the
hardware-based PHY polling mechanism has concluded. So, in fact the
adjust_link() callback was basically a no-op.

However, the network happened to be working because on the network
interfaces used by U-Boot for tftp on Armada 370 platforms because the
hardware PHY polling was enabled by the bootloader, and left enabled
by Linux. However, the second network interface not used for tftp (or
both network interfaces if the kernel is loaded from USB, NAND or SD
card) didn't had the hardware PHY polling enabled.

This patch fixes this situation by:

 (1) Making sure that the hardware PHY polling is disabled by clearing
     the MVNETA_PHY_POLLING_ENABLE bit in the MVNETA_UNIT_CONTROL
     register in the driver -&gt;probe() function.

 (2) Making sure that the duplex and speed selections made by the
     adjust_link() callback are taken into account by clearing the
     MVNETA_GMAC_AN_SPEED_EN and MVNETA_GMAC_AN_DUPLEX_EN bits in the
     MVNETA_GMAC_AUTONEG_CONFIG register.

This patch has been tested on Armada 370 Mirabox, and now both network
interfaces are usable after boot.

[ Problem introduced by commit c5aff18 ("net: mvneta: driver for
  Marvell Armada 370/XP network unit") ]

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Jochen De Smet &lt;jochen.armkernel@leahnim.org&gt;
Cc: Peter Sanford &lt;psanford@nearbuy.io&gt;
Cc: Ethan Tuttle &lt;ethan@ethantuttle.com&gt;
Cc: Chény Yves-Gael &lt;yves@cheny.fr&gt;
Cc: Ryan Press &lt;ryan@presslab.us&gt;
Cc: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Cc: vdonnefort@lacie.com
Cc: stable@vger.kernel.org
Acked-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Tested-by: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Tested-by: Yves-Gael Cheny &lt;yves@cheny.fr&gt;
Tested-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mv643xx_eth: Allocate receive queue initialized to zero</title>
<updated>2013-06-20T05:18:52+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2013-06-18T17:32:38+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=9fa8e980bb0a56e46ddd97731f83f608c39aa7a5'/>
<id>9fa8e980bb0a56e46ddd97731f83f608c39aa7a5</id>
<content type='text'>
Zero pointer in rx_skb is how respective rxq_deinit() finds out out that a skb
slot is unallocated. If rxq_refill() fails (e.g. on OOM condition), subsequent
teardown would result in an attempt to kfree() invalid pointers.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Cc: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Zero pointer in rx_skb is how respective rxq_deinit() finds out out that a skb
slot is unallocated. If rxq_refill() fails (e.g. on OOM condition), subsequent
teardown would result in an attempt to kfree() invalid pointers.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Cc: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pxa168_eth: Allocate receive queue initialized to zero</title>
<updated>2013-06-20T05:18:52+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2013-06-18T17:30:48+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=451bff2932a69e904f41a180145de1d2358bb8f5'/>
<id>451bff2932a69e904f41a180145de1d2358bb8f5</id>
<content type='text'>
Zero pointer in rx_skb or tx_skb is how respective *_deinit() functions find
out that a skb slot is unallocated. If *_init() functions unsuccessfully return
after the allocation (e.g. when subsequent dma_alloc_coherent() is not
successful), this would result in attempt to kfree() invalid pointers.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Cc: Kosta Zertsekel &lt;konszert@marvell.com&gt;
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Zero pointer in rx_skb or tx_skb is how respective *_deinit() functions find
out that a skb slot is unallocated. If *_init() functions unsuccessfully return
after the allocation (e.g. when subsequent dma_alloc_coherent() is not
successful), this would result in attempt to kfree() invalid pointers.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Cc: Kosta Zertsekel &lt;konszert@marvell.com&gt;
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NET: mv643xx_eth: avoid lockdep dump on interface down</title>
<updated>2013-05-16T21:56:21+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2013-05-16T06:31:42+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=3aefe2b4a8003517d6e15112f806fd4069785389'/>
<id>3aefe2b4a8003517d6e15112f806fd4069785389</id>
<content type='text'>
When the interface is shutdown, the mv643xx_eth driver hits the following
lockdep dump:

=================================
[ INFO: inconsistent lock state ]
3.8.0+ #303 Not tainted
---------------------------------
inconsistent {IN-SOFTIRQ-W} -&gt; {SOFTIRQ-ON-W} usage.
NetworkManager/3449 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (_xmit_ETHER#2){+.?...}, at: [&lt;c02828e4&gt;] txq_reclaim+0x60/0x230
{IN-SOFTIRQ-W} state was registered at:
  [&lt;c007e93c&gt;] mark_irqflags+0xf8/0x1c4
  [&lt;c007ee60&gt;] __lock_acquire+0x458/0x9a4
  [&lt;c007f8b0&gt;] lock_acquire+0x60/0x74
  [&lt;c03ea914&gt;] _raw_spin_lock+0x40/0x50
  [&lt;c0334040&gt;] sch_direct_xmit+0xa4/0x2e4
  [&lt;c0320880&gt;] dev_queue_xmit+0x174/0x508
  [&lt;c03953b0&gt;] ip6_finish_output2+0xd0/0x3c4
  [&lt;c03b15bc&gt;] mld_sendpack+0x190/0x368
  [&lt;c03b3204&gt;] mld_ifc_timer_expire+0xc/0x58
  [&lt;c005133c&gt;] call_timer_fn+0x6c/0xe0
  [&lt;c0051588&gt;] run_timer_softirq+0x1d8/0x210
  [&lt;c004c004&gt;] __do_softirq+0xe0/0x1b4
  [&lt;c004c448&gt;] irq_exit+0x64/0x6c
  [&lt;c000f1e0&gt;] handle_IRQ+0x34/0x84
  [&lt;c000e0d0&gt;] __irq_usr+0x30/0x80
irq event stamp: 160603
hardirqs last  enabled at (160603): [&lt;c00c736c&gt;] kfree+0xa8/0xe8
hardirqs last disabled at (160602): [&lt;c00c72e0&gt;] kfree+0x1c/0xe8
softirqs last  enabled at (160304): [&lt;c028260c&gt;] mib_counters_update+0x5ec/0x60c
softirqs last disabled at (160302): [&lt;c03eab8c&gt;] _raw_spin_lock_bh+0x14/0x54

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

       CPU0
       ----
  lock(_xmit_ETHER#2);
  &lt;Interrupt&gt;
    lock(_xmit_ETHER#2);

 *** DEADLOCK ***

1 lock held by NetworkManager/3449:
 #0:  (rtnl_mutex){+.+.+.}, at: [&lt;c032e664&gt;] rtnetlink_rcv+0xc/0x24

stack backtrace:
[&lt;c0013e34&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;c007e12c&gt;] (print_usage_bug+0x150/0x1d4)
[&lt;c007e12c&gt;] (print_usage_bug+0x150/0x1d4) from [&lt;c007e3f8&gt;] (mark_lock_irq+0x248/0x290)
[&lt;c007e3f8&gt;] (mark_lock_irq+0x248/0x290) from [&lt;c007e598&gt;] (mark_lock+0x158/0x404)
[&lt;c007e598&gt;] (mark_lock+0x158/0x404) from [&lt;c007e97c&gt;] (mark_irqflags+0x138/0x1c4)
[&lt;c007e97c&gt;] (mark_irqflags+0x138/0x1c4) from [&lt;c007ee60&gt;] (__lock_acquire+0x458/0x9a4)
[&lt;c007ee60&gt;] (__lock_acquire+0x458/0x9a4) from [&lt;c007f8b0&gt;] (lock_acquire+0x60/0x74)
[&lt;c007f8b0&gt;] (lock_acquire+0x60/0x74) from [&lt;c03ea914&gt;] (_raw_spin_lock+0x40/0x50)
[&lt;c03ea914&gt;] (_raw_spin_lock+0x40/0x50) from [&lt;c02828e4&gt;] (txq_reclaim+0x60/0x230)
[&lt;c02828e4&gt;] (txq_reclaim+0x60/0x230) from [&lt;c0282ad8&gt;] (txq_deinit+0x24/0xcc)
[&lt;c0282ad8&gt;] (txq_deinit+0x24/0xcc) from [&lt;c0282d28&gt;] (mv643xx_eth_stop+0x1a8/0x1bc)
[&lt;c0282d28&gt;] (mv643xx_eth_stop+0x1a8/0x1bc) from [&lt;c031e314&gt;] (__dev_close_many+0x88/0xcc)
[&lt;c031e314&gt;] (__dev_close_many+0x88/0xcc) from [&lt;c031e380&gt;] (__dev_close+0x28/0x3c)
[&lt;c031e380&gt;] (__dev_close+0x28/0x3c) from [&lt;c0320fa0&gt;] (__dev_change_flags+0x7c/0x134)
[&lt;c0320fa0&gt;] (__dev_change_flags+0x7c/0x134) from [&lt;c03210e0&gt;] (dev_change_flags+0x10/0x48)
[&lt;c03210e0&gt;] (dev_change_flags+0x10/0x48) from [&lt;c032da1c&gt;] (do_setlink+0x1a0/0x730)
[&lt;c032da1c&gt;] (do_setlink+0x1a0/0x730) from [&lt;c032f524&gt;] (rtnl_newlink+0x304/0x4b0)
[&lt;c032f524&gt;] (rtnl_newlink+0x304/0x4b0) from [&lt;c032ef8c&gt;] (rtnetlink_rcv_msg+0x25c/0x2a0)
[&lt;c032ef8c&gt;] (rtnetlink_rcv_msg+0x25c/0x2a0) from [&lt;c03383a0&gt;] (netlink_rcv_skb+0xbc/0xd8)
[&lt;c03383a0&gt;] (netlink_rcv_skb+0xbc/0xd8) from [&lt;c032e674&gt;] (rtnetlink_rcv+0x1c/0x24)
[&lt;c032e674&gt;] (rtnetlink_rcv+0x1c/0x24) from [&lt;c03361d8&gt;] (netlink_unicast_kernel+0x88/0xd4)
[&lt;c03361d8&gt;] (netlink_unicast_kernel+0x88/0xd4) from [&lt;c0337dd0&gt;] (netlink_unicast+0x138/0x180)
[&lt;c0337dd0&gt;] (netlink_unicast+0x138/0x180) from [&lt;c0338020&gt;] (netlink_sendmsg+0x208/0x32c)
[&lt;c0338020&gt;] (netlink_sendmsg+0x208/0x32c) from [&lt;c030ab48&gt;] (sock_sendmsg+0x84/0xa4)
[&lt;c030ab48&gt;] (sock_sendmsg+0x84/0xa4) from [&lt;c030aef4&gt;] (__sys_sendmsg+0x2ac/0x2c4)
[&lt;c030aef4&gt;] (__sys_sendmsg+0x2ac/0x2c4) from [&lt;c030c8ec&gt;] (sys_sendmsg+0x3c/0x68)
[&lt;c030c8ec&gt;] (sys_sendmsg+0x3c/0x68) from [&lt;c000e2e0&gt;] (ret_fast_syscall+0x0/0x3c)

It seems that txq_reclaim() takes the netif tx lock:

        __netif_tx_lock(nq, smp_processor_id());

in a context outside of softirq context, and thus is susceptible to
deadlock should an interrupt occur.

Use __netif_tx_lock_bh()/__netif_tx_unlock_bh() instead.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&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>
When the interface is shutdown, the mv643xx_eth driver hits the following
lockdep dump:

=================================
[ INFO: inconsistent lock state ]
3.8.0+ #303 Not tainted
---------------------------------
inconsistent {IN-SOFTIRQ-W} -&gt; {SOFTIRQ-ON-W} usage.
NetworkManager/3449 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (_xmit_ETHER#2){+.?...}, at: [&lt;c02828e4&gt;] txq_reclaim+0x60/0x230
{IN-SOFTIRQ-W} state was registered at:
  [&lt;c007e93c&gt;] mark_irqflags+0xf8/0x1c4
  [&lt;c007ee60&gt;] __lock_acquire+0x458/0x9a4
  [&lt;c007f8b0&gt;] lock_acquire+0x60/0x74
  [&lt;c03ea914&gt;] _raw_spin_lock+0x40/0x50
  [&lt;c0334040&gt;] sch_direct_xmit+0xa4/0x2e4
  [&lt;c0320880&gt;] dev_queue_xmit+0x174/0x508
  [&lt;c03953b0&gt;] ip6_finish_output2+0xd0/0x3c4
  [&lt;c03b15bc&gt;] mld_sendpack+0x190/0x368
  [&lt;c03b3204&gt;] mld_ifc_timer_expire+0xc/0x58
  [&lt;c005133c&gt;] call_timer_fn+0x6c/0xe0
  [&lt;c0051588&gt;] run_timer_softirq+0x1d8/0x210
  [&lt;c004c004&gt;] __do_softirq+0xe0/0x1b4
  [&lt;c004c448&gt;] irq_exit+0x64/0x6c
  [&lt;c000f1e0&gt;] handle_IRQ+0x34/0x84
  [&lt;c000e0d0&gt;] __irq_usr+0x30/0x80
irq event stamp: 160603
hardirqs last  enabled at (160603): [&lt;c00c736c&gt;] kfree+0xa8/0xe8
hardirqs last disabled at (160602): [&lt;c00c72e0&gt;] kfree+0x1c/0xe8
softirqs last  enabled at (160304): [&lt;c028260c&gt;] mib_counters_update+0x5ec/0x60c
softirqs last disabled at (160302): [&lt;c03eab8c&gt;] _raw_spin_lock_bh+0x14/0x54

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

       CPU0
       ----
  lock(_xmit_ETHER#2);
  &lt;Interrupt&gt;
    lock(_xmit_ETHER#2);

 *** DEADLOCK ***

1 lock held by NetworkManager/3449:
 #0:  (rtnl_mutex){+.+.+.}, at: [&lt;c032e664&gt;] rtnetlink_rcv+0xc/0x24

stack backtrace:
[&lt;c0013e34&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;c007e12c&gt;] (print_usage_bug+0x150/0x1d4)
[&lt;c007e12c&gt;] (print_usage_bug+0x150/0x1d4) from [&lt;c007e3f8&gt;] (mark_lock_irq+0x248/0x290)
[&lt;c007e3f8&gt;] (mark_lock_irq+0x248/0x290) from [&lt;c007e598&gt;] (mark_lock+0x158/0x404)
[&lt;c007e598&gt;] (mark_lock+0x158/0x404) from [&lt;c007e97c&gt;] (mark_irqflags+0x138/0x1c4)
[&lt;c007e97c&gt;] (mark_irqflags+0x138/0x1c4) from [&lt;c007ee60&gt;] (__lock_acquire+0x458/0x9a4)
[&lt;c007ee60&gt;] (__lock_acquire+0x458/0x9a4) from [&lt;c007f8b0&gt;] (lock_acquire+0x60/0x74)
[&lt;c007f8b0&gt;] (lock_acquire+0x60/0x74) from [&lt;c03ea914&gt;] (_raw_spin_lock+0x40/0x50)
[&lt;c03ea914&gt;] (_raw_spin_lock+0x40/0x50) from [&lt;c02828e4&gt;] (txq_reclaim+0x60/0x230)
[&lt;c02828e4&gt;] (txq_reclaim+0x60/0x230) from [&lt;c0282ad8&gt;] (txq_deinit+0x24/0xcc)
[&lt;c0282ad8&gt;] (txq_deinit+0x24/0xcc) from [&lt;c0282d28&gt;] (mv643xx_eth_stop+0x1a8/0x1bc)
[&lt;c0282d28&gt;] (mv643xx_eth_stop+0x1a8/0x1bc) from [&lt;c031e314&gt;] (__dev_close_many+0x88/0xcc)
[&lt;c031e314&gt;] (__dev_close_many+0x88/0xcc) from [&lt;c031e380&gt;] (__dev_close+0x28/0x3c)
[&lt;c031e380&gt;] (__dev_close+0x28/0x3c) from [&lt;c0320fa0&gt;] (__dev_change_flags+0x7c/0x134)
[&lt;c0320fa0&gt;] (__dev_change_flags+0x7c/0x134) from [&lt;c03210e0&gt;] (dev_change_flags+0x10/0x48)
[&lt;c03210e0&gt;] (dev_change_flags+0x10/0x48) from [&lt;c032da1c&gt;] (do_setlink+0x1a0/0x730)
[&lt;c032da1c&gt;] (do_setlink+0x1a0/0x730) from [&lt;c032f524&gt;] (rtnl_newlink+0x304/0x4b0)
[&lt;c032f524&gt;] (rtnl_newlink+0x304/0x4b0) from [&lt;c032ef8c&gt;] (rtnetlink_rcv_msg+0x25c/0x2a0)
[&lt;c032ef8c&gt;] (rtnetlink_rcv_msg+0x25c/0x2a0) from [&lt;c03383a0&gt;] (netlink_rcv_skb+0xbc/0xd8)
[&lt;c03383a0&gt;] (netlink_rcv_skb+0xbc/0xd8) from [&lt;c032e674&gt;] (rtnetlink_rcv+0x1c/0x24)
[&lt;c032e674&gt;] (rtnetlink_rcv+0x1c/0x24) from [&lt;c03361d8&gt;] (netlink_unicast_kernel+0x88/0xd4)
[&lt;c03361d8&gt;] (netlink_unicast_kernel+0x88/0xd4) from [&lt;c0337dd0&gt;] (netlink_unicast+0x138/0x180)
[&lt;c0337dd0&gt;] (netlink_unicast+0x138/0x180) from [&lt;c0338020&gt;] (netlink_sendmsg+0x208/0x32c)
[&lt;c0338020&gt;] (netlink_sendmsg+0x208/0x32c) from [&lt;c030ab48&gt;] (sock_sendmsg+0x84/0xa4)
[&lt;c030ab48&gt;] (sock_sendmsg+0x84/0xa4) from [&lt;c030aef4&gt;] (__sys_sendmsg+0x2ac/0x2c4)
[&lt;c030aef4&gt;] (__sys_sendmsg+0x2ac/0x2c4) from [&lt;c030c8ec&gt;] (sys_sendmsg+0x3c/0x68)
[&lt;c030c8ec&gt;] (sys_sendmsg+0x3c/0x68) from [&lt;c000e2e0&gt;] (ret_fast_syscall+0x0/0x3c)

It seems that txq_reclaim() takes the netif tx lock:

        __netif_tx_lock(nq, smp_processor_id());

in a context outside of softirq context, and thus is susceptible to
deadlock should an interrupt occur.

Use __netif_tx_lock_bh()/__netif_tx_unlock_bh() instead.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mv643xx_eth: fix NAPI weight being &gt; 64</title>
<updated>2013-05-14T18:32:05+00:00</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2013-05-13T23:54:20+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=a3659aa09a2ee7e0028349b9100d8b4a7750a4be'/>
<id>a3659aa09a2ee7e0028349b9100d8b4a7750a4be</id>
<content type='text'>
3.10-rc1 issues the following warning:

netif_napi_add() called with weight 128 on device eth%d

This patch reduce the weight to 64, using NAPI_POLL_WEIGHT.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&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>
3.10-rc1 issues the following warning:

netif_napi_add() called with weight 128 on device eth%d

This patch reduce the weight to 64, using NAPI_POLL_WEIGHT.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sky2: Fix crash on receiving VLAN frames</title>
<updated>2013-05-03T20:10:34+00:00</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2013-05-03T04:22:04+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=88dccf5b344163645d694d74cffc5a7e64a385bb'/>
<id>88dccf5b344163645d694d74cffc5a7e64a385bb</id>
<content type='text'>
After recent 86a9bad3 (net: vlan: add protocol argument to packet
tagging functions) my sky2 started to crash on receive of tagged
frames, with backtrace similar to

    #CRASH!!!
    vlan_do_receive
    __netif_receive_skb_core
    __netif_receive_skb
    netif_receive_skb
    sky2_poll
    ...
    __net_rx_action
    __do_softirq

The problem turned out to be:

    1) sky2 copies small packets from ring on RX, and in its
       receive_copy() skb header is copied manually field, by field, and
       only for some fields;

    2) 86a9bad3  added skb-&gt;vlan_proto, which vlan_untag() or
       __vlan_hwaccel_put_tag() set, and which is later used in
       vlan_do_receive().

       That patch updated copy_skb_header() for newly introduced
       skb-&gt;vlan_proto, but overlooked the need to also copy it in sky2's
       receive_copy().

Because of 2, we have the following scenario:

    - frame is received and tagged in a ring, by sky2_rx_tag(). Both
      skb-&gt;vlan_proto and skb-&gt;vlan_tci are set;

    - later skb is decided to be copied, but skb-&gt;vlan_proto is
      forgotten and becomes 0.

    - in the beginning of vlan_do_receive() we call

        __be16 vlan_proto = skb-&gt;vlan_proto;
        vlan_dev = vlan_find_dev(skb-&gt;dev, vlan_proto, vlan_id);

      which eventually invokes

        vlan_proto_idx(vlan_proto)

      and that routine BUGs for everything except ETH_P_8021Q and
      ETH_P_8021AD.

      Oops.

Fix it.

P.S.

Stephen, I wonder, why copy_skb_header() is not used in
sky2.c::receive_copy() ? Problems, where receive_copy was updated field
by field showed several times already, e.g.

    3f42941b    (sky2: propogate rx hash when packet is copied)
    e072b3fa    (sky2: fix receive length error in mixed non-VLAN/VLAN traffic)

Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: Mirko Lindner &lt;mlindner@marvell.com&gt;
Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by: Stephen Hemminger &lt;stephen@networkplumber.org&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>
After recent 86a9bad3 (net: vlan: add protocol argument to packet
tagging functions) my sky2 started to crash on receive of tagged
frames, with backtrace similar to

    #CRASH!!!
    vlan_do_receive
    __netif_receive_skb_core
    __netif_receive_skb
    netif_receive_skb
    sky2_poll
    ...
    __net_rx_action
    __do_softirq

The problem turned out to be:

    1) sky2 copies small packets from ring on RX, and in its
       receive_copy() skb header is copied manually field, by field, and
       only for some fields;

    2) 86a9bad3  added skb-&gt;vlan_proto, which vlan_untag() or
       __vlan_hwaccel_put_tag() set, and which is later used in
       vlan_do_receive().

       That patch updated copy_skb_header() for newly introduced
       skb-&gt;vlan_proto, but overlooked the need to also copy it in sky2's
       receive_copy().

Because of 2, we have the following scenario:

    - frame is received and tagged in a ring, by sky2_rx_tag(). Both
      skb-&gt;vlan_proto and skb-&gt;vlan_tci are set;

    - later skb is decided to be copied, but skb-&gt;vlan_proto is
      forgotten and becomes 0.

    - in the beginning of vlan_do_receive() we call

        __be16 vlan_proto = skb-&gt;vlan_proto;
        vlan_dev = vlan_find_dev(skb-&gt;dev, vlan_proto, vlan_id);

      which eventually invokes

        vlan_proto_idx(vlan_proto)

      and that routine BUGs for everything except ETH_P_8021Q and
      ETH_P_8021AD.

      Oops.

Fix it.

P.S.

Stephen, I wonder, why copy_skb_header() is not used in
sky2.c::receive_copy() ? Problems, where receive_copy was updated field
by field showed several times already, e.g.

    3f42941b    (sky2: propogate rx hash when packet is copied)
    e072b3fa    (sky2: fix receive length error in mixed non-VLAN/VLAN traffic)

Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: Mirko Lindner &lt;mlindner@marvell.com&gt;
Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2013-04-23T00:32:51+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2013-04-23T00:32:51+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt-imx6.git/commit/?id=6e0895c2ea326cc4bb11e8fa2f654628d5754c31'/>
<id>6e0895c2ea326cc4bb11e8fa2f654628d5754c31</id>
<content type='text'>
Conflicts:
	drivers/net/ethernet/emulex/benet/be_main.c
	drivers/net/ethernet/intel/igb/igb_main.c
	drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
	include/net/scm.h
	net/batman-adv/routing.c
	net/ipv4/tcp_input.c

The e{uid,gid} --&gt; {uid,gid} credentials fix conflicted with the
cleanup in net-next to now pass cred structs around.

The be2net driver had a bug fix in 'net' that overlapped with the VLAN
interface changes by Patrick McHardy in net-next.

An IGB conflict existed because in 'net' the build_skb() support was
reverted, and in 'net-next' there was a comment style fix within that
code.

Several batman-adv conflicts were resolved by making sure that all
calls to batadv_is_my_mac() are changed to have a new bat_priv first
argument.

Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO
rewrite in 'net-next', mostly overlapping changes.

Thanks to Stephen Rothwell and Antonio Quartulli for help with several
of these merge resolutions.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/ethernet/emulex/benet/be_main.c
	drivers/net/ethernet/intel/igb/igb_main.c
	drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
	include/net/scm.h
	net/batman-adv/routing.c
	net/ipv4/tcp_input.c

The e{uid,gid} --&gt; {uid,gid} credentials fix conflicted with the
cleanup in net-next to now pass cred structs around.

The be2net driver had a bug fix in 'net' that overlapped with the VLAN
interface changes by Patrick McHardy in net-next.

An IGB conflict existed because in 'net' the build_skb() support was
reverted, and in 'net-next' there was a comment style fix within that
code.

Several batman-adv conflicts were resolved by making sure that all
calls to batadv_is_my_mac() are changed to have a new bat_priv first
argument.

Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO
rewrite in 'net-next', mostly overlapping changes.

Thanks to Stephen Rothwell and Antonio Quartulli for help with several
of these merge resolutions.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
