Module Name:    src
Committed By:   skrll
Date:           Tue May  3 13:14:44 UTC 2016

Modified Files:
        src/sys/dev/pci: xhci_pci.c
        src/sys/dev/usb: xhcivar.h

Log Message:
Kill XHCI_QUIRK_FORCE_INTR and surrounding code


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/xhci_pci.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/xhcivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/xhci_pci.c
diff -u src/sys/dev/pci/xhci_pci.c:1.5 src/sys/dev/pci/xhci_pci.c:1.6
--- src/sys/dev/pci/xhci_pci.c:1.5	Sat Apr 23 10:15:31 2016
+++ src/sys/dev/pci/xhci_pci.c	Tue May  3 13:14:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci_pci.c,v 1.5 2016/04/23 10:15:31 skrll Exp $	*/
+/*	$NetBSD: xhci_pci.c,v 1.6 2016/05/03 13:14:44 skrll Exp $	*/
 /*	OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.5 2016/04/23 10:15:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.6 2016/05/03 13:14:44 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -54,17 +54,6 @@ __KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v
 #include <dev/usb/xhcireg.h>
 #include <dev/usb/xhcivar.h>
 
-struct xhci_pci_quirk {
-	pci_vendor_id_t		vendor;
-	pci_product_id_t	product;
-	int			quirks;
-};
-
-static const struct xhci_pci_quirk xhci_pci_quirks[] = {
-	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_CORE4G_M_XHCI,
-	    XHCI_QUIRK_FORCE_INTR },
-};
-
 struct xhci_pci_softc {
 	struct xhci_softc	sc_xhci;
 	pci_chipset_tag_t	sc_pc;
@@ -74,18 +63,6 @@ struct xhci_pci_softc {
 };
 
 static int
-xhci_pci_has_quirk(pci_vendor_id_t vendor, pci_product_id_t product)
-{
-	int i;
-
-	for (i = 0; i < __arraycount(xhci_pci_quirks); i++)
-		if (vendor == xhci_pci_quirks[i].vendor &&
-		    product == xhci_pci_quirks[i].product)
-			return xhci_pci_quirks[i].quirks;
-	return 0;
-}
-
-static int
 xhci_pci_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct pci_attach_args *pa = (struct pci_attach_args *) aux;
@@ -154,8 +131,7 @@ xhci_pci_attach(device_t parent, device_
 	pci_aprint_devinfo(pa, "USB Controller");
 
 	/* Check for quirks */
-	sc->sc_quirks = xhci_pci_has_quirk(PCI_VENDOR(pa->pa_id),
-						PCI_PRODUCT(pa->pa_id));
+	sc->sc_quirks = 0;
 
 	/* check if memory space access is enabled */
 	csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);

Index: src/sys/dev/usb/xhcivar.h
diff -u src/sys/dev/usb/xhcivar.h:1.5 src/sys/dev/usb/xhcivar.h:1.6
--- src/sys/dev/usb/xhcivar.h:1.5	Sat Apr 23 10:15:32 2016
+++ src/sys/dev/usb/xhcivar.h	Tue May  3 13:14:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhcivar.h,v 1.5 2016/04/23 10:15:32 skrll Exp $	*/
+/*	$NetBSD: xhcivar.h,v 1.6 2016/05/03 13:14:44 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -125,8 +125,7 @@ struct xhci_softc {
 	int (*sc_vendor_port_status)(struct xhci_softc *, uint32_t, int);
 
 	int sc_quirks;
-#define XHCI_QUIRK_FORCE_INTR	__BIT(0) /* force interrupt reading */
-#define XHCI_QUIRK_INTEL	__BIT(1) /* Intel xhci chip */
+#define XHCI_QUIRK_INTEL	__BIT(0) /* Intel xhci chip */
 };
 
 int	xhci_init(struct xhci_softc *);

Reply via email to