<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/net, branch v3.16.58</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.58</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.58'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-06-16T21:22:50Z</updated>
<entry>
<title>net/mlx4_en: Fix mixed PFC and Global pause user control requests</title>
<updated>2018-06-16T21:22:50Z</updated>
<author>
<name>Eran Ben Elisha</name>
<email>eranbe@mellanox.com</email>
</author>
<published>2018-03-27T11:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5f480591cb6a705b8eef7eca60d39e64e1d5d9e8'/>
<id>urn:sha1:5f480591cb6a705b8eef7eca60d39e64e1d5d9e8</id>
<content type='text'>
commit 6e8814ceb7e8f468659ef9253bd212c07ae19584 upstream.

Global pause and PFC configuration should be mutually exclusive (i.e. only
one of them at most can be set). However, once PFC was turned off,
driver automatically turned Global pause on. This is a bug.

Fix the driver behaviour to turn off PFC/Global once the user turned the
other on.

This also fixed a weird behaviour that at a current time, the profile
had both PFC and global pause configuration turned on, which is
Hardware-wise impossible and caused returning false positive indication
to query tools.

In addition, fix error code when setting global pause or PFC to change
metadata only upon successful change.

Also, removed useless debug print.

Fixes: af7d51852631 ("net/mlx4_en: Add DCB PFC support through CEE netlink commands")
Fixes: c27a02cd94d6 ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC")
Signed-off-by: Eran Ben Elisha &lt;eranbe@mellanox.com&gt;
Signed-off-by: Tariq Toukan &lt;tariqt@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 3.16:
 - Drop changes to mlx4_en_dcbnl_set_all()
 - Don't call mlx4_en_update_pfc_stats_bitmap()]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam()</title>
<updated>2018-06-16T21:22:50Z</updated>
<author>
<name>Ivan Vecera</name>
<email>ivecera@redhat.com</email>
</author>
<published>2014-09-08T16:46:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8340856ac8f1c87ed088f55d125141f6f95d6a20'/>
<id>urn:sha1:8340856ac8f1c87ed088f55d125141f6f95d6a20</id>
<content type='text'>
commit 278d436a476f69fc95d5c82bf61b6c2d02f4d44e upstream.

The driver does not support pause autonegotiation so it should return
-EINVAL when the function is called with non-zero autoneg.

Cc: Amir Vadai &lt;amirv@mellanox.com&gt;
Signed-off-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bonding: process the err returned by dev_set_allmulti properly in bond_enslave</title>
<updated>2018-06-16T21:22:49Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-03-25T17:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6d05470a0ef1cebb630c64ce073a20a741616ded'/>
<id>urn:sha1:6d05470a0ef1cebb630c64ce073a20a741616ded</id>
<content type='text'>
commit 9f5a90c107741b864398f4ac0014711a8c1d8474 upstream.

When dev_set_promiscuity(1) succeeds but dev_set_allmulti(1) fails,
dev_set_promiscuity(-1) should be done before going to the err path.
Otherwise, dev-&gt;promiscuity will leak.

Fixes: 7e1a1ac1fbaa ("bonding: Check return of dev_set_promiscuity/allmulti")
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave</title>
<updated>2018-06-16T21:22:49Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-03-25T17:16:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d75d599c634e68f08618d2f4e9c2c13e25c86d71'/>
<id>urn:sha1:d75d599c634e68f08618d2f4e9c2c13e25c86d71</id>
<content type='text'>
commit ae42cc62a9f07f1f6979054ed92606b9c30f4a2e upstream.

Beniamino found a crash when adding vlan as slave of bond which is also
the parent link:

  ip link add bond1 type bond
  ip link set bond1 up
  ip link add link bond1 vlan1 type vlan id 80
  ip link set vlan1 master bond1

The call trace is as below:

  [&lt;ffffffffa850842a&gt;] queued_spin_lock_slowpath+0xb/0xf
  [&lt;ffffffffa8515680&gt;] _raw_spin_lock+0x20/0x30
  [&lt;ffffffffa83f6f07&gt;] dev_mc_sync+0x37/0x80
  [&lt;ffffffffc08687dc&gt;] vlan_dev_set_rx_mode+0x1c/0x30 [8021q]
  [&lt;ffffffffa83efd2a&gt;] __dev_set_rx_mode+0x5a/0xa0
  [&lt;ffffffffa83f7138&gt;] dev_mc_sync_multiple+0x78/0x80
  [&lt;ffffffffc084127c&gt;] bond_enslave+0x67c/0x1190 [bonding]
  [&lt;ffffffffa8401909&gt;] do_setlink+0x9c9/0xe50
  [&lt;ffffffffa8403bf2&gt;] rtnl_newlink+0x522/0x880
  [&lt;ffffffffa8403ff7&gt;] rtnetlink_rcv_msg+0xa7/0x260
  [&lt;ffffffffa8424ecb&gt;] netlink_rcv_skb+0xab/0xc0
  [&lt;ffffffffa83fe498&gt;] rtnetlink_rcv+0x28/0x30
  [&lt;ffffffffa8424850&gt;] netlink_unicast+0x170/0x210
  [&lt;ffffffffa8424bf8&gt;] netlink_sendmsg+0x308/0x420
  [&lt;ffffffffa83cc396&gt;] sock_sendmsg+0xb6/0xf0

This is actually a dead lock caused by sync slave hwaddr from master when
the master is the slave's 'slave'. This dead loop check is actually done
by netdev_master_upper_dev_link. However, Commit 1f718f0f4f97 ("bonding:
populate neighbour's private on enslave") moved it after dev_mc_sync.

This patch is to fix it by moving dev_mc_sync after master_upper_dev_link,
so that this loop check would be earlier than dev_mc_sync. It also moves
if (mode == BOND_MODE_8023AD) into if (!bond_uses_primary) clause as an
improvement.

Note team driver also has this issue, I will fix it in another patch.

Fixes: 1f718f0f4f97 ("bonding: populate neighbour's private on enslave")
Reported-by: Beniamino Galvani &lt;bgalvani@redhat.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>bonding: fix the err path for dev hwaddr sync in bond_enslave</title>
<updated>2018-06-16T21:22:49Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-03-25T17:16:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e370a644c520cddfadc201c0d55c18e9c48cdce7'/>
<id>urn:sha1:e370a644c520cddfadc201c0d55c18e9c48cdce7</id>
<content type='text'>
commit 5c78f6bfae2b10ff70e21d343e64584ea6280c26 upstream.

vlan_vids_add_by_dev is called right after dev hwaddr sync, so on
the err path it should unsync dev hwaddr. Otherwise, the slave
dev's hwaddr will never be unsync when this err happens.

Fixes: 1ff412ad7714 ("bonding: change the bond's vlan syncing functions with the standard ones")
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Reviewed-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Acked-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>can: cc770: Fix use after free in cc770_tx_interrupt()</title>
<updated>2018-06-16T21:22:44Z</updated>
<author>
<name>Andri Yngvason</name>
<email>andri.yngvason@marel.com</email>
</author>
<published>2018-03-15T18:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8430e3426659e969f70a3066c816ba7122e47ac4'/>
<id>urn:sha1:8430e3426659e969f70a3066c816ba7122e47ac4</id>
<content type='text'>
commit 9ffd7503944ec7c0ef41c3245d1306c221aef2be upstream.

This fixes use after free introduced by the last cc770 patch.

Signed-off-by: Andri Yngvason &lt;andri.yngvason@marel.com&gt;
Fixes: 746201235b3f ("can: cc770: Fix queue stall &amp; dropped RTR reply")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: systemport: Rewrite __bcm_sysport_tx_reclaim()</title>
<updated>2018-06-16T21:22:42Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2018-03-13T21:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4381ed5081c8931f3d41f11bbe6294fab60beccb'/>
<id>urn:sha1:4381ed5081c8931f3d41f11bbe6294fab60beccb</id>
<content type='text'>
commit 484d802d0f2f29c335563fcac2a8facf174a1bbc upstream.

There is no need for complex checking between the last consumed index
and current consumed index, a simple subtraction will do.

This also eliminates the possibility of a permanent transmit queue stall
under the following conditions:

- one CPU bursts ring-&gt;size worth of traffic (up to 256 buffers), to the
  point where we run out of free descriptors, so we stop the transmit
  queue at the end of bcm_sysport_xmit()

- because of our locking, we have the transmit process disable
  interrupts which means we can be blocking the TX reclamation process

- when TX reclamation finally runs, we will be computing the difference
  between ring-&gt;c_index (last consumed index by SW) and what the HW
  reports through its register

- this register is masked with (ring-&gt;size - 1) = 0xff, which will lead
  to stripping the upper bits of the index (register is 16-bits wide)

- we will be computing last_tx_cn as 0, which means there is no work to
  be done, and we never wake-up the transmit queue, leaving it
  permanently disabled

A practical example is e.g: ring-&gt;c_index aka last_c_index = 12, we
pushed 256 entries, HW consumer index = 268, we mask it with 0xff = 12,
so last_tx_cn == 0, nothing happens.

Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>can: cc770: Fix queue stall &amp; dropped RTR reply</title>
<updated>2018-06-16T21:22:38Z</updated>
<author>
<name>Andri Yngvason</name>
<email>andri.yngvason@marel.com</email>
</author>
<published>2018-03-14T11:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c6980bbfdebb3b6635cffb37584400e761044d33'/>
<id>urn:sha1:c6980bbfdebb3b6635cffb37584400e761044d33</id>
<content type='text'>
commit 746201235b3f876792099079f4c6fea941d76183 upstream.

While waiting for the TX object to send an RTR, an external message with a
matching id can overwrite the TX data. In this case we must call the rx
routine and then try transmitting the message that was overwritten again.

The queue was being stalled because the RX event did not generate an
interrupt to wake up the queue again and the TX event did not happen
because the TXRQST flag is reset by the chip when new data is received.

According to the CC770 datasheet the id of a message object should not be
changed while the MSGVAL bit is set. This has been fixed by resetting the
MSGVAL bit before modifying the object in the transmit function and setting
it after. It is not enough to set &amp; reset CPUUPD.

It is important to keep the MSGVAL bit reset while the message object is
being modified. Otherwise, during RTR transmission, a frame with matching
id could trigger an rx-interrupt, which would cause a race condition
between the interrupt routine and the transmit function.

Signed-off-by: Andri Yngvason &lt;andri.yngvason@marel.com&gt;
Tested-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>can: cc770: Fix stalls on rt-linux, remove redundant IRQ ack</title>
<updated>2018-06-16T21:22:38Z</updated>
<author>
<name>Andri Yngvason</name>
<email>andri.yngvason@marel.com</email>
</author>
<published>2018-03-14T11:52:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ecf5d4ccdeffa2b44de59fafaa6588cfe540b83a'/>
<id>urn:sha1:ecf5d4ccdeffa2b44de59fafaa6588cfe540b83a</id>
<content type='text'>
commit f4353daf4905c0099fd25fa742e2ffd4a4bab26a upstream.

This has been reported to cause stalls on rt-linux.

Suggested-by: Richard Weinberger &lt;richard@nod.at&gt;
Tested-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Andri Yngvason &lt;andri.yngvason@marel.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>team: Fix double free in error path</title>
<updated>2018-06-16T21:22:35Z</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2018-03-08T10:42:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fefd86f394315d1fef65326af9abee6f7abe45c1'/>
<id>urn:sha1:fefd86f394315d1fef65326af9abee6f7abe45c1</id>
<content type='text'>
commit cbcc607e18422555db569b593608aec26111cb0b upstream.

The __send_and_alloc_skb() receives a skb ptr as a parameter but in
case it fails the skb is not valid:
- Send failed and released the skb internally.
- Allocation failed.

The current code tries to release the skb in case of failure which
causes redundant freeing.

Fixes: 9b00cf2d1024 ("team: implement multipart netlink messages for options transfers")
Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
