Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe846d0b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: f_uac1: Increase the IN endpoint buffer allocation"

parents 98899f1f c6641133
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -774,7 +774,8 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f)
	ecm->notify_req = usb_ep_alloc_request(ep, GFP_KERNEL);
	if (!ecm->notify_req)
		goto fail;
	ecm->notify_req->buf = kmalloc(ECM_STATUS_BYTECOUNT, GFP_KERNEL);
	ecm->notify_req->buf = kmalloc(ECM_STATUS_BYTECOUNT +
			cdev->gadget->extra_buf_alloc, GFP_KERNEL);
	if (!ecm->notify_req->buf)
		goto fail;
	ecm->notify_req->context = ecm;
+5 −3
Original line number Diff line number Diff line
@@ -567,13 +567,14 @@ static void mbim_free_ctrl_pkt(struct ctrl_pkt *pkt)
	}
}

static struct usb_request *mbim_alloc_req(struct usb_ep *ep, int buffer_size)
static struct usb_request *mbim_alloc_req(struct usb_ep *ep, int buffer_size,
		size_t extra_buf)
{
	struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL);
	if (!req)
		return NULL;

	req->buf = kmalloc(buffer_size, GFP_KERNEL);
	req->buf = kmalloc(buffer_size + extra_buf, GFP_KERNEL);
	if (!req->buf) {
		usb_ep_free_request(ep, req);
		return NULL;
@@ -1510,7 +1511,8 @@ mbim_bind(struct usb_configuration *c, struct usb_function *f)
	status = -ENOMEM;

	/* allocate notification request and buffer */
	mbim->not_port.notify_req = mbim_alloc_req(ep, NCM_STATUS_BYTECOUNT);
	mbim->not_port.notify_req = mbim_alloc_req(ep, NCM_STATUS_BYTECOUNT,
				cdev->gadget->extra_buf_alloc);
	if (!mbim->not_port.notify_req) {
		pr_info("failed to allocate notify request\n");
		goto fail;
+3 −2
Original line number Diff line number Diff line
@@ -1010,7 +1010,8 @@ static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
				pr_err("request allocation failed\n");
				return -ENOMEM;
			}
			req->buf = kzalloc(req_capture_buf_size,
			req->buf = kzalloc(req_capture_buf_size +
					cdev->gadget->extra_buf_alloc,
					GFP_ATOMIC);
			if (!req->buf) {
				pr_err("request buffer allocation failed\n");