Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Kill XHCI_QUIRK_FORCE_INTR and surrounding code



details:   https://anonhg.NetBSD.org/src/rev/c95b4a728e6c
branches:  trunk
changeset: 345024:c95b4a728e6c
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue May 03 13:14:44 2016 +0000

description:
Kill XHCI_QUIRK_FORCE_INTR and surrounding code

diffstat:

 sys/dev/pci/xhci_pci.c |  30 +++---------------------------
 sys/dev/usb/xhcivar.h  |   5 ++---
 2 files changed, 5 insertions(+), 30 deletions(-)

diffs (84 lines):

diff -r 90ce31752e79 -r c95b4a728e6c sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c    Tue May 03 03:16:55 2016 +0000
+++ b/sys/dev/pci/xhci_pci.c    Tue May 03 13:14:44 2016 +0000
@@ -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 @@
 #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 @@
 };
 
 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 @@
        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);
diff -r 90ce31752e79 -r c95b4a728e6c sys/dev/usb/xhcivar.h
--- a/sys/dev/usb/xhcivar.h     Tue May 03 03:16:55 2016 +0000
+++ b/sys/dev/usb/xhcivar.h     Tue May 03 13:14:44 2016 +0000
@@ -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 @@
        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 *);



Home | Main Index | Thread Index | Old Index