Module Name: src Committed By: pooka Date: Sun Oct 4 10:44:31 UTC 2009
Modified Files: src/sys/rump/dev/wip/librumpusbhc: rumpusbhc.c Log Message: Pass some requests to the device. Hi ho, required for rum. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/wip/librumpusbhc/rumpusbhc.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/rump/dev/wip/librumpusbhc/rumpusbhc.c diff -u src/sys/rump/dev/wip/librumpusbhc/rumpusbhc.c:1.3 src/sys/rump/dev/wip/librumpusbhc/rumpusbhc.c:1.4 --- src/sys/rump/dev/wip/librumpusbhc/rumpusbhc.c:1.3 Sat Oct 3 20:46:49 2009 +++ src/sys/rump/dev/wip/librumpusbhc/rumpusbhc.c Sun Oct 4 10:44:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpusbhc.c,v 1.3 2009/10/03 20:46:49 pooka Exp $ */ +/* $NetBSD: rumpusbhc.c,v 1.4 2009/10/04 10:44:31 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rumpusbhc.c,v 1.3 2009/10/03 20:46:49 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpusbhc.c,v 1.4 2009/10/04 10:44:31 pooka Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -472,6 +472,24 @@ totlen = 0; break; + /* + * XXX: don't wildcard these yet. I want to better figure + * out what to trap here + */ + case C(0x07, UT_READ_VENDOR_DEVICE): + case C(0x09, UT_READ_VENDOR_DEVICE): + { + struct usb_ctl_request ucr; + + memcpy(&ucr.ucr_request, req, sizeof(ucr.ucr_request)); + ucr.ucr_data = buf; + if (rumpuser_ioctl(sc->sc_ugenfd[UGEN_EPT_CTRL], + USB_DO_REQUEST, &ucr, &ru_error) == -1) { + panic("request failed"); + } + } + break; + default: panic("unhandled request"); break;