Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/pci/ehci_pci.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/pci/ehci_pci.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.27.6.3 retrieving revision 1.28 diff -u -p -r1.27.6.3 -r1.28 --- src/sys/dev/pci/ehci_pci.c 2007/10/23 20:08:52 1.27.6.3 +++ src/sys/dev/pci/ehci_pci.c 2007/07/08 18:22:28 1.28 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_pci.c,v 1.27.6.3 2007/10/23 20:08:52 ad Exp $ */ +/* $NetBSD: ehci_pci.c,v 1.28 2007/07/08 18:22:28 jmcneill Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.27.6.3 2007/10/23 20:08:52 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.28 2007/07/08 18:22:28 jmcneill Exp $"); #include #include @@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v #include #include -#include +#include #include #include @@ -182,15 +182,8 @@ ehci_pci_attach(struct device *parent, s "vendor 0x%04x", PCI_VENDOR(pa->pa_id)); /* Enable workaround for dropped interrupts as required */ - switch (sc->sc.sc_id_vendor) { - case PCI_VENDOR_ATI: - case PCI_VENDOR_VIATECH: + if (sc->sc.sc_id_vendor == PCI_VENDOR_VIATECH) sc->sc.sc_flags |= EHCIF_DROPPED_INTR_WORKAROUND; - aprint_normal("%s: dropped intr workaround enabled\n", devname); - break; - default: - break; - } /* * Find companion controllers. According to the spec they always @@ -210,21 +203,18 @@ ehci_pci_attach(struct device *parent, s ehci_get_ownership(&sc->sc, pc, tag); - /* - * Establish our powerhook before ehci_init() does its powerhook. - */ - sc->sc_powerhook = powerhook_establish( - USBDEVNAME(sc->sc.sc_bus.bdev) , ehci_pci_powerhook, sc); - if (sc->sc_powerhook == NULL) - aprint_error("%s: couldn't establish powerhook\n", - devname); - r = ehci_init(&sc->sc); if (r != USBD_NORMAL_COMPLETION) { aprint_error("%s: init failed, error=%d\n", devname, r); return; } + sc->sc_powerhook = powerhook_establish( + USBDEVNAME(sc->sc.sc_bus.bdev) , ehci_pci_powerhook, sc); + if (sc->sc_powerhook == NULL) + aprint_error("%s: couldn't establish powerhook\n", + devname); + /* Attach usb device. */ sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, usbctlprint);