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

Commit b8d282e1 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "f_fs: Return correct USB endpoint descriptor to user space daemon"

parents cbcb2fc9 4abb83b7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1457,6 +1457,7 @@ static long ffs_epfile_ioctl(struct file *file, unsigned code,
		struct usb_endpoint_descriptor desc1, *desc;

		switch (epfile->ffs->gadget->speed) {
		case USB_SPEED_SUPER_PLUS:
		case USB_SPEED_SUPER:
			desc_idx = 2;
			break;
@@ -3430,6 +3431,7 @@ static int _ffs_func_bind(struct usb_configuration *c,
			ret = ss_len;
			goto error;
		}
		func->function.ssp_descriptors = func->function.ss_descriptors;
	} else {
		ss_len = 0;
	}
@@ -3865,6 +3867,7 @@ static void ffs_func_unbind(struct usb_configuration *c,
	func->function.fs_descriptors = NULL;
	func->function.hs_descriptors = NULL;
	func->function.ss_descriptors = NULL;
	func->function.ssp_descriptors = NULL;
	func->interfaces_nums = NULL;

	ffs_event_add(ffs, FUNCTIONFS_UNBIND);
+1 −1
Original line number Diff line number Diff line
@@ -1519,7 +1519,7 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f)
		fs_ncm_notify_desc.bEndpointAddress;

	status = usb_assign_descriptors(f, ncm_fs_function, ncm_hs_function,
			ncm_ss_function, NULL);
			ncm_ss_function, ncm_ss_function);
	if (status)
		goto fail;