From owner-freebsd-hackers@FreeBSD.ORG  Mon Sep  8 21:18:49 2014
Return-Path: <owner-freebsd-hackers@FreeBSD.ORG>
Delivered-To: freebsd-hackers@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id C06BAC6F;
 Mon,  8 Sep 2014 21:18:49 +0000 (UTC)
Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214])
 (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7B5A01DE0;
 Mon,  8 Sep 2014 21:18:49 +0000 (UTC)
Received: from laptop015.home.selasky.org
 (cm-176.74.213.204.customer.telag.net [176.74.213.204])
 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits))
 (No client certificate requested)
 by mail.turbocat.net (Postfix) with ESMTPSA id CFB121FE027;
 Mon,  8 Sep 2014 23:18:45 +0200 (CEST)
Message-ID: <540E1D2E.3020401@selasky.org>
Date: Mon, 08 Sep 2014 23:18:38 +0200
From: Hans Petter Selasky <hps@selasky.org>
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: Ian Lepore <ian@FreeBSD.org>
Subject: Re: What to do if USB stack seems dead
References: <1455331.JKPkSxLmbq@quad> <540B7AC4.9060504@selasky.org>
 <1410208808.1150.406.camel@revolution.hippie.lan>
In-Reply-To: <1410208808.1150.406.camel@revolution.hippie.lan>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: freebsd-hackers@freebsd.org
X-BeenThere: freebsd-hackers@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: Technical Discussions relating to FreeBSD
 <freebsd-hackers.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-hackers>, 
 <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers/>
List-Post: <mailto:freebsd-hackers@freebsd.org>
List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>,
 <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Sep 2014 21:18:49 -0000

On 09/08/14 22:40, Ian Lepore wrote:
> On Sat, 2014-09-06 at 23:21 +0200, Hans Petter Selasky wrote:
>> On 09/06/14 21:57, Maxim V FIlimonov wrote:
>>> Lately, I've been heavily experimenting with different USB devices (for
>>> instance, USB to TTL one, but that's another story), and at a moment I
>>> encountered that the system doesn't react on new USB devices connected. The
>>> connected devices work fine, though. The question is: what can I do in such a
>>> case if I don't want to reboot my box?
>>>
>>
>> Hi,
>>
>> If a TTY port is not closed, it will prevent other USB devices on that
>> particular USB controller from enumerating.
>>
>> --HPS
>
> What does that mean, "is not closed"?  You mean if I have any usb-serial
> adapter tty device open, other device insert/remove events aren't
> handled?
>
> Or that if a usb-serial device is removed while the device is open, that
> prevents other insert/remove events?
>
> -- Ian

Yes, because we need to wait for some refcounting inside the TTY layer 
at detach when the TTY device is open at detach. It is not a USB stack 
problem.

--HPS