Messages in this thread | | | Date | Tue, 13 Jul 2021 22:49:06 +0200 | From | Pavel Machek <> | Subject | Re: [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] | |