Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1593878 > unrolled thread

[PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd

Started byChunfeng Yun <chunfeng.yun@mediatek.com>
First post2017-03-07 04:40 +0100
Last post2017-03-08 12:10 +0100
Articles 7 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-03-07 04:40 +0100
    [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-03-07 04:40 +0100
      Re: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of  xhci_hcd struct Thierry Reding <treding@nvidia.com> - 2017-03-07 12:10 +0100
        Re: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of  xhci_hcd struct Mathias Nyman <mathias.nyman@linux.intel.com> - 2017-03-07 16:20 +0100
    Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary  hcd Mathias Nyman <mathias.nyman@linux.intel.com> - 2017-03-07 17:30 +0100
      Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding  primary hcd Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-03-08 02:00 +0100
        Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary  hcd Mathias Nyman <mathias.nyman@linux.intel.com> - 2017-03-08 12:10 +0100

#1593878 — [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd

FromChunfeng Yun <chunfeng.yun@mediatek.com>
Date2017-03-07 04:40 +0100
Subject[PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd
Message-ID<tie8G-1nN-1@gated-at.bofh.it>
hcc_params is set in xhci_gen_setup() called from usb_add_hcd(),
so checks the Maximum Primary Stream Array Size in the hcc_params
register after adding primary hcd.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/host/xhci-mtk.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 9066ec9..6ac73a6 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -678,13 +678,13 @@ static int xhci_mtk_probe(struct platform_device *pdev)
 		goto power_off_phys;
 	}
 
-	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
-		xhci->shared_hcd->can_do_streams = 1;
-
 	ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
 	if (ret)
 		goto put_usb3_hcd;
 
+	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
+		xhci->shared_hcd->can_do_streams = 1;
+
 	ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
 	if (ret)
 		goto dealloc_usb2_hcd;
-- 
1.7.9.5

[toc] | [next] | [standalone]


#1593888 — [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct

FromChunfeng Yun <chunfeng.yun@mediatek.com>
Date2017-03-07 04:40 +0100
Subject[PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct
Message-ID<tie8H-1nN-25@gated-at.bofh.it>
In reply to#1593878
because hcd_priv_size is already size of xhci_hcd struct,
extra_priv_size is not needed anymore for MTK and tegra drivers.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/host/xhci-mtk.c   |    1 -
 drivers/usb/host/xhci-tegra.c |    1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 6ac73a6..67d5dc7 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -382,7 +382,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
 
 static int xhci_mtk_setup(struct usb_hcd *hcd);
 static const struct xhci_driver_overrides xhci_mtk_overrides __initconst = {
-	.extra_priv_size = sizeof(struct xhci_hcd),
 	.reset = xhci_mtk_setup,
 };
 
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index a59fafb..74436f8 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1308,7 +1308,6 @@ static int tegra_xhci_setup(struct usb_hcd *hcd)
 }
 
 static const struct xhci_driver_overrides tegra_xhci_overrides __initconst = {
-	.extra_priv_size = sizeof(struct xhci_hcd),
 	.reset = tegra_xhci_setup,
 };
 
-- 
1.7.9.5

[toc] | [prev] | [next] | [standalone]


#1594121 — Re: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct

FromThierry Reding <treding@nvidia.com>
Date2017-03-07 12:10 +0100
SubjectRe: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct
Message-ID<tilaa-6G6-11@gated-at.bofh.it>
In reply to#1593888

[Multipart message — attachments visible in raw view] — view raw

On Tue, Mar 07, 2017 at 11:32:23AM +0800, Chunfeng Yun wrote:
> because hcd_priv_size is already size of xhci_hcd struct,
> extra_priv_size is not needed anymore for MTK and tegra drivers.
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  drivers/usb/host/xhci-mtk.c   |    1 -
>  drivers/usb/host/xhci-tegra.c |    1 -
>  2 files changed, 2 deletions(-)

For Tegra:

Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>

[toc] | [prev] | [next] | [standalone]


#1594331 — Re: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct

FromMathias Nyman <mathias.nyman@linux.intel.com>
Date2017-03-07 16:20 +0100
SubjectRe: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct
Message-ID<tip46-X4-17@gated-at.bofh.it>
In reply to#1594121
On 07.03.2017 13:02, Thierry Reding wrote:
> On Tue, Mar 07, 2017 at 11:32:23AM +0800, Chunfeng Yun wrote:
>> because hcd_priv_size is already size of xhci_hcd struct,
>> extra_priv_size is not needed anymore for MTK and tegra drivers.
>>
>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>> ---
>>   drivers/usb/host/xhci-mtk.c   |    1 -
>>   drivers/usb/host/xhci-tegra.c |    1 -
>>   2 files changed, 2 deletions(-)
>

Nice catch, thanks.
queued.

> For Tegra:
>
> Tested-by: Thierry Reding <treding@nvidia.com>
> Acked-by: Thierry Reding <treding@nvidia.com>
>

adding tags

-Mathias

[toc] | [prev] | [next] | [standalone]


#1594398 — Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd

FromMathias Nyman <mathias.nyman@linux.intel.com>
Date2017-03-07 17:30 +0100
SubjectRe: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd
Message-ID<tiq9Q-1Dp-7@gated-at.bofh.it>
In reply to#1593878
On 07.03.2017 05:32, Chunfeng Yun wrote:
> hcc_params is set in xhci_gen_setup() called from usb_add_hcd(),
> so checks the Maximum Primary Stream Array Size in the hcc_params
> register after adding primary hcd.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>   drivers/usb/host/xhci-mtk.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
> index 9066ec9..6ac73a6 100644
> --- a/drivers/usb/host/xhci-mtk.c
> +++ b/drivers/usb/host/xhci-mtk.c
> @@ -678,13 +678,13 @@ static int xhci_mtk_probe(struct platform_device *pdev)
>   		goto power_off_phys;
>   	}
>
> -	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
> -		xhci->shared_hcd->can_do_streams = 1;
> -
>   	ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
>   	if (ret)
>   		goto put_usb3_hcd;
>
> +	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
> +		xhci->shared_hcd->can_do_streams = 1;
> +
>   	ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
>   	if (ret)
>   		goto dealloc_usb2_hcd;
>

Thanks.
Looks like streams check has never worked for Mediatek xHC hosts,

Do you know if this has caused any issues?
looks like it should go usb-linus and maybe stable kernels as well.
  
-Mathias

[toc] | [prev] | [next] | [standalone]


#1594776 — Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd

FromChunfeng Yun <chunfeng.yun@mediatek.com>
Date2017-03-08 02:00 +0100
SubjectRe: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd
Message-ID<tiy7n-7dF-7@gated-at.bofh.it>
In reply to#1594398
On Tue, 2017-03-07 at 17:10 +0200, Mathias Nyman wrote:
> On 07.03.2017 05:32, Chunfeng Yun wrote:
> > hcc_params is set in xhci_gen_setup() called from usb_add_hcd(),
> > so checks the Maximum Primary Stream Array Size in the hcc_params
> > register after adding primary hcd.
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >   drivers/usb/host/xhci-mtk.c |    6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
> > index 9066ec9..6ac73a6 100644
> > --- a/drivers/usb/host/xhci-mtk.c
> > +++ b/drivers/usb/host/xhci-mtk.c
> > @@ -678,13 +678,13 @@ static int xhci_mtk_probe(struct platform_device *pdev)
> >   		goto power_off_phys;
> >   	}
> >
> > -	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
> > -		xhci->shared_hcd->can_do_streams = 1;
> > -
> >   	ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
> >   	if (ret)
> >   		goto put_usb3_hcd;
> >
> > +	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
> > +		xhci->shared_hcd->can_do_streams = 1;
> > +
> >   	ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
> >   	if (ret)
> >   		goto dealloc_usb2_hcd;
> >
> 
> Thanks.
> Looks like streams check has never worked for Mediatek xHC hosts,
> 
> Do you know if this has caused any issues?
> looks like it should go usb-linus and maybe stable kernels as well.
No issues on mt8173, because it doesn't support bulk stream. But it
causes a issue on the newest SoC which is not upstreamed, so I think it
needn't go stable kernels.

Thank you.
>   
> -Mathias

[toc] | [prev] | [next] | [standalone]


#1595057 — Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd

FromMathias Nyman <mathias.nyman@linux.intel.com>
Date2017-03-08 12:10 +0100
SubjectRe: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd
Message-ID<tiHDI-5Js-19@gated-at.bofh.it>
In reply to#1594776
On 08.03.2017 02:51, Chunfeng Yun wrote:
> On Tue, 2017-03-07 at 17:10 +0200, Mathias Nyman wrote:
>> On 07.03.2017 05:32, Chunfeng Yun wrote:
>>> hcc_params is set in xhci_gen_setup() called from usb_add_hcd(),
>>> so checks the Maximum Primary Stream Array Size in the hcc_params
>>> register after adding primary hcd.
>>>
>>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>>
>> Thanks.
>> Looks like streams check has never worked for Mediatek xHC hosts,
>>
>> Do you know if this has caused any issues?
>> looks like it should go usb-linus and maybe stable kernels as well.
> No issues on mt8173, because it doesn't support bulk stream. But it
> causes a issue on the newest SoC which is not upstreamed, so I think it
> needn't go stable kernels.
>

Ok, thanks, skipping stable

-Mathias

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web