Rev 1628 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1628 | serge | 1 | |
2 | #include |
||
3 | #include |
||
4 | #include |
||
5 | #include |
||
6 | |||
7 | |||
8 | #include "acpi_bus.h" |
||
9 | |||
10 | |||
11 | |||
12 | |||
13 | |||
14 | |||
15 | { |
||
16 | struct pci_dev *dev; |
||
17 | |||
18 | |||
19 | if (!dev) |
||
20 | goto out; |
||
21 | |||
22 | |||
23 | // pci_acpi_remove_pm_notifier(device); |
||
24 | |||
25 | |||
26 | goto out; |
||
27 | |||
28 | |||
29 | |||
30 | |||
31 | device->ops.unbind = NULL; |
||
32 | |||
33 | |||
34 | // pci_dev_put(dev); |
||
35 | return 0; |
||
36 | } |
||
37 | |||
38 | |||
39 | { |
||
40 | ACPI_STATUS status; |
||
41 | ACPI_HANDLE handle; |
||
42 | struct pci_bus *bus; |
||
43 | struct pci_dev *dev; |
||
44 | |||
45 | |||
46 | if (!dev) |
||
47 | return 0; |
||
48 | |||
49 | |||
1867 | serge | 50 | |
51 | |||
52 | |||
53 | |||
54 | dev->vendor, dev->device); |
||
55 | |||
56 | |||
1628 | serge | 57 | // if (device->wakeup.flags.run_wake) |
58 | // device_set_run_wake(&dev->dev, true); |
||
59 | |||
60 | |||
61 | * Install the 'bind' function to facilitate callbacks for |
||
62 | * children of the P2P bridge. |
||
63 | */ |
||
64 | if (dev->subordinate) { |
||
65 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
||
66 | "Device %04x:%02x:%02x.%d is a PCI bridge\n", |
||
67 | pci_domain_nr(dev->bus), dev->bus->number, |
||
68 | PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn))); |
||
69 | device->ops.bind = acpi_pci_bind; |
||
70 | device->ops.unbind = acpi_pci_unbind; |
||
71 | } |
||
72 | |||
73 | |||
74 | * Evaluate and parse _PRT, if exists. This code allows parsing of |
||
75 | * _PRT objects within the scope of non-bridge devices. Note that |
||
76 | * _PRTs within the scope of a PCI bridge assume the bridge's |
||
77 | * subordinate bus number. |
||
78 | * |
||
79 | * TBD: Can _PRTs exist within the scope of non-bridge PCI devices? |
||
80 | */ |
||
81 | status = AcpiGetHandle(device->handle, METHOD_NAME__PRT, &handle); |
||
82 | if (ACPI_FAILURE(status)) |
||
83 | goto out; |
||
84 | |||
85 | |||
86 | bus = dev->subordinate; |
||
87 | else |
||
88 | bus = dev->bus; |
||
89 | |||
90 | |||
91 | |||
92 | |||
93 | // pci_dev_put(dev); |
||
94 | return 0; |
||
95 | } |
||
96 | |||
97 | |||
98 | { |
||
99 | device->ops.bind = acpi_pci_bind; |
||
100 | device->ops.unbind = acpi_pci_unbind; |
||
101 | |||
102 | |||
103 | } |
||
104 |