diff options
author | stefan <stefan@FreeBSD.org> | 2006-07-30 19:48:24 +0800 |
---|---|---|
committer | stefan <stefan@FreeBSD.org> | 2006-07-30 19:48:24 +0800 |
commit | 1b0bda5aacd00759751a4d55c4c576c4bf9b2684 (patch) | |
tree | dd9264c42189940f0ad41879ab535dffc5ff5c0d /devel/libusb | |
parent | 891e3debac9878e2d8d425a292fb71fd62f04e3f (diff) | |
download | freebsd-ports-gnome-1b0bda5aacd00759751a4d55c4c576c4bf9b2684.tar.gz freebsd-ports-gnome-1b0bda5aacd00759751a4d55c4c576c4bf9b2684.tar.zst freebsd-ports-gnome-1b0bda5aacd00759751a4d55c4c576c4bf9b2684.zip |
- Add usb_clear_halt implementation.
- Bump PORTREVISION.
PR: 100718
Submitted by: Robert Nilsson <rnilsson@mac.com>
Approved by: maintainer
arved (mentor)
Diffstat (limited to 'devel/libusb')
-rw-r--r-- | devel/libusb/Makefile | 1 | ||||
-rw-r--r-- | devel/libusb/files/patch-bsd.c | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/devel/libusb/Makefile b/devel/libusb/Makefile index fb1cdf8b9e2f..b1520e46898f 100644 --- a/devel/libusb/Makefile +++ b/devel/libusb/Makefile @@ -7,6 +7,7 @@ PORTNAME= libusb PORTVERSION= 0.1.12 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/devel/libusb/files/patch-bsd.c b/devel/libusb/files/patch-bsd.c new file mode 100644 index 000000000000..6e8afde3fdf7 --- /dev/null +++ b/devel/libusb/files/patch-bsd.c @@ -0,0 +1,26 @@ +--- bsd.c.orig Sun Jul 30 11:18:07 2006 ++++ bsd.c Sun Jul 30 11:20:30 2006 +@@ -623,9 +623,21 @@ + + int usb_clear_halt(usb_dev_handle *dev, unsigned int ep) + { +- /* Not yet done, because I haven't needed it. */ ++ int ret; ++ struct usb_ctl_request ctl_req; + +- USB_ERROR_STR(-ENOSYS, "usb_clear_halt called, unimplemented on BSD"); ++ ctl_req.ucr_addr = 0; // Not used for this type of request ++ ctl_req.ucr_request.bmRequestType = UT_WRITE_ENDPOINT; ++ ctl_req.ucr_request.bRequest = UR_CLEAR_FEATURE; ++ USETW(ctl_req.ucr_request.wValue, UF_ENDPOINT_HALT); ++ USETW(ctl_req.ucr_request.wIndex, ep); ++ USETW(ctl_req.ucr_request.wLength, 0); ++ ctl_req.ucr_flags = 0; ++ ++ if ((ret = ioctl(dev->fd, USB_DO_REQUEST, &ctl_req)) < 0) ++ USB_ERROR_STR(-errno, "clear_halt: failed for %d", ep); ++ ++ return ret; + } + + int usb_reset(usb_dev_handle *dev) |