hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/pci/hotplug/cpqphp_ctrl.c
....@@ -1130,9 +1130,7 @@
11301130 for (slot = ctrl->slot; slot; slot = slot->next) {
11311131 if (slot->device == (hp_slot + ctrl->slot_device_offset))
11321132 continue;
1133
- if (!slot->hotplug_slot || !slot->hotplug_slot->info)
1134
- continue;
1135
- if (slot->hotplug_slot->info->adapter_status == 0)
1133
+ if (get_presence_status(ctrl, slot) == 0)
11361134 continue;
11371135 /* If another adapter is running on the same segment but at a
11381136 * lower speed/mode, we allow the new adapter to function at
....@@ -1767,24 +1765,6 @@
17671765 }
17681766
17691767
1770
-static int update_slot_info(struct controller *ctrl, struct slot *slot)
1771
-{
1772
- struct hotplug_slot_info *info;
1773
- int result;
1774
-
1775
- info = kmalloc(sizeof(*info), GFP_KERNEL);
1776
- if (!info)
1777
- return -ENOMEM;
1778
-
1779
- info->power_status = get_slot_enabled(ctrl, slot);
1780
- info->attention_status = cpq_get_attention_status(ctrl, slot);
1781
- info->latch_status = cpq_get_latch_status(ctrl, slot);
1782
- info->adapter_status = get_presence_status(ctrl, slot);
1783
- result = pci_hp_change_slot_info(slot->hotplug_slot, info);
1784
- kfree(info);
1785
- return result;
1786
-}
1787
-
17881768 static void interrupt_event_handler(struct controller *ctrl)
17891769 {
17901770 int loop = 0;
....@@ -1884,9 +1864,6 @@
18841864 /***********POWER FAULT */
18851865 else if (ctrl->event_queue[loop].event_type == INT_POWER_FAULT) {
18861866 dbg("power fault\n");
1887
- } else {
1888
- /* refresh notification */
1889
- update_slot_info(ctrl, p_slot);
18901867 }
18911868
18921869 ctrl->event_queue[loop].event_type = 0;
....@@ -1895,8 +1872,6 @@
18951872 }
18961873 } /* End of FOR loop */
18971874 }
1898
-
1899
- return;
19001875 }
19011876
19021877
....@@ -1966,8 +1941,6 @@
19661941
19671942 p_slot->state = STATIC_STATE;
19681943 }
1969
-
1970
- return;
19711944 }
19721945
19731946
....@@ -2057,9 +2030,6 @@
20572030 if (rc)
20582031 dbg("%s: rc = %d\n", __func__, rc);
20592032
2060
- if (p_slot)
2061
- update_slot_info(ctrl, p_slot);
2062
-
20632033 return rc;
20642034 }
20652035
....@@ -2124,9 +2094,6 @@
21242094 } else if (!rc) {
21252095 rc = 1;
21262096 }
2127
-
2128
- if (p_slot)
2129
- update_slot_info(ctrl, p_slot);
21302097
21312098 return rc;
21322099 }