On Mon, Dec 19, 2016 at 02:12:05PM -0800, Russell Senior wrote: > >> Apart from the two additional tests mentioned above, can you also > >> provide a log from when connecting the device using the following commit > >> that I just pushed to the ch341 branch: > >> > >> f341ee36198d ("dbg: ch341: add register dumps to probe") > >> > >> which provides dumps of the register settings during initialisation. > >> (Make sure ch341 dynamic debugging is not enabled to avoid cluttering > >> the log.) > > > > I'll send this in a followup, need to rebuild. > > 00018-gf341ee3: > > Dec 19 13:51:13 willard kernel: usbcore: registered new interface driver ch341 > Dec 19 13:51:13 willard kernel: usbserial: USB Serial support > registered for ch341-uart > Dec 19 13:51:23 willard kernel: usb 6-2: new full-speed USB device > number 10 using uhci_hcd > Dec 19 13:51:23 willard kernel: usb 6-2: New USB device found, > idVendor=1a86, idProduct=7523 > Dec 19 13:51:23 willard kernel: usb 6-2: New USB device strings: > Mfr=0, Product=2, SerialNumber=0 > Dec 19 13:51:23 willard kernel: usb 6-2: Product: USB2.0-Ser! > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: ch341-uart converter detected > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [00] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [01] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [02] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [03] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [04] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [05] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [06] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [07] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [08] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [09] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [0a] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [0b] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [0c] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [0d] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [0e] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [0f] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [10] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [11] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [12] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [13] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [14] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [15] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [16] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [17] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [18] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [19] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [1a] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [1b] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [1c] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [1d] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [1e] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [1f] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [20] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [21] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [22] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [23] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [24] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [25] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [26] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [27] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [28] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [29] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [2a] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [2b] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [2c] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [2d] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [2e] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: [2f] = 00 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: init 0 0 > Dec 19 13:51:23 willard kernel: ch341 6-2:1.0: write 0x31 0xb282 Ok, so no direct register read works (as they do on CH340G and CH341A) and instead always return zero. Except, when LCR is read back together with register 0x25: > Dec 19 13:51:23 willard kernel: usb 6-2: ch341_dbg - [0x2518] = f1 00, > [0x1213] = 00 00 (pre version) Note that the 0x31 LCR is read back as 0xf1, that is, with the tx and rx enable bits set. My CH341A behaves similarly and always has rx enabled. > Dec 19 13:51:23 willard kernel: usb 6-2: ch341_dbg - [0x2518] = f1 00, > [0x1213] = 00 00 (post init-0) > Dec 19 13:51:23 willard kernel: usb 6-2: ch341_set_baudrate_lcr - > speed = 9600, lcr = c3, a = b202 > Dec 19 13:51:23 willard kernel: usb 6-2: ch341_dbg - [0x2518] = f1 00, > [0x1213] = 00 00 (post init - lcr reset) And the init command does not seem to have any effect on either LCR or the divisors as previous tests also show. I'm not sure what device we're dealing with here, but it seems it would not be supported by the vendor (whose version of this driver also uses the init-command). Perhaps you could give the attached vendor driver a quick spin just to confirm that? It's a rebased version against usb-next. I've also pushed a commit that tries to dump the registers differently (reading together with register 0x25): 3baa1eff4245 ("dbg: ch341: dump registers differently") Could you provide a log from when connecting the device with this commit as well? Thanks, Johan