Joe,
PCI Express is hot-plug by default, at least at the “device” end of the wire. (PCIe is a point-to-point technology, called a “bus” only for name recognition.) The “slot” end of the wire, which may be just a trace on the motherboard, can optionally implement a hot-plug controller, which then gives software a state machine to manage for applying power and clocks to the slot, etc. All common chipsets implement these hot-plug controllers and most BIOSes will configure those chipsets to hide the hot-plug control registers for slots which do not have independent power control and for devices physically embedded on the motherboard.
The stock PCI driver (the one included in Windows) will manage PCI Express hot-plug if two things are true: first that the BIOS gives up control of PCI Express to Windows and second that the BIOS configures the slot to expose the hot-plug controller. There are not two bus drivers.
If the BIOS fails to give up control of PCI Express to Windows, it can still expose hot-plug through ACPI, managing PCI Express internally. This works, though the quality of implementation is spotty. When this comes into play, there is still only one bus driver, though ACPI.sys, acting as a filter, performs some of the work.
The most common implementation of PCI Express hot-plug is called “Express Card.” It’s a laptop expansion slot similar to Cardbus, except that it’s PCI Express instead of an amalgam of conventional PCI and ISAPnP (also called PCMCIA.) Thunderbolt is a newer form of PCIe hot-plug.
- Jake Oshins
(occasional PCI guy)
Windows Kernel Team
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@flounder.com
Sent: Tuesday, November 19, 2013 2:09 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Multifunction A reloaded while B is active
Is PCIe “hot plug” by default? I only ask this because it would be the
bus driver that detects the device being missing, does all the protocols
via the PnP Manager (“Hey, remember that device I said we had…?”) to get
the driver unloaded, then sees it reappear and of course reloads the
driver. I didn’t think that the stock non-hotplug PCI bus driver could do
that, but PCI is not hotpluggable except on certain motherboards. For
these, as I had understood it, a special PCI hotplug bus driver is used.
So, my question on PCIe, does it have two bus drivers, one for hotplug and
one for non-hotplug? And if so, does the board the OP is using support
PCIe hotplug? Of course, if PCIe is intrinsically hotpluggable, There Can
Be Only One™ driver, and yes, I agree, it looks like a hardware
problem, although it could be a software issue of the bus driver
overreacting. I’d think some logging statements at various key PnP and/or
Power callbacks might be revealing.
joe
“There Can Be Only One” is a trademark of Highlander Software Ltd.,
headquartered in Glasgow, Scotland, and is used here without permission.
I suspect he means “reload a driver for a given function” – He has a
multi-function PCIe device, and apparently the function driver for one of
the functions on this device is periodically getting unloaded and
reloaded.
OP… how did I go? Good guess on my part??
The only reason this should be the case is if the function is dropping
off-line (with Windows subsequently unloading the driver) and coming back
online (with Windows subsequently REloading the driver). We’ve seen other
reports of this here on NTDEV… if this is what’s happening, it’s a
fundamental hardware problem.
There really is no other reason Windows would unload a driver and then
reload it.
Peter
OSR
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer