FreeCalypso > hg > fc-usbser-tools
comparison doc/Replug-after-EEPROM-write @ 47:b6a5ee85c6a3
doc/Replug-after-EEPROM-write: new article
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Sep 2023 03:40:58 +0000 |
parents | doc/FTDI-EEPROM-tools@f548ae912622 |
children |
comparison
equal
deleted
inserted
replaced
46:d682cac178c2 | 47:b6a5ee85c6a3 |
---|---|
1 USB replug after EEPROM modification | |
2 ==================================== | |
3 | |
4 With the current state of software, if you use any of the tools provided in | |
5 this package to modify the configuration EEPROM content of your USB-serial | |
6 adapter device (FTDI, CP2102, possibly others to be supported in the future), | |
7 you then have to physically unplug and replug the USB device. This unplug- | |
8 replug sequence is needed because: | |
9 | |
10 * Most USB-serial chips require a deep reset in order to reread their EEPROM | |
11 and fully apply the new configuration, which may include a new USB VID:PID | |
12 or other USB descriptor changes. | |
13 | |
14 * With some chips safe and correct EEPROM programming requires unbinding the | |
15 kernel's usb-serial driver, causing the ttyUSB device for the USB-serial chip | |
16 (or multiple ttyUSB devices for multichannel chips) to disappear. With the | |
17 current state of Linux, we can command the kernel to unbind its drivers from | |
18 a specific interface on a specific chip (*without* rmmod of the responsible | |
19 driver, killing all other devices of the same tyoe), but we have no way to | |
20 tell the kernel to rebind everything when we are done. | |
21 | |
22 Why is physical plug/unplug manipulation needed, why can't we command the needed | |
23 effect via software? As it turns out, there are no *valid* reasons why it can't | |
24 be done - but we are not currently able to do so because Linux kernel USB | |
25 maintainers are being pricks and won't support functionality that doesn't fit | |
26 into their worldview. Given that Harald Welte discovered this problem back in | |
27 2017: | |
28 | |
29 https://laforge.gnumonks.org/blog/20170524-usb-port-powercycle/ | |
30 https://marc.info/?l=linux-usb&m=149557709602259&w=2 | |
31 | |
32 (the thread shows Harald's good-faith attempt to reason with those pricks and | |
33 their dismissive responses) and given my own (Mother Mychaela's) sour experience | |
34 with trying to get a simple patch into ftdi_sio (failed attempt to mainline the | |
35 patch adding support for DUART28C), the situation with Linux currently looks | |
36 hopeless. |