MFp4 //depot/projects/usb @159375,159376,159377

Further remove dependancy towards Giant.

Submitted by:	Hans Petter Selasky
This commit is contained in:
Andrew Thompson 2009-03-20 18:56:27 +00:00
parent 8302ce4487
commit 296ade6016
8 changed files with 23 additions and 25 deletions

View File

@ -668,8 +668,8 @@ uhid_attach(device_t dev)
* feature report ID 2 before it'll start * feature report ID 2 before it'll start
* returning digitizer data. * returning digitizer data.
*/ */
error = usb2_req_set_report error = usb2_req_set_report(uaa->device, NULL,
(uaa->device, &Giant, reportbuf, sizeof(reportbuf), reportbuf, sizeof(reportbuf),
uaa->info.bIfaceIndex, UHID_FEATURE_REPORT, 2); uaa->info.bIfaceIndex, UHID_FEATURE_REPORT, 2);
if (error) { if (error) {
@ -691,16 +691,16 @@ uhid_attach(device_t dev)
} }
if (sc->sc_repdesc_ptr == NULL) { if (sc->sc_repdesc_ptr == NULL) {
error = usb2_req_get_hid_desc error = usb2_req_get_hid_desc(uaa->device, NULL,
(uaa->device, &Giant, &sc->sc_repdesc_ptr, &sc->sc_repdesc_ptr, &sc->sc_repdesc_size,
&sc->sc_repdesc_size, M_USBDEV, uaa->info.bIfaceIndex); M_USBDEV, uaa->info.bIfaceIndex);
if (error) { if (error) {
device_printf(dev, "no report descriptor\n"); device_printf(dev, "no report descriptor\n");
goto detach; goto detach;
} }
} }
error = usb2_req_set_idle(uaa->device, &Giant, error = usb2_req_set_idle(uaa->device, NULL,
uaa->info.bIfaceIndex, 0, 0); uaa->info.bIfaceIndex, 0, 0);
if (error) { if (error) {

View File

@ -338,7 +338,7 @@ ums_probe(device_t dev)
(id->bInterfaceClass != UICLASS_HID)) (id->bInterfaceClass != UICLASS_HID))
return (ENXIO); return (ENXIO);
error = usb2_req_get_hid_desc(uaa->device, &Giant, error = usb2_req_get_hid_desc(uaa->device, NULL,
&d_ptr, &d_len, M_TEMP, uaa->info.bIfaceIndex); &d_ptr, &d_len, M_TEMP, uaa->info.bIfaceIndex);
if (error) if (error)
@ -395,8 +395,7 @@ ums_attach(device_t dev)
DPRINTF("error=%s\n", usb2_errstr(err)); DPRINTF("error=%s\n", usb2_errstr(err));
goto detach; goto detach;
} }
err = usb2_req_get_hid_desc err = usb2_req_get_hid_desc(uaa->device, NULL, &d_ptr,
(uaa->device, &Giant, &d_ptr,
&d_len, M_TEMP, uaa->info.bIfaceIndex); &d_len, M_TEMP, uaa->info.bIfaceIndex);
if (err) { if (err) {

View File

@ -244,8 +244,8 @@ ubser_attach(device_t dev)
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, 1); USETW(req.wLength, 1);
error = usb2_do_request_flags error = usb2_do_request_flags(uaa->device, NULL,
(uaa->device, &Giant, &req, &sc->sc_numser, &req, &sc->sc_numser,
0, NULL, USB_DEFAULT_TIMEOUT); 0, NULL, USB_DEFAULT_TIMEOUT);
if (error || (sc->sc_numser == 0)) { if (error || (sc->sc_numser == 0)) {

View File

@ -222,8 +222,7 @@ ucycom_attach(device_t dev)
/* get report descriptor */ /* get report descriptor */
error = usb2_req_get_hid_desc error = usb2_req_get_hid_desc(uaa->device, NULL,
(uaa->device, &Giant,
&urd_ptr, &urd_len, M_USBDEV, &urd_ptr, &urd_len, M_USBDEV,
UCYCOM_IFACE_INDEX); UCYCOM_IFACE_INDEX);

View File

@ -769,7 +769,7 @@ umodem_set_comm_feature(struct usb2_device *udev, uint8_t iface_no,
USETW(req.wLength, UCDC_ABSTRACT_STATE_LENGTH); USETW(req.wLength, UCDC_ABSTRACT_STATE_LENGTH);
USETW(ast.wState, state); USETW(ast.wState, state);
return (usb2_do_request(udev, &Giant, &req, &ast)); return (usb2_do_request(udev, NULL, &req, &ast));
} }
static int static int

View File

@ -441,7 +441,7 @@ uplcom_reset(struct uplcom_softc *sc, struct usb2_device *udev)
req.wIndex[1] = 0; req.wIndex[1] = 0;
USETW(req.wLength, 0); USETW(req.wLength, 0);
return (usb2_do_request(udev, &Giant, &req, NULL)); return (usb2_do_request(udev, NULL, &req, NULL));
} }
struct pl2303x_init { struct pl2303x_init {
@ -485,7 +485,7 @@ uplcom_pl2303x_init(struct usb2_device *udev)
USETW(req.wIndex, pl2303x[i].index); USETW(req.wIndex, pl2303x[i].index);
USETW(req.wLength, pl2303x[i].length); USETW(req.wLength, pl2303x[i].length);
err = usb2_do_request(udev, &Giant, &req, buf); err = usb2_do_request(udev, NULL, &req, buf);
if (err) { if (err) {
DPRINTF("error=%s\n", usb2_errstr(err)); DPRINTF("error=%s\n", usb2_errstr(err));
return (EIO); return (EIO);

View File

@ -373,8 +373,8 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wValue, 0); USETW(req.wValue, 0);
USETW(req.wIndex, 0); USETW(req.wIndex, 0);
USETW(req.wLength, UVISOR_CONNECTION_INFO_SIZE); USETW(req.wLength, UVISOR_CONNECTION_INFO_SIZE);
err = usb2_do_request_flags err = usb2_do_request_flags(udev, NULL,
(udev, &Giant, &req, &coninfo, USB_SHORT_XFER_OK, &req, &coninfo, USB_SHORT_XFER_OK,
&actlen, USB_DEFAULT_TIMEOUT); &actlen, USB_DEFAULT_TIMEOUT);
if (err) { if (err) {
@ -427,7 +427,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wLength, UVISOR_GET_PALM_INFORMATION_LEN); USETW(req.wLength, UVISOR_GET_PALM_INFORMATION_LEN);
err = usb2_do_request_flags err = usb2_do_request_flags
(udev, &Giant, &req, &pconinfo, USB_SHORT_XFER_OK, (udev, NULL, &req, &pconinfo, USB_SHORT_XFER_OK,
&actlen, USB_DEFAULT_TIMEOUT); &actlen, USB_DEFAULT_TIMEOUT);
if (err) { if (err) {
@ -468,7 +468,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wIndex, 0); USETW(req.wIndex, 0);
USETW(req.wLength, 1); USETW(req.wLength, 1);
err = usb2_do_request(udev, &Giant, &req, buffer); err = usb2_do_request(udev, NULL, &req, buffer);
if (err) { if (err) {
goto done; goto done;
} }
@ -479,7 +479,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wValue, 0); USETW(req.wValue, 0);
USETW(req.wIndex, 0); USETW(req.wIndex, 0);
USETW(req.wLength, 1); USETW(req.wLength, 1);
err = usb2_do_request(udev, &Giant, &req, buffer); err = usb2_do_request(udev, NULL, &req, buffer);
if (err) { if (err) {
goto done; goto done;
} }
@ -490,7 +490,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wValue, 0); USETW(req.wValue, 0);
USETW(req.wIndex, 5); USETW(req.wIndex, 5);
USETW(req.wLength, sizeof(wAvail)); USETW(req.wLength, sizeof(wAvail));
err = usb2_do_request(udev, &Giant, &req, &wAvail); err = usb2_do_request(udev, NULL, &req, &wAvail);
if (err) { if (err) {
goto done; goto done;
} }

View File

@ -1583,7 +1583,7 @@ umass_attach(device_t dev)
* some devices need a delay after that the configuration value is * some devices need a delay after that the configuration value is
* set to function properly: * set to function properly:
*/ */
usb2_pause_mtx(&Giant, hz); usb2_pause_mtx(NULL, hz);
/* register the SIM */ /* register the SIM */
err = umass_cam_attach_sim(sc); err = umass_cam_attach_sim(sc);
@ -1642,7 +1642,7 @@ umass_init_shuttle(struct umass_softc *sc)
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 = usb2_do_request(sc->sc_udev, &Giant, &req, &status); err = usb2_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]);
@ -2161,7 +2161,7 @@ umass_bbb_get_max_lun(struct umass_softc *sc)
req.wIndex[1] = 0; req.wIndex[1] = 0;
USETW(req.wLength, 1); USETW(req.wLength, 1);
err = usb2_do_request(sc->sc_udev, &Giant, &req, &buf); err = usb2_do_request(sc->sc_udev, NULL, &req, &buf);
if (err) { if (err) {
buf = 0; buf = 0;