From owner-freebsd-hackers@freebsd.org Tue Sep 25 13:28:33 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E10EE10B2437 for ; Tue, 25 Sep 2018 13:28:32 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85F2971F86 for ; Tue, 25 Sep 2018 13:28:32 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EA14F21B25; Tue, 25 Sep 2018 09:28:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 25 Sep 2018 09:28:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=cTa9R8HewzcWMygrrG5AlkZ3f9jGo A+V6vns0zyq+JU=; b=UH+kve8OFgSennYb21h5AE5fzvimFlYmClpJ4E1GqjuMN ghXNhmUWtFL+kYJTFtsVR3ErnTqYkQl+p7fGqpv7twuberUUZs6+LIlI06JJkor7 /HkstMNVQhvjfO4Dp0HYSG+DBrfMvHbnsuLMyg6+v27MEGX2xt6DZlfOOsJavF6N pH4dNbyoGAHgfcWHDkPu1zXAJHWPj1VUqKZOxXWIt64Tv61GIFehcEtgsSNetizJ A2vvze/+mGm5ariG7ijjE4CtLgKbrXs3zp/5iKU132NgF/xB56v0SZ51anTxUsxy U9KWRIEyvWkL3Z/aKwXt9vbtE6KQZcKiVyf0l77Yg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=cTa9R8 HewzcWMygrrG5AlkZ3f9jGoA+V6vns0zyq+JU=; b=so1pfkN4ClhLf2NqT7wd1e puyXPcDBasirXQJtjEma4Hn3IF7WEMqHf6gEvAQpzPvfmZmmWJJM5pObFvuqK+k0 nTIxhWgjsckOQRFktrx6dwGVEXVlRSC9pC7xg1DTyK4tXCWQah4P81TWAbbiy217 ShOKli+hvbXpLyaGPbMqa0Sk1F4SX2qKvs8M/kummGBSYr0qn7j2dqpF4WrJbNin f3IrnbndX5PmU6pA+LlxeFD5mrJr/sgUGIFwHQfXJ4hiMzRO4CcwNhxPtZLaPMai QEYlN+qYk/ylD+Oxt1L6QJlCxvrqPP7nWck0LKEe/2aY/wRC0xZZfxJyKVmUWE5Q == X-ME-Proxy: X-ME-Sender: Received: from thor.yuripv.net (unknown [62.183.127.62]) by mail.messagingengine.com (Postfix) with ESMTPA id EB06F102E4; Tue, 25 Sep 2018 09:28:30 -0400 (EDT) Subject: Re: allow specifying literal values in MODULE_PNP_INFO(9) To: Warner Losh Cc: freebsd-hackers@freebsd.org References: <2926f43a-4709-3335-07a4-03248e13675a@yuripv.net> From: Yuri Pankov Message-ID: <880c1557-6eba-b624-3a0f-73f67a38edc7@yuripv.net> Date: Tue, 25 Sep 2018 16:29:04 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 13:28:33 -0000 Warner Losh wrote: > On Tue, Sep 25, 2018 at 7:12 AM Yuri Pankov wrote: > >> Hi, >> >> Looking at adding the MODULE_PNP_INFO() entry to iwm(4), I came up with >> the patch in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231625 >> adding redundant and useless vendor field to iwm_devices. While it >> works, it's unfortunate, and I have started looking into possible >> solutions and the result is a small patch for kldxref(8) allowing >> specifying literal values in descriptor_string like the following: >> >> MODULE_PNP_INFO("U16=8086:vendor;U16:device;P:#", pci, iwm_pci_driver, >> iwm_devices, sizeof(iwm_devices[0]), nitems(iwm_devices)); >> >> ...so that we always have vendor 0x8086 and only consume the device field. >> >> If it makes at least some sense, I'll put it for review. >> > > So what's wrong with using the T type that's already implemented? > T:device=0x8086? Nothing other than my inability to read and understand the documentation. I'm actually happy that it already exists. Thanks and sorry for the noise.