summaryrefslogtreecommitdiff
path: root/include/linux/usb/chipidea.h
diff options
context:
space:
mode:
authorXu Yang <xu.yang_2@nxp.com>2024-09-23 11:12:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-04 16:13:58 +0300
commitec841b8d73cff37f8960e209017efe1eb2fb21f2 (patch)
tree59f2145cefd2c5cb8eda2a871604dd8863076950 /include/linux/usb/chipidea.h
parent669e995f70deb2e1be7290fb63877fe313d9132c (diff)
downloadlinux-ec841b8d73cff37f8960e209017efe1eb2fb21f2.tar.xz
usb: chipidea: add CI_HDRC_HAS_SHORT_PKT_LIMIT flag
Currently, the imx deivice controller has below limitations: 1. can't generate short packet interrupt if IOC not set in dTD. So if one request span more than one dTDs and only the last dTD set IOC, the usb request will pending there if no more data comes. 2. the controller can't accurately deliver data to differtent usb requests in some cases due to short packet. For example: one usb request span 3 dTDs, then if the controller received a short packet the next packet will go to 2nd dTD of current request rather than the first dTD of next request. 3. can't build a bus packet use multiple dTDs. For example: controller needs to send one packet of 512 bytes use dTD1 (200 bytes) + dTD2 (312 bytes), actually the host side will see 200 bytes short packet. Based on these limits, add CI_HDRC_HAS_SHORT_PKT_LIMIT flag and use it on imx platforms. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20240923081203.2851768-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/chipidea.h')
-rw-r--r--include/linux/usb/chipidea.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 5a7f96684ea2..ebdfef124b2b 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -65,6 +65,7 @@ struct ci_hdrc_platform_data {
#define CI_HDRC_PHY_VBUS_CONTROL BIT(16)
#define CI_HDRC_HAS_PORTSC_PEC_MISSED BIT(17)
#define CI_HDRC_FORCE_VBUS_ACTIVE_ALWAYS BIT(18)
+#define CI_HDRC_HAS_SHORT_PKT_LIMIT BIT(19)
enum usb_dr_mode dr_mode;
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1