Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/storage/umass.c
Show First 20 Lines • Show All 1,081 Lines • ▼ Show 20 Lines | umass_detach(device_t dev) | ||||
return (0); /* success */ | return (0); /* success */ | ||||
} | } | ||||
static void | static void | ||||
umass_init_shuttle(struct umass_softc *sc) | umass_init_shuttle(struct umass_softc *sc) | ||||
{ | { | ||||
struct usb_device_request req; | struct usb_device_request req; | ||||
usb_error_t err; | |||||
uint8_t status[2] = {0, 0}; | uint8_t status[2] = {0, 0}; | ||||
/* | /* | ||||
* The Linux driver does this, but no one can tell us what the | * The Linux driver does this, but no one can tell us what the | ||||
* command does. | * command does. | ||||
*/ | */ | ||||
req.bmRequestType = UT_READ_VENDOR_DEVICE; | req.bmRequestType = UT_READ_VENDOR_DEVICE; | ||||
req.bRequest = 1; /* XXX unknown command */ | req.bRequest = 1; /* XXX unknown command */ | ||||
USETW(req.wValue, 0); | USETW(req.wValue, 0); | ||||
req.wIndex[0] = sc->sc_iface_no; | req.wIndex[0] = sc->sc_iface_no; | ||||
req.wIndex[1] = 0; | req.wIndex[1] = 0; | ||||
USETW(req.wLength, sizeof(status)); | USETW(req.wLength, sizeof(status)); | ||||
err = usbd_do_request(sc->sc_udev, NULL, &req, &status); | usbd_do_request(sc->sc_udev, NULL, &req, &status); | ||||
DPRINTF(sc, UDMASS_GEN, "Shuttle init returned 0x%02x%02x\n", | DPRINTF(sc, UDMASS_GEN, "Shuttle init returned 0x%02x%02x\n", | ||||
status[0], status[1]); | status[0], status[1]); | ||||
} | } | ||||
/* | /* | ||||
* Generic functions to handle transfers | * Generic functions to handle transfers | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,907 Lines • Show Last 20 Lines |