On 1/15/20 7:14 AM, Alan Stern wrote: > I don't think any earlier messages in this thread made it through the > mailing list, but this one definitely did. Yay! I also saw this one in the archives so I was hopeful. >>> I've been trying to set "iInterface" in my usb gadget to a specific string, but I simply can't find a way to make configfs accept this. >>> >>> When I set my gadget up on my Beaglebone Black (uname -a: Linux beaglebone 4.14.108-ti-r113 #1 SMP PREEMPT Wed Jul 31 00:01:10 UTC 2019 armv7l GNU/Linux). >>> >>> I get (output from lsusb): >>> >>> iInterface 5 HID Interface >>> >>> >>> But I want it to be something like: >>> >>> iInterface 4 LPC-LINK2 CMSIS-DAP V5.224 >>> >>> >>> This seems to be wired up as a fixed value in f_hid.c and doesn't seem to have a corresponding way to actually change it via configfs. >>> >>> >>> #define CT_FUNC_HID_IDX 0 >>> >>> static struct usb_string ct_func_string_defs[] = { >>> [CT_FUNC_HID_IDX].s = "HID Interface", >>> {}, /* end of list */ >>> }; > > Then maybe you need to fix f_hid.c. Or maybe configfs isn't meant to > allow the user to specify these string index values (I don't know any > of the configfs details). That's kind of my problem in that I was hoping to get someone far more knowledegable than me to at least flag these before attacking it: A) I didn't overlook something stupid and this really is hardwired with no way to change it (either in configfs or ... some other? kernel mechanism) B) This is an *actual* bug. C) This is an actual bug *that should be fixed* and isn't that way intentionally for some Linux reason. D) This is actually the right place to fix it. Obviously there is going to be something at the configfs level, too, and I have *zero* idea where to start looking for that. Thanks, -a