From owner-freebsd-usb@FreeBSD.ORG Sat Jan 14 10:19:05 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A2211065670; Sat, 14 Jan 2012 10:19:05 +0000 (UTC) (envelope-from yehorov@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 436558FC12; Sat, 14 Jan 2012 10:19:04 +0000 (UTC) Received: by qcse15 with SMTP id e15so1030753qcs.13 for ; Sat, 14 Jan 2012 02:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2rodWVBvPbN86LcjNy3E/+x9CtpoLAucf354wMPCI94=; b=Ibps1tGh1vrZFuBgxprjPYgFrQA91hDrVD9KQcFSS3UVMiIkIBEzFQa+rYLIilr8yb hWwkKffgCnQUrd5VcMINq/9WEr+Wuf8AdZRCrSIgLQHpF/mggbuwrEwmRnCdFwo1Spcs 6jJWhfNgJzwm1FVWjzt4owumlndnIuY4K/imA= MIME-Version: 1.0 Received: by 10.229.77.86 with SMTP id f22mr1706967qck.17.1326534667693; Sat, 14 Jan 2012 01:51:07 -0800 (PST) Received: by 10.224.196.66 with HTTP; Sat, 14 Jan 2012 01:51:07 -0800 (PST) In-Reply-To: <201201132154.01815.hselasky@c2i.net> References: <201201131705.q0DH5Tko030020@red.freebsd.org> <201201132154.01815.hselasky@c2i.net> Date: Sat, 14 Jan 2012 11:51:07 +0200 Message-ID: From: Mykhaylo Yehorov To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: freebsd-gnats-submit@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/164090: [umodem] [patch] Add sysctl with ucom unit number X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2012 10:19:05 -0000 On Fri, Jan 13, 2012 at 22:54, Hans Petter Selasky wrote: > > Hi, > > Could you patch ucom_set_pnpinfo_usb() instead, so that such a sysctl is > created for all ucom devices, not only umodem? I guess it will be necessary to remove a sysctl oid from a parent sysctl tree before destroying ucom structures. It's would be better to do in ucom_detach() but now there is no a pointer to a parent device structure from there. Now all drivers that use ucom pass a pointer to parent softc structure to ucom_attach(). Is there any reason for this? May be it's would be more useful to pass a pointer to a parent device structure. > Can you explain a bit more how you use this information in your scripts? I've got a gps receiver and a mobile phone that supported by the umodem driver. I can attach its in any order. So I use sysctl to generate gpsd and ppp configs with appropriate values of serial port. -- Mykhaylo Yehorov