From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: WangYuli <wangyuli@uniontech.com>
Cc: <nbd@nbd.name>, <lorenzo@kernel.org>, <ryder.lee@mediatek.com>,
<shayne.chen@mediatek.com>, <sean.wang@mediatek.com>,
<kvalo@kernel.org>, <matthias.bgg@gmail.com>,
<angelogioacchino.delregno@collabora.com>, <davem@davemloft.net>,
<andrew+netdev@lunn.ch>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <alexander.deucher@amd.com>,
<gregkh@linuxfoundation.org>, <rodrigo.vivi@intel.com>,
<linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <raoxu@uniontech.com>,
<guanwentao@uniontech.com>, <zhanjun@uniontech.com>,
<cug_yangyuancong@hotmail.com>, <lorenzo.bianconi@redhat.com>,
<kvalo@codeaurora.org>, <sidhayn@gmail.com>,
<lorenzo.bianconi83@gmail.com>, <sgruszka@redhat.com>,
<keescook@chromium.org>, <markus.theil@tu-ilmenau.de>,
<gustavoars@kernel.org>, <stf_xl@wp.pl>,
<romain.perier@gmail.com>, <apais@linux.microsoft.com>,
<mrkiko.rs@gmail.com>, <oliver@neukum.org>,
<woojung.huh@microchip.com>, <helmut.schaa@googlemail.com>,
<mailhol.vincent@wanadoo.fr>, <dokyungs@yonsei.ac.kr>,
<deren.wu@mediatek.com>, <daniel@makrotopia.org>,
<sujuan.chen@mediatek.com>, <mikhail.v.gavrilov@gmail.com>,
<stern@rowland.harvard.edu>, <linux-usb@vger.kernel.org>,
<leitao@debian.org>, <dsahern@kernel.org>, <weiwan@google.com>,
<netdev@vger.kernel.org>, <horms@kernel.org>, <andrew@lunn.ch>,
<leit@fb.com>, <wang.zhao@mediatek.com>,
<chui-hao.chiu@mediatek.com>, <lynxis@fe80.eu>,
<mingyen.hsieh@mediatek.com>, <yn.chen@mediatek.com>,
<quan.zhou@mediatek.com>, <dzm91@hust.edu.cn>,
<gch981213@gmail.com>, <git@qrsnap.io>, <jiefeng_li@hust.edu.cn>,
<nelson.yu@mediatek.com>, <rong.yan@mediatek.com>,
<Bo.Jiao@mediatek.com>, <StanleyYP.Wang@mediatek.com>
Subject: Re: [RESEND. PATCH] mt76: mt76u_vendor_request: Do not print error messages when -EPROTO
Date: Wed, 18 Dec 2024 17:10:53 +0100 [thread overview]
Message-ID: <a2bbdfb4-19ed-461e-a14b-e91a5636cc77@intel.com> (raw)
In-Reply-To: <1E6ABDEA91ADAB1A+20241218090833.140045-1-wangyuli@uniontech.com>
From: Wangyuli <wangyuli@uniontech.com>
Date: Wed, 18 Dec 2024 17:08:33 +0800
> [RESEND. PATCH] mt76: mt76u_vendor_request: Do not print error messages when -EPROTO
Is it a fix or an improvement?
You need to specify the target tree, either 'PATCH net' (fixes) or
'PATCH net-next' (improvements).
The '.' after 'RESEND' is not needed.
> When initializing the network card, unplugging the device will
> trigger an -EPROTO error, resulting in a flood of error messages
> being printed frantically.
>
If it's a fix, you need to have a 'Fixes:' tag here.
> Co-developed-by: Xu Rao <raoxu@uniontech.com>
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
> Signed-off-by: WangYuli <wangyuli@uniontech.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);
How do other drivers handle this?
Can -EPROTO happen in other cases, not only unplugging, which this patch
would break?
Thanks,
Olek
next prev parent reply other threads:[~2024-12-18 16:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 9:08 [RESEND. PATCH] mt76: mt76u_vendor_request: Do not print error messages when -EPROTO WangYuli
2024-12-18 16:10 ` Alexander Lobakin [this message]
2024-12-18 16:50 ` Kalle Valo
2024-12-19 7:11 ` WangYuli
2024-12-19 15:23 ` Alexander Lobakin
2024-12-24 9:01 ` WangYuli
2024-12-19 23:27 ` mt76: dealing with disconnections, -ENODEV and -EPROTO Michał Pecio
-- strict thread matches above, loose matches on Subject: below --
2024-11-08 8:48 [RESEND. PATCH] mt76: mt76u_vendor_request: Do not print error messages when -EPROTO WangYuli
2024-10-17 3:05 WangYuli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a2bbdfb4-19ed-461e-a14b-e91a5636cc77@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=Bo.Jiao@mediatek.com \
--cc=StanleyYP.Wang@mediatek.com \
--cc=alexander.deucher@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=apais@linux.microsoft.com \
--cc=chui-hao.chiu@mediatek.com \
--cc=cug_yangyuancong@hotmail.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=deren.wu@mediatek.com \
--cc=dokyungs@yonsei.ac.kr \
--cc=dsahern@kernel.org \
--cc=dzm91@hust.edu.cn \
--cc=edumazet@google.com \
--cc=gch981213@gmail.com \
--cc=git@qrsnap.io \
--cc=gregkh@linuxfoundation.org \
--cc=guanwentao@uniontech.com \
--cc=gustavoars@kernel.org \
--cc=helmut.schaa@googlemail.com \
--cc=horms@kernel.org \
--cc=jiefeng_li@hust.edu.cn \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=kvalo@kernel.org \
--cc=leit@fb.com \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=lynxis@fe80.eu \
--cc=mailhol.vincent@wanadoo.fr \
--cc=markus.theil@tu-ilmenau.de \
--cc=matthias.bgg@gmail.com \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=mingyen.hsieh@mediatek.com \
--cc=mrkiko.rs@gmail.com \
--cc=nbd@nbd.name \
--cc=nelson.yu@mediatek.com \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=pabeni@redhat.com \
--cc=quan.zhou@mediatek.com \
--cc=raoxu@uniontech.com \
--cc=rodrigo.vivi@intel.com \
--cc=romain.perier@gmail.com \
--cc=rong.yan@mediatek.com \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=sgruszka@redhat.com \
--cc=shayne.chen@mediatek.com \
--cc=sidhayn@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=stf_xl@wp.pl \
--cc=sujuan.chen@mediatek.com \
--cc=wang.zhao@mediatek.com \
--cc=wangyuli@uniontech.com \
--cc=weiwan@google.com \
--cc=woojung.huh@microchip.com \
--cc=yn.chen@mediatek.com \
--cc=zhanjun@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.