View | Details | Raw Unified | Return to bug 1212365
Collapse All | Expand All

(-)a/drivers/usb/host/xhci-pci.c (-3 / +1 lines)
Lines 486-495 static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) Link Here
486
			pdev->device == 0x3432)
486
			pdev->device == 0x3432)
487
		xhci->quirks |= XHCI_BROKEN_STREAMS;
487
		xhci->quirks |= XHCI_BROKEN_STREAMS;
488
488
489
	if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
489
	if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483)
490
		xhci->quirks |= XHCI_LPM_SUPPORT;
490
		xhci->quirks |= XHCI_LPM_SUPPORT;
491
		xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
492
	}
493
491
494
	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
492
	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
495
		pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) {
493
		pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) {
(-)a/drivers/usb/host/xhci-ring.c (-25 / +1 lines)
Lines 592-602 static int xhci_move_dequeue_past_td(struct xhci_hcd *xhci, Link Here
592
	struct xhci_ring *ep_ring;
592
	struct xhci_ring *ep_ring;
593
	struct xhci_command *cmd;
593
	struct xhci_command *cmd;
594
	struct xhci_segment *new_seg;
594
	struct xhci_segment *new_seg;
595
	struct xhci_segment *halted_seg = NULL;
596
	union xhci_trb *new_deq;
595
	union xhci_trb *new_deq;
597
	int new_cycle;
596
	int new_cycle;
598
	union xhci_trb *halted_trb;
599
	int index = 0;
600
	dma_addr_t addr;
597
	dma_addr_t addr;
601
	u64 hw_dequeue;
598
	u64 hw_dequeue;
602
	bool cycle_found = false;
599
	bool cycle_found = false;
Lines 634-660 static int xhci_move_dequeue_past_td(struct xhci_hcd *xhci, Link Here
634
	hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
631
	hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
635
	new_seg = ep_ring->deq_seg;
632
	new_seg = ep_ring->deq_seg;
636
	new_deq = ep_ring->dequeue;
633
	new_deq = ep_ring->dequeue;
637
634
	new_cycle = hw_dequeue & 0x1;
638
	/*
639
	 * Quirk: xHC write-back of the DCS field in the hardware dequeue
640
	 * pointer is wrong - use the cycle state of the TRB pointed to by
641
	 * the dequeue pointer.
642
	 */
643
	if (xhci->quirks & XHCI_EP_CTX_BROKEN_DCS &&
644
	    !(ep->ep_state & EP_HAS_STREAMS))
645
		halted_seg = trb_in_td(xhci, td->start_seg,
646
				       td->first_trb, td->last_trb,
647
				       hw_dequeue & ~0xf, false);
648
	if (halted_seg) {
649
		index = ((dma_addr_t)(hw_dequeue & ~0xf) - halted_seg->dma) /
650
			 sizeof(*halted_trb);
651
		halted_trb = &halted_seg->trbs[index];
652
		new_cycle = halted_trb->generic.field[3] & 0x1;
653
		xhci_dbg(xhci, "Endpoint DCS = %d TRB index = %d cycle = %d\n",
654
			 (u8)(hw_dequeue & 0x1), index, new_cycle);
655
	} else {
656
		new_cycle = hw_dequeue & 0x1;
657
	}
658
635
659
	/*
636
	/*
660
	 * We want to find the pointer, segment and cycle state of the new trb
637
	 * We want to find the pointer, segment and cycle state of the new trb
661
- 

Return to bug 1212365