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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 1 Sep 2020 16:23:46 +0200
From:   Daniele Palmas <dnlplm@...il.com>
To:     William Sung <william.sung@...antech.com.tw>
Cc:     Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb <linux-usb@...r.kernel.org>,
        linux-kernel@...r.kernel.org,
        Campion Kang <campion.kang@...antech.com.tw>
Subject: Re: [PATCH 2/2] usb: serial: usb_wwan: Fix lackage for Quectel EG95
 LTE modem support

Hi William,

Il giorno mar 1 set 2020 alle ore 07:14 William Sung
<william.sung@...antech.com.tw> ha scritto:
>
> As required by the USB protocol, add zero packet support for Quectel
> EG95 LTE modem module.
>
> Fixes: f815dd5cf48b ("net: usb: qmi_wwan: add support for Quectel EG95
> LTE modem"

If I'm not wrong, that commit is just related to qmi_wwan.

>
> Signed-off-by: William Sung <william.sung@...antech.com.tw>
> ---
>  drivers/usb/serial/usb_wwan.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
> index 4b9845807bee..75495c939ac6 100644
> --- a/drivers/usb/serial/usb_wwan.c
> +++ b/drivers/usb/serial/usb_wwan.c
> @@ -467,6 +467,7 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
>         struct usb_serial *serial = port->serial;
>         struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
>         struct urb *urb;
> +       struct usb_device_descriptor *desc = &serial->dev->descriptor;
>
>         urb = usb_alloc_urb(0, GFP_KERNEL);     /* No ISO */
>         if (!urb)
> @@ -476,8 +477,15 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
>                           usb_sndbulkpipe(serial->dev, endpoint) | dir,
>                           buf, len, callback, ctx);
>
> -       if (intfdata->use_zlp && dir == USB_DIR_OUT)
> -               urb->transfer_flags |= URB_ZERO_PACKET;
> +       if (dir == USB_DIR_OUT) {
> +               if (intfdata->use_zlp)
> +                       urb->transfer_flags |= URB_ZERO_PACKET;
> +
> +               /* Add zero packet support for Quectel EG95 */
> +               if (desc->idVendor == cpu_to_le16(0x2C7C) &&
> +                       desc->idProduct == cpu_to_le16(0x0195))
> +                       urb->transfer_flags |= URB_ZERO_PACKET;
> +       }

Why not simply add the ZLP flag in option for that device?

Regards,
Daniele

>
>         return urb;
>  }
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ