Wednesday, November 12, 2008

Can I 'rescan' the PCI expansion slots?

PCIe to ExpressCard ReaderThis is in response to a question we saw on an archived Apple Discussion board": "Can I 'rescan' the PCI expansion slots?" Many of the answers you've been provided with here are incorrect. By specification, PCIe (PCI Express) is supposed to feature hot swap capability. This is why the ExpressCard standard features it for the higher end of the specification without modification. The has nothing to do with drivers or any of the other erroneous information put forth in this thread.

The inability of Mac OS X and Windows (Windows requires user intervention via their bizarre "device manager" interface) to hot swap PCIe based devices may stem from the fact that vendors didn't expect devices on the market which took advantage of PCIe's hot swap capability. Since Apple has implemented hot swap on the MacBook Pro's ExpressCard slot [1], there is no reason why they shouldn't be able to do the same with Macs featuring PCIe slots. At my day job, Synchrotech, we have to answer to people wanting to use Sony/Sandisk SxS cards on PowerMac G5 (PCIe) and Mac Pro systems almost every day. When we explain that a PCIe to ExpressCard reader currently requires a reboot between card swaps.

To put this in perspective MS argues that PCIe hot swap isn't possible, and that manually refreshing to rescan is the fault of BIOS/Firmware. Putting this theory to the test, we sent a PCIe to ExpressCard reader with several PCIe based ExpressCards to the OpenBSD team. Within three days the OpenBSD developers had implemented full hot swap PCIe in the kernel and we were able to hot swap PCIe based ExpressCards on a desktop PC with no issues.

The ability to add an inexpensive PCIe to ExpressCard reader to and PCIe based Macs and have them hot swap is crucial with the emergence of the Sony/Sandisk SxS cards and the professional cameras using them. Apple could easily become the premier platform for ingesting and processing these cards. We doubt it will be any more trouble for Apple to implement PCIe hot swap in the kernel than it was for the OpenBSD team.

[1] Important to remind people that ExpressCard is a dual bus standard. For slow and simple minded devices, ExpressCard employs USB 2.0. For high performance and complex applications ExpressCard utilizes PCIe. The ExpressCard standard effectively defines no new busses, it merely provides a different form factor and set of connectors for the existing PCIe and USB 2.0 standards.

2 comments:

Anonymous said...

If Mac OS is based on BSD and hot swap can be implemented in OpenBSD, wouldn't there be a way to implement this by modifying as they did with OpenBSD and then using a script to access through Terminal?

Synchrotech said...

> If Mac OS is based on BSD and hot swap can be
> implemented in OpenBSD, wouldn't there be a way to
> implement this by modifying as they did with OpenBSD
> and then using a script to access through Terminal?

In a word yes. Apple could implement similar code in their kernel to enable hot swap. In fact, a shell script wouldn't be necessary.