From owner-freebsd-hackers@freebsd.org Tue Sep 25 13:20:17 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 6BEA510B20ED for ; Tue, 25 Sep 2018 13:20:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it1-x12c.google.com (mail-it1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C59371B2A for ; Tue, 25 Sep 2018 13:20:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it1-x12c.google.com with SMTP id h3-v6so15308565ita.2 for ; Tue, 25 Sep 2018 06:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P4pIplyetG9MsxWPY/axfkPkzfld+asXPhr99wmS4Ak=; b=On/g9cCEj/38YUQv3lD1tPHrPSHmuaz4FXb4WmZW1bSP3zRMy7baxestPmXj+kUHt7 sCGT2IhBZL910beUm4Sq2TnerboViOJIsndNaGktRrUAaFoCwVMi4XVWCPMgAgHHqXwm HrN2qui5HIvPAXTMOFd72TF/dCWgX/4CcTt4aZMUDV3SmRKVmB3pCRob3icqDfVTPwlG 6LIt/LbVnv2hEvA6Ca/S1XDmKaIHi9l9IqOnR1Hk9SCzdNBedfWJRvh3k7kdY8PYwBXW J2rA/lVBGy9F1YNhMGOyq5HbW8O/+WNPgIade9Ejufli2Uva+RUJbmXL9Ukto6lLpL5+ gHhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P4pIplyetG9MsxWPY/axfkPkzfld+asXPhr99wmS4Ak=; b=Gak74x1zv4l57MJUWiKUHwwgn26SprjVqc68ezvEhnHdBg3P+QGzfkH93UAkQ+uUXA XupG0enR0iImxjYuKi9iWuIEAg3q9buPDe36Fen86HQc1QtzjBTSrXZFMqTAB9oICec3 bZzwlh+DTOxYb1FVu0tT6qF7Nd2GmANB4YyPuTVWcm1qDFDwbyLKU/gm5TpV6pAu80tS 4P+T9IAylWKT+3ktQbDZX/jvmYXYydpxwmrHABENDDgeRe4LV7V5T148jJo3CrjbO+H9 7JI7Fe7HcOyzsZrvFBf/21Q+pDfX5u5LdiP2CKkIOIjrrQ1NYSs5vEEDDbRIOrhW93pN K5tQ== X-Gm-Message-State: ABuFfoguOLMF+YUHperJcgaCMt++kjPV0B7xkPvX15PsB7j9huv3Z7mo 9VEtiy5IGkxcRGWRaIjfAiByWWSG/t0sA9YElmn/3Q== X-Google-Smtp-Source: ACcGV61GHj197VcimcshW6b+UQ0ZiZ03Cv+b1PT2iDmE9nAoREmCd06L52+b8etoWOtZvRR1C1ym0GzhWYVQXBiV8Sk= X-Received: by 2002:a24:a54c:: with SMTP id w12-v6mr643632iti.75.1537881615943; Tue, 25 Sep 2018 06:20:15 -0700 (PDT) MIME-Version: 1.0 References: <2926f43a-4709-3335-07a4-03248e13675a@yuripv.net> In-Reply-To: <2926f43a-4709-3335-07a4-03248e13675a@yuripv.net> From: Warner Losh Date: Tue, 25 Sep 2018 07:20:04 -0600 Message-ID: Subject: Re: allow specifying literal values in MODULE_PNP_INFO(9) To: Yuri Pankov Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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:20:17 -0000 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? Warner