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

Further remove dependancy towards Giant.

Submitted by:	Hans Petter Selasky
This commit is contained in:
thompsa 2009-03-20 18:56:27 +00:00
parent 4ed7cea882
commit 83e8c0befe
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
* returning digitizer data.
*/
error = usb2_req_set_report
(uaa->device, &Giant, reportbuf, sizeof(reportbuf),
error = usb2_req_set_report(uaa->device, NULL,
reportbuf, sizeof(reportbuf),
uaa->info.bIfaceIndex, UHID_FEATURE_REPORT, 2);
if (error) {
@ -691,16 +691,16 @@ uhid_attach(device_t dev)
}
if (sc->sc_repdesc_ptr == NULL) {
error = usb2_req_get_hid_desc
(uaa->device, &Giant, &sc->sc_repdesc_ptr,
&sc->sc_repdesc_size, M_USBDEV, uaa->info.bIfaceIndex);
error = usb2_req_get_hid_desc(uaa->device, NULL,
&sc->sc_repdesc_ptr, &sc->sc_repdesc_size,
M_USBDEV, uaa->info.bIfaceIndex);
if (error) {
device_printf(dev, "no report descriptor\n");
goto detach;
}
}
error = usb2_req_set_idle(uaa->device, &Giant,
error = usb2_req_set_idle(uaa->device, NULL,
uaa->info.bIfaceIndex, 0, 0);
if (error) {

View File

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

View File

@ -244,8 +244,8 @@ ubser_attach(device_t dev)
req.wIndex[0] = sc->sc_iface_no;
req.wIndex[1] = 0;
USETW(req.wLength, 1);
error = usb2_do_request_flags
(uaa->device, &Giant, &req, &sc->sc_numser,
error = usb2_do_request_flags(uaa->device, NULL,
&req, &sc->sc_numser,
0, NULL, USB_DEFAULT_TIMEOUT);
if (error || (sc->sc_numser == 0)) {

View File

@ -222,8 +222,7 @@ ucycom_attach(device_t dev)
/* get report descriptor */
error = usb2_req_get_hid_desc
(uaa->device, &Giant,
error = usb2_req_get_hid_desc(uaa->device, NULL,
&urd_ptr, &urd_len, M_USBDEV,
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(ast.wState, state);
return (usb2_do_request(udev, &Giant, &req, &ast));
return (usb2_do_request(udev, NULL, &req, &ast));
}
static int

View File

@ -441,7 +441,7 @@ uplcom_reset(struct uplcom_softc *sc, struct usb2_device *udev)
req.wIndex[1] = 0;
USETW(req.wLength, 0);
return (usb2_do_request(udev, &Giant, &req, NULL));
return (usb2_do_request(udev, NULL, &req, NULL));
}
struct pl2303x_init {
@ -485,7 +485,7 @@ uplcom_pl2303x_init(struct usb2_device *udev)
USETW(req.wIndex, pl2303x[i].index);
USETW(req.wLength, pl2303x[i].length);
err = usb2_do_request(udev, &Giant, &req, buf);
err = usb2_do_request(udev, NULL, &req, buf);
if (err) {
DPRINTF("error=%s\n", usb2_errstr(err));
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.wIndex, 0);
USETW(req.wLength, UVISOR_CONNECTION_INFO_SIZE);
err = usb2_do_request_flags
(udev, &Giant, &req, &coninfo, USB_SHORT_XFER_OK,
err = usb2_do_request_flags(udev, NULL,
&req, &coninfo, USB_SHORT_XFER_OK,
&actlen, USB_DEFAULT_TIMEOUT);
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);
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);
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.wLength, 1);
err = usb2_do_request(udev, &Giant, &req, buffer);
err = usb2_do_request(udev, NULL, &req, buffer);
if (err) {
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.wIndex, 0);
USETW(req.wLength, 1);
err = usb2_do_request(udev, &Giant, &req, buffer);
err = usb2_do_request(udev, NULL, &req, buffer);
if (err) {
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.wIndex, 5);
USETW(req.wLength, sizeof(wAvail));
err = usb2_do_request(udev, &Giant, &req, &wAvail);
err = usb2_do_request(udev, NULL, &req, &wAvail);
if (err) {
goto done;
}

View File

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