On Do, 2018-12-13 at 11:27 +0800, macpaul.lin@xxxxxxxxxxxx wrote: > From: Macpaul Lin <macpaul.lin@xxxxxxxxxxxx> > > Mediatek Preloader is a proprietary embedded boot loader for loading > Little Kernel and Linux into device DRAM. > > This boot loader also handle firmware updating. Mediatek Preloader will be > enumerated as a virtual COM port when the device is connected to Windows > or Linux OS via CDC-ACM class driver. When the enumeration has been done, > Mediatek Preloader will send out handshake command "READY" to PC actively > instead of waiting command from the download tool. > Since Linux 4.12, the commit "tty: reset termios state on device > registration" (93857edd9829e144acb6c7e72d593f6e01aead66) causes Mediatek > Preloader receiving some abnoraml command like "READYXX" as it sended. > Which will be recognized as an incorrect response. This behavior change > also causes the handshake fail. Thank you for making this patch. However, I am afraid I have to ask for two little alterations before it can go upstream 1. If I understand you correctly it only worked by accident usually on the old kernels. Please CC the patch to stable. 2. Do not check for exact match on your quirk. That will prevent combining quirks. Please test for the specific bit being set. > > > + /* handle active handshake triggered by device */ > + if (quirks == DISABLE_ECHO) This test is too specific. > + acm_tty_driver->init_termios.c_lflag &= ~(ECHO); > + Regards Oliver