|
14 | 14 |
|
15 | 15 | #define dev_fmt(fmt) "pciehp: " fmt |
16 | 16 |
|
| 17 | +#include <linux/bitfield.h> |
17 | 18 | #include <linux/dmi.h> |
18 | 19 | #include <linux/kernel.h> |
19 | 20 | #include <linux/types.h> |
@@ -484,7 +485,7 @@ int pciehp_set_raw_indicator_status(struct hotplug_slot *hotplug_slot, |
484 | 485 | struct pci_dev *pdev = ctrl_dev(ctrl); |
485 | 486 |
|
486 | 487 | pci_config_pm_runtime_get(pdev); |
487 | | - pcie_write_cmd_nowait(ctrl, status << 6, |
| 488 | + pcie_write_cmd_nowait(ctrl, FIELD_PREP(PCI_EXP_SLTCTL_AIC, status), |
488 | 489 | PCI_EXP_SLTCTL_AIC | PCI_EXP_SLTCTL_PIC); |
489 | 490 | pci_config_pm_runtime_put(pdev); |
490 | 491 | return 0; |
@@ -1028,7 +1029,7 @@ struct controller *pcie_init(struct pcie_device *dev) |
1028 | 1029 | PCI_EXP_SLTSTA_DLLSC | PCI_EXP_SLTSTA_PDC); |
1029 | 1030 |
|
1030 | 1031 | ctrl_info(ctrl, "Slot #%d AttnBtn%c PwrCtrl%c MRL%c AttnInd%c PwrInd%c HotPlug%c Surprise%c Interlock%c NoCompl%c IbPresDis%c LLActRep%c%s\n", |
1031 | | - (slot_cap & PCI_EXP_SLTCAP_PSN) >> 19, |
| 1032 | + FIELD_GET(PCI_EXP_SLTCAP_PSN, slot_cap), |
1032 | 1033 | FLAG(slot_cap, PCI_EXP_SLTCAP_ABP), |
1033 | 1034 | FLAG(slot_cap, PCI_EXP_SLTCAP_PCP), |
1034 | 1035 | FLAG(slot_cap, PCI_EXP_SLTCAP_MRLSP), |
|
0 commit comments