Change in ...osmo-ccid-firmware[master]: Fix USB descriptor bugs (wrong interface, ProtocolsSuported, ...)

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.org
Fri Oct 4 15:58:06 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15643 )

Change subject: Fix USB descriptor bugs (wrong interface, ProtocolsSuported, ...)
......................................................................

Fix USB descriptor bugs (wrong interface, ProtocolsSuported, ...)

Change-Id: I0be2d8b92f176f31250a76e6f5b74a5c12d8cf42
---
M sysmoOCTSIM/config/hpl_usb_config.h
M sysmoOCTSIM/config/usbd_config.h
M sysmoOCTSIM/usb_descriptors.c
3 files changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Hoernchen: Looks good to me, but someone else must approve; Verified
  laforge: Looks good to me, approved



diff --git a/sysmoOCTSIM/config/hpl_usb_config.h b/sysmoOCTSIM/config/hpl_usb_config.h
index bbfd99d..dd62bd9 100644
--- a/sysmoOCTSIM/config/hpl_usb_config.h
+++ b/sysmoOCTSIM/config/hpl_usb_config.h
@@ -39,7 +39,7 @@
 // <CONF_USB_D_N_EP_MAX"> Max possible (by "Max Endpoint Number" config)
 // <id> usbd_num_ep_sp
 #ifndef CONF_USB_D_NUM_EP_SP
-#define CONF_USB_D_NUM_EP_SP CONF_USB_N_6
+#define CONF_USB_D_NUM_EP_SP CONF_USB_N_7
 #endif
 
 // </h>
diff --git a/sysmoOCTSIM/config/usbd_config.h b/sysmoOCTSIM/config/usbd_config.h
index 0be4363..a8861dd 100644
--- a/sysmoOCTSIM/config/usbd_config.h
+++ b/sysmoOCTSIM/config/usbd_config.h
@@ -204,7 +204,7 @@
 // <o> bInterfaceNumber <0x00-0xFF>
 // <id> usb_cdcd_acm_comm_bifcnum
 #ifndef CONF_USB_CDCD_ACM_COMM_BIFCNUM
-#define CONF_USB_CDCD_ACM_COMM_BIFCNUM 0x0
+#define CONF_USB_CDCD_ACM_COMM_BIFCNUM 0x1
 #endif
 // <o> bAlternateSetting <0x00-0xFF>
 // <id> usb_cdcd_acm_comm_baltset
@@ -253,7 +253,7 @@
 // <o> bInterfaceNumber <0x00-0xFF>
 // <id> usb_cdcd_acm_data_bifcnum
 #ifndef CONF_USB_CDCD_ACM_DATA_BIFCNUM
-#define CONF_USB_CDCD_ACM_DATA_BIFCNUM 0x1
+#define CONF_USB_CDCD_ACM_DATA_BIFCNUM 0x2
 #endif
 // <o> bAlternateSetting <0x00-0xFF>
 // <id> usb_cdcd_acm_data_baltset
diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c
index 429e8c2..ddb925b 100644
--- a/sysmoOCTSIM/usb_descriptors.c
+++ b/sysmoOCTSIM/usb_descriptors.c
@@ -162,7 +162,7 @@
 		.iface = {
 			.bLength = sizeof(struct usb_iface_desc),
 			.bDescriptorType = USB_DT_INTERFACE,
-			.bInterfaceNumber = 2,
+			.bInterfaceNumber = 0,
 			.bAlternateSetting = 0,
 			.bNumEndpoints = 3,
 			.bInterfaceClass = 11,
@@ -175,7 +175,8 @@
 			.bDescriptorType = 33,
 			.bcdCCID = LE16(0x0110),
 			.bMaxSlotIndex = 7,
-			.dwProtocols = 0x07, /* 5/3/1.8V */
+			.bVoltageSupport = 0x07, /* 5/3/1.8V */
+			.dwProtocols = 0x03,
 			.dwDefaultClock = LE32(2500),
 			.dwMaximumClock = LE32(20000),
 			.bNumClockSupported = 4,
@@ -185,7 +186,7 @@
 			.dwMaxIFSD = LE32(0),
 			.dwSynchProtocols = LE32(0),
 			.dwMechanical = LE32(0),
-			.dwFeatures = LE32(0x10),
+			.dwFeatures = LE32(0x10 | 0x00010000),
 			.dwMaxCCIDMessageLength = 272,
 			.bClassGetResponse = 0xff,
 			.bClassEnvelope = 0xff,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15643
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: I0be2d8b92f176f31250a76e6f5b74a5c12d8cf42
Gerrit-Change-Number: 15643
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191004/4801e7a0/attachment.htm>


More information about the gerrit-log mailing list