mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
usb: mtu3: fix interval value for intr and isoc
[ Upstream commit e3d4621c22 ]
Use the Interval value from isoc/intr endpoint descriptor, no need
minus one. The original code doesn't cause transfer error for
normal cases, but it may have side effect with respond time of ERDY
or tPingTimeout.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20211218095749.6250-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f0e5709824
commit
6a3ffcc9ff
@@ -85,7 +85,7 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
|
||||
if (usb_endpoint_xfer_int(desc) ||
|
||||
usb_endpoint_xfer_isoc(desc)) {
|
||||
interval = desc->bInterval;
|
||||
interval = clamp_val(interval, 1, 16) - 1;
|
||||
interval = clamp_val(interval, 1, 16);
|
||||
if (usb_endpoint_xfer_isoc(desc) && comp_desc)
|
||||
mult = comp_desc->bmAttributes;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
|
||||
if (usb_endpoint_xfer_isoc(desc) ||
|
||||
usb_endpoint_xfer_int(desc)) {
|
||||
interval = desc->bInterval;
|
||||
interval = clamp_val(interval, 1, 16) - 1;
|
||||
interval = clamp_val(interval, 1, 16);
|
||||
mult = usb_endpoint_maxp_mult(desc) - 1;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user