From nobody Sat Dec 10 05:31:50 2022 X-Original-To: freebsd-usb@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 4NTc2p3WpJz4kf6r for ; Sat, 10 Dec 2022 05:32:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (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 4NTc2p2sjNz3NpK for ; Sat, 10 Dec 2022 05:32:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x636.google.com with SMTP id bj12so16008062ejb.13 for ; Fri, 09 Dec 2022 21:32:02 -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=mvusS6eYh4qtY3Ta45yuWcdbqrRmMh1AAeNbcIw34NE=; b=emtJUd0cSTWgB1pdfOVnqStYS8pvSDJktXHI7+mJx70JPINGUXKpj/D5IyvBlCDv/d edsZ2AdvrJYAsgMCx0SWrp/p1hzSqlDKxaXhs1Gc+2rq1UR714MZgnvunugoTpXxAR/X nZv0UF2B/580Nve3xv+pJeOu4gaO7PCJVj4IhomMTpiworIltxJ5s9xTV6hUV5kkmP0R Bp3iFLGyihl9GP2yp2O5rHYw5c/jTQlxXAXhbC9QJJIJEzS6EPo6kF9qf0NqB7Q9d5Dv Yab/h47LhdaQpgrSSustiLTD7GuQatJBoAOkf+DUG5jy1JvfKOlbxtxp78Qk0Cwh3Zl4 WP0A== 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=mvusS6eYh4qtY3Ta45yuWcdbqrRmMh1AAeNbcIw34NE=; b=oV8gp1950KTwoJbe8juJ07mYwRxzTFuPL95CFLRzcTV3R3cHTuK3b8YXMlb5mLerRf ljJkdtx7FhdEx1SGo95Omf4jtEgIRwLy6abP0d8BLoPWOuKE+hZOqvRF4d6mq8NTnOVz kyKQafd2DiRjmpVopgiTixmQlgrN94TyOjaTgxF7dRYm5ZYQzoYj4x1P2k/wrrRhBUiQ QYdw0oGjMUEG1k6ZyUL9XYlKP4vmhCVrH3NzACYLMNzCUHS8ATaLhXlULGmu8ffHjfyq R8L/FcqJlgIXncalWHMn2lxF2vekzETPdrIyFYNhe5640rLBTzFF2TzTJtap8txG8/Gw zzVw== X-Gm-Message-State: ANoB5pmcief8xMfU8C6Tt7kfjgNnXbbDUo0n9OcEQ//0sh5QUsdiSLtg 3/QsIx6D8nq9NW49lZhNcR352OunIm0gitIWLHT254FKzBvWWQ== X-Google-Smtp-Source: AA0mqf6vsaekDLA4GuChR5lerqsEJFCQhUnRk/fG/h3xj49P2F+ccmB+FbNsxVmG63PeZYz0ExrqyEpeod9ycFv+AuQ= X-Received: by 2002:a17:906:c2d3:b0:7c1:535:f2fb with SMTP id ch19-20020a170906c2d300b007c10535f2fbmr10958127ejb.252.1670650321112; Fri, 09 Dec 2022 21:32:01 -0800 (PST) List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 References: <75ddc208-5bf1-7c9c-4d57-057a2058cc26@selasky.org> In-Reply-To: From: Warner Losh Date: Fri, 9 Dec 2022 22:31:50 -0700 Message-ID: Subject: Re: autoloading module when matching device To: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Cc: freebsd-usb@freebsd.org, Hans Petter Selasky Content-Type: multipart/alternative; boundary="000000000000ef35f005ef72967e" X-Rspamd-Queue-Id: 4NTc2p2sjNz3NpK 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 --000000000000ef35f005ef72967e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 9, 2022 at 12:50 PM Fernando Apestegu=C3=ADa wrote: > Forwarding from developers@ by indication of Hans, > > Maybe a devd(8) can do this? > > Just to be clear, the keyboard works nicely, but it would be better if > it was detected during the hotplug :-) > Usually the USB devices that are keyboards autoload the right driver(s). So, sure, you could use a hack in devd to do this (it was how we did all the matching before devmatch harvested the matches from the .ko files), but maybe a better question is why aren't the driver(s) automatically loade= d when the NOMATCH event gets generated when the device is plugged in? Warner > Thanks! > ---------- Forwarded message --------- > From: Hans Petter Selasky > Date: Fri, Dec 9, 2022 at 8:34 PM > Subject: Re: autoloading module when matching device > To: Fernando Apestegu=C3=ADa , developers > > > > On 12/9/22 19:57, Fernando Apestegu=C3=ADa wrote: > > Hi all, > > > > I have a new usb keyboard that uses the ums(4) driver. However I need > > to add it to kld_list to preload it since the module is not autoloaded > > when the keyboard is plugged in. The keyboard I want to replace is > > properly detected when plugged in, though. I thought there would be > > some place where I could add some device id and map it to ums(4), but > > I can't find it. I've had a look at devmatch(8) but I can't find any > > related config files. > > > > Where do I need to look? > > > > Thanks! > > Hi Fernando, > > There is no such quirk yet. There are only quirks via usbconfig to > prevent attach of ums or ukbd. > > However, this is a perfect question for freebsd-usb@freebsd.org . Let's > continue there! > > --HPS > > --000000000000ef35f005ef72967e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Dec 9, 2022 at 12:50 PM Ferna= ndo Apestegu=C3=ADa <fernape@free= bsd.org> wrote:
Forwarding from developers@ by indication of Hans,

Maybe a devd(8) can do this?

Just to be clear, the keyboard works nicely, but it would be better if
it was detected during the hotplug :-)

= Usually the USB devices that are keyboards autoload the right driver(s).

So, sure, you could use a hack in devd to do this (i= t was how we did all
the matching before devmatch harvested the m= atches from the .ko files),
but maybe a better question is why ar= en't the driver(s) automatically loaded
when the NOMATCH even= t gets generated when the device is plugged in?

Wa= rner
=C2=A0
hps@selasky.org>
Date: Fri, Dec 9, 2022 at 8:34 PM
Subject: Re: autoloading module when matching device
To: Fernando Apestegu=C3=ADa <fernape@freebsd.org>, developers
<developers@= freebsd.org>


On 12/9/22 19:57, Fernando Apestegu=C3=ADa wrote:
> Hi all,
>
> I have a new usb keyboard that uses the ums(4) driver. However I need<= br> > to add it to kld_list to preload it since the module is not autoloaded=
> when the keyboard is plugged in. The keyboard I want to replace is
> properly detected when plugged in, though. I thought there would be > some place where I could add some device id and map it to ums(4), but<= br> > I can't find it. I've had a look at devmatch(8) but I can'= t find any
> related config files.
>
> Where do I need to look?
>
> Thanks!

Hi Fernando,

There is no such quirk yet. There are only quirks via usbconfig to
prevent attach of ums or ukbd.

However, this is a perfect question for freebsd-usb@freebsd.org . Let's
continue there!

--HPS

--000000000000ef35f005ef72967e--