Deleted Added
full compact
xhci_pci.c (1.30) xhci_pci.c (1.31)
1/* $NetBSD: xhci_pci.c,v 1.30 2021/08/07 16:19:14 thorpej Exp $ */
1/* $NetBSD: xhci_pci.c,v 1.31 2022/10/11 09:18:22 msaitoh Exp $ */
2/* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Lennart Augustsson (lennart@augustsson.net) at

--- 17 unchanged lines hidden (view full) ---

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
2/* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Lennart Augustsson (lennart@augustsson.net) at

--- 17 unchanged lines hidden (view full) ---

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.30 2021/08/07 16:19:14 thorpej Exp $");
35__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.31 2022/10/11 09:18:22 msaitoh Exp $");
36
37#ifdef _KERNEL_OPT
38#include "opt_xhci_pci.h"
39#endif
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>

--- 238 unchanged lines hidden (view full) ---

282 if ((sc->sc_quirks & XHCI_QUIRK_INTEL) != 0)
283 xhci_pci_port_route(psc);
284
285 if (!pmf_device_register1(self, xhci_suspend, xhci_resume,
286 xhci_shutdown))
287 aprint_error_dev(self, "couldn't establish power handler\n");
288
289 /* Attach usb buses. */
36
37#ifdef _KERNEL_OPT
38#include "opt_xhci_pci.h"
39#endif
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>

--- 238 unchanged lines hidden (view full) ---

282 if ((sc->sc_quirks & XHCI_QUIRK_INTEL) != 0)
283 xhci_pci_port_route(psc);
284
285 if (!pmf_device_register1(self, xhci_suspend, xhci_resume,
286 xhci_shutdown))
287 aprint_error_dev(self, "couldn't establish power handler\n");
288
289 /* Attach usb buses. */
290 sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARGS_NONE);
290 if (sc->sc_usb3nports != 0)
291 sc->sc_child =
292 config_found(self, &sc->sc_bus, usbctlprint, CFARGS_NONE);
291
293
292 sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint,
293 CFARGS_NONE);
294 if (sc->sc_usb2nports != 0)
295 sc->sc_child2 =
296 config_found(self, &sc->sc_bus2, usbctlprint, CFARGS_NONE);
294
295 return;
296
297fail:
298 if (psc->sc_ih != NULL) {
299 pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
300 psc->sc_ih = NULL;
301 }

--- 53 unchanged lines hidden ---
297
298 return;
299
300fail:
301 if (psc->sc_ih != NULL) {
302 pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
303 psc->sc_ih = NULL;
304 }

--- 53 unchanged lines hidden ---