From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Diehl Date: Fri, 08 Feb 2002 01:34:12 +0000 Subject: Re: PCI hotplug question: resources Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, 7 Feb 2002, Greg KH wrote: > On Thu, Feb 07, 2002 at 08:42:46AM -0800, Stephen Williams wrote: > > > > I spend lot of time during a typical day powering down, changing > > the board and/or soldering wires, and rebooting. I would *love* > > to be able to just change a card on a live system. > > Ok, here's the code that I have. I don't know if this works. Heck, > I've never even compiled it :) > > This code was written by Vladimir Kondratiev. Wow - thanks! When I saw your hotplug-skeleton I was thinking I should try something like this for my OB800: it has an built-in scsi-HA which is detected during pci-busscan only if the proprietary cable is connected (My guess is the power is simply routed thru some magic in the plug...) Hence one has to reboot to make use of the scsi if booted without the cable connected. But all one would need is to rescan the bus later whenever one wants to connect or disconnect. Note that there is no real hotplug controller there to create (un)plug notifications. But there are some changing registers in the northbridge so one could even poll with say 1 sec intervall for connections. Anyway, there is probably nothing which provides real hot (un)plugging on the active scsi bus. So I really prefer to do this by hand whenever I switch scsi cabling. I just tried this patch and it seems to be almost exactly what I was looking for. However, I first had to disable the "print IRQ routing" path because it Oopsed for me (in pcibios_get_irq_routing_table(), fwiw). No big deal and now its working really fine: cable connected, insmod pcibus: scsi-HA detected+registered, bar's allocated, lspci -vvvxxx looks fine modprobe ncr53c8xx and friends: PIRQ routed, HA detected, scsi-device found mount /dev/scd0 -> normal operation reverse unmount, rmmod, disconnect and then insmod pcibus again: pci-device removed, lspci and /proc/ioports cleaned Turns out it's a real useful tool for me. I'm going to improve it a little bit (probably next weekend...) Thanks. Martin _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel