annotate doc/Replug-after-EEPROM-write @ 83:b3989befca98

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