From: Hauke Mehrtens <hauke@hauke-m.de>
[ Upstream commit f9317ae5523f99999fb54c513ebabbb2bc887ddf ]
The TX DMA channel data is accessed by the xrx200_start_xmit() and the
xrx200_tx_housekeeping() function from different threads. Make sure the
accesses are synchronized by acquiring the netif_tx_lock() in the
xrx200_tx_housekeeping() function too. This lock is acquired by the
kernel before calling xrx200_start_xmit().
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/lantiq_xrx200.c | 2 ++
1 file changed, 2 insertions(+)
From: Jamie Iles <redacted>
[ Upstream commit 1ec8e74855588cecb2620b28b877c08f45765374 ]
MDIO reads can happen during PHY probing, and printing an error with
dev_err can result in a large number of error messages during device
probe. On a platform with a serial console this can result in
excessively long boot times in a way that looks like an infinite loop
when multiple busses are present. Since 0f183fd151c (net/fsl: enable
extended scanning in xgmac_mdio) we perform more scanning so there are
potentially more failures.
Reduce the logging level to dev_dbg which is consistent with the
Freescale enetc driver.
Cc: Jeremy Linton <redacted>
Signed-off-by: Jamie Iles <redacted>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -229,7 +229,7 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)/* Return all Fs if nothing was there */if((xgmac_read32(®s->mdio_stat,endian)&MDIO_STAT_RD_ER)&&!priv->has_a011043){-dev_err(&bus->dev,+dev_dbg(&bus->dev,"Error while reading PHY%d reg at %d.%hhu\n",phy_id,dev_addr,regnum);return0xffff;
From: Petko Manolov <redacted>
[ Upstream commit f30e25a9d1b25ac8d40071c4dc2679ad0fcdc55a ]
v2:
If reading the MAC address from eeprom fail don't throw an error, use randomly
generated MAC instead. Either way the adapter will soldier on and the return
type of set_ethernet_addr() can be reverted to void.
v1:
Fix a bug in set_ethernet_addr() which does not take into account possible
errors (or partial reads) returned by its helpers. This can potentially lead to
writing random data into device's MAC address registers.
Signed-off-by: Petko Manolov <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/pegasus.c | 35 +++++++++++++++++++++++++++--------
1 file changed, 27 insertions(+), 8 deletions(-)
From: Anant Thazhemadam <redacted>
[ Upstream commit f45a4248ea4cc13ed50618ff066849f9587226b2 ]
When get_registers() fails in set_ethernet_addr(),the uninitialized
value of node_id gets copied over as the address.
So, check the return value of get_registers().
If get_registers() executed successfully (i.e., it returns
sizeof(node_id)), copy over the MAC address using ether_addr_copy()
(instead of using memcpy()).
Else, if get_registers() failed instead, a randomly generated MAC
address is set as the MAC address instead.
Reported-by: syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com
Tested-by: syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com
Acked-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Anant Thazhemadam <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/rtl8150.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
@@ -274,12 +274,20 @@ static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)return1;}-staticinlinevoidset_ethernet_addr(rtl8150_t*dev)+staticvoidset_ethernet_addr(rtl8150_t*dev){-u8node_id[6];+u8node_id[ETH_ALEN];+intret;++ret=get_registers(dev,IDR,sizeof(node_id),node_id);-get_registers(dev,IDR,sizeof(node_id),node_id);-memcpy(dev->netdev->dev_addr,node_id,sizeof(node_id));+if(ret==sizeof(node_id)){+ether_addr_copy(dev->netdev->dev_addr,node_id);+}else{+eth_hw_addr_random(dev->netdev);+netdev_notice(dev->netdev,"Assigned a random MAC address: %pM\n",+dev->netdev->dev_addr);+}}staticintrtl8150_set_mac_address(structnet_device*netdev,void*p)
From: Mike Christie <michael.christie@oracle.com>
[ Upstream commit 37787e9f81e2e586b526ff5c29c94e4f41513e80 ]
We must free the vqs array in the open failure path, because
vhost_vdpa_release will not be called.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/1600712588-9514-2-git-send-email-michael.christie@oracle.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/vhost/vdpa.c | 1 +
1 file changed, 1 insertion(+)
From: Kevin Brace <kevinbrace@bracecomputerlab.com>
[ Upstream commit aa15190cf2cf25ec7e6c6d7373ae3ca563d48601 ]
The VIA Technologies VT8251 South Bridge's integrated Rhine-II
Ethernet MAC comes has a PCI revision value of 0x7c. This was
verified on ASUS P5V800-VM mainboard.
Signed-off-by: Kevin Brace <kevinbrace@bracecomputerlab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/via/via-rhine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -243,7 +243,7 @@ enum rhine_revs {VT8233=0x60,/* Integrated MAC */VT8235=0x74,/* Integrated MAC */VT8237=0x78,/* Integrated MAC */-VTunknown1=0x7C,+VT8251=0x7C,/* Integrated MAC */VT6105=0x80,VT6105_B0=0x83,VT6105L=0x8A,
From: Vladimir Oltean <vladimir.oltean@nxp.com>
[ Upstream commit 460e985ea07ec23d46af257e84e57b5409576577 ]
The port mask width was larger than the actual number of ports, and
therefore, all fields following this one were also shifted by the number
of excess bits. But the driver doesn't use the REW_OP, SMAC_REPLACE_ENA
or ACL_ID bits from the action vector, so the bug was inconsequential.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/dsa/ocelot/felix_vsc9959.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
From: Wilken Gottwalt <redacted>
[ Upstream commit c92a79829c7c169139874aa1d4bf6da32d10c38a ]
Adds the driver_info and usb ids of the AX88179 based MCT U3-A9003 USB
3.0 ethernet adapter.
Signed-off-by: Wilken Gottwalt <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/ax88179_178a.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
From: Kevin Brace <kevinbrace@bracecomputerlab.com>
[ Upstream commit d120c9a81e32c43cba8017dec873b6a414898716 ]
In rhine_resume() and rhine_suspend(), the code calls netif_running()
to see if the network interface is down or not. If it is down (i.e.,
netif_running() returning false), they will skip any housekeeping work
within the function relating to the hardware. This becomes a problem
when the hardware resumes from a standby since it is counting on
rhine_resume() to map its MMIO and power up rest of the hardware.
Not getting its MMIO remapped and rest of the hardware powered
up lead to a soft reset failure and hardware disappearance. The
solution is to map its MMIO and power up rest of the hardware inside
rhine_open() before soft reset is to be performed. This solution was
verified on ASUS P5V800-VM mainboard's integrated Rhine-II Ethernet
MAC inside VIA Technologies VT8251 South Bridge.
Signed-off-by: Kevin Brace <kevinbrace@bracecomputerlab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/via/via-rhine.c | 2 ++
1 file changed, 2 insertions(+)
From: Wilken Gottwalt <redacted>
[ Upstream commit e42d72fea91f8f2e82b65808739ca04b7a8cd7a8 ]
Adds the driver_info and usb ids of the AX88179 based Toshiba USB 3.0
ethernet adapter.
Signed-off-by: Wilken Gottwalt <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/ax88179_178a.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
From: Xie He <redacted>
[ Upstream commit ed46cd1d4cc4b2cf05f31fe25fc68d1a9d3589ba ]
1.
Move the lapb_register/lapb_unregister calls into the ndo_open/ndo_stop
functions.
This makes the LAPB protocol start/stop when the network interface
starts/stops. When the network interface is down, the LAPB protocol
shouldn't be running and the LAPB module shoudn't be generating control
frames.
2.
Move netif_start_queue/netif_stop_queue into the ndo_open/ndo_stop
functions.
This makes the TX queue start/stop when the network interface
starts/stops.
(netif_stop_queue was originally in the ndo_stop function. But to make
the code look better, I created a new function to use as ndo_stop, and
made it call the original ndo_stop function. I moved netif_stop_queue
from the original ndo_stop function to the new ndo_stop function.)
Cc: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Xie He <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wan/x25_asy.c | 43 +++++++++++++++++++++++----------------
1 file changed, 26 insertions(+), 17 deletions(-)
@@ -511,7 +503,6 @@ static int x25_asy_close(struct net_device *dev)if(sl->tty)clear_bit(TTY_DO_WRITE_WAKEUP,&sl->tty->flags);-netif_stop_queue(dev);sl->rcount=0;sl->xleft=0;spin_unlock(&sl->lock);
@@ -596,7 +587,6 @@ static int x25_asy_open_tty(struct tty_struct *tty)staticvoidx25_asy_close_tty(structtty_struct*tty){structx25_asy*sl=tty->disc_data;-interr;/* First make sure we're connected. */if(!sl||sl->magic!=X25_ASY_MAGIC)
From: Igor Russkikh <redacted>
[ Upstream commit 059432495e209279bae12db3d2b0bc8c8fe987bb ]
Driver subfolder files refer parent folder includes in an
absolute manner.
Makefile contains a -I for this, but apparently that does not
work if object tree is separated.
Adding srctree to fix that.
Signed-off-by: Igor Russkikh <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/aquantia/atlantic/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit efb1676306f664625c0c546dd10d18d33c75e3fc ]
After fixing mac80211 to allow larger A-MSDUs in some cases, there have been
reports of performance regressions and packet loss with some clients.
It appears that the issue occurs when the hardware is transmitting A-MSDUs
bigger than 8k. Limit the local VHT MPDU size capability to 7991, matching
the value used for MT7915 as well.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <redacted>
Link: https://lore.kernel.org/r/20200923052442.24141-1-nbd@nbd.name
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7615/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Joe Perches <joe@perches.com> Date: 2020-10-12 19:11:24
On Mon, 2020-10-12 at 15:02 -0400, Sasha Levin wrote:
From: Anant Thazhemadam <redacted>
[ Upstream commit f45a4248ea4cc13ed50618ff066849f9587226b2 ]
When get_registers() fails in set_ethernet_addr(),the uninitialized
value of node_id gets copied over as the address.
So, check the return value of get_registers().
If get_registers() executed successfully (i.e., it returns
sizeof(node_id)), copy over the MAC address using ether_addr_copy()
(instead of using memcpy()).
Else, if get_registers() failed instead, a randomly generated MAC
address is set as the MAC address instead.
This autosel is premature.
This patch always sets a random MAC.
See the follow on patch: https://lkml.org/lkml/2020/10/11/131
To my knowledge, this follow-ob has yet to be applied:
On Mon, 2020-10-12 at 15:02 -0400, Sasha Levin wrote:
quoted
From: Anant Thazhemadam <redacted>
[ Upstream commit f45a4248ea4cc13ed50618ff066849f9587226b2 ]
When get_registers() fails in set_ethernet_addr(),the uninitialized
value of node_id gets copied over as the address.
So, check the return value of get_registers().
If get_registers() executed successfully (i.e., it returns
sizeof(node_id)), copy over the MAC address using ether_addr_copy()
(instead of using memcpy()).
Else, if get_registers() failed instead, a randomly generated MAC
address is set as the MAC address instead.
This autosel is premature.
This patch always sets a random MAC.
See the follow on patch: https://lkml.org/lkml/2020/10/11/131
To my knowledge, this follow-ob has yet to be applied:
ACK, the follow-on patch has got the correct semantics.
Petko
On Tue, Oct 13, 2020 at 12:01:06AM +0300, Petko Manolov wrote:
On 20-10-12 12:11:18, Joe Perches wrote:
quoted
On Mon, 2020-10-12 at 15:02 -0400, Sasha Levin wrote:
quoted
From: Anant Thazhemadam <redacted>
[ Upstream commit f45a4248ea4cc13ed50618ff066849f9587226b2 ]
When get_registers() fails in set_ethernet_addr(),the uninitialized
value of node_id gets copied over as the address.
So, check the return value of get_registers().
If get_registers() executed successfully (i.e., it returns
sizeof(node_id)), copy over the MAC address using ether_addr_copy()
(instead of using memcpy()).
Else, if get_registers() failed instead, a randomly generated MAC
address is set as the MAC address instead.
This autosel is premature.
This patch always sets a random MAC.
See the follow on patch: https://lkml.org/lkml/2020/10/11/131
To my knowledge, this follow-ob has yet to be applied:
ACK, the follow-on patch has got the correct semantics.
I'll hold off on this patch until the follow-on is merged, thanks!
--
Thanks,
Sasha