diff options
author | Vincent Pelletier <plr.vincent@gmail.com> | 2017-01-23 17:41:04 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-01-24 12:04:23 +0300 |
commit | 41dc9ac163e76718d445a8149f8ce635375c8c38 (patch) | |
tree | d4ed01b18ddc7bb8585008b0b09c994ff8f6b766 /drivers/usb/gadget/function/u_fs.h | |
parent | f199a80cfece94b67f9e3d2955666e47c6051517 (diff) | |
download | linux-41dc9ac163e76718d445a8149f8ce635375c8c38.tar.xz |
usb: gadget: f_fs: Accept up to 30 endpoints.
It is allowed by the USB specification to enabled same-address, opposite-
direction endpoints simultaneously, which means 30 non-zero endpoints
are allowed. So double eps_addrmap length to 30.
The original code only accepted 14 descriptors out of a likely intended 15
(as there are 15 endpoint addresses, ignoring direction), because the first
eps_addrmap entry is unused (it is a placeholder for endpoint zero). So
increase eps_addrmap length by one to 31.
Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_fs.h')
-rw-r--r-- | drivers/usb/gadget/function/u_fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/u_fs.h b/drivers/usb/gadget/function/u_fs.h index 60139854e0b1..4b6969451cdc 100644 --- a/drivers/usb/gadget/function/u_fs.h +++ b/drivers/usb/gadget/function/u_fs.h @@ -247,7 +247,8 @@ struct ffs_data { unsigned user_flags; - u8 eps_addrmap[15]; +#define FFS_MAX_EPS_COUNT 31 + u8 eps_addrmap[FFS_MAX_EPS_COUNT]; unsigned short strings_count; unsigned short interfaces_count; |