6 #include <sys/device.h>
12 * handwritten device configuration.... 'nuf said
15 static const struct cfiattrdata uroothub_iattrdata
= {
20 static const struct cfiattrdata
*const usb_attrs
[] = {
24 CFDRIVER_DECL(usb
, DV_DULL
, usb_attrs
);
26 static const struct cfiattrdata usbdevif_iattrdata
= {
31 static const struct cfiattrdata usbifif_iattrdata
= {
36 static const struct cfiattrdata
*const uhub_attrs
[] = {
41 CFDRIVER_DECL(uhub
, DV_DULL
, uhub_attrs
);
43 CFDRIVER_DECL(rum
, DV_IFNET
, NULL
);
45 struct cfparent rumpusbhc_pspec
= {
51 struct cfdata usb_cfdata
[] = {
52 { "usb", "usb", 0, FSTATE_STAR
, NULL
, 0, &rumpusbhc_pspec
},
55 struct cfparent usb_pspec
= {
61 struct cfdata uhub_cfdata
[] = {
62 { "uhub", "uroothub", 0, FSTATE_STAR
, NULL
, 0, &usb_pspec
},
65 struct cfparent usbifif_pspec
= {
71 struct cfparent usbdevif_pspec
= {
77 struct cfdata rum_cfdata
[] = {
78 { "rum", "rum", 0, FSTATE_STAR
, NULL
, 0, &usbdevif_pspec
},
81 #include "rump_dev_private.h"
83 #define FLAWLESSCALL(call) \
86 if ((att_error = call) != 0) \
87 panic("\"%s\" failed", #call); \
88 } while (/*CONSTCOND*/0)
91 rump_device_configuration(void)
93 extern struct cfattach usb_ca
, uhub_ca
, uroothub_ca
, rum_ca
;
95 FLAWLESSCALL(config_cfdriver_attach(&usb_cd
));
96 FLAWLESSCALL(config_cfattach_attach("usb", &usb_ca
));
97 FLAWLESSCALL(config_cfdata_attach(usb_cfdata
, 0));
99 FLAWLESSCALL(config_cfdriver_attach(&uhub_cd
));
100 FLAWLESSCALL(config_cfattach_attach("uhub", &uhub_ca
));
101 FLAWLESSCALL(config_cfdata_attach(uhub_cfdata
, 0));
103 FLAWLESSCALL(config_cfdriver_attach(&rum_cd
));
104 FLAWLESSCALL(config_cfattach_attach("rum", &rum_ca
));
105 FLAWLESSCALL(config_cfdata_attach(rum_cfdata
, 0));
107 FLAWLESSCALL(config_cfattach_attach("uhub", &uroothub_ca
));