Due to HS function is disabled when set as FS, need restore
it when set as SS/SSP.
Fixes: dc4c1aa7eae9 ("usb: mtu3: add ->udc_set_speed()")
Cc: stable <redacted>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/mtu3/mtu3_core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Use usb_endpoint_maxp() and usb_endpoint_maxp_mult() seperately
to get maxpacket and mult.
Meanwhile fix the bug that should use @mult but not @burst
to save mult value.
Fixes: 4d79e042ed8b ("usb: mtu3: add support for usb3.1 IP")
Cc: stable <redacted>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/mtu3/mtu3_gadget.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
From: Felipe Balbi <balbi@kernel.org> Date: 2021-08-12 06:50:29
Chunfeng Yun [off-list ref] writes:
Use usb_endpoint_maxp() and usb_endpoint_maxp_mult() seperately
to get maxpacket and mult.
Meanwhile fix the bug that should use @mult but not @burst
to save mult value.
I really think you should split this into two patches. One which *only*
fixes the bug and another (patch 2) which *only* corrects the use
usb_endpoint_maxp()
--
balbi
On Thu, 2021-08-12 at 09:49 +0300, Felipe Balbi wrote:
Chunfeng Yun [off-list ref] writes:
quoted
Use usb_endpoint_maxp() and usb_endpoint_maxp_mult() seperately
to get maxpacket and mult.
Meanwhile fix the bug that should use @mult but not @burst
to save mult value.
I really think you should split this into two patches. One which
*only*
fixes the bug and another (patch 2) which *only* corrects the use
usb_endpoint_maxp()
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not include bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/cdns3/cdnsp-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Felipe Balbi <balbi@kernel.org> Date: 2021-08-12 06:51:39
Chunfeng Yun [off-list ref] writes:
quoted hunk
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not include bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/cdns3/cdnsp-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Thu, 2021-08-12 at 09:51 +0300, Felipe Balbi wrote:
Chunfeng Yun [off-list ref] writes:
quoted
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not include bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/cdns3/cdnsp-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/cdns3/cdnsp-mem.c
b/drivers/usb/cdns3/cdnsp-mem.c
index a47948a1623f..ad9aee3f1e39 100644
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not include bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/cdns3/cdnsp-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Tue, 2021-08-17 at 05:05 +0000, Pawel Laszczak wrote:
quoted
Chunfeng Yun [off-list ref] writes:
quoted
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not include bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/cdns3/cdnsp-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/cdns3/cdnsp-mem.c
b/drivers/usb/cdns3/cdnsp-mem.c
index a47948a1623f..ad9aee3f1e39 100644
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not includes bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Meanwhile no need AND 0x7ff when get maxp, remove it.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/gadget/udc/tegra-xudc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Felipe Balbi <balbi@kernel.org> Date: 2021-08-12 06:52:34
Chunfeng Yun [off-list ref] writes:
quoted hunk
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not includes bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Meanwhile no need AND 0x7ff when get maxp, remove it.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/gadget/udc/tegra-xudc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
On Thu, 2021-08-12 at 09:51 +0300, Felipe Balbi wrote:
Chunfeng Yun [off-list ref] writes:
quoted
usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize
of endpoint descriptor, not includes bit[12:11] anymore, so use
usb_endpoint_maxp_mult() instead.
Meanwhile no need AND 0x7ff when get maxp, remove it.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/gadget/udc/tegra-xudc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/udc/tegra-xudc.c
b/drivers/usb/gadget/udc/tegra-xudc.c
index a54d1cef17db..40a7417e7ae4 100644
usb_endpoint_maxp() already returns actual max packet size, no need
AND 0x7ff.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/gadget/udc/bdc/bdc_cmd.c | 1 -
1 file changed, 1 deletion(-)