From nobody Thu Jan 12 17:19:35 2023 X-Original-To: freebsd-drivers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NtBBG2lYbz2p9sF for ; Thu, 12 Jan 2023 17:19:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NtBBF5bttz42YH for ; Thu, 12 Jan 2023 17:19:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x529.google.com with SMTP id i9so27810438edj.4 for ; Thu, 12 Jan 2023 09:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cZMMaeTroOtd0LUsF+hVg2+hJ0H6SktIzyyTdajfP9w=; b=qCKDqev7D+uVLmgvTo3x+yIHbUFQq8qBykuHPKCK38O3Kz8GkB+10o369Ss0Rbm246 ywsW2Mmv4qthVGvLOZgDBki32fjruA60dTeCAxKljx2SDnFPekM7ED+qBkCWMkjphUhk FVqR06KOI7QaUIZ9bGv+E0N3JOuapa1HXCmP2KetKODT0ISVGLFhniOwfB//NwDhivY9 T9NJevpCiH2VeHq1L9zQ3Sp6ouKJdYan8hMf3Bzv7Bj0cOBWyJRj6UgWodcUfdeM/j7/ 4QYIAYy6FuoEV2kecN8UzOpYaVOhRaU3w38lTzCtmwW25WpKvwvR2445AkEFvTdKODBY ucJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cZMMaeTroOtd0LUsF+hVg2+hJ0H6SktIzyyTdajfP9w=; b=SXK3kD2HOCmBu6qp0RyZTmIBJJl1xQlKcXASsQmW+vouXE2o6IyefRoD/QVWIX5cvu CSNJeXYE+p9siFEzWZbYzMfF5DoJ3rJgoGE+YtV4S9RYBrs+7PVj9KNxsY4ujqInIKMp 5VV5Ke819ktskRtjkqszjoAj2mN+A7gapk+ubYw/BqQ/iHoUbWu3YrXb70RQ56wcQ7Jp eGKl/L/OQrCGEhE3J1bkKQhRhhxVr6XfxPgBdBP5BZqvccjimUZgm6iaMJh0KeCjzKdd sZ4TLkxRDpKtvVVEluYfJJJakB6FvVDeVhdTT8jyjEFpLXtHhZAU1othoq/SQXDP/aKb V6/w== X-Gm-Message-State: AFqh2kpzWq4Ye8BzdJvB4znZRaM42lnVCqhDiVGwxv7WiCtId3ycD2re t0OPub+0PJZYCu1moVzF0lbXAXowYMR//1GsgW1wNq3r5WSUIA== X-Google-Smtp-Source: AMrXdXv2GQeXrb0k+lzNL+C1Qj5WYqJtXXg0QQ4eMaP29J+SHZdz5nZLhl4n3crsrQeW4SZ02GpW2PB/x0i4udmu+/A= X-Received: by 2002:a50:fe86:0:b0:48e:abb8:57a0 with SMTP id d6-20020a50fe86000000b0048eabb857a0mr5210352edt.174.1673543988175; Thu, 12 Jan 2023 09:19:48 -0800 (PST) List-Id: Writing device drivers for FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-drivers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-drivers@freebsd.org MIME-Version: 1.0 References: <32c375a93a8642dab66066ffd71b4747@stormshield.eu> In-Reply-To: <32c375a93a8642dab66066ffd71b4747@stormshield.eu> From: Warner Losh Date: Thu, 12 Jan 2023 10:19:35 -0700 Message-ID: Subject: Re: kernel-space ioctl equivalent To: Lee MATTHEWS Cc: "freebsd-drivers@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000ee76b705f21452d4" X-Rspamd-Queue-Id: 4NtBBF5bttz42YH X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000ee76b705f21452d4 Content-Type: text/plain; charset="UTF-8" On Thu, Jan 12, 2023 at 3:37 AM Lee MATTHEWS < Lee.MATTHEWS.external@stormshield.eu> wrote: > Hi, > > > I'd like to obtain a list of all pci devices from the pci driver from > another driver that I'm working on. > > > I note that in the userland tool 'pciconf', this is obtained via the ioctl > "ioctl(fd, PCIOCGETCONF, &pc)". > > > I'd like to know if there is a way of obtaining the same information but > directly in kernel space, rather than user space. > > Is there an equivalent of ioctl that I can use in my driver to get the > output from the request PCIOCGETCONF from the pci driver? > I have to ask... what's your goal in getting this information? Why do you need it? Warner --000000000000ee76b705f21452d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jan 12, 2023 at 3:37 AM Lee M= ATTHEWS <Lee.MAT= THEWS.external@stormshield.eu> wrote:

Hi,


I'd like to obtain a list of all pci devices from the pci driver fro= m another driver that I'm working on.


I note that in the userland tool 'pciconf', this is obtained via= the ioctl "ioctl(fd, PCIOCGETCONF, &pc)".


I'd like to know if there is a way of obtaining the same information= but directly in kernel space, rather than user space.


Is there an equivalent of ioctl that I can use in my driver to get the= output from the request PCIOCGETCONF from the pci driver?

I have to ask... what's your goal in gettin= g this information? Why do you need it?

Warner=C2= =A0
--000000000000ee76b705f21452d4-- From nobody Wed Jan 18 08:35:28 2023 X-Original-To: freebsd-drivers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxfGX39JZz2sZHs for ; Wed, 18 Jan 2023 08:35:32 +0000 (UTC) (envelope-from Stephane.ROCHOY@stormshield.eu) Received: from mail.stormshield.eu (mail.stormshield.eu [91.212.116.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ictdccexch001.one.local", Issuer "Stormshield Servers CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxfGW3VFkz3sw1 for ; Wed, 18 Jan 2023 08:35:31 +0000 (UTC) (envelope-from Stephane.ROCHOY@stormshield.eu) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=stormshield.eu header.s=signer header.b=xcfdTmNI; spf=pass (mx1.freebsd.org: domain of Stephane.ROCHOY@stormshield.eu designates 91.212.116.25 as permitted sender) smtp.mailfrom=Stephane.ROCHOY@stormshield.eu; dmarc=pass (policy=quarantine) header.from=stormshield.eu DKIM-Signature: v=1; a=rsa-sha256; d=stormshield.eu; s=signer; c=simple/simple; t=1674030928; h=from:subject:to:date:message-id; bh=rBJk/fl0PiHZOgXJwHZVaEDHbxbQ6ctgmtOUV45h2us=; b=xcfdTmNI1d7B6gKlMa2y/DflALtB/m4ugGOMnwArJ2EAn4uDT5iy9YM00VVWEaBdvGOb0yxIERm CSV3B2QU/5bDtFoqwmhpHfa4MDUfd63deinL3WjaCbfKRmdqevYOJIe8lBna+pKmKES6Y5muG2wVm eBoTfEgPKCKPEYZsVihQ1nZcyZuI/nfi55ruMXkE37TJaBWX/WItjL5HfGK+SEoIBQ36suuNxY3rG Lqtp1M5tEgviwf27QtI40CptoD6c1uPfwdNFtPvMstU7HTs5eWPVTmpgE+6ArA5SktqGN3o0AiCRq 19Zgj8u5ZuIxU6EVNvpC5XOoI7cAiifsvqhA== Received: from cthulhu.stephaner.labo.int (10.2.16.1) by ICTDCCEXCH001.one.local (10.180.4.1) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21; Wed, 18 Jan 2023 09:35:28 +0100 Received: by cthulhu.stephaner.labo.int (Postfix, from userid 1001) id 11A321FDC9; Wed, 18 Jan 2023 09:35:28 +0100 (CET) References: <865ydovrx9.fsf@cthulhu.stephaner.labo.int> User-agent: mu4e 1.2.0; emacs 27.1 From: Stephane Rochoy To: Subject: Re: GPIO on Fintek and Nuvoton Super I/O In-Reply-To: <865ydovrx9.fsf@cthulhu.stephaner.labo.int> Date: Wed, 18 Jan 2023 09:35:28 +0100 Message-ID: <86edrsme9b.fsf@cthulhu.stephaner.labo.int> List-Id: Writing device drivers for FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-drivers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.2.16.1] X-ClientProxiedBy: ICTDCCEXCH001.one.local (10.180.4.1) To ICTDCCEXCH001.one.local (10.180.4.1) X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; DMARC_POLICY_ALLOW(-0.50)[stormshield.eu,quarantine]; R_DKIM_ALLOW(-0.20)[stormshield.eu:s=signer]; R_SPF_ALLOW(-0.20)[+ip4:91.212.116.25]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-drivers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[stormshield.eu:+]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[3]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; HAS_XOIP(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ASN(0.00)[asn:49068, ipnet:91.212.116.0/24, country:FR] X-Rspamd-Queue-Id: 4NxfGW3VFkz3sw1 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Stephane Rochoy writes: > I would like to draw some attention on two patches I recently > submitted: ftgpio[1] and nctgpio[2]. Both are adding support to > Super I/O chips: > > - ftgpio: Add support for Fintek F81865 Super I/O's GPIO > - nctgpio: Refactor and add support for NCT6779, NCT6116D and > Winbond 83627DHG > > The 2nd patch, about Nuvoton chips, would especially require=20 > some > attention as they're a bit more tricky than the others. > > [1] https://reviews.freebsd.org/D37893 > [2] https://reviews.freebsd.org/D37897 Hello, This patches were submitted last year ;) More seriously, is there something I can do to have them reviewed and merged? I picked reviewers based on commit history, but maybe I'm still missing the right people? Should I cross post to a more crowded list, like freebsd-hackers@? Regards, -- St=C3=A9phane Rochoy O: Stormshield