Changeset View
Changeset View
Standalone View
Standalone View
stand/usb/storage/umass_common.c
| Show All 32 Lines | |||||
| #include "umass_common.h" | #include "umass_common.h" | ||||
| struct usb_attach_arg umass_uaa; | struct usb_attach_arg umass_uaa; | ||||
| static device_probe_t umass_probe; | static device_probe_t umass_probe; | ||||
| static device_attach_t umass_attach; | static device_attach_t umass_attach; | ||||
| static device_detach_t umass_detach; | static device_detach_t umass_detach; | ||||
| static devclass_t umass_devclass; | |||||
| static device_method_t umass_methods[] = { | static device_method_t umass_methods[] = { | ||||
| /* Device interface */ | /* Device interface */ | ||||
| DEVMETHOD(device_probe, umass_probe), | DEVMETHOD(device_probe, umass_probe), | ||||
| DEVMETHOD(device_attach, umass_attach), | DEVMETHOD(device_attach, umass_attach), | ||||
| DEVMETHOD(device_detach, umass_detach), | DEVMETHOD(device_detach, umass_detach), | ||||
| DEVMETHOD_END | DEVMETHOD_END | ||||
| }; | }; | ||||
| static driver_t umass_driver = { | static driver_t umass_driver = { | ||||
| .name = "umass", | .name = "umass", | ||||
| .methods = umass_methods, | .methods = umass_methods, | ||||
| }; | }; | ||||
| DRIVER_MODULE(umass, uhub, umass_driver, umass_devclass, NULL, 0); | DRIVER_MODULE(umass, uhub, umass_driver, NULL, 0); | ||||
| static int | static int | ||||
| umass_probe(device_t dev) | umass_probe(device_t dev) | ||||
| { | { | ||||
| struct usb_attach_arg *uaa = device_get_ivars(dev); | struct usb_attach_arg *uaa = device_get_ivars(dev); | ||||
| if (uaa->usb_mode != USB_MODE_HOST || | if (uaa->usb_mode != USB_MODE_HOST || | ||||
| uaa->info.bInterfaceClass != UICLASS_MASS || | uaa->info.bInterfaceClass != UICLASS_MASS || | ||||
| Show All 24 Lines | |||||