lkml.org 
[lkml]   [2021]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.10 021/593] usb: gadget: eem: fix echo command packet response issue
Hi!

> fix it by allocating a usb request from IN endpoint of eem interface,
> and transmit the usb request to same IN endpoint of eem interface.

> drivers/usb/gadget/function/f_eem.c | 43
> @@ -439,11 +449,36 @@ static int eem_unwrap(struct gether *por
> skb_trim(skb2, len);
> put_unaligned_le16(BIT(15) | BIT(11) | len,
> skb_push(skb2, 2));
> +
> + ep = port->in_ep;
> + req = usb_ep_alloc_request(ep, GFP_ATOMIC);
> + if (!req) {
> + dev_kfree_skb_any(skb2);
> + goto next;
> + }
> +
> + req->buf = kmalloc(skb2->len, GFP_KERNEL);
> + if (!req->buf) {
> + usb_ep_free_request(ep, req);
> + dev_kfree_skb_any(skb2);
> + goto next;
> + }

This does not make sense; either both allocations can be GFP_KERNEL or
both must be GFP_ATOMIC, no?

Best regards,
Pavel

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-07-13 22:50    [W:1.781 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site