From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by sourceware.org (Postfix) with ESMTPS id 218903858D38 for ; Thu, 10 Nov 2022 14:55:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 218903858D38 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MNKqC-1oeMAH2gRu-00OoZN; Thu, 10 Nov 2022 15:55:11 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id A3FDEA809C8; Thu, 10 Nov 2022 15:55:10 +0100 (CET) Date: Thu, 10 Nov 2022 15:55:10 +0100 From: Corinna Vinschen To: "Carlo B." Cc: The Cygwin Mailing List Subject: Re: PATCH: TIOCMBIS/TIOCMBIC not working when using usbser.sys Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: "Carlo B." , The Cygwin Mailing List References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:n+wnmflOXpgcbbbFB+pRZvx1OBUATdmUwrlioBXxztS3CUi8lbR J690mOYy/VsCQp6Fkwb8TYHE102bKIZ6Eyxe2alZXTaM3hkTZi3KmTIjL/tlbX+lCGbSh8v Bn8dTAD9VdnvLRkvsvEhWSWL4i004+6j/2bTFj5ocPBBAfXMNoFOUlmZ8f6ZAm1zKa2pSue n2UctA2TCtwgSAokSBLDA== X-UI-Out-Filterresults: notjunk:1;V03:K0:98qo3NF2Mb0=:fPXPQOddKoTaqVoDt7UpIb xIxwQoe7jJNaCJeSwRcSBw+WymZSICoeygtOkVFuSALVh9JqPTmqwprGKPKvPrTOaDGmwypm1 R6gxFJNqP1mss+9VLBihUS/Uy+td1sHhs8ERS08n/AI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ga+ZdeJA6pKQrk66sYq4Vrur+XGxGiYsPD6P8tOwbdgxeJtdhWFwOgcsd IZiecA94zT0MX4thF9JVNL10DRDlpD4108h/B/XlSDZ+uvqL3UbLAfwuCTzYC7qvAbiXARLGs J3W5WGXn/4tzDl+U1ONHWUqeRJjuzw== X-Spam-Status: No, score=-95.8 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_DMARC_NONE,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_FAIL,SPF_HELO_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Carlo, On Nov 10 10:07, Carlo B. wrote: > Hello, > into winsup/cygwin/fhandler/serial.cc, the function > fhandler_serial::switch_modem_lines() is called when TIOCMBIS/TIOCMBIC > are used into an ioctl() call. > This function uses EscapeCommFunction() for setting and resetting RTS > and DTR signals of a serial port. > Unfortunately, this function does not work on USB CDC devices. > This is not a true bug of a CYGWIN but an issue of the usbser.sys > driver from Microsoft, from Windows 2000 to the latest Windows 11. > Both 32bit and 64bit versions of the operating system are affected. > Actually, I tested EscapeCommFunction() also when using a real UART, > based on the traditional 16550 driver and it works fine. > Using thirdy party CDC drivers, like the one provided by FTDI for > their USB bridge chips, probably also works. > However, it is also possible to drive the RTS/DTR signals by writing > their state with SetCommState(), which proved to be working fine all > types of connection. > > Here, I attached a patch that I made for fixing this issue. Thanks for your patch, but would you be so kind to create a complete git patch, created by committing your patch locally on top of git master, with a fine commit message outlining the technical details as described above? Then create a patch file using `git format-patch -1' and send it here or to the cygwin-patches mailing list, please? > I was wondering if this fix could be imported into the core of CYGWIN > and if it could be possible to include it also into the v3.3.x branch, > since I have seen that 32bit support has been removed from Master > branch recently. There will be no more 32 bit release. 3.3.6 is the last one. Thanks, Corinna