diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-02-24 03:41:52 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-02-24 03:41:52 +0000 |
commit | 8041f6f6948e9212d22713bd2c0c2bec494e144c (patch) | |
tree | 13d47a7128085f71816e3d34526404331e4d64fa /sys/dev/usb/usb_generic.c | |
parent | 111921b05dd005836d9139fff6225cf38ae27b4f (diff) | |
download | FreeBSD-src-8041f6f6948e9212d22713bd2c0c2bec494e144c.zip FreeBSD-src-8041f6f6948e9212d22713bd2c0c2bec494e144c.tar.gz |
MFp4 //depot/projects/usb@157958
- We don't need to exit the Giant mutex when sleeping. This is done
automatically. Replace Giant by NULL mutex for all control requests in the
enumeration path.
- Optimise away duplicate alternate interface selection requests in USB Host
mode.
Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/usb_generic.c')
-rw-r--r-- | sys/dev/usb/usb_generic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c index 15ca909..75b985c 100644 --- a/sys/dev/usb/usb_generic.c +++ b/sys/dev/usb/usb_generic.c @@ -664,7 +664,7 @@ ugen_get_cdesc(struct usb2_fifo *f, struct usb2_gen_descriptor *ugd) } else { if (usb2_req_get_config_desc_full(udev, - &Giant, &cdesc, M_USBDEV, + NULL, &cdesc, M_USBDEV, ugd->ugd_config_index)) { return (ENXIO); } @@ -695,7 +695,7 @@ ugen_get_sdesc(struct usb2_fifo *f, struct usb2_gen_descriptor *ugd) uint16_t size = sizeof(f->udev->bus->scratch[0].data); int error; - if (usb2_req_get_string_desc(f->udev, &Giant, ptr, + if (usb2_req_get_string_desc(f->udev, NULL, ptr, size, ugd->ugd_lang_id, ugd->ugd_string_index)) { error = EINVAL; } else { |