This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15016 )
Change subject: ensure kernel >= 5.0 is happy
......................................................................
ensure kernel >= 5.0 is happy
dummy_hcd now checks wMaxPacketSize
Change-Id: I3ca4fa3948b5eb9995e0c9f679713ad860dd118e
---
M ccid/README.linux-dummy_hcd-ffs
M ccid/ccid_main_functionfs.c
2 files changed, 7 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/ccid/README.linux-dummy_hcd-ffs b/ccid/README.linux-dummy_hcd-ffs
index bb628b6..2b98eff 100644
--- a/ccid/README.linux-dummy_hcd-ffs
+++ b/ccid/README.linux-dummy_hcd-ffs
@@ -2,7 +2,8 @@
============
* you need dummy_hcd.ko, i.e. a kernel compiled with CONFIG_USB_DUMMY_HCD=m
-* you need a fixed usb_f_fs.ko, which doesn't make blind assumptions about
+* kernel version >= 5.0 does NOT require patching
+* kernel version < 5.0 needs a fixed usb_f_fs.ko, which doesn't make blind assumptions about
everything being a HID descriptor. See CCID.patch
On a stock Debian system, this works as follows (kernel versions will change over time,
diff --git a/ccid/ccid_main_functionfs.c b/ccid/ccid_main_functionfs.c
index 81cf225..26bb525 100644
--- a/ccid/ccid_main_functionfs.c
+++ b/ccid/ccid_main_functionfs.c
@@ -2,6 +2,7 @@
#include <errno.h>
#include <stdint.h>
#include <endian.h>
+#include <signal.h>
#include <sys/types.h>
#include <linux/usb/functionfs.h>
@@ -87,20 +88,22 @@
.bEndpointAddress = 1 | USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_INT,
.wMaxPacketSize = 64,
+ .bInterval = 1,
},
+ // dummy_hcd expects a valid wMaxPacketSize!
.ep_out = {
.bLength = sizeof(descriptors.fs_descs.ep_out),
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = 2 | USB_DIR_OUT,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
- /* .wMaxPacketSize = autoconfiguration (kernel) */
+ .wMaxPacketSize = 64,
},
.ep_in = {
.bLength = sizeof(descriptors.fs_descs.ep_in),
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = 3 | USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
- /* .wMaxPacketSize = autoconfiguration (kernel) */
+ .wMaxPacketSize = 64,
},
},
};
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15016
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I3ca4fa3948b5eb9995e0c9f679713ad860dd118e
Gerrit-Change-Number: 15016
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190802/b88bfbf8/attachment.htm>