usb: gadget: s3c-hsotg: fix set_ep_maxpacket function
usb: gadget: s3c-hsotg: fix set_ep_maxpacket function

This patch fixes max packet size check in s3c_hsotg_set_ep_maxpacket()
function. According USB specification, bits 10..0 of mps specifies maximum
packet size, so there is bitwise AND between mps and 0x7ff value. Also added
check if maxpacket isn't grater than 1024 which is maximum size od single USB
transaction.

In s3c_hsotg_ep_enable() function added s3c_hsotg_set_ep_maxpacket() call
instead of setting ep.maxpacket value directly.

Signed-off-by: Robert Baldyga <72b1db3d98bf139199de36aba5da00140727c571@samsung.com>
Signed-off-by: Kyungmin Park <504c23c4986a3760712724894be3105092c27331@samsung.com>
Signed-off-by: Felipe Balbi <94dddeeef08b001e003cce128ddc162a4e2c6cd2@ti.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs