[USB]
[reactos.git] / reactos / drivers / bus / pcix / arb / ar_busno.c
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 #define NDEBUG
13 #include <debug.h>
14
15 /* GLOBALS ********************************************************************/
16
17 PCI_INTERFACE ArbiterInterfaceBusNumber =
18 {
19 &GUID_ARBITER_INTERFACE_STANDARD,
20 sizeof(ARBITER_INTERFACE),
21 0,
22 0,
23 PCI_INTERFACE_FDO,
24 0,
25 PciArb_BusNumber,
26 arbusno_Constructor,
27 arbusno_Initializer
28 };
29
30 /* FUNCTIONS ******************************************************************/
31
32 NTSTATUS
33 NTAPI
34 arbusno_Initializer(IN PVOID Instance)
35 {
36 /* Not yet implemented */
37 UNIMPLEMENTED;
38 //while (TRUE);
39 return STATUS_SUCCESS;
40 }
41
42 NTSTATUS
43 NTAPI
44 arbusno_Constructor(IN PVOID DeviceExtension,
45 IN PVOID PciInterface,
46 IN PVOID InterfaceData,
47 IN USHORT Version,
48 IN USHORT Size,
49 IN PINTERFACE Interface)
50 {
51 PPCI_FDO_EXTENSION FdoExtension = (PPCI_FDO_EXTENSION)DeviceExtension;
52 NTSTATUS Status;
53 PAGED_CODE();
54
55 /* Make sure it's the expected interface */
56 if ((ULONG)InterfaceData != CmResourceTypeBusNumber)
57 {
58 /* Arbiter support must have been initialized first */
59 if (FdoExtension->ArbitersInitialized)
60 {
61 /* Not yet implemented */
62 UNIMPLEMENTED;
63 while (TRUE);
64 }
65 else
66 {
67 /* No arbiters for this FDO */
68 Status = STATUS_NOT_SUPPORTED;
69 }
70 }
71 else
72 {
73 /* Not the right interface */
74 Status = STATUS_INVALID_PARAMETER_5;
75 }
76
77 /* Return the status */
78 return Status;
79 }
80
81 /* EOF */