From owner-freebsd-usb@freebsd.org Wed Sep 23 20:52:34 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39C1FA07F42 for ; Wed, 23 Sep 2015 20:52:34 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 008071F8E for ; Wed, 23 Sep 2015 20:52:34 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: by igcpb10 with SMTP id pb10so1007037igc.1 for ; Wed, 23 Sep 2015 13:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=i7R6eiyhdU9C5RIoqnzzYCzd5MwbcNkQ4NFN8vyq+So=; b=WIwtNTUYjHOnl1VLJvftcvTTmAQgFK0lgGi9QV/KvhDlIlbLGUvNag6XCZHYOkr1an 1v1DDaxkNFxm3Veo4a3J9cML2Fsoay6XwNNCbgcTTjesKPGFTsOljrTWCLtCALhUCepw FVqn56ylAHVhdjntvYzyNZKA+TiNme3efR4tIgoa1q9EGczHqWDp84sIzOmQj4QimloG /7sUfjp895EZe9Ug45MqxbYeGsQS9vbUvZtoekJ6EJ5O61V+IcK9z/7op+HVLod8+AE5 uAsLneyVEyzy1fIF/LFvFQ+ZyYGfQpiHgvsAuFz/CWETckWdRTi5bP6ym7HcjdfFBTyf B9HA== MIME-Version: 1.0 X-Received: by 10.50.79.129 with SMTP id j1mr24352990igx.63.1443041553204; Wed, 23 Sep 2015 13:52:33 -0700 (PDT) Received: by 10.64.96.74 with HTTP; Wed, 23 Sep 2015 13:52:33 -0700 (PDT) In-Reply-To: References: <55FF282D.2040003@scoubidou.com> <55FFA8EA.3030308@selasky.org> <56007395.1010006@scoubidou.com> <5600FC1E.2060206@selasky.org> <7E6FCC35-5CA5-4B07-A1F1-41B73EA5B0FC@bsdimp.com> Date: Wed, 23 Sep 2015 13:52:33 -0700 Message-ID: Subject: Re: Patch to allow dynamic USB quirks at boot From: Mehmet Erol Sanliturk To: Warner Losh Cc: Hans Petter Selasky , =?UTF-8?Q?Maxime_Soul=C3=A9?= , freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 20:52:34 -0000 On Wed, Sep 23, 2015 at 9:26 AM, Warner Losh wrote: > Nearly all the PCI drivers have tables of vendor/device IDs. > They all have slightly different forms, and none of them use > a common macro / format like USB. So each driver needs a > line or two to describe the table so we can extract the data > from the .ko. Some drivers don't have lists, and those will > need to be dealt with on a case-by-case basis. > > I also have another set of work to do PNP translations at run > time. The bus will lie about the PNP IDs of the device so that > drivers can treat new hardware just like old hardware. The obvious > (and wrong) approach of forcing drivers to "take" devices only > works for the most trivial drivers as nearly all of them have a > table that tells about the "quirks" of the hardware since not > all of that can be determined from registers alone. > > Warner > > All over the world , almost all of the products have a "Bar Code" identifier , which approximately may be considered "Unique" . Is there a possibility to associate PCI and USB and other devices with their bar code identifiers ? For computers assembled already , it will be necessary to ask to sellers to supply bar codes of included devices . By using product bar codes , I think , it will be possible to identify uniquely a large number of devices . In that way , it will also be possible to define device characteristics correctly even they lie about their parameters . Mehmet Erol Sanliturk > On Tue, Sep 22, 2015 at 5:38 PM, Mehmet Erol Sanliturk < > m.e.sanliturk@gmail.com> wrote: > >> >> >> On Tue, Sep 22, 2015 at 2:38 PM, Warner Losh wrote: >> >>> I need help with PCI driver marking. Grab my patches and we can talk. >>> >>> Basically, it marks all the .ko modules in a similar way that we do >>> inter-module >>> dependencies with plug and play info. kldxref then takes this data and >>> stuffs >>> it in loader.hints. I also need to write something that will parse this >>> data and >>> either generate a devd.conf file (easy to do from kldxref sources) or >>> queues >>> the load drive in the kernel (kinda hard). Bonus points for similar cod= e >>> in >>> /boot/loader for any storage device that=E2=80=99s found. >>> >>> Warner >>> >>> >>> > On Sep 22, 2015, at 1:12 AM, Mehmet Erol Sanliturk < >>> m.e.sanliturk@gmail.com> wrote: >>> > >>> > >>> > >>> > On Mon, Sep 21, 2015 at 11:58 PM, Hans Petter Selasky >>> wrote: >>> > On 09/22/15 00:58, Mehmet Erol Sanliturk wrote: >>> > On Mon, Sep 21, 2015 at 2:16 PM, Maxime Soul=C3=A9 >>> > wrote: >>> > >>> > One of my wishes is to move ALL of the device definition information >>> for ( >>> > NIC , USB , and other devices ) into files where for each device ( a >>> unique >>> > file to dedicated itself containing information presently defined as >>> preset >>> > in internal arrays with one additional information ( at least ) whic= h >>> > driver will be used for the device ) will be prepared . >>> > >>> > >>> > Hi Mehmet, >>> > >>> > Warner Losh is working on this currently, CC'ed. See: >>> > >>> > https://reviews.freebsd.org/D3458 >>> > >>> > Maybe you want to help out testing? >>> > >>> > --HPS >>> > >>> > >>> > >>> > If I can help in any way , I will do it . >>> > >>> > >>> > Mehmet Erol Sanliturk >>> > >>> > >>> >>> >> >> >> What does "PCI driver marking" mean ? >> >> >> Mehmet Erol Sanliturk >> >> >> >> >