From owner-freebsd-current@FreeBSD.ORG Mon Aug 6 09:28:02 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE3A6106564A for ; Mon, 6 Aug 2012 09:28:02 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7129E8FC08 for ; Mon, 6 Aug 2012 09:28:02 +0000 (UTC) Received: by obbun3 with SMTP id un3so7149928obb.13 for ; Mon, 06 Aug 2012 02:28:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=iYPPO2FtJZwEaKI0wSowDXiU6pTDBpqfxJuCTlzeX1M=; b=WFatFe6Dql/OY6hzdn1N5jCH+Dk/0jF6xDeNckd89L5mo8BrXIEfHUD1WpVv9ccImR 4OTzquTs3lDEvyxP1KlPoMzsSSdMgJdD0FD7HBlcd1JzBXaHwo1rDB1ENWKPalQeMZiG 4mdUNxI2rwXzGxpNk3kOP8D5Ov3jQ+2o40uJm6JewXMMjBrQrCRuShJMBhpkSCU70x6z UxZy0cIX7DklBlMpSr0j3L2EuRjymVVvRhH1Q8ZYJk0F6cxuJv2TfZ/h8uN2NPy+zQTX mMxqDfoNJalAhy6Bbn9eJYO7h2tOzSTm/R4qXjQiirrbSw6zvobfD/mEPI1j97VoTdkJ w1ow== MIME-Version: 1.0 Received: by 10.182.174.68 with SMTP id bq4mr18340614obc.53.1344245281583; Mon, 06 Aug 2012 02:28:01 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.153.195 with HTTP; Mon, 6 Aug 2012 02:28:01 -0700 (PDT) In-Reply-To: <201208051033.13486.hselasky@c2i.net> References: <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208012341.25509.hselasky@c2i.net> <201208051033.13486.hselasky@c2i.net> Date: Mon, 6 Aug 2012 11:28:01 +0200 X-Google-Sender-Auth: uAprNcNZ1D7oF_005uvxGZRzc1M Message-ID: From: Ed Schouten To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , freebsd-current@freebsd.org Subject: Re: ttydev_cdevsw has no d_purge X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2012 09:28:02 -0000 Hi Hans, 2012/8/5 Hans Petter Selasky : > When can the previous unit number be re-used? Is there a callback for this? The unit number can be reused after .tsw_free() has been called. > When can the USB serial code assume that it will not be called again and that > all callbacks are drained? The tty_rel_gone() function has to be called while holding the TTY lock. Also, all calls done by the TTY layer into the driver also hold the TTY lock and will assert that the TTY is not in the `gone' state. So you can safely assume that you will not get any driver calls as soon as tty_rel_gone() returns. I hope this helps. If you have any further questions, let me know! -- Ed Schouten