public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: "Carlo B." <carlo.bramini@gmail.com>
Cc: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: PATCH: TIOCMBIS/TIOCMBIC not working when using usbser.sys
Date: Thu, 10 Nov 2022 15:55:10 +0100	[thread overview]
Message-ID: <Y20Qzrfo+JZYlQhq@calimero.vinschen.de> (raw)
In-Reply-To: <CADt9575fzjVLgAwB0EScK=0CZr_dBCCs_bE3VrVuDFUH-MFRTg@mail.gmail.com>

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

  reply	other threads:[~2022-11-10 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  9:07 Carlo B.
2022-11-10 14:55 ` Corinna Vinschen [this message]
2022-11-11 10:30 Carlo B.
2022-11-11 12:07 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y20Qzrfo+JZYlQhq@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=carlo.bramini@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).