From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 13:28:15 2005 Return-Path: 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 24A7516A4CE for ; Mon, 11 Apr 2005 13:28:15 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FD3343D53 for ; Mon, 11 Apr 2005 13:28:14 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j3BDVhoQ030936; Mon, 11 Apr 2005 07:31:44 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <425A7AB3.7040908@samsco.org> Date: Mon, 11 Apr 2005 07:25:07 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce M Simpson References: <20050411082600.GA735@empiric.icir.org> In-Reply-To: <20050411082600.GA735@empiric.icir.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: freebsd-hackers@freebsd.org Subject: Re: A question about hot-pluggable PCI. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 13:28:15 -0000 Bruce M Simpson wrote: > Hi, > > I have acquired a Mobility Electronics EasiDock 5000. As some of you may > already know, this is a device which allows you to connect regular PCI > cards to your laptop, using a device called a 'Split Bridge'. (*) > > Ok. Cool toy, you may be thinking. Indeed. > > But I want to make it work with FreeBSD. (+) > > I'd love to hear from anyone who has plans to implement hot-plug in > a BSD, because this is the missing piece of the puzzle currently. > > It seems that this device is known to work with Linux, with some further > hacking of support which Magma (who acquired Mobility a few years back) > provide on a 'as is' basis. > > So I've begun hacking the pci and pcib drivers from RELENG_5_4 to support > this device. So far, I've been able to probe configuration space. I see > all the devices on the PCI bus inside the expansion chassis. > > However I cannot get drivers to attach properly, because resources have > not been assigned to the cards. Normally the BIOS would do this. But > because BIOSes do not normally explore beyond the CardBus bridges, none > of the devices have had their I/O, memory, or interrupt registers set > to non-default values; everything is the same as a pristine bus reset, > even when I boot with the bridge card in a CardBus slot. > > In order to get this far I've had to add NEWBUS detach methods to both > pci and pcib, as well as some cleanup in pci_pci.c, and some downright > dirty hacks to deal with subordinate bus numbering which rely on the > current behaviour of our CardBus driver. > > I'll post diffs if anyone else is interested; but right now it's pretty > trivial stuff. Asking for 'hotplug support' is pretty generic and non-descriptive. Are you asking for device level hotplug support, where we carefully drain transactions out of a device, device driver, and whatever I/O or network or whatever layers are above it? Or are you talking about PCI hotplug support? If so, which de-facto standard? Compaq? IBM? ACPI? PCI-SIG? Something else? Scott