From: Greg KH <greg@kroah.com>
To: Fabio Luongo <f.langufo.l@gmail.com>
Cc: linux-usb@vger.kernel.org, oneukum@suse.com
Subject: Re: [PATCH] Add support for JULABO PRESTO to cdc_acm
Date: Wed, 16 Oct 2024 10:11:15 +0200 [thread overview]
Message-ID: <2024101624-stimulate-unbend-89a8@gregkh> (raw)
In-Reply-To: <20240927134404.110284-1-f.langufo.l@gmail.com>
On Fri, Sep 27, 2024 at 03:44:04PM +0200, Fabio Luongo wrote:
> JULABO PRESTO chillers on Windows use the usbser.sys driver
> for communication, so the same functionality should be achievable
> on Linux using the cdc_acm driver.
>
> However, cdc_acm does not accomodate the quirkness of these devices,
> as they fail normal probing ("Zero length descriptor references"),
> but they also feature a single USB interface instead of two.
>
> This patch extends the effect of the `NO_UNION_NORMAL` quirk
> to cover the features of JULABO PRESTO devices.
>
> Signed-off-by: Fabio Luongo <f.langufo.l@gmail.com>
> ---
> drivers/usb/class/cdc-acm.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
> index 605fea461102..d77c84c6e878 100644
> --- a/drivers/usb/class/cdc-acm.c
> +++ b/drivers/usb/class/cdc-acm.c
> @@ -1210,6 +1210,8 @@ static int acm_probe(struct usb_interface *intf,
> if (quirks == NO_UNION_NORMAL) {
> data_interface = usb_ifnum_to_if(usb_dev, 1);
> control_interface = usb_ifnum_to_if(usb_dev, 0);
> + if (!data_interface)
> + data_interface = control_interface;
That feels wrong, how can we send data out both for different things?
> /* we would crash */
> if (!data_interface || !control_interface)
> return -ENODEV;
> @@ -1284,6 +1286,8 @@ static int acm_probe(struct usb_interface *intf,
> if (data_intf_num != call_intf_num)
> dev_dbg(&intf->dev, "Separate call control interface. That is not fully supported.\n");
>
> +skip_normal_probe:
> +
> if (control_interface == data_interface) {
> /* some broken devices designed for windows work this way */
> dev_warn(&intf->dev,"Control and data interfaces are not separated!\n");
> @@ -1303,8 +1307,6 @@ static int acm_probe(struct usb_interface *intf,
> goto made_compressed_probe;
> }
>
> -skip_normal_probe:
Why the movement of the goto tag?
thanks,
greg k-h
next prev parent reply other threads:[~2024-10-16 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 13:44 [PATCH] Add support for JULABO PRESTO to cdc_acm Fabio Luongo
2024-10-16 8:11 ` Greg KH [this message]
2024-10-16 12:51 ` Fabio Luongo
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=2024101624-stimulate-unbend-89a8@gregkh \
--to=greg@kroah.com \
--cc=f.langufo.l@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.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.