RE: Configfs composite gadget with CCID and mass storage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I managed to get the implementation working for us using the following dirty patch for kernel 3.14,
-----------------------------------------------------------------------------------------------------
diff -u -r a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
--- a/drivers/usb/gadget/f_fs.c	2014-06-11 21:02:49.000000000 +0200
+++ b/drivers/usb/gadget/f_fs.c	2015-10-08 11:34:29.177420065 +0200
@@ -1449,8 +1449,9 @@
 		break;
 
 	case HID_DT_HID:
-		pr_vdebug("hid descriptor\n");
-		if (length != sizeof(struct hid_descriptor))
+		pr_vdebug("hid or sc device class descriptor\n");
+		if (length != sizeof(struct hid_descriptor) &&
+				length != 0x36)
 			goto inv_length;
 		break;
 -----------------------------------------------------------------------------------------------------

It turns out that our main problem was passing the smart card device class descriptor to FunctionFS as the code in f_fs.c incorrectly identified our descriptor as a HID descriptor since HID_DT_HID == 0x21 which corresponds to the bDescriptorType value for a smart card device class descriptor. It looks like FunctionFS does not make provision for class descriptors specific to certain interfaces.

I also had to remove "USB wakeup signalling" from dwFeatures in our smart card class descriptor to get the implementation working on Windows.

This might help someone someday :-)

Cheers,
Pieter



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux