From: Oliver Neukum <oliver@neukum.org>
To: "Robert White" <rwhite@casabyte.com>,
"'Pete Zaitcev'" <zaitcev@redhat.com>
Cc: <linux-usb-devel@lists.sourceforge.net>, <linux-kernel@vger.kernel.org>
Subject: Re: [linux-usb-devel] [PATCH] (linux 2.4.25) hangup on disconnect for usbserial module
Date: Mon, 5 Apr 2004 10:10:46 +0200 [thread overview]
Message-ID: <200404051010.47141.oliver@neukum.org> (raw)
In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA2ZSI4XW+fk25FhAf9BqjtMKAAAAQAAAA9BOg2suQOk2BJuklNeZkhAEAAAAA@casabyte.com>
Am Montag, 5. April 2004 07:49 schrieb Robert White:
> Pasting the whole program is impractical, so here is the psudocode
>
> Open /dev/usb/ttyUSB0
> Build Poll structure with events = POLLIN for this descriptor
> Call poll(&structure,1,-1)
>
> (Without the patch) If you pull the usb cable out of the computer, the
> program above will never return from the poll. I was quite surprised,
> especially since this didn't match the behavior of the ACM device that we
> alternately use in our box. The hang is semi-terminal too, as nothing can
> reattach to the file descriptor from below.
This is clearly unacceptable behavior.
[..]
> The hangup semantic with all its ramifications (sighup if the device is a
> controlling terminal etc.) is "good for me", and matches other kinds of
> (USB and non-USB) devices, but I have no opinion on particular apps. I
> considered adding an IOCTL and flag to control this but decided against for
> the following reasons:
Unless you want to go for reattaching, which I wouldn't consider a good idea,
I see no other choice.
I did a quick look at the drivers and the other driver hanging there is usb-midi.
I haven't checked the serial drivers not using generic_disconnect() though.
Regards
Oliver
prev parent reply other threads:[~2004-04-05 8:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-05 4:46 Robert White
2004-04-05 5:14 ` [linux-usb-devel] " Pete Zaitcev
2004-04-05 5:49 ` Robert White
2004-04-05 8:10 ` Oliver Neukum [this message]
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=200404051010.47141.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=rwhite@casabyte.com \
--cc=zaitcev@redhat.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
all inboxes | Powered by JetHome®