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

Commit 2e6c72b6 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: gadget: mass_storage: allow for deeper queue lengths



Instead of allowing a range of 2 to 4 requests,
let's allow the user choose up to 32 requests
as that will give us a better chance of keeping
controller busy.

We still maintain default of 2 so users shouldn't
be affected.

Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a8f32817
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ config USB_GADGET_VBUS_DRAW

config USB_GADGET_STORAGE_NUM_BUFFERS
	int "Number of storage pipeline buffers"
	range 2 4
	range 2 32
	default 2
	help
	   Usually 2 buffers are enough to establish a good buffering
+4 −2
Original line number Diff line number Diff line
@@ -2662,10 +2662,12 @@ EXPORT_SYMBOL_GPL(fsg_common_put);
/* check if fsg_num_buffers is within a valid range */
static inline int fsg_num_buffers_validate(unsigned int fsg_num_buffers)
{
	if (fsg_num_buffers >= 2 && fsg_num_buffers <= 4)
#define FSG_MAX_NUM_BUFFERS	32

	if (fsg_num_buffers >= 2 && fsg_num_buffers <= FSG_MAX_NUM_BUFFERS)
		return 0;
	pr_err("fsg_num_buffers %u is out of range (%d to %d)\n",
	       fsg_num_buffers, 2, 4);
	       fsg_num_buffers, 2, FSG_MAX_NUM_BUFFERS);
	return -EINVAL;
}