From owner-freebsd-current@FreeBSD.ORG Wed Aug 8 17:24:19 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E2EF1065673 for ; Wed, 8 Aug 2012 17:24:19 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 160E88FC25 for ; Wed, 8 Aug 2012 17:24:18 +0000 (UTC) Received: by ggnk4 with SMTP id k4so1241900ggn.13 for ; Wed, 08 Aug 2012 10:24:18 -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=Il9d5dHTy/3WL658g1G6aKWxeUGMl0tw6CYirtc0UIU=; b=B4KyIERUAgEYMBW0kHBkRRQ0D3NZEMIy3nbM3ciObO59gP9qYvk6UUb6Zyt4RG5z86 fajG2NOwrxTap11Pdvnir5zEaDyf6gpteSQZN46qsspkemw9DVMl1qUiN3PqyuBq7oNu FXxPzG5I/oLTuVAAeta5Xzp9eFxZ7g4LFFi6gnZg5AdTzGkbFgNvb0Ly013dZ1a3zDZI zS7U+5pjdl+GFZToeP/RklID+Y7H+cZt5yiAwDGoWQV2k2i89lFD56khS0U69QT7uyrF VM8Taku57cvrLjYHz0EPpJp4/BErBBTWQgcIkmdPJQivi8pkgZlor+b+K340f00zldgz 6c+Q== MIME-Version: 1.0 Received: by 10.60.19.34 with SMTP id b2mr550874oee.41.1344446658239; Wed, 08 Aug 2012 10:24:18 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.153.195 with HTTP; Wed, 8 Aug 2012 10:24:18 -0700 (PDT) In-Reply-To: <201208081827.53824.hselasky@c2i.net> References: <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208071703.13773.hselasky@c2i.net> <20120808113133.GO2676@deviant.kiev.zoral.com.ua> <201208081827.53824.hselasky@c2i.net> Date: Wed, 8 Aug 2012 19:24:18 +0200 X-Google-Sender-Auth: 3a8EotZUkdi2d9CUkccFdDe4ieo 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: Wed, 08 Aug 2012 17:24:19 -0000 2012/8/8 Hans Petter Selasky : >> I have a question regarding the changed fragment of code. Why don't you use >> unr(9) KPI to manage unit numbers ? > > Probably I could, but right now the unr interface doesn't support pending unit > free which I need for other reasons, see below. What does `pending unit free' mean? I also would prefer it if you used unr(9) -- not just here, but across the entire USB stack. > Ed: I would really like to see a custom argument for the tsw_free(), because > it only needs to know the unit number, and the xsc for UCOM is freed when this > is called and cannot be referred. Is it possible to have a separate "void *" > for the tsw_free() function? Is this something which you can implement? We could extend the TTY code to allow the softc to be changed, e.g. tty_set_softc(). This function could be called right before calling tty_rel_gone(). Still, I would prefer it if these kind of things would not be part of the API. Is there really no way the deallocation of the softc can be delayed until tsw_free() is called? Thanks, -- Ed Schouten