Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 3  
05 May 09 02:32
Sathiyaraj Venkatesan
xxxxxx@gmail.com
Join Date: 30 Apr 2009
Posts To This List: 5
PCI Function Number

Hi all, Can any body explain PCI Function Number?
  Message 2 of 3  
05 May 09 08:06
Peter Viscarola (OSR)
xxxxxx@osr.com
Join Date:
Posts To This List: 5916
List Moderator
PCI Function Number

The PCI Function Number is the logical number of an individual device that's resident in the same bus slot. Each PCI card sits in a single slot. On that card can be more than one logical device, each with its own set of resources. Each of these logical devices is referred to as a function. For example, a single PCI network card could have two logically separate NICs. Hope that helps, Peter OSR
  Message 3 of 3  
05 May 09 11:09
Jake Oshins
xxxxxx@windows.microsoft.com
Join Date:
Posts To This List: 1047
PCI Function Number

Let me expand on what Peter said. (Peter was correct, by the way, for early definitions of "Function.") For many years, the PCI specs defined "Function" like most of us would define "device." Each "slot" could contain a device with up to eight functions. Each PCI bus could contain up to 32 devices. Thus you could theoretically have 256 functions on a bus. Today, with PCI Express, a "device" occupies an entire bus. If your device supports it, you can indicate that your device occupies all 256 functions on that bus. This is dependent on the upstream switch or root port also supporting this type of enumeration. See the "Alternative Routing Interpretation (ARI)" Engineering Change Notice (ECN) in the PCI Express specs for more details. No Windows version currently supports ARI, though. To Windows, either of these situations is 256 completely separate device stacks, each with their own driver. Windows Plug-and-Play and Power Management assume that all device stacks are completely independent, except when there is explicit information to the contrary. A child node is assumed to be dependent on the parent. Thus all device stacks will be powered down before their bus drivers that enumerated them. In PnP, we have "device relations/bus relations" that can specify that certain devices are physically contained in the same package and must be ejected together. In ACPI, we have "power relations" which specify that certain devices are powered by the same planes and removal of power from one constitutes removal of power from all. But, aside from those, the assumption is that all PCI Functions are completely independent. If one function in your device is in D3, this has no effect on the others. Any of the drivers on various functions can be updated (with their stacks torn down and rebuilt) without affecting the operation of any others. This assumption is often violated by hardware designers who don't understand the consequences. Then poor driver writers like yourselves are asked to "just write software" that will make it all function as a single logical device. This is very difficult software to write. If you're on this path, and you still have a chance to get the hardware designer to change the design, do so. As a final note, and at this point I'm just trying to be over-complete, the PCI Express spec has recently defined "I/O Virtualization" that allows a device to implement a control function "called a Physical Function" with many "Virtual Functions" which can perform I/O but which cannot enforce policy. This allows a device to have many interfaces, each which can be under the control of a separate virtual machine. -- Jake Oshins Hyper-V I/O Architect (Microsoft representative to several PCI SIG committees) Windows Kernel Group This post implies no warranties and confers no rights. -------------------------------------------------------------- <xxxxx@osr.com> wrote in message news:123579@ntdev... > The PCI Function Number is the logical number of an individual device > that's resident in the same bus slot. > > Each PCI card sits in a single slot. On that card can be more than one > logical device, each with its own set of resources. Each of these logical > devices is referred to as a function. > > For example, a single PCI network card could have two logically separate > NICs. > <...excess quoted lines suppressed...>
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 15:36.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license