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: 7+ 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
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$(echo .)com \
--cc=Bo.Jiao@mediatek$(echo .)com \
--cc=StanleyYP.Wang@mediatek$(echo .)com \
--cc=alexander.deucher@amd$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=andrew@lunn$(echo .)ch \
--cc=angelogioacchino.delregno@collabora$(echo .)com \
--cc=apais@linux$(echo .)microsoft.com \
--cc=chui-hao.chiu@mediatek$(echo .)com \
--cc=cug_yangyuancong@hotmail$(echo .)com \
--cc=daniel@makrotopia$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=deren.wu@mediatek$(echo .)com \
--cc=dokyungs@yonsei$(echo .)ac.kr \
--cc=dsahern@kernel$(echo .)org \
--cc=dzm91@hust$(echo .)edu.cn \
--cc=edumazet@google$(echo .)com \
--cc=gch981213@gmail$(echo .)com \
--cc=git@qrsnap$(echo .)io \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=guanwentao@uniontech$(echo .)com \
--cc=gustavoars@kernel$(echo .)org \
--cc=helmut.schaa@googlemail$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=jiefeng_li@hust$(echo .)edu.cn \
--cc=keescook@chromium$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=kvalo@codeaurora$(echo .)org \
--cc=kvalo@kernel$(echo .)org \
--cc=leit@fb$(echo .)com \
--cc=leitao@debian$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=lorenzo.bianconi83@gmail$(echo .)com \
--cc=lorenzo.bianconi@redhat$(echo .)com \
--cc=lorenzo@kernel$(echo .)org \
--cc=lynxis@fe80$(echo .)eu \
--cc=mailhol.vincent@wanadoo$(echo .)fr \
--cc=markus.theil@tu-ilmenau$(echo .)de \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=mikhail.v.gavrilov@gmail$(echo .)com \
--cc=mingyen.hsieh@mediatek$(echo .)com \
--cc=mrkiko.rs@gmail$(echo .)com \
--cc=nbd@nbd$(echo .)name \
--cc=nelson.yu@mediatek$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=oliver@neukum$(echo .)org \
--cc=pabeni@redhat$(echo .)com \
--cc=quan.zhou@mediatek$(echo .)com \
--cc=raoxu@uniontech$(echo .)com \
--cc=rodrigo.vivi@intel$(echo .)com \
--cc=romain.perier@gmail$(echo .)com \
--cc=rong.yan@mediatek$(echo .)com \
--cc=ryder.lee@mediatek$(echo .)com \
--cc=sean.wang@mediatek$(echo .)com \
--cc=sgruszka@redhat$(echo .)com \
--cc=shayne.chen@mediatek$(echo .)com \
--cc=sidhayn@gmail$(echo .)com \
--cc=stern@rowland$(echo .)harvard.edu \
--cc=stf_xl@wp$(echo .)pl \
--cc=sujuan.chen@mediatek$(echo .)com \
--cc=wang.zhao@mediatek$(echo .)com \
--cc=wangyuli@uniontech$(echo .)com \
--cc=weiwan@google$(echo .)com \
--cc=woojung.huh@microchip$(echo .)com \
--cc=yn.chen@mediatek$(echo .)com \
--cc=zhanjun@uniontech$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox