Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Chunfeng Yun
On Thu, 2018-03-22 at 13:53 +0100, Greg Kroah-Hartman wrote:
> On Thu, Mar 22, 2018 at 08:12:50PM +0800, Chunfeng Yun wrote:
> > The phys has already been initialized when add primary hcd,
> > including usb2 phys and usb3 phys also if exist, so needn't
> > re-parse "phys" property again.
> 
> Wait, why does the subject say "xhci", when this is in USB core code?
> 
> I'll go edit that by hand...
Thanks




Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Chunfeng Yun
On Thu, 2018-03-22 at 13:53 +0100, Greg Kroah-Hartman wrote:
> On Thu, Mar 22, 2018 at 08:12:50PM +0800, Chunfeng Yun wrote:
> > The phys has already been initialized when add primary hcd,
> > including usb2 phys and usb3 phys also if exist, so needn't
> > re-parse "phys" property again.
> 
> Wait, why does the subject say "xhci", when this is in USB core code?
> 
> I'll go edit that by hand...
Thanks




Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Greg Kroah-Hartman
On Thu, Mar 22, 2018 at 08:12:50PM +0800, Chunfeng Yun wrote:
> The phys has already been initialized when add primary hcd,
> including usb2 phys and usb3 phys also if exist, so needn't
> re-parse "phys" property again.

Wait, why does the subject say "xhci", when this is in USB core code?

I'll go edit that by hand...


Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Greg Kroah-Hartman
On Thu, Mar 22, 2018 at 08:12:50PM +0800, Chunfeng Yun wrote:
> The phys has already been initialized when add primary hcd,
> including usb2 phys and usb3 phys also if exist, so needn't
> re-parse "phys" property again.

Wait, why does the subject say "xhci", when this is in USB core code?

I'll go edit that by hand...


Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Roger Quadros
On 22/03/18 14:12, Chunfeng Yun wrote:
> The phys has already been initialized when add primary hcd,
> including usb2 phys and usb3 phys also if exist, so needn't
> re-parse "phys" property again.
> 
> Signed-off-by: Chunfeng Yun 

Reviewed-by: Roger Quadros 

> ---
> V3:
> add the following info about v1 & v2 suggested by Greg
> V2:
> fix it in hcd.c suggested by Roger
> V1:
> skip phys initialization when add shared HCD by setting
> xhci->shared_hcd->skip_phy_initialization=1;
> for both xhci-plat.c & xhci-mtk.c files.
> ---
>  drivers/usb/core/hcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index 5a92d8f..777036a 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -2757,7 +2757,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
>   }
>   }
>  
> - if (!hcd->skip_phy_initialization) {
> + if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) {
>   hcd->phy_roothub = usb_phy_roothub_init(hcd->self.sysdev);
>   if (IS_ERR(hcd->phy_roothub)) {
>   retval = PTR_ERR(hcd->phy_roothub);
> 

-- 
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Roger Quadros
On 22/03/18 14:12, Chunfeng Yun wrote:
> The phys has already been initialized when add primary hcd,
> including usb2 phys and usb3 phys also if exist, so needn't
> re-parse "phys" property again.
> 
> Signed-off-by: Chunfeng Yun 

Reviewed-by: Roger Quadros 

> ---
> V3:
> add the following info about v1 & v2 suggested by Greg
> V2:
> fix it in hcd.c suggested by Roger
> V1:
> skip phys initialization when add shared HCD by setting
> xhci->shared_hcd->skip_phy_initialization=1;
> for both xhci-plat.c & xhci-mtk.c files.
> ---
>  drivers/usb/core/hcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index 5a92d8f..777036a 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -2757,7 +2757,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
>   }
>   }
>  
> - if (!hcd->skip_phy_initialization) {
> + if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) {
>   hcd->phy_roothub = usb_phy_roothub_init(hcd->self.sysdev);
>   if (IS_ERR(hcd->phy_roothub)) {
>   retval = PTR_ERR(hcd->phy_roothub);
> 

-- 
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki