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

Commit dcfb3af5 authored by ChandanaKishori Chiluveru's avatar ChandanaKishori Chiluveru Committed by Ajay Agarwal
Browse files

USB: f_mass_storage: Increase the IN endpoint buffer allocation



Some UDC may require allocation of some extra bytes for
TX buffer due to hardware requirement. Add necessary
changes for the same.

Change-Id: I503fe186f4e75e35c3ca7193805f28c62350dd25
Signed-off-by: default avatarSujeet Kumar <ksujeet@codeaurora.org>
Signed-off-by: default avatarChandanaKishori Chiluveru <cchilu@codeaurora.org>
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 44920ffd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2750,7 +2750,8 @@ int fsg_common_set_num_buffers(struct fsg_common *common, unsigned int n)
		bh->next = bh + 1;
		++bh;
buffhds_first_it:
		bh->buf = kmalloc(FSG_BUFLEN, GFP_KERNEL);
		bh->buf = kmalloc(FSG_BUFLEN + EXTRA_ALLOCATION_SIZE,
				GFP_KERNEL);
		if (unlikely(!bh->buf))
			goto error_release;
	} while (--i);
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ static inline bool fsg_lun_is_open(struct fsg_lun *curlun)

/* Default size of buffer length. */
#define FSG_BUFLEN	((u32)16384)
#define EXTRA_ALLOCATION_SIZE	((u32)256)

/* Maximal number of LUNs supported in mass storage function */
#define FSG_MAX_LUNS	16