From owner-freebsd-hackers@FreeBSD.ORG Mon May 22 06:29:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E1D016A463 for ; Mon, 22 May 2006 06:29:08 +0000 (UTC) (envelope-from fierykylin@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDB8B43D5E for ; Mon, 22 May 2006 06:28:59 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by wx-out-0102.google.com with SMTP id i30so552687wxd for ; Sun, 21 May 2006 23:28:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=YVmijvfrnEjzuLPnlONLtsnOoVSkNvbL5T73C2FRThsbIxzLPikuUDTESCFUqDKvx38civzwdHZZmZfhdjao23Qv2kDyLs5yn6yKqI0OEWNNStvMT2HoP6ele6K+WRQgNT81RKkV4NBGzA3OCtvuJzH50g4DhXEegDZiuRRwFRk= Received: by 10.70.65.14 with SMTP id n14mr4821935wxa; Sun, 21 May 2006 23:28:58 -0700 (PDT) Received: by 10.70.43.11 with HTTP; Sun, 21 May 2006 23:28:58 -0700 (PDT) Message-ID: <87ab37ab0605212328ue7c70fcu49c5fec8921ae229@mail.gmail.com> Date: Mon, 22 May 2006 14:28:58 +0800 From: "william wallace" Sender: fierykylin@gmail.com To: "Warner Losh" In-Reply-To: <20060521.114807.74702188.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <87ab37ab0605201942o3e27c46w2ac57261e02a2890@mail.gmail.com> <20060521.000729.41671970.imp@bsdimp.com> <87ab37ab0605210108w127a235bue281428f52bbc784@mail.gmail.com> <20060521.114807.74702188.imp@bsdimp.com> X-Google-Sender-Auth: aaf5a687283f7723 Cc: "freebsd-hackers@freebsd.org" Subject: Re: misc questions about the device&driver arch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2006 06:29:12 -0000 On 5/22/06, Warner Losh wrote: > From: "william wallace" > Subject: Re: misc questions about the device&driver arch > Date: Sun, 21 May 2006 16:08:00 +0800 > > > On 5/21/06, Warner Losh wrote: > > > nope. It may be called once per bus instance per driver, if the bus > > > is not self-identifying. If the bus is self-idntiying, chances are > > > that it will not be called. pci never calls its children drivers' > > > identify routine because it already knows all the children on the bus > > > and doesn't need the leaf drivers to go find instances of themselves. > > > the isa bus driver, on the other hand, does call the identify routine > > > so that pre-plug and play standard device enumeration can happen. > > > > > > Warner > > the defination of self-enumerating > > 1 > > what does self-enumerating mean ? > > self-enumerating or self-identifying mean the same thing. The bus > driver is able to know all of its children. This may be because > there's a method to finding them, or the bus may have perfect > knowledge of what is there by other means. > PCI, CardBus, PC Card, USB, Firewire, and EISA are all examples of > self enumerating busses. You can know that you have a device, and the > device can provide information about its existance. ISA is the > odd-man out. It isn't possible to know when you have an ISA card in a > given slot. There are some add-on hacks to be able to discover the > devices. ISAPNP is one such hack. Really old Realtek adapters have > another. 3Com cards have yet another. It was for these old, pre-plug > and play enumeration techniques that the identify routine was > invented. o ,really thanx,first time to identity the meaning of IDENTIFY > > 2 > > does that mean the pci way of looping through configuration space ? > > Yes. > > > 3 > > does that happen in start time and hotplug time ? > > That happens at attach time. Cardbus right now has a private protocol > between the card bus bridge (cbb) and the bus to know when there's a > new card in a slot and to enumerate that bus. i think that 's because in cardbus protocol ,one bus only have one device ,so does pci express port (port :device =3D1:1) > > 4 > > pci doesn't need the leaf drivers to go find instances of themselves. > > does that mean that self-enumerating device system use the top do= wn way , > > and the non- self-enumerating device system use the down -top way > > Right. FreeBSD's device enumeration model is top down. > > > 5 > > i guest pci hot plug need some magic to identify or emulae(loop pci son= s ) > > Yes. The hot plug bridge would need to tell its child bus about > changes to the bus. This might mean the child bus does a full > enumeration, or a partial one. Cardbus does a full enueration, but > each card bus slot is its own bus. > > > BTW > > There r so many hot plug specifications ,SHPC hotplug ,PCIE hotplug > > and compaq hotplug and so on , in linux ,they use different driver for > > different pci > > bridge > > so i think for us to implement in freeBSD ,just do 1 by 1:) > > Yes. We'd need todo something similar in FreeBSD. Chances are that > the best way to approach this would be to add hotplug functionality > directly to the pci bus, and teach cardbus the new protocol. > > Warner > so there will be a long list of methods in the future hotplug pci driver and pcib driver SHPC interface .. ....... PCIE interface ....... compaq interface ....... IBM interface .... ....... poer interface ....... - thanks ,sir ! we who r about to die,salute u!