lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1E6ABDEA91ADAB1A+20241218090833.140045-1-wangyuli@uniontech.com>
Date: Wed, 18 Dec 2024 17:08:33 +0800
From: WangYuli <wangyuli@...ontech.com>
To: nbd@....name,
	lorenzo@...nel.org,
	ryder.lee@...iatek.com,
	shayne.chen@...iatek.com,
	sean.wang@...iatek.com,
	kvalo@...nel.org,
	matthias.bgg@...il.com,
	angelogioacchino.delregno@...labora.com,
	davem@...emloft.net,
	andrew+netdev@...n.ch,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	alexander.deucher@....com,
	gregkh@...uxfoundation.org,
	rodrigo.vivi@...el.com
Cc: linux-wireless@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org,
	raoxu@...ontech.com,
	guanwentao@...ontech.com,
	zhanjun@...ontech.com,
	cug_yangyuancong@...mail.com,
	lorenzo.bianconi@...hat.com,
	kvalo@...eaurora.org,
	sidhayn@...il.com,
	lorenzo.bianconi83@...il.com,
	sgruszka@...hat.com,
	keescook@...omium.org,
	markus.theil@...ilmenau.de,
	gustavoars@...nel.org,
	stf_xl@...pl,
	romain.perier@...il.com,
	apais@...ux.microsoft.com,
	mrkiko.rs@...il.com,
	oliver@...kum.org,
	woojung.huh@...rochip.com,
	helmut.schaa@...glemail.com,
	mailhol.vincent@...adoo.fr,
	dokyungs@...sei.ac.kr,
	deren.wu@...iatek.com,
	daniel@...rotopia.org,
	sujuan.chen@...iatek.com,
	mikhail.v.gavrilov@...il.com,
	stern@...land.harvard.edu,
	linux-usb@...r.kernel.org,
	leitao@...ian.org,
	dsahern@...nel.org,
	weiwan@...gle.com,
	netdev@...r.kernel.org,
	horms@...nel.org,
	andrew@...n.ch,
	leit@...com,
	wang.zhao@...iatek.com,
	chui-hao.chiu@...iatek.com,
	lynxis@...0.eu,
	mingyen.hsieh@...iatek.com,
	yn.chen@...iatek.com,
	quan.zhou@...iatek.com,
	dzm91@...t.edu.cn,
	gch981213@...il.com,
	git@...nap.io,
	jiefeng_li@...t.edu.cn,
	nelson.yu@...iatek.com,
	rong.yan@...iatek.com,
	Bo.Jiao@...iatek.com,
	StanleyYP.Wang@...iatek.com,
	WangYuli <wangyuli@...ontech.com>
Subject: [RESEND. PATCH] mt76: mt76u_vendor_request: Do not print error messages when -EPROTO

When initializing the network card, unplugging the device will
trigger an -EPROTO error, resulting in a flood of error messages
being printed frantically.

Co-developed-by: Xu Rao <raoxu@...ontech.com>
Signed-off-by: Xu Rao <raoxu@...ontech.com>
Signed-off-by: WangYuli <wangyuli@...ontech.com>
---
 drivers/net/wireless/mediatek/mt76/usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 58ff06823389..f9e67b8c3b3c 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -33,9 +33,9 @@ int __mt76u_vendor_request(struct mt76_dev *dev, u8 req, u8 req_type,
 
 		ret = usb_control_msg(udev, pipe, req, req_type, val,
 				      offset, buf, len, MT_VEND_REQ_TOUT_MS);
-		if (ret == -ENODEV)
+		if (ret == -ENODEV || ret == -EPROTO)
 			set_bit(MT76_REMOVED, &dev->phy.state);
-		if (ret >= 0 || ret == -ENODEV)
+		if (ret >= 0 || ret == -ENODEV || ret == -EPROTO)
 			return ret;
 		usleep_range(5000, 10000);
 	}
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ