* [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
@ 2023-12-15 7:34 Chunfeng Yun
2023-12-15 7:34 ` [PATCH v2 2/3] usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer Chunfeng Yun
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Chunfeng Yun @ 2023-12-15 7:34 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
AngeloGioacchino Del Regno
Cc: Chunfeng Yun, Conor Dooley, Matthias Brugger, Mathias Nyman,
linux-usb, linux-arm-kernel, linux-mediatek, devicetree,
linux-kernel, Macpaul Lin, Eddie Hung
For Gen1 isoc-in endpoint on controller before about SSUSB IPM v1.6.0, it
still send out unexpected ACK after receiving a short packet in burst
transfer, this will cause an exception on connected device, specially for
a 4k camera.
Add a quirk property "rx-fifo-depth" to work around this hardware issue,
prefer to use 2;
The side-effect is that may cause performance drop about 10%, including
bulk transfer.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth'
---
.../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
index e9644e333d78..e44a71acb5c0 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
@@ -124,6 +124,18 @@ properties:
defined in the xHCI spec on MTK's controller.
default: 5000
+ rx-fifo-depth:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ It is a quirk used to work around Gen1 isoc-in endpoint transfer issue
+ that still send out unexpected ACK after device finish the burst transfer
+ with a short packet and cause an exception, specially on a 4K camera
+ device, it happens on controller before about IPM v1.6.0; the side-effect
+ is that may cause performance drop about 10%, include bulk transfer,
+ prefer to use 2 here.
+ minimum: 0
+ maximum: 3
+
# the following properties are only used for case 1
wakeup-source:
description: enable USB remote wakeup, see power/wakeup-source.txt
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer
2023-12-15 7:34 [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Chunfeng Yun
@ 2023-12-15 7:34 ` Chunfeng Yun
2023-12-15 12:39 ` Greg Kroah-Hartman
2023-12-15 7:34 ` [PATCH v2 3/3] arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry Chunfeng Yun
2023-12-15 7:36 ` [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Krzysztof Kozlowski
2 siblings, 1 reply; 8+ messages in thread
From: Chunfeng Yun @ 2023-12-15 7:34 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
AngeloGioacchino Del Regno
Cc: Chunfeng Yun, Conor Dooley, Matthias Brugger, Mathias Nyman,
linux-usb, linux-arm-kernel, linux-mediatek, devicetree,
linux-kernel, Macpaul Lin, Eddie Hung
For Gen1 isoc-in transfer, host still send out unexpected ACK after device
finish the burst with a short packet, this will cause an exception on the
connected device, such as, a usb 4k camera.
It can be fixed by setting rxfifo depth less than 3, prefer to use 2 here,
the side-effect is that may cause performance drop about 10%, including
bulk transfer.
Fixes: 926d60ae64a6 ("usb: xhci-mtk: modify the SOF/ITP interval for mt8195")
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2:
use 'rx-fifo-depth' property;
add header file 'linux/bitfield.h' to avoid building error on some ARCH;
---
drivers/usb/host/xhci-mtk.c | 38 +++++++++++++++++++++++++++++++++++--
drivers/usb/host/xhci-mtk.h | 2 ++
2 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index bbdf1b0b7be1..dad6c9873d79 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -7,6 +7,7 @@
* Chunfeng Yun <chunfeng.yun@mediatek.com>
*/
+#include <linux/bitfield.h>
#include <linux/dma-mapping.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
@@ -73,6 +74,9 @@
#define FRMCNT_LEV1_RANG (0x12b << 8)
#define FRMCNT_LEV1_RANG_MASK GENMASK(19, 8)
+#define HSCH_CFG1 0x960
+#define SCH3_RXFIFO_DEPTH_MASK GENMASK(21, 20)
+
#define SS_GEN2_EOF_CFG 0x990
#define SSG2EOF_OFFSET 0x3c
@@ -165,6 +169,34 @@ static void xhci_mtk_set_frame_interval(struct xhci_hcd_mtk *mtk)
writel(value, hcd->regs + SS_GEN2_EOF_CFG);
}
+/*
+ * workaround: usb3.2 gen1 isoc rx hw issue
+ * host send out unexpected ACK afer device fininsh a burst transfer with
+ * a short packet.
+ */
+static void xhci_mtk_rxfifo_depth_set(struct xhci_hcd_mtk *mtk)
+{
+ struct usb_hcd *hcd = mtk->hcd;
+ u32 value;
+
+ if (mtk->rxfifo_depth < 0)
+ return;
+
+ value = readl(hcd->regs + HSCH_CFG1);
+ value &= ~SCH3_RXFIFO_DEPTH_MASK;
+ value |= FIELD_PREP(SCH3_RXFIFO_DEPTH_MASK, mtk->rxfifo_depth);
+ writel(value, hcd->regs + HSCH_CFG1);
+}
+
+static void xhci_mtk_init_quirk(struct xhci_hcd_mtk *mtk)
+{
+ /* workaround only for mt8195 */
+ xhci_mtk_set_frame_interval(mtk);
+
+ /* workaround for SoCs using SSUSB about before IPM v1.6.0 */
+ xhci_mtk_rxfifo_depth_set(mtk);
+}
+
static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
{
struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;
@@ -448,8 +480,7 @@ static int xhci_mtk_setup(struct usb_hcd *hcd)
if (ret)
return ret;
- /* workaround only for mt8195 */
- xhci_mtk_set_frame_interval(mtk);
+ xhci_mtk_init_quirk(mtk);
}
ret = xhci_gen_setup(hcd, xhci_mtk_quirks);
@@ -527,6 +558,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
of_property_read_u32(node, "mediatek,u2p-dis-msk",
&mtk->u2p_dis_msk);
+ mtk->rxfifo_depth = -1;
+ of_property_read_u32(node, "rx-fifo-depth", &mtk->rxfifo_depth);
+
ret = usb_wakeup_of_property_parse(mtk, node);
if (ret) {
dev_err(dev, "failed to parse uwk property\n");
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index 39f7ae7d3087..2d27bb0d3ecb 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -171,6 +171,8 @@ struct xhci_hcd_mtk {
struct regmap *uwk;
u32 uwk_reg_base;
u32 uwk_vers;
+
+ int rxfifo_depth;
};
static inline struct xhci_hcd_mtk *hcd_to_mtk(struct usb_hcd *hcd)
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry
2023-12-15 7:34 [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Chunfeng Yun
2023-12-15 7:34 ` [PATCH v2 2/3] usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer Chunfeng Yun
@ 2023-12-15 7:34 ` Chunfeng Yun
2023-12-15 7:36 ` [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Krzysztof Kozlowski
2 siblings, 0 replies; 8+ messages in thread
From: Chunfeng Yun @ 2023-12-15 7:34 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
AngeloGioacchino Del Regno
Cc: Chunfeng Yun, Conor Dooley, Matthias Brugger, Mathias Nyman,
linux-usb, linux-arm-kernel, linux-mediatek, devicetree,
linux-kernel, Macpaul Lin, Eddie Hung
Add the quirk property "rx-fifo-depth" to work around Gen1 isoc-in
transfer issue which send out unexpected ACK even after device
already finished the burst transfer with a short patcket, specially
for a 4K camera device.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2: use 'rx-fifo-depth' property
---
arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
index dd5b89b73190..132baeab675e 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
@@ -1185,6 +1185,7 @@
vusb33-supply = <&mt6359_vusb_ldo_reg>;
vbus-supply = <&usb_vbus>;
+ rx-fifo-depth = <2>;
};
&xhci1 {
@@ -1192,6 +1193,7 @@
vusb33-supply = <&mt6359_vusb_ldo_reg>;
vbus-supply = <&usb_vbus>;
+ rx-fifo-depth = <2>;
};
&xhci2 {
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
2023-12-15 7:34 [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Chunfeng Yun
2023-12-15 7:34 ` [PATCH v2 2/3] usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer Chunfeng Yun
2023-12-15 7:34 ` [PATCH v2 3/3] arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry Chunfeng Yun
@ 2023-12-15 7:36 ` Krzysztof Kozlowski
2023-12-20 2:05 ` Chunfeng Yun (云春峰)
2 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-15 7:36 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, AngeloGioacchino Del Regno
Cc: Conor Dooley, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Macpaul Lin, Eddie Hung
On 15/12/2023 08:34, Chunfeng Yun wrote:
> For Gen1 isoc-in endpoint on controller before about SSUSB IPM v1.6.0, it
> still send out unexpected ACK after receiving a short packet in burst
> transfer, this will cause an exception on connected device, specially for
> a 4k camera.
> Add a quirk property "rx-fifo-depth" to work around this hardware issue,
> prefer to use 2;
> The side-effect is that may cause performance drop about 10%, including
> bulk transfer.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth'
> ---
> .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> index e9644e333d78..e44a71acb5c0 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> @@ -124,6 +124,18 @@ properties:
> defined in the xHCI spec on MTK's controller.
> default: 5000
>
> + rx-fifo-depth:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + It is a quirk used to work around Gen1 isoc-in endpoint transfer issue
> + that still send out unexpected ACK after device finish the burst transfer
> + with a short packet and cause an exception, specially on a 4K camera
> + device, it happens on controller before about IPM v1.6.0; the side-effect
> + is that may cause performance drop about 10%, include bulk transfer,
> + prefer to use 2 here.
What is the meaning of 0-3? bytes? words?
> + minimum: 0
> + maximum: 3
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer
2023-12-15 7:34 ` [PATCH v2 2/3] usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer Chunfeng Yun
@ 2023-12-15 12:39 ` Greg Kroah-Hartman
0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-15 12:39 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Macpaul Lin, Eddie Hung
On Fri, Dec 15, 2023 at 03:34:30PM +0800, Chunfeng Yun wrote:
> For Gen1 isoc-in transfer, host still send out unexpected ACK after device
> finish the burst with a short packet, this will cause an exception on the
> connected device, such as, a usb 4k camera.
> It can be fixed by setting rxfifo depth less than 3, prefer to use 2 here,
> the side-effect is that may cause performance drop about 10%, including
> bulk transfer.
>
> Fixes: 926d60ae64a6 ("usb: xhci-mtk: modify the SOF/ITP interval for mt8195")
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2:
> use 'rx-fifo-depth' property;
> add header file 'linux/bitfield.h' to avoid building error on some ARCH;
> ---
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You have marked a patch with a "Fixes:" tag for a commit that is in an
older released kernel, yet you do not have a cc: stable line in the
signed-off-by area at all, which means that the patch will not be
applied to any older kernel releases. To properly fix this, please
follow the documented rules in the
Documentation/process/stable-kernel-rules.rst file for how to resolve
this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
2023-12-15 7:36 ` [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Krzysztof Kozlowski
@ 2023-12-20 2:05 ` Chunfeng Yun (云春峰)
2023-12-20 7:25 ` Krzysztof Kozlowski
0 siblings, 1 reply; 8+ messages in thread
From: Chunfeng Yun (云春峰) @ 2023-12-20 2:05 UTC (permalink / raw)
To: krzysztof.kozlowski@linaro.org, gregkh@linuxfoundation.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
angelogioacchino.delregno@collabora.com
Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
mathias.nyman@intel.com, Eddie Hung (洪正鑫),
conor+dt@kernel.org, Macpaul Lin (林智斌),
linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com
On Fri, 2023-12-15 at 08:36 +0100, Krzysztof Kozlowski wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On 15/12/2023 08:34, Chunfeng Yun wrote:
> > For Gen1 isoc-in endpoint on controller before about SSUSB IPM
> v1.6.0, it
> > still send out unexpected ACK after receiving a short packet in
> burst
> > transfer, this will cause an exception on connected device,
> specially for
> > a 4k camera.
> > Add a quirk property "rx-fifo-depth" to work around this hardware
> issue,
> > prefer to use 2;
> > The side-effect is that may cause performance drop about 10%,
> including
> > bulk transfer.
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth'
> > ---
> > .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12
> ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml
> > index e9644e333d78..e44a71acb5c0 100644
> > --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > @@ -124,6 +124,18 @@ properties:
> > defined in the xHCI spec on MTK's controller.
> > default: 5000
> >
> > + rx-fifo-depth:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
> > + It is a quirk used to work around Gen1 isoc-in endpoint
> transfer issue
> > + that still send out unexpected ACK after device finish the
> burst transfer
> > + with a short packet and cause an exception, specially on a
> 4K camera
> > + device, it happens on controller before about IPM v1.6.0;
> the side-effect
> > + is that may cause performance drop about 10%, include bulk
> transfer,
> > + prefer to use 2 here.
>
> What is the meaning of 0-3? bytes? words?
0 - 1K bytes;
3 - 4K bytes;
I will add this in description
>
> > + minimum: 0
> > + maximum: 3
>
>
> Best regards,
> Krzysztof
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
2023-12-20 2:05 ` Chunfeng Yun (云春峰)
@ 2023-12-20 7:25 ` Krzysztof Kozlowski
2023-12-27 2:00 ` Chunfeng Yun (云春峰)
0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-20 7:25 UTC (permalink / raw)
To: Chunfeng Yun (云春峰),
gregkh@linuxfoundation.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org,
angelogioacchino.delregno@collabora.com
Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
mathias.nyman@intel.com, Eddie Hung (洪正鑫),
conor+dt@kernel.org, Macpaul Lin (林智斌),
linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com
On 20/12/2023 03:05, Chunfeng Yun (云春峰) wrote:
> On Fri, 2023-12-15 at 08:36 +0100, Krzysztof Kozlowski wrote:
>>
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>> On 15/12/2023 08:34, Chunfeng Yun wrote:
>>> For Gen1 isoc-in endpoint on controller before about SSUSB IPM
>> v1.6.0, it
>>> still send out unexpected ACK after receiving a short packet in
>> burst
>>> transfer, this will cause an exception on connected device,
>> specially for
>>> a 4k camera.
>>> Add a quirk property "rx-fifo-depth" to work around this hardware
>> issue,
>>> prefer to use 2;
>>> The side-effect is that may cause performance drop about 10%,
>> including
>>> bulk transfer.
>>>
>>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>>> ---
>>> v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth'
>>> ---
>>> .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12
>> ++++++++++++
>>> 1 file changed, 12 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-
>> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-
>> xhci.yaml
>>> index e9644e333d78..e44a71acb5c0 100644
>>> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
>>> @@ -124,6 +124,18 @@ properties:
>>> defined in the xHCI spec on MTK's controller.
>>> default: 5000
>>>
>>> + rx-fifo-depth:
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + description:
>>> + It is a quirk used to work around Gen1 isoc-in endpoint
>> transfer issue
>>> + that still send out unexpected ACK after device finish the
>> burst transfer
>>> + with a short packet and cause an exception, specially on a
>> 4K camera
>>> + device, it happens on controller before about IPM v1.6.0;
>> the side-effect
>>> + is that may cause performance drop about 10%, include bulk
>> transfer,
>>> + prefer to use 2 here.
>>
>> What is the meaning of 0-3? bytes? words?
> 0 - 1K bytes;
> 3 - 4K bytes;
> I will add this in description
No, don't add. Just use correct values. 0 means 0 words or bytes. Not
1000 bytes.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
2023-12-20 7:25 ` Krzysztof Kozlowski
@ 2023-12-27 2:00 ` Chunfeng Yun (云春峰)
0 siblings, 0 replies; 8+ messages in thread
From: Chunfeng Yun (云春峰) @ 2023-12-27 2:00 UTC (permalink / raw)
To: krzysztof.kozlowski@linaro.org, gregkh@linuxfoundation.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
angelogioacchino.delregno@collabora.com
Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
mathias.nyman@intel.com, Eddie Hung (洪正鑫),
Macpaul Lin (林智斌), conor+dt@kernel.org,
linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com
On Wed, 2023-12-20 at 08:25 +0100, Krzysztof Kozlowski wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On 20/12/2023 03:05, Chunfeng Yun (云春峰) wrote:
> > On Fri, 2023-12-15 at 08:36 +0100, Krzysztof Kozlowski wrote:
> >>
> >> External email : Please do not click links or open attachments
> until
> >> you have verified the sender or the content.
> >> On 15/12/2023 08:34, Chunfeng Yun wrote:
> >>> For Gen1 isoc-in endpoint on controller before about SSUSB IPM
> >> v1.6.0, it
> >>> still send out unexpected ACK after receiving a short packet in
> >> burst
> >>> transfer, this will cause an exception on connected device,
> >> specially for
> >>> a 4k camera.
> >>> Add a quirk property "rx-fifo-depth" to work around this hardware
> >> issue,
> >>> prefer to use 2;
> >>> The side-effect is that may cause performance drop about 10%,
> >> including
> >>> bulk transfer.
> >>>
> >>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> >>> ---
> >>> v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth'
> >>> ---
> >>> .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12
> >> ++++++++++++
> >>> 1 file changed, 12 insertions(+)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-
> >> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-
> >> xhci.yaml
> >>> index e9644e333d78..e44a71acb5c0 100644
> >>> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml
> >>> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml
> >>> @@ -124,6 +124,18 @@ properties:
> >>> defined in the xHCI spec on MTK's controller.
> >>> default: 5000
> >>>
> >>> + rx-fifo-depth:
> >>> + $ref: /schemas/types.yaml#/definitions/uint32
> >>> + description:
> >>> + It is a quirk used to work around Gen1 isoc-in endpoint
> >> transfer issue
> >>> + that still send out unexpected ACK after device finish the
> >> burst transfer
> >>> + with a short packet and cause an exception, specially on a
> >> 4K camera
> >>> + device, it happens on controller before about IPM v1.6.0;
> >> the side-effect
> >>> + is that may cause performance drop about 10%, include bulk
> >> transfer,
> >>> + prefer to use 2 here.
> >>
> >> What is the meaning of 0-3? bytes? words?
> > 0 - 1K bytes;
> > 3 - 4K bytes;
> > I will add this in description
>
> No, don't add. Just use correct values. 0 means 0 words or bytes. Not
> 1000 bytes.
Ok, I'll modify it;
Thanks
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-27 2:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 7:34 [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Chunfeng Yun
2023-12-15 7:34 ` [PATCH v2 2/3] usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer Chunfeng Yun
2023-12-15 12:39 ` Greg Kroah-Hartman
2023-12-15 7:34 ` [PATCH v2 3/3] arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry Chunfeng Yun
2023-12-15 7:36 ` [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Krzysztof Kozlowski
2023-12-20 2:05 ` Chunfeng Yun (云春峰)
2023-12-20 7:25 ` Krzysztof Kozlowski
2023-12-27 2:00 ` Chunfeng Yun (云春峰)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).