Re: [PATCH 5.10 021/593] usb: gadget: eem: fix echo command packet response issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux