Hi, Rick Tseng <[email protected]> writes: > +static int xhci_poll_cnr(struct usb_hcd *hcd) > +{ > + struct xhci_hcd *xhci = hcd_to_xhci(hcd); > + void __iomem *reg = &xhci->op_regs->status; > + u32 result; > + int ret; > + > + ret = readl_poll_timeout_atomic(reg, result, > + (result & STS_CNR) == 0, > + 1, 100 * 1000); > + return ret; > +} > +
instead of defining your own function...
> static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
> {
> struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> @@ -508,6 +522,12 @@ static int xhci_pci_resume(struct usb_hcd *hcd, bool
> hibernated)
> if (pdev->vendor == PCI_VENDOR_ID_INTEL)
> usb_enable_intel_xhci_ports(pdev);
>
> + if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) {
> + retval = xhci_poll_cnr(hcd);
you could just use xhci_handshake() here, right?
--
balbi
signature.asc
Description: PGP signature
