From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 01:22:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BB76106564A; Mon, 9 Jul 2012 01:22:19 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9DE648FC0C; Mon, 9 Jul 2012 01:22:18 +0000 (UTC) Received: by werp13 with SMTP id p13so7396880wer.13 for ; Sun, 08 Jul 2012 18:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=pXICLcFOZ+Eei5tfX/FTSS3eI+kM+W0rnm/YTkAhd7w=; b=CvZxxpvVqxo428ODPph5dk07TLbGstkvCS5/tg8Py4L3qAi8PF1Ei/W1MLXWuH04EC 1DBZnaJALRA74W7HRWP+fs2fAT0VO1EUYGGfpkd3mppo0vIiMw9E6+eGA02PrH6J6Jl0 8XHVdJ9ySiJuBX/ZtIGmtXMHLDIyGuQvhrFWM41JA+YWuhHK2i12AmPBKa5R+u4Na7Fe gFDAGwDQSTn6AUtU64/QgQlQD8WgwNf2M3QaEfDW1fTXkQd9FlHoUlRF6VVqnrR3iuNi iEC4kQgaacjBW1AkF3dEe4HxdK7cvTK3sLSKfFaO9lu14lUUShx3oAVKe4oP10624vsZ NCxw== MIME-Version: 1.0 Received: by 10.180.86.106 with SMTP id o10mr25293370wiz.22.1341796937633; Sun, 08 Jul 2012 18:22:17 -0700 (PDT) Received: by 10.216.23.200 with HTTP; Sun, 8 Jul 2012 18:22:17 -0700 (PDT) Date: Sun, 8 Jul 2012 21:22:17 -0400 Message-ID: From: Arnaud Lacombe To: FreeBSD Current , FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: newbus' ivar's limitation.. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 01:22:19 -0000 Hi folks, Ok, yet another Newbus' limitation. Assuming a device exports more than one interface, and one of its child has need to use more than one interface, each interfaces cannot register, concurrently, its own ivar. While I try to always have a single child per interface/resource, I need to keep some compatibility with the old way of doing thing (POLA wrt. drivers I cannot/will not convert and userland). So, it would have been nice if ivar had been per-interface, not global and unique to one device. Unless I am mistaken, ivar are the only way for a parent can transmit information to a child. I can not simply implement a new METHOD to get that ivar as the device implements multiple time the same function (actually, up to 4 time for one, 3 for the other, with possible crossovers...), each one physically distinct. Each child is being tied to a pair. Thus, I need to pass each child discriminator(s) for each interfaces right after having been *created*, which cannot be done later on. Of course, it is out-of-question to have crossover in the interfaces definitions. The best way I could achieve this currently is to pass the child's device to its parent, and do a lookup based on that pointer to get information I need, but erk.... my 1c, - Arnaud