Lines Matching refs:pdev

24  * @pdev   : PCI device structure
28 static int acpi_enable_dpc(struct pci_dev *pdev)
30 struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
60 pci_err(pdev, FW_BUG "Enable DPC _DSM returned non integer\n");
65 pci_err(pdev, "Enable DPC _DSM failed to enable DPC\n");
76 * @pdev : Device which received EDR event
81 static struct pci_dev *acpi_dpc_port_get(struct pci_dev *pdev)
83 struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
93 return pci_dev_get(pdev);
98 return pci_dev_get(pdev);
102 pci_err(pdev, FW_BUG "Locate Port _DSM returned non integer\n");
116 return pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
122 * @pdev : Device used to send _OST
126 static int acpi_send_edr_status(struct pci_dev *pdev, struct pci_dev *edev,
129 struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
132 pci_dbg(pdev, "Status for %s: %#x\n", pci_name(edev), status);
147 struct pci_dev *pdev = data, *edev;
155 * pdev is a Root Port or Downstream Port that is still present and
159 pci_info(pdev, "EDR event received\n");
162 * Locate the port that experienced the containment event. pdev
166 edev = acpi_dpc_port_get(pdev);
168 pci_err(pdev, "Firmware failed to locate DPC port\n");
172 pci_dbg(pdev, "Reported EDR dev: %s\n", pci_name(edev));
206 acpi_send_edr_status(pdev, edev, EDR_OST_SUCCESS);
209 acpi_send_edr_status(pdev, edev, EDR_OST_FAILED);
215 void pci_acpi_add_edr_notifier(struct pci_dev *pdev)
217 struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
221 pci_dbg(pdev, "No valid ACPI node, skipping EDR init\n");
226 edr_handle_event, pdev);
228 pci_err(pdev, "Failed to install notify handler\n");
232 if (acpi_enable_dpc(pdev))
236 pci_dbg(pdev, "Notify handler installed\n");
239 void pci_acpi_remove_edr_notifier(struct pci_dev *pdev)
241 struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
248 pci_dbg(pdev, "Notify handler removed\n");