From: Greg KH <gregkh@linuxfoundation.org>
To: Miao Li <limiao870622@163.com>
Cc: zaitcev@redhat.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Miao Li <limiao@kylinos.cn>
Subject: Re: [PATCH] USB: usblp: reset device at probe for Fuji Xerox DocuPrint P475 AP
Date: Wed, 17 Dec 2025 14:27:27 +0100 [thread overview]
Message-ID: <2025121739-parking-swizzle-3cf2@gregkh> (raw)
In-Reply-To: <20251128065206.361475-1-limiao870622@163.com>
On Fri, Nov 28, 2025 at 02:52:06PM +0800, Miao Li wrote:
> From: Miao Li <limiao@kylinos.cn>
>
> when connecting Fuji Xerox DocuPrint P475 AP printer(which vid:pid is
> 0550:020e) to Huawei hisi platform and do reboot test for 500 cycles,
> usblp probe function executed successfully but there is a small
> chance it might not work, we can reset the device at probe to deal
> with the problem.
>
> Signed-off-by: Miao Li <limiao@kylinos.cn>
> ---
> drivers/usb/class/usblp.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
> index a7a1d38b6bef..566930eb88a1 100644
> --- a/drivers/usb/class/usblp.c
> +++ b/drivers/usb/class/usblp.c
> @@ -210,6 +210,7 @@ struct quirk_printer_struct {
> #define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */
> #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
> #define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific Class or SubClass */
> +#define USBLP_QUIRK_RESET_DEV 0x8 /* reset USB device */
>
> static const struct quirk_printer_struct quirk_printers[] = {
> { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
> @@ -228,6 +229,7 @@ static const struct quirk_printer_struct quirk_printers[] = {
> { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */
> { 0x04f9, 0x000d, USBLP_QUIRK_BIDIR }, /* Brother Industries, Ltd HL-1440 Laser Printer */
> { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt Printer M129C */
> + { 0x0550, 0x020e, USBLP_QUIRK_RESET_DEV }, /* FUJI XEROX DocuPrint P475 AP Printer */
> { 0, 0 }
> };
>
> @@ -1189,6 +1191,13 @@ static int usblp_probe(struct usb_interface *intf,
> le16_to_cpu(dev->descriptor.idVendor),
> le16_to_cpu(dev->descriptor.idProduct));
>
> + /*
> + * Some printer need to reset the device here or it might not work
> + * when finished probe.
> + */
> + if (usblp->quirks & USBLP_QUIRK_RESET_DEV)
> + usb_reset_device(dev);
This feels very very wrong. Why must a driver tell the device to reset
itself? How does it pass any Windows USB validation without such a
"reset"? Why does it require this?
Are you sure this isn't a bug in the host controller logic instead?
thanks,
greg k-h
prev parent reply other threads:[~2025-12-17 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 6:52 [PATCH] USB: usblp: reset device at probe for Fuji Xerox DocuPrint P475 AP Miao Li
2025-12-17 13:27 ` Greg KH [this message]
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=2025121739-parking-swizzle-3cf2@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=limiao870622@163.com \
--cc=limiao@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=zaitcev@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox