OSDN Git Service

usb: gadget: f_fs: Accept up to 30 endpoints.
authorVincent Pelletier <plr.vincent@gmail.com>
Mon, 23 Jan 2017 14:41:04 +0000 (14:41 +0000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 24 Jan 2017 09:04:23 +0000 (11:04 +0200)
commit41dc9ac163e76718d445a8149f8ce635375c8c38
treed4ed01b18ddc7bb8585008b0b09c994ff8f6b766
parentf199a80cfece94b67f9e3d2955666e47c6051517
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>
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/u_fs.h