diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2013-12-14 15:06:36 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-12-15 18:15:41 -0500 |
| commit | afe2478f2e3fffc45a1be24ebfc23945a66a80fd (patch) | |
| tree | c5eef0237b7ad4a146a5a5c15cc6c5f8384a872a /drivers | |
| parent | 6dae62020f0e6a2ffe424c8cea542fa49d42ec6e (diff) | |
PCI: pciehp: Announce slot capabilities (slot #, button, LEDs, etc)
We already have the vendor/device IDs from pci_setup_device(), so drop that
info and print things that will be more useful for debugging: the slot
number and presence of button/indicators/link active reporting/etc.
No functional change.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 83df74910f9a..55109d6d8a90 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
| @@ -771,6 +771,8 @@ static inline void dbg_ctrl(struct controller *ctrl) | |||
| 771 | ctrl_info(ctrl, "Slot Control : 0x%04x\n", reg16); | 771 | ctrl_info(ctrl, "Slot Control : 0x%04x\n", reg16); |
| 772 | } | 772 | } |
| 773 | 773 | ||
| 774 | #define FLAG(x,y) (((x) & (y)) ? '+' : '-') | ||
| 775 | |||
| 774 | struct controller *pcie_init(struct pcie_device *dev) | 776 | struct controller *pcie_init(struct pcie_device *dev) |
| 775 | { | 777 | { |
| 776 | struct controller *ctrl; | 778 | struct controller *ctrl; |
| @@ -811,9 +813,16 @@ struct controller *pcie_init(struct pcie_device *dev) | |||
| 811 | /* Disable software notification */ | 813 | /* Disable software notification */ |
| 812 | pcie_disable_notification(ctrl); | 814 | pcie_disable_notification(ctrl); |
| 813 | 815 | ||
| 814 | ctrl_info(ctrl, "HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", | 816 | ctrl_info(ctrl, "Slot #%d AttnBtn%c AttnInd%c PwrInd%c PwrCtrl%c MRL%c Interlock%c NoCompl%c LLActRep%c\n", |
| 815 | pdev->vendor, pdev->device, pdev->subsystem_vendor, | 817 | (slot_cap & PCI_EXP_SLTCAP_PSN) >> 19, |
| 816 | pdev->subsystem_device); | 818 | FLAG(slot_cap, PCI_EXP_SLTCAP_ABP), |
| 819 | FLAG(slot_cap, PCI_EXP_SLTCAP_AIP), | ||
| 820 | FLAG(slot_cap, PCI_EXP_SLTCAP_PIP), | ||
| 821 | FLAG(slot_cap, PCI_EXP_SLTCAP_PCP), | ||
| 822 | FLAG(slot_cap, PCI_EXP_SLTCAP_MRLSP), | ||
| 823 | FLAG(slot_cap, PCI_EXP_SLTCAP_EIP), | ||
| 824 | FLAG(slot_cap, PCI_EXP_SLTCAP_NCCS), | ||
| 825 | FLAG(link_cap, PCI_EXP_LNKCAP_DLLLARC)); | ||
| 817 | 826 | ||
| 818 | if (pcie_init_slot(ctrl)) | 827 | if (pcie_init_slot(ctrl)) |
| 819 | goto abort_ctrl; | 828 | goto abort_ctrl; |
