From owner-freebsd-questions@FreeBSD.ORG Tue Jun 7 04:12:28 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA62516A41C for ; Tue, 7 Jun 2005 04:12:28 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BF4143D49 for ; Tue, 7 Jun 2005 04:12:28 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by zproxy.gmail.com with SMTP id 16so2034487nzp for ; Mon, 06 Jun 2005 21:12:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=p3+xUt7eqnC9Apg42KOi/zdvvJRFhoUtH5c2KQUrZjXN2ifnE3/d2LpJfm/X+TQAIVhrPnpDI78iXrU6xqr7uhANUBgWQcIhZoWgoFaH5CqgJXHOoTY99lWqhos/r1RdKB1EUIhxUseL6dYv3hvvhr/TFAib82V04WVB04MuVL0= Received: by 10.36.224.21 with SMTP id w21mr1014963nzg; Mon, 06 Jun 2005 21:12:27 -0700 (PDT) Received: by 10.36.104.10 with HTTP; Mon, 6 Jun 2005 21:12:27 -0700 (PDT) Message-ID: <87ab37ab050606211290c3220@mail.gmail.com> Date: Tue, 7 Jun 2005 12:12:27 +0800 From: kylin To: "M. Warner Losh" In-Reply-To: <20050605.110508.101566419.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <87ab37ab05060108167dee1d6@mail.gmail.com> <20050605.110508.101566419.imp@bsdimp.com> Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org Subject: Re: what is the init entrance for pci bus scan in FREEbsd? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kylin List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2005 04:12:29 -0000 sir : it is a great pleasure to get ur reply .thank you very much for your words below is my appinion , i will report with the advance of my work On 6/6/05, M. Warner Losh wrote: > I'm not sure I understand what you are getting at here. First, devd > already provides 95% of the infrastructure to do things when devices > are added to the system. sorry ,i ignore it!! it is really a lite tool:) ,but it seems that /dev/devctl does not present the function to write to the devctl,then I think it is impossible to give order to disable or enable the pci slots without making changes. static struct cdevsw dev_cdevsw =3D { =09.d_version =3D=09D_VERSION, =09.d_flags =3D=09D_NEEDGIANT, =09.d_open =3D=09devopen, =09.d_close =3D=09devclose, =09.d_read =3D=09devread, =09.d_ioctl =3D=09devioctl, =09.d_poll =3D=09devpoll, =09.d_name =3D=09"devctl", =09.d_maj =3D=09CDEV_MAJOR, }; i need the function to cooperated with the hardware to detect the present of card ,and enumerate the bus , and add it to the bus , then it is devd that should come into play( like the sbin/hotplug in linux?):) > Second, you assume that linux's way of doing things is how FreeBSD > does things. This isn't the case. FreeBSD scans the bus at pci bus > attach time and adds chilren nodes that it finds. In the Cardbus > case, it will add nodes as the card bus bridge tells us of children, > and then probe/attaches them.=20 i mean the enumeration way . and the trickes to talk with the hotplug brid= ge. BTW pci_init() is the start point for PCI enumeration in linux. The way to add the device to the lists > Finally, you should send me your work for review. I've been keen on > expanding pci bus support for a long time and would be happy to review > such changes. > BTW, Which chipsets and hotplugging methods do you support? i will begin with the fake way here ,then give support to pciexpress native hotplug .there is common register interface for pci e hotplug first ,i will not change the source ,just add a module. --=20 we who r about to die,salute u!