提交 2f2ed41c 编写于 作者: B Bjorn Helgaas

PCI: pciehp: Simplify "Power Fault Detected" checking/clearing

It's simpler to test the PCI_EXP_SLTSTA_PFD bit directly and to write the
constant back to PCI_EXP_SLTSTA.

No functional change.
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 afe2478f
...@@ -501,9 +501,9 @@ int pciehp_power_on_slot(struct slot * slot) ...@@ -501,9 +501,9 @@ int pciehp_power_on_slot(struct slot * slot)
/* Clear sticky power-fault bit from previous power failures */ /* Clear sticky power-fault bit from previous power failures */
pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status); pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status);
slot_status &= PCI_EXP_SLTSTA_PFD; if (slot_status & PCI_EXP_SLTSTA_PFD)
if (slot_status) pcie_capability_write_word(pdev, PCI_EXP_SLTSTA,
pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, slot_status); PCI_EXP_SLTSTA_PFD);
ctrl->power_fault_detected = 0; ctrl->power_fault_detected = 0;
slot_cmd = POWER_ON; slot_cmd = POWER_ON;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册