Re: PCI reset using x86 or x86-64 BIOS calls?

From: Linas Vepstas
Date: Fri May 26 2006 - 18:00:28 EST


On Thu, May 25, 2006 at 07:52:23PM -0600, Robert Hancock wrote:
> Linas Vepstas wrote:
> >I've go a newbie x86 BIOS question: is there a BIOS function that
> >can be called to reset a PCI device? (By "reset a device" I mean
> >raise the #RST PCI signal line to electrical high for 1.5 seconds).
> >I know that BIOS does this during a soft reboot, but I was wondering
> >if there's a stand-alone function for doing this while the system is up
> >and running.
>
> Unlikely - if you mean just resetting one PCI device, it's likely
> electrically impossible on many, if not most machines as the RST lines
> will be tied together on all slots.

I was afraid of that.

> In any case, I don't think - or at least would hope - that a PCI device
> going so far into the weeds that it can't be recovered without a RST
> would be a rare situation.

Well, this comes up in the case of having kexec take over from a crashed
kernel; the state of any given PCI card is unclear, and its conceptually
easiest to hit them with a hammer to put them back into a known state.

For hotplug slots, this can be accomplished by toggling power to a slot,
but not all slots out there are hot-pluggable.

The other situation where this is useful is in recovering from a PCI bus
error (e.g. parity error); but his has additional complications.

I've got someone here asking about the LSI megaraid controller;
appearently its under-documented, and it can hang hard on kexec.
Hitting it with a reset would make life simpler.

--linas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/