Browse Source

Merge branch 'for-usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus

* 'for-usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
  Revert "xHCI: reset-on-resume quirk for NEC uPD720200"
  xHCI: fix bug in xhci_clear_command_ring()
Greg Kroah-Hartman 13 years ago
parent
commit
8593b6f6b0
2 changed files with 5 additions and 7 deletions
  1. 1 6
      drivers/usb/host/xhci-pci.c
  2. 4 1
      drivers/usb/host/xhci.c

+ 1 - 6
drivers/usb/host/xhci-pci.c

@@ -33,8 +33,6 @@
 #define PCI_VENDOR_ID_ETRON		0x1b6f
 #define PCI_VENDOR_ID_ETRON		0x1b6f
 #define PCI_DEVICE_ID_ASROCK_P67	0x7023
 #define PCI_DEVICE_ID_ASROCK_P67	0x7023
 
 
-#define PCI_DEVICE_ID_NEC_uPD720200	0x0194
-
 static const char hcd_name[] = "xhci_hcd";
 static const char hcd_name[] = "xhci_hcd";
 
 
 /* called after powerup, by probe or system-pm "wakeup" */
 /* called after powerup, by probe or system-pm "wakeup" */
@@ -76,11 +74,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 				pdev->revision);
 				pdev->revision);
 	}
 	}
 
 
-	if (pdev->vendor == PCI_VENDOR_ID_NEC) {
+	if (pdev->vendor == PCI_VENDOR_ID_NEC)
 		xhci->quirks |= XHCI_NEC_HOST;
 		xhci->quirks |= XHCI_NEC_HOST;
-		if (pdev->device == PCI_DEVICE_ID_NEC_uPD720200)
-			xhci->quirks |= XHCI_RESET_ON_RESUME;
-	}
 
 
 	if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96)
 	if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96)
 		xhci->quirks |= XHCI_AMD_0x96_HOST;
 		xhci->quirks |= XHCI_AMD_0x96_HOST;

+ 4 - 1
drivers/usb/host/xhci.c

@@ -711,7 +711,10 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci)
 	ring = xhci->cmd_ring;
 	ring = xhci->cmd_ring;
 	seg = ring->deq_seg;
 	seg = ring->deq_seg;
 	do {
 	do {
-		memset(seg->trbs, 0, SEGMENT_SIZE);
+		memset(seg->trbs, 0,
+			sizeof(union xhci_trb) * (TRBS_PER_SEGMENT - 1));
+		seg->trbs[TRBS_PER_SEGMENT - 1].link.control &=
+			cpu_to_le32(~TRB_CYCLE);
 		seg = seg->next;
 		seg = seg->next;
 	} while (seg != ring->deq_seg);
 	} while (seg != ring->deq_seg);