From owner-freebsd-hackers@FreeBSD.ORG Sat May 20 05:39:09 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 760F216A420 for ; Sat, 20 May 2006 05:39:09 +0000 (UTC) (envelope-from fierykylin@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC6843D45 for ; Sat, 20 May 2006 05:39:08 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by wx-out-0102.google.com with SMTP id i31so639317wxd for ; Fri, 19 May 2006 22:39:08 -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=l47DG4FaxnZpxEIbKeitiiz9PhtmHvQa1moEIchwgM3ZL2vylcPdAUCx6tNRfaX/wlTiTwC+DcqK3XnGkiWvGviG1Erd6gZlB5pa/Vjaku+NyXu0G1VsbaacsMjTk4e4zTRbwPy4rvd2gM2AwFl5HwpWUu9jj5vf/T4C1Sob7gk= Received: by 10.70.77.7 with SMTP id z7mr2958311wxa; Fri, 19 May 2006 22:39:08 -0700 (PDT) Received: by 10.70.43.11 with HTTP; Fri, 19 May 2006 22:39:08 -0700 (PDT) Message-ID: <87ab37ab0605192239n73b7fcdbtbdd5dbd3f1099fc3@mail.gmail.com> Date: Sat, 20 May 2006 13:39:08 +0800 From: "william wallace" Sender: fierykylin@gmail.com To: "Warner Losh" In-Reply-To: <20060519.232002.71106210.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> <87ab37ab0605192015h363ef74aw23dcc2d97721dea9@mail.gmail.com> <20060519.232002.71106210.imp@bsdimp.com> X-Google-Sender-Auth: 792a31b4e8ccdaea 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: Sat, 20 May 2006 05:39:09 -0000 comparing the method array of pci_pci and cardbusbridge: what losts in pci bridge but exist in cardbusbridge: 1 card interface 2 power interface 3 some functions : 3ain bus interface (bus_driver_added, cbb_driver_added), (bus_child_detached, cbb_child_detached), (bus_child_present, cbb_child_present), 3b in device interface (device_detach, cbb_detach), what exists in pci bridge but losts in cardbusbridge: (pcib_route_interrupt, pcib_route_interrupt), not only that ,functions r very different eventhough they realize the same interface function template wooo,so long to go to hotplug pci On 5/20/06, Warner Losh wrote: > Busses create devices to represent hardware in the system. The bus > then causes these devices to be probed and attached. This latter > usage is for those cases. As drivers are loaded these devices are > offered to the new (and old) drivers in the system. > > FreeBSD inherently dynamic in its device system. The hardest part of > adding hotplug support is programming the bridge. Adding new devices > to the tree is easy, but knowing when to add them is hard since you > have to write a bridge driver... > > Warner > -- we who r about to die,salute u!