Rename rumpusbhc to ugenhc, as that better describes what it does.
(the full component name is rumpdev_ugenhc)
This commit is contained in:
parent
ee03580145
commit
d444f29418
@ -1,7 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.5 2010/02/05 22:01:38 pooka Exp $
|
||||
# $NetBSD: Makefile,v 1.6 2010/02/10 02:26:23 pooka Exp $
|
||||
#
|
||||
|
||||
SUBDIR= librumpusbhc libucom libumass libulpt libusb libusbrum
|
||||
SUBDIR= libugenhc libucom libumass libulpt libusb libusbrum
|
||||
SUBDIR+=libums libukbd
|
||||
|
||||
SUBDIR+=libwscons
|
||||
|
@ -1,20 +1,20 @@
|
||||
# $NetBSD: files.rump,v 1.1 2010/02/04 00:37:08 pooka Exp $
|
||||
# $NetBSD: files.rump,v 1.2 2010/02/10 02:26:23 pooka Exp $
|
||||
#
|
||||
|
||||
device mainbus { }
|
||||
attach mainbus at root
|
||||
device rumpusbhc: usbus, usbroothub
|
||||
attach rumpusbhc at mainbus
|
||||
device ugenhc: usbus, usbroothub
|
||||
attach ugenhc at mainbus
|
||||
|
||||
# ugen0 - ugen3
|
||||
mainbus0 at root
|
||||
rumpusbhc0 at mainbus0
|
||||
rumpusbhc1 at mainbus0
|
||||
rumpusbhc2 at mainbus0
|
||||
rumpusbhc3 at mainbus0
|
||||
ugenhc0 at mainbus0
|
||||
ugenhc1 at mainbus0
|
||||
ugenhc2 at mainbus0
|
||||
ugenhc3 at mainbus0
|
||||
|
||||
# USB bus support
|
||||
usb* at rumpusbhc?
|
||||
usb* at ugenhc?
|
||||
|
||||
# USB ROOT Hub
|
||||
#
|
||||
|
@ -1,11 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.2 2009/10/05 13:00:37 pooka Exp $
|
||||
#
|
||||
|
||||
LIB= rumpdev_usbhc
|
||||
|
||||
SRCS= rumpusbhc.c
|
||||
|
||||
CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
.include <bsd.klinks.mk>
|
@ -1,4 +0,0 @@
|
||||
# $NetBSD: shlib_version,v 1.1 2009/10/02 15:35:46 pooka Exp $
|
||||
#
|
||||
major=0
|
||||
minor=0
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ucom_at_usb.c,v 1.3 2010/02/03 21:18:38 pooka Exp $ */
|
||||
/* $NetBSD: ucom_at_usb.c,v 1.4 2010/02/10 02:26:23 pooka Exp $ */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
@ -32,8 +32,8 @@ rump_device_configuration(void)
|
||||
FLAWLESSCALL(config_cfdriver_attach(&mainbus_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("mainbus", &mainbus_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&rumpusbhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("rumpusbhc", &rumpusbhc_ca));
|
||||
FLAWLESSCALL(config_cfdriver_attach(&ugenhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("ugenhc", &ugenhc_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&usb_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("usb", &usb_ca));
|
||||
|
11
sys/rump/dev/wip/libugenhc/Makefile
Normal file
11
sys/rump/dev/wip/libugenhc/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $NetBSD: Makefile,v 1.1 2010/02/10 02:26:23 pooka Exp $
|
||||
#
|
||||
|
||||
LIB= rumpdev_ugenhc
|
||||
|
||||
SRCS= ugenhc.c
|
||||
|
||||
CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
.include <bsd.klinks.mk>
|
4
sys/rump/dev/wip/libugenhc/shlib_version
Normal file
4
sys/rump/dev/wip/libugenhc/shlib_version
Normal file
@ -0,0 +1,4 @@
|
||||
# $NetBSD: shlib_version,v 1.1 2010/02/10 02:26:23 pooka Exp $
|
||||
#
|
||||
major=0
|
||||
minor=0
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rumpusbhc.c,v 1.15 2010/02/09 18:27:17 pooka Exp $ */
|
||||
/* $NetBSD: ugenhc.c,v 1.1 2010/02/10 02:26:23 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.15 2010/02/09 18:27:17 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.1 2010/02/10 02:26:23 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
@ -87,7 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: rumpusbhc.c,v 1.15 2010/02/09 18:27:17 pooka Exp $")
|
||||
#define UGEN_NEPTS 16
|
||||
#define UGEN_EPT_CTRL 0 /* ugenx.00 is the control endpoint */
|
||||
|
||||
struct rumpusbhc_softc {
|
||||
struct ugenhc_softc {
|
||||
struct usbd_bus sc_bus;
|
||||
int sc_devnum;
|
||||
|
||||
@ -100,11 +100,11 @@ struct rumpusbhc_softc {
|
||||
int sc_conf;
|
||||
};
|
||||
|
||||
static int rumpusbhc_probe(struct device *, struct cfdata *, void *);
|
||||
static void rumpusbhc_attach(struct device *, struct device *, void *);
|
||||
static int ugenhc_probe(struct device *, struct cfdata *, void *);
|
||||
static void ugenhc_attach(struct device *, struct device *, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(rumpusbhc, sizeof(struct rumpusbhc_softc),
|
||||
rumpusbhc_probe, rumpusbhc_attach, NULL, NULL);
|
||||
CFATTACH_DECL_NEW(ugenhc, sizeof(struct ugenhc_softc),
|
||||
ugenhc_probe, ugenhc_attach, NULL, NULL);
|
||||
|
||||
struct rusb_xfer {
|
||||
struct usbd_xfer rusb_xfer;
|
||||
@ -174,7 +174,7 @@ static usbd_status
|
||||
rumpusb_root_ctrl_start(usbd_xfer_handle xfer)
|
||||
{
|
||||
usb_device_request_t *req = &xfer->request;
|
||||
struct rumpusbhc_softc *sc = xfer->pipe->device->bus->hci_private;
|
||||
struct ugenhc_softc *sc = xfer->pipe->device->bus->hci_private;
|
||||
int len, totlen, value, curlen, err;
|
||||
uint8_t *buf = NULL;
|
||||
|
||||
@ -360,7 +360,7 @@ static usbd_status
|
||||
rumpusb_device_ctrl_start(usbd_xfer_handle xfer)
|
||||
{
|
||||
usb_device_request_t *req = &xfer->request;
|
||||
struct rumpusbhc_softc *sc = xfer->pipe->device->bus->hci_private;
|
||||
struct ugenhc_softc *sc = xfer->pipe->device->bus->hci_private;
|
||||
uint8_t *buf = NULL;
|
||||
int len, totlen;
|
||||
int value;
|
||||
@ -408,7 +408,7 @@ rumpusb_device_ctrl_start(usbd_xfer_handle xfer)
|
||||
|
||||
if (rumpuser_ioctl(sc->sc_ugenfd[UGEN_EPT_CTRL],
|
||||
USB_GET_DEVICEINFO, &udi, &ru_error) == -1) {
|
||||
printf("rumpusbhc: get dev info failed: %d\n",
|
||||
printf("ugenhc: get dev info failed: %d\n",
|
||||
ru_error);
|
||||
err = USBD_IOERROR;
|
||||
goto ret;
|
||||
@ -453,7 +453,7 @@ rumpusb_device_ctrl_start(usbd_xfer_handle xfer)
|
||||
uai.uai_alt_no = value;
|
||||
if (rumpuser_ioctl(sc->sc_ugenfd[UGEN_EPT_CTRL],
|
||||
USB_SET_ALTINTERFACE, &uai, &ru_error) == -1) {
|
||||
printf("rumpusbhc: set alt interface failed: %d\n",
|
||||
printf("ugenhc: set alt interface failed: %d\n",
|
||||
ru_error);
|
||||
err = USBD_IOERROR;
|
||||
goto ret;
|
||||
@ -652,7 +652,7 @@ static const struct usbd_pipe_methods rumpusb_root_intr_methods = {
|
||||
static usbd_status
|
||||
rumpusb_device_bulk_start(usbd_xfer_handle xfer)
|
||||
{
|
||||
struct rumpusbhc_softc *sc = xfer->pipe->device->bus->hci_private;
|
||||
struct ugenhc_softc *sc = xfer->pipe->device->bus->hci_private;
|
||||
ssize_t n;
|
||||
ssize_t done;
|
||||
bool isread;
|
||||
@ -815,10 +815,10 @@ static const struct usbd_pipe_methods rumpusb_device_intr_methods = {
|
||||
};
|
||||
|
||||
static usbd_status
|
||||
rumpusbhc_open(struct usbd_pipe *pipe)
|
||||
ugenhc_open(struct usbd_pipe *pipe)
|
||||
{
|
||||
usbd_device_handle dev = pipe->device;
|
||||
struct rumpusbhc_softc *sc = dev->bus->hci_private;
|
||||
struct ugenhc_softc *sc = dev->bus->hci_private;
|
||||
usb_endpoint_descriptor_t *ed = pipe->endpoint->edesc;
|
||||
u_int8_t addr = dev->address;
|
||||
u_int8_t xfertype = ed->bmAttributes & UE_XFERTYPE;
|
||||
@ -889,33 +889,33 @@ rumpusbhc_open(struct usbd_pipe *pipe)
|
||||
}
|
||||
|
||||
static void
|
||||
rumpusbhc_softint(void *arg)
|
||||
ugenhc_softint(void *arg)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
rumpusbhc_poll(struct usbd_bus *ubus)
|
||||
ugenhc_poll(struct usbd_bus *ubus)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static usbd_status
|
||||
rumpusbhc_allocm(struct usbd_bus *bus, usb_dma_t *dma, uint32_t size)
|
||||
ugenhc_allocm(struct usbd_bus *bus, usb_dma_t *dma, uint32_t size)
|
||||
{
|
||||
struct rumpusbhc_softc *sc = bus->hci_private;
|
||||
struct ugenhc_softc *sc = bus->hci_private;
|
||||
|
||||
return usb_allocmem(&sc->sc_bus, size, 0, dma);
|
||||
}
|
||||
|
||||
static void
|
||||
rumpusbhc_freem(struct usbd_bus *ubus, usb_dma_t *udma)
|
||||
ugenhc_freem(struct usbd_bus *ubus, usb_dma_t *udma)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static struct usbd_xfer *
|
||||
rumpusbhc_allocx(struct usbd_bus *bus)
|
||||
ugenhc_allocx(struct usbd_bus *bus)
|
||||
{
|
||||
usbd_xfer_handle xfer;
|
||||
|
||||
@ -926,28 +926,28 @@ rumpusbhc_allocx(struct usbd_bus *bus)
|
||||
}
|
||||
|
||||
static void
|
||||
rumpusbhc_freex(struct usbd_bus *bus, struct usbd_xfer *xfer)
|
||||
ugenhc_freex(struct usbd_bus *bus, struct usbd_xfer *xfer)
|
||||
{
|
||||
|
||||
kmem_free(xfer, sizeof(struct usbd_xfer));
|
||||
}
|
||||
|
||||
struct rumpusbhc_pipe {
|
||||
struct ugenhc_pipe {
|
||||
struct usbd_pipe pipe;
|
||||
};
|
||||
|
||||
static const struct usbd_bus_methods rumpusbhc_bus_methods = {
|
||||
.open_pipe = rumpusbhc_open,
|
||||
.soft_intr = rumpusbhc_softint,
|
||||
.do_poll = rumpusbhc_poll,
|
||||
.allocm = rumpusbhc_allocm,
|
||||
.freem = rumpusbhc_freem,
|
||||
.allocx = rumpusbhc_allocx,
|
||||
.freex = rumpusbhc_freex,
|
||||
static const struct usbd_bus_methods ugenhc_bus_methods = {
|
||||
.open_pipe = ugenhc_open,
|
||||
.soft_intr = ugenhc_softint,
|
||||
.do_poll = ugenhc_poll,
|
||||
.allocm = ugenhc_allocm,
|
||||
.freem = ugenhc_freem,
|
||||
.allocx = ugenhc_allocx,
|
||||
.freex = ugenhc_freex,
|
||||
};
|
||||
|
||||
static int
|
||||
rumpusbhc_probe(struct device *parent, struct cfdata *match, void *aux)
|
||||
ugenhc_probe(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
char buf[UGENDEV_BUFSIZE];
|
||||
int fd, error;
|
||||
@ -962,10 +962,10 @@ rumpusbhc_probe(struct device *parent, struct cfdata *match, void *aux)
|
||||
}
|
||||
|
||||
static void
|
||||
rumpusbhc_attach(struct device *parent, struct device *self, void *aux)
|
||||
ugenhc_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct mainbus_attach_args *maa = aux;
|
||||
struct rumpusbhc_softc *sc = device_private(self);
|
||||
struct ugenhc_softc *sc = device_private(self);
|
||||
char buf[UGENDEV_BUFSIZE];
|
||||
int error;
|
||||
|
||||
@ -976,15 +976,15 @@ rumpusbhc_attach(struct device *parent, struct device *self, void *aux)
|
||||
memset(&sc->sc_fdmodes, -1, sizeof(sc->sc_fdmodes));
|
||||
|
||||
sc->sc_bus.usbrev = USBREV_2_0;
|
||||
sc->sc_bus.methods = &rumpusbhc_bus_methods;
|
||||
sc->sc_bus.methods = &ugenhc_bus_methods;
|
||||
sc->sc_bus.hci_private = sc;
|
||||
sc->sc_bus.pipe_size = sizeof(struct rumpusbhc_pipe);
|
||||
sc->sc_bus.pipe_size = sizeof(struct ugenhc_pipe);
|
||||
sc->sc_devnum = maa->maa_unit;
|
||||
|
||||
makeugendevstr(sc->sc_devnum, 0, buf);
|
||||
sc->sc_ugenfd[UGEN_EPT_CTRL] = rumpuser_open(buf, O_RDWR, &error);
|
||||
if (error)
|
||||
panic("rumpusbhc_attach: failed to open ctrl ept %s\n", buf);
|
||||
panic("ugenhc_attach: failed to open ctrl ept %s\n", buf);
|
||||
|
||||
config_found(self, &sc->sc_bus, usbctlprint);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ukbd_at_usb.c,v 1.2 2010/02/03 21:18:38 pooka Exp $ */
|
||||
/* $NetBSD: ukbd_at_usb.c,v 1.3 2010/02/10 02:26:23 pooka Exp $ */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -28,8 +28,8 @@ rump_device_configuration(void)
|
||||
FLAWLESSCALL(config_cfdriver_attach(&mainbus_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("mainbus", &mainbus_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&rumpusbhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("rumpusbhc", &rumpusbhc_ca));
|
||||
FLAWLESSCALL(config_cfdriver_attach(&ugenhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("ugenhc", &ugenhc_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&usb_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("usb", &usb_ca));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ulpt_at_usb.c,v 1.1 2009/12/15 15:52:30 pooka Exp $ */
|
||||
/* $NetBSD: ulpt_at_usb.c,v 1.2 2010/02/10 02:26:23 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* MACHINE GENERATED: DO NOT EDIT
|
||||
@ -347,15 +347,10 @@ CFDRIVER_DECL(uhub, DV_DULL, uhub_attrs);
|
||||
|
||||
CFDRIVER_DECL(ulpt, DV_DULL, NULL);
|
||||
|
||||
static const struct cfiattrdata * const rumpusbhc_attrs[] = { &usbuscf_iattrdata, NULL };
|
||||
CFDRIVER_DECL(rumpusbhc, DV_DULL, rumpusbhc_attrs);
|
||||
|
||||
|
||||
|
||||
extern struct cfattach usb_ca;
|
||||
extern struct cfattach uroothub_ca;
|
||||
extern struct cfattach ulpt_ca;
|
||||
extern struct cfattach rumpusbhc_ca;
|
||||
|
||||
/* locators */
|
||||
static int loc[6] = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.9 2010/02/10 02:08:34 pooka Exp $ */
|
||||
/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.10 2010/02/10 02:26:24 pooka Exp $ */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -21,7 +21,7 @@ do { \
|
||||
void
|
||||
rump_device_configuration(void)
|
||||
{
|
||||
extern struct cfattach rumpusbhc_ca;
|
||||
extern struct cfattach ugenhc_ca;
|
||||
extern struct cfattach usb_ca, uhub_ca, uroothub_ca, umass_ca;
|
||||
extern struct cfattach scsibus_ca, atapibus_ca, sd_ca, cd_ca;
|
||||
extern struct bdevsw sd_bdevsw, cd_bdevsw;
|
||||
@ -33,8 +33,8 @@ rump_device_configuration(void)
|
||||
FLAWLESSCALL(config_cfdriver_attach(&mainbus_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("mainbus", &mainbus_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&rumpusbhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("rumpusbhc", &rumpusbhc_ca));
|
||||
FLAWLESSCALL(config_cfdriver_attach(&ugenhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("ugenhc", &ugenhc_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&usb_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("usb", &usb_ca));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ums_at_usb.c,v 1.2 2010/02/03 21:18:38 pooka Exp $ */
|
||||
/* $NetBSD: ums_at_usb.c,v 1.3 2010/02/10 02:26:24 pooka Exp $ */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -26,8 +26,8 @@ rump_device_configuration(void)
|
||||
FLAWLESSCALL(config_cfdriver_attach(&mainbus_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("mainbus", &mainbus_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&rumpusbhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("rumpusbhc", &rumpusbhc_ca));
|
||||
FLAWLESSCALL(config_cfdriver_attach(&ugenhc_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("ugenhc", &ugenhc_ca));
|
||||
|
||||
FLAWLESSCALL(config_cfdriver_attach(&usb_cd));
|
||||
FLAWLESSCALL(config_cfattach_attach("usb", &usb_ca));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rum_at_usb.c,v 1.2 2010/02/03 21:18:38 pooka Exp $ */
|
||||
/* $NetBSD: rum_at_usb.c,v 1.3 2010/02/10 02:26:24 pooka Exp $ */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
@ -45,14 +45,14 @@ CFDRIVER_DECL(uhub, DV_DULL, uhub_attrs);
|
||||
|
||||
CFDRIVER_DECL(rum, DV_IFNET, NULL);
|
||||
|
||||
struct cfparent rumpusbhc_pspec = {
|
||||
struct cfparent ugenhc_pspec = {
|
||||
"usbus",
|
||||
"rumpusbhc",
|
||||
"ugenhc",
|
||||
DVUNIT_ANY
|
||||
};
|
||||
|
||||
struct cfdata usb_cfdata[] = {
|
||||
{ "usb", "usb", 0, FSTATE_STAR, NULL, 0, &rumpusbhc_pspec },
|
||||
{ "usb", "usb", 0, FSTATE_STAR, NULL, 0, &ugenhc_pspec },
|
||||
};
|
||||
|
||||
struct cfparent usb_pspec = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: component.c,v 1.1 2010/01/11 02:12:51 pooka Exp $ */
|
||||
/* $NetBSD: component.c,v 1.2 2010/02/10 02:26:24 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* MACHINE GENERATED: DO NOT EDIT
|
||||
@ -380,9 +380,6 @@ CFDRIVER_DECL(ums, DV_DULL, ums_attrs);
|
||||
static const struct cfiattrdata * const mainbus_attrs[] = { &mainbuscf_iattrdata, NULL };
|
||||
CFDRIVER_DECL(mainbus, DV_DULL, mainbus_attrs);
|
||||
|
||||
static const struct cfiattrdata * const rumpusbhc_attrs[] = { &usbuscf_iattrdata, NULL };
|
||||
CFDRIVER_DECL(rumpusbhc, DV_DULL, rumpusbhc_attrs);
|
||||
|
||||
|
||||
|
||||
extern struct cfattach wskbd_ca;
|
||||
@ -395,7 +392,6 @@ extern struct cfattach uhid_ca;
|
||||
extern struct cfattach ukbd_ca;
|
||||
extern struct cfattach ums_ca;
|
||||
extern struct cfattach mainbus_ca;
|
||||
extern struct cfattach rumpusbhc_ca;
|
||||
|
||||
/* locators */
|
||||
static int loc[18] = {
|
||||
|
Loading…
Reference in New Issue
Block a user