* [PATCH v1 1/1] usb:xhci: update condition to select bus->sysdev from parent device
@ 2017-06-06 7:11 Thang Q. Nguyen
2017-07-04 3:37 ` Thang Q. Nguyen
0 siblings, 1 reply; 2+ messages in thread
From: Thang Q. Nguyen @ 2017-06-06 7:11 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Sriram Dash, linux-usb, linux-kernel
Cc: Thang Nguyen, Phong Vo, Loc Ho, Tung Nguyen, patches
For commit 4c39d4b949d3 ("usb: xhci: use bus->sysdev for DMA
configuration"), sysdev points to devices known to the system firmware
or hardware for DMA parameters.
However, the parent of the system firmware/hardware device checking
logic does not work in ACPI boot mode. This patch updates the formulation
to check this case in both DT and ACPI.
Signed-off-by: Tung Nguyen <tunguyen@apm.com>
Signed-off-by: Thang Q. Nguyen <tqnguyen@apm.com>
---
drivers/usb/host/xhci-plat.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index c04144b..e3e342a 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -187,7 +187,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
* 3. xhci_plat is grandchild of a pci device (dwc3-pci)
*/
sysdev = &pdev->dev;
- if (sysdev->parent && !sysdev->of_node && sysdev->parent->of_node)
+ if (sysdev->parent && (sysdev->fwnode->type == FWNODE_PDATA) &&
+ (is_of_node(sysdev->parent->fwnode) ||
+ is_acpi_device_node(sysdev->parent->fwnode)))
sysdev = sysdev->parent;
#ifdef CONFIG_PCI
else if (sysdev->parent && sysdev->parent->parent &&
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] usb:xhci: update condition to select bus->sysdev from parent device
2017-06-06 7:11 [PATCH v1 1/1] usb:xhci: update condition to select bus->sysdev from parent device Thang Q. Nguyen
@ 2017-07-04 3:37 ` Thang Q. Nguyen
0 siblings, 0 replies; 2+ messages in thread
From: Thang Q. Nguyen @ 2017-07-04 3:37 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Sriram Dash, linux-usb, linux-kernel
Cc: Thang Nguyen, Phong Vo, Loc Ho, Tung Nguyen, patches
On Tue, Jun 6, 2017 at 2:11 PM, Thang Q. Nguyen <tqnguyen@apm.com> wrote:
> For commit 4c39d4b949d3 ("usb: xhci: use bus->sysdev for DMA
> configuration"), sysdev points to devices known to the system firmware
> or hardware for DMA parameters.
> However, the parent of the system firmware/hardware device checking
> logic does not work in ACPI boot mode. This patch updates the formulation
> to check this case in both DT and ACPI.
>
> Signed-off-by: Tung Nguyen <tunguyen@apm.com>
> Signed-off-by: Thang Q. Nguyen <tqnguyen@apm.com>
> ---
> drivers/usb/host/xhci-plat.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index c04144b..e3e342a 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -187,7 +187,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
> * 3. xhci_plat is grandchild of a pci device (dwc3-pci)
> */
> sysdev = &pdev->dev;
> - if (sysdev->parent && !sysdev->of_node && sysdev->parent->of_node)
> + if (sysdev->parent && (sysdev->fwnode->type == FWNODE_PDATA) &&
> + (is_of_node(sysdev->parent->fwnode) ||
> + is_acpi_device_node(sysdev->parent->fwnode)))
> sysdev = sysdev->parent;
> #ifdef CONFIG_PCI
> else if (sysdev->parent && sysdev->parent->parent &&
> --
> 1.7.1
>
Hi,
Do you have any comment on this patch?
Regards,
Thang Q. Nguyen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-04 3:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-06 7:11 [PATCH v1 1/1] usb:xhci: update condition to select bus->sysdev from parent device Thang Q. Nguyen
2017-07-04 3:37 ` Thang Q. Nguyen
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.