1 /* 2 * PROJECT: ReactOS PCI Bus Driver 3 * LICENSE: BSD - See COPYING.ARM in the top level directory 4 * FILE: drivers/bus/pci/arb/ar_busno.c 5 * PURPOSE: Bus Number Arbitration 6 * PROGRAMMERS: ReactOS Portable Systems Group 7 */ 8 9 /* INCLUDES *******************************************************************/ 10 11 #include <pci.h> 12 13 #define NDEBUG 14 #include <debug.h> 15 16 /* GLOBALS ********************************************************************/ 17 18 PCI_INTERFACE ArbiterInterfaceBusNumber = 19 { 20 &GUID_ARBITER_INTERFACE_STANDARD, 21 sizeof(ARBITER_INTERFACE), 22 0, 23 0, 24 PCI_INTERFACE_FDO, 25 0, 26 PciArb_BusNumber, 27 arbusno_Constructor, 28 arbusno_Initializer 29 }; 30 31 /* FUNCTIONS ******************************************************************/ 32 33 NTSTATUS 34 NTAPI 35 arbusno_Initializer(IN PVOID Instance) 36 { 37 UNREFERENCED_PARAMETER(Instance); 38 /* Not yet implemented */ 39 UNIMPLEMENTED; 40 //while (TRUE); 41 return STATUS_SUCCESS; 42 } 43 44 NTSTATUS 45 NTAPI 46 arbusno_Constructor(IN PVOID DeviceExtension, 47 IN PVOID PciInterface, 48 IN PVOID InterfaceData, 49 IN USHORT Version, 50 IN USHORT Size, 51 IN PINTERFACE Interface) 52 { 53 PPCI_FDO_EXTENSION FdoExtension = (PPCI_FDO_EXTENSION)DeviceExtension; 54 NTSTATUS Status; 55 PAGED_CODE(); 56 57 UNREFERENCED_PARAMETER(PciInterface); 58 UNREFERENCED_PARAMETER(Version); 59 UNREFERENCED_PARAMETER(Size); 60 UNREFERENCED_PARAMETER(Interface); 61 62 /* Make sure it's the expected interface */ 63 if ((ULONG)InterfaceData != CmResourceTypeBusNumber) 64 { 65 /* Arbiter support must have been initialized first */ 66 if (FdoExtension->ArbitersInitialized) 67 { 68 /* Not yet implemented */ 69 UNIMPLEMENTED; 70 while (TRUE); 71 } 72 else 73 { 74 /* No arbiters for this FDO */ 75 Status = STATUS_NOT_SUPPORTED; 76 } 77 } 78 else 79 { 80 /* Not the right interface */ 81 Status = STATUS_INVALID_PARAMETER_5; 82 } 83 84 /* Return the status */ 85 return Status; 86 } 87 88 /* EOF */ 89