Module Name: src Committed By: skrll Date: Sun Oct 4 10:45:37 UTC 2015
Modified Files: src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c Log Message: Adapt to usbroothub and use usbroothub defaults for some requests rather than returning an error. To generate a diff of this commit: cvs rdiff -u -r1.32.2.11 -r1.32.2.12 src/sys/external/bsd/dwc2/dwc2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/dwc2/dwc2.c diff -u src/sys/external/bsd/dwc2/dwc2.c:1.32.2.11 src/sys/external/bsd/dwc2/dwc2.c:1.32.2.12 --- src/sys/external/bsd/dwc2/dwc2.c:1.32.2.11 Tue Sep 22 12:06:06 2015 +++ src/sys/external/bsd/dwc2/dwc2.c Sun Oct 4 10:45:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2.c,v 1.32.2.11 2015/09/22 12:06:06 skrll Exp $ */ +/* $NetBSD: dwc2.c,v 1.32.2.12 2015/10/04 10:45:37 skrll Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.11 2015/09/22 12:06:06 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.12 2015/10/04 10:45:37 skrll Exp $"); #include "opt_usb.h" @@ -604,6 +604,18 @@ dwc2_roothub_ctrl(struct usbd_bus *bus, return buflen; } break; + + case C(UR_GET_CONFIG, UT_READ_DEVICE): + case C(UR_GET_INTERFACE, UT_READ_INTERFACE): + case C(UR_GET_STATUS, UT_READ_INTERFACE): + case C(UR_GET_STATUS, UT_READ_ENDPOINT): + case C(UR_SET_ADDRESS, UT_WRITE_DEVICE): + case C(UR_SET_CONFIG, UT_WRITE_DEVICE): + /* default from usbroothub */ + DPRINTFN(4, "returning %d (usbroothub default)", buflen); + + return buflen; + default: /* Hub requests */ err = dwc2_hcd_hub_control(sc->sc_hsotg,