All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
@ 2021-10-21  5:33 Chunfeng Yun
  2021-11-02  2:45 ` Chunfeng Yun
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Chunfeng Yun @ 2021-10-21  5:33 UTC (permalink / raw)
  To: Bin Meng, Marek Vasut
  Cc: Ryder Lee, Weijie Gao, Chunfeng Yun, GSS_MTK_Uboot_upstream,
	u-boot, Tom Rini, Xin Lin

When allocate the GPD ring, and tell its address to the controller, then
the driver starts or resumes the QMU, the controller will try to access
the first GPD, so need flush the first one to avoid wrong GPD status.

Reported-by: Xin Lin <Xin.Lin@mediatek.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_qmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
index 95eaf6d236..e8dc0095ab 100644
--- a/drivers/usb/mtu3/mtu3_qmu.c
+++ b/drivers/usb/mtu3/mtu3_qmu.c
@@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
 	memset(gpd, 0, QMU_GPD_RING_SIZE);
 	ring->dma = (dma_addr_t)gpd;
 	gpd_ring_init(ring, gpd);
+	mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
 
 	return 0;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
  2021-10-21  5:33 [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring Chunfeng Yun
@ 2021-11-02  2:45 ` Chunfeng Yun
  2021-11-02  2:50 ` Chunfeng Yun
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Chunfeng Yun @ 2021-11-02  2:45 UTC (permalink / raw)
  To: Bin Meng, Marek Vasut
  Cc: Ryder Lee, Weijie Gao, GSS_MTK_Uboot_upstream, u-boot, Tom Rini, Xin Lin

Hi Marek,

On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote:
> When allocate the GPD ring, and tell its address to the controller,
> then
> the driver starts or resumes the QMU, the controller will try to
> access
> the first GPD, so need flush the first one to avoid wrong GPD status.
> 
> Reported-by: Xin Lin <Xin.Lin@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/mtu3/mtu3_qmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/mtu3/mtu3_qmu.c
> b/drivers/usb/mtu3/mtu3_qmu.c
> index 95eaf6d236..e8dc0095ab 100644
> --- a/drivers/usb/mtu3/mtu3_qmu.c
> +++ b/drivers/usb/mtu3/mtu3_qmu.c
> @@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
>  	memset(gpd, 0, QMU_GPD_RING_SIZE);
>  	ring->dma = (dma_addr_t)gpd;
>  	gpd_ring_init(ring, gpd);
> +	mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
>  
>  	return 0;
>  }

Could you please pick up this patch?

Thanks


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
  2021-10-21  5:33 [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring Chunfeng Yun
  2021-11-02  2:45 ` Chunfeng Yun
@ 2021-11-02  2:50 ` Chunfeng Yun
  2021-11-02  7:19 ` Chunfeng Yun
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Chunfeng Yun @ 2021-11-02  2:50 UTC (permalink / raw)
  To: Bin Meng, Marek Vasut
  Cc: Ryder Lee, Weijie Gao, GSS_MTK_Uboot_upstream, u-boot, Tom Rini, Xin Lin

Hi Marek,

On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote:
> When allocate the GPD ring, and tell its address to the controller,
> then
> the driver starts or resumes the QMU, the controller will try to
> access
> the first GPD, so need flush the first one to avoid wrong GPD status.
> 
> Reported-by: Xin Lin <Xin.Lin@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/mtu3/mtu3_qmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/mtu3/mtu3_qmu.c
> b/drivers/usb/mtu3/mtu3_qmu.c
> index 95eaf6d236..e8dc0095ab 100644
> --- a/drivers/usb/mtu3/mtu3_qmu.c
> +++ b/drivers/usb/mtu3/mtu3_qmu.c
> @@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
>  	memset(gpd, 0, QMU_GPD_RING_SIZE);
>  	ring->dma = (dma_addr_t)gpd;
>  	gpd_ring_init(ring, gpd);
> +	mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
>  
>  	return 0;
>  }

Could you please pick up this patch?

Thanks


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
  2021-10-21  5:33 [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring Chunfeng Yun
  2021-11-02  2:45 ` Chunfeng Yun
  2021-11-02  2:50 ` Chunfeng Yun
@ 2021-11-02  7:19 ` Chunfeng Yun
  2021-11-03  2:31 ` Chunfeng Yun
  2021-11-03  2:39 ` Chunfeng Yun
  4 siblings, 0 replies; 7+ messages in thread
From: Chunfeng Yun @ 2021-11-02  7:19 UTC (permalink / raw)
  To: Bin Meng, Marek Vasut
  Cc: Ryder Lee, Weijie Gao, GSS_MTK_Uboot_upstream, u-boot, Tom Rini, Xin Lin

Hi Marek,

On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote:
> When allocate the GPD ring, and tell its address to the controller,
> then
> the driver starts or resumes the QMU, the controller will try to
> access
> the first GPD, so need flush the first one to avoid wrong GPD status.
> 
> Reported-by: Xin Lin <Xin.Lin@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/mtu3/mtu3_qmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/mtu3/mtu3_qmu.c
> b/drivers/usb/mtu3/mtu3_qmu.c
> index 95eaf6d236..e8dc0095ab 100644
> --- a/drivers/usb/mtu3/mtu3_qmu.c
> +++ b/drivers/usb/mtu3/mtu3_qmu.c
> @@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
>  	memset(gpd, 0, QMU_GPD_RING_SIZE);
>  	ring->dma = (dma_addr_t)gpd;
>  	gpd_ring_init(ring, gpd);
> +	mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
>  
>  	return 0;
>  }
Could you please pick up this patch?

Thanks


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
  2021-10-21  5:33 [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring Chunfeng Yun
                   ` (2 preceding siblings ...)
  2021-11-02  7:19 ` Chunfeng Yun
@ 2021-11-03  2:31 ` Chunfeng Yun
  2021-11-03  2:39 ` Chunfeng Yun
  4 siblings, 0 replies; 7+ messages in thread
From: Chunfeng Yun @ 2021-11-03  2:31 UTC (permalink / raw)
  To: Bin Meng, Marek Vasut
  Cc: Ryder Lee, Weijie Gao, GSS_MTK_Uboot_upstream, u-boot, Tom Rini, Xin Lin

Hi Marek,

On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote:
> When allocate the GPD ring, and tell its address to the controller,
> then
> the driver starts or resumes the QMU, the controller will try to
> access
> the first GPD, so need flush the first one to avoid wrong GPD status.
> 
> Reported-by: Xin Lin <Xin.Lin@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/mtu3/mtu3_qmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/mtu3/mtu3_qmu.c
> b/drivers/usb/mtu3/mtu3_qmu.c
> index 95eaf6d236..e8dc0095ab 100644
> --- a/drivers/usb/mtu3/mtu3_qmu.c
> +++ b/drivers/usb/mtu3/mtu3_qmu.c
> @@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
>  	memset(gpd, 0, QMU_GPD_RING_SIZE);
>  	ring->dma = (dma_addr_t)gpd;
>  	gpd_ring_init(ring, gpd);
> +	mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
>  
>  	return 0;
>  }
Could you please pick up this patch?

Thanks


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
  2021-10-21  5:33 [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring Chunfeng Yun
                   ` (3 preceding siblings ...)
  2021-11-03  2:31 ` Chunfeng Yun
@ 2021-11-03  2:39 ` Chunfeng Yun
  2021-11-03 10:13   ` Marek Vasut
  4 siblings, 1 reply; 7+ messages in thread
From: Chunfeng Yun @ 2021-11-03  2:39 UTC (permalink / raw)
  To: Bin Meng, Marek Vasut
  Cc: Ryder Lee, Weijie Gao, GSS_MTK_Uboot_upstream, u-boot, Tom Rini, Xin Lin

Hi Marek,

On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote:
> When allocate the GPD ring, and tell its address to the controller,
> then
> the driver starts or resumes the QMU, the controller will try to
> access
> the first GPD, so need flush the first one to avoid wrong GPD status.
> 
> Reported-by: Xin Lin <Xin.Lin@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/mtu3/mtu3_qmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/mtu3/mtu3_qmu.c
> b/drivers/usb/mtu3/mtu3_qmu.c
> index 95eaf6d236..e8dc0095ab 100644
> --- a/drivers/usb/mtu3/mtu3_qmu.c
> +++ b/drivers/usb/mtu3/mtu3_qmu.c
> @@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
>  	memset(gpd, 0, QMU_GPD_RING_SIZE);
>  	ring->dma = (dma_addr_t)gpd;
>  	gpd_ring_init(ring, gpd);
> +	mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
>  
>  	return 0;
>  }
Could you please pick up this patch?

Thanks


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
  2021-11-03  2:39 ` Chunfeng Yun
@ 2021-11-03 10:13   ` Marek Vasut
  0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2021-11-03 10:13 UTC (permalink / raw)
  To: Chunfeng Yun, Bin Meng
  Cc: Ryder Lee, Weijie Gao, GSS_MTK_Uboot_upstream, u-boot, Tom Rini, Xin Lin

On 11/3/21 3:39 AM, Chunfeng Yun wrote:
> Hi Marek,
> 
> On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote:
>> When allocate the GPD ring, and tell its address to the controller,
>> then
>> the driver starts or resumes the QMU, the controller will try to
>> access
>> the first GPD, so need flush the first one to avoid wrong GPD status.
>>
>> Reported-by: Xin Lin <Xin.Lin@mediatek.com>
>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>> ---
>>   drivers/usb/mtu3/mtu3_qmu.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/usb/mtu3/mtu3_qmu.c
>> b/drivers/usb/mtu3/mtu3_qmu.c
>> index 95eaf6d236..e8dc0095ab 100644
>> --- a/drivers/usb/mtu3/mtu3_qmu.c
>> +++ b/drivers/usb/mtu3/mtu3_qmu.c
>> @@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
>>   	memset(gpd, 0, QMU_GPD_RING_SIZE);
>>   	ring->dma = (dma_addr_t)gpd;
>>   	gpd_ring_init(ring, gpd);
>> +	mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
>>   
>>   	return 0;
>>   }
> Could you please pick up this patch?

Should be on its way, thanks for the reminder.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-13  7:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21  5:33 [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring Chunfeng Yun
2021-11-02  2:45 ` Chunfeng Yun
2021-11-02  2:50 ` Chunfeng Yun
2021-11-02  7:19 ` Chunfeng Yun
2021-11-03  2:31 ` Chunfeng Yun
2021-11-03  2:39 ` Chunfeng Yun
2021-11-03 10:13   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.