From owner-freebsd-usb@freebsd.org Wed Sep 23 16:26:45 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 60A92A07EE3 for ; Wed, 23 Sep 2015 16:26:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) (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 1F1AA18FE for ; Wed, 23 Sep 2015 16:26:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgt47 with SMTP id 47so23490319qgt.2 for ; Wed, 23 Sep 2015 09:26:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=8ppalc+a7S5za7pbMxHwUht5B2sYbLXg/JLx8TZ+9sY=; b=ejaoPY5h2RPiBrZhR8SVcTh+HtLQWf0HbPGstk1C2xYpj9d/Kb3pIusipLpSkV2sFs OEigFCBzbergNwy594lfSvpitCsODXw4smOQKFI6KN3gt0nnztH6It6il/qBpp7ghzJ5 knS797IURCZU/20Bckw32+B6T3PkbC5J26+dYvWT6UOsYdoVDForeGOy9TeJ+5/mr5ad WSQox0z1PzU0e56c1NbyDfEXxZqvNG/7nBCDN10X+EajxJi9hAuKskmupns2PdnOpfRT sNuzCmqjzkHJT9LVWZGkzcFeI9120JufdK1NTWOPnpEdhc+Z/G601Gj263dvmo/Uw3Fl iJnw== X-Gm-Message-State: ALoCoQnKyzqF0oFbJ9TtlYuJwO7kbUgE3Q5UyywYhFGkPRJ8+lIwyh+XbyR21WtH6OMvS+ZG25bS MIME-Version: 1.0 X-Received: by 10.140.234.78 with SMTP id f75mr40748497qhc.20.1443025598248; Wed, 23 Sep 2015 09:26:38 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.140.80.167 with HTTP; Wed, 23 Sep 2015 09:26:38 -0700 (PDT) X-Originating-IP: [40.140.178.190] 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 09:26:38 -0700 X-Google-Sender-Auth: ycdgsmo1HCsqntn70ghAS6-mkHM Message-ID: Subject: Re: Patch to allow dynamic USB quirks at boot From: Warner Losh To: Mehmet Erol Sanliturk 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 16:26:45 -0000 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 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 code >> 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 ) which >> > 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 > > > >