--- zzzz-none-000/linux-3.18.24/drivers/usb/host/xhci.c 2015-10-31 20:39:51.000000000 +0000 +++ rtl96-5690pro-762/linux-3.18.24/drivers/usb/host/xhci.c 2024-08-14 08:36:37.000000000 +0000 @@ -147,8 +147,7 @@ "waited %u microseconds.\n", XHCI_MAX_HALT_USEC); if (!ret) - xhci->xhc_state &= ~(XHCI_STATE_HALTED | XHCI_STATE_DYING); - + xhci->xhc_state &= ~XHCI_STATE_HALTED; return ret; } @@ -199,7 +198,7 @@ return ret; } -#ifdef CONFIG_PCI +#ifdef CONFIG_USB_XHCI_PCI static int xhci_free_msi(struct xhci_hcd *xhci) { int i; @@ -711,8 +710,11 @@ __func__); } +#ifdef CONFIG_USB_XHCI_PCI if (xhci->quirks & XHCI_AMD_PLL_FIX) usb_amd_dev_put(); +#endif + xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Disabling event ring interrupts"); @@ -741,9 +743,10 @@ void xhci_shutdown(struct usb_hcd *hcd) { struct xhci_hcd *xhci = hcd_to_xhci(hcd); - + #if !defined(CONFIG_RTL8672) if (xhci->quirks & XHCI_SPURIOUS_REBOOT) usb_disable_xhci_ports(to_pci_dev(hcd->self.controller)); + #endif spin_lock_irq(&xhci->lock); xhci_halt(xhci); @@ -1344,11 +1347,6 @@ if (usb_endpoint_xfer_isoc(&urb->ep->desc)) size = urb->number_of_packets; - else if (usb_endpoint_is_bulk_out(&urb->ep->desc) && - urb->transfer_buffer_length > 0 && - urb->transfer_flags & URB_ZERO_PACKET && - !(urb->transfer_buffer_length % usb_endpoint_maxp(&urb->ep->desc))) - size = 2; else size = 1; @@ -3463,9 +3461,6 @@ return -EINVAL; } - if (virt_dev->tt_info) - old_active_eps = virt_dev->tt_info->active_eps; - if (virt_dev->udev != udev) { /* If the virt_dev and the udev does not match, this virt_dev * may belong to another udev. @@ -3793,9 +3788,6 @@ u64 temp_64; struct xhci_command *command; - if (xhci->xhc_state) /* dying or halted */ - return -EINVAL; - if (!udev->slot_id) { xhci_dbg_trace(xhci, trace_xhci_dbg_address, "Bad Slot ID %d", udev->slot_id);