summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeng Guang <hotice0@qq.com>2023-03-02 09:18:56 +0000
committerTormod Volden <debian.tormod@gmail.com>2023-03-12 14:52:23 +0100
commit3593d5469d563042a5b2cc6f283ffce4b73c82dd (patch)
tree5ae646a22771415a80e187b2cef6abb7421f43f3
parent4dbcefaf61a36ad95af74fdb93979230efdaa68f (diff)
downloadlibusb-3593d5469d563042a5b2cc6f283ffce4b73c82dd.tar.gz
windows: Add USBD_STATUS_STALL_PID to usbd_status translation
The value is returned if "The device returned a stall packet identifier", so translate it to LIBUSB_TRANSFER_STALL. Closes #1257
-rw-r--r--libusb/os/windows_common.c1
-rw-r--r--libusb/os/windows_common.h1
-rw-r--r--libusb/version_nano.h2
3 files changed, 3 insertions, 1 deletions
diff --git a/libusb/os/windows_common.c b/libusb/os/windows_common.c
index 308bbc8..9054349 100644
--- a/libusb/os/windows_common.c
+++ b/libusb/os/windows_common.c
@@ -279,6 +279,7 @@ enum libusb_transfer_status usbd_status_to_libusb_transfer_status(USBD_STATUS st
case USBD_STATUS_CANCELED:
return LIBUSB_TRANSFER_CANCELLED;
case USBD_STATUS_ENDPOINT_HALTED:
+ case USBD_STATUS_STALL_PID:
return LIBUSB_TRANSFER_STALL;
case USBD_STATUS_DEVICE_GONE:
return LIBUSB_TRANSFER_NO_DEVICE;
diff --git a/libusb/os/windows_common.h b/libusb/os/windows_common.h
index 49c02ab..cdee97f 100644
--- a/libusb/os/windows_common.h
+++ b/libusb/os/windows_common.h
@@ -131,6 +131,7 @@ typedef LONG USBD_STATUS;
#define USBD_SUCCESS(Status) ((USBD_STATUS)(Status) >= 0)
+#define USBD_STATUS_STALL_PID ((USBD_STATUS)0xC0000004L)
#define USBD_STATUS_ENDPOINT_HALTED ((USBD_STATUS)0xC0000030L)
#define USBD_STATUS_TIMEOUT ((USBD_STATUS)0xC0006000L)
#define USBD_STATUS_DEVICE_GONE ((USBD_STATUS)0xC0007000L)
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index fefe657..5dc9f0b 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11789
+#define LIBUSB_NANO 11790