.. | .. |
---|
1130 | 1130 | for (slot = ctrl->slot; slot; slot = slot->next) { |
---|
1131 | 1131 | if (slot->device == (hp_slot + ctrl->slot_device_offset)) |
---|
1132 | 1132 | 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) |
---|
1136 | 1134 | continue; |
---|
1137 | 1135 | /* If another adapter is running on the same segment but at a |
---|
1138 | 1136 | * lower speed/mode, we allow the new adapter to function at |
---|
.. | .. |
---|
1767 | 1765 | } |
---|
1768 | 1766 | |
---|
1769 | 1767 | |
---|
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 | | - |
---|
1788 | 1768 | static void interrupt_event_handler(struct controller *ctrl) |
---|
1789 | 1769 | { |
---|
1790 | 1770 | int loop = 0; |
---|
.. | .. |
---|
1884 | 1864 | /***********POWER FAULT */ |
---|
1885 | 1865 | else if (ctrl->event_queue[loop].event_type == INT_POWER_FAULT) { |
---|
1886 | 1866 | dbg("power fault\n"); |
---|
1887 | | - } else { |
---|
1888 | | - /* refresh notification */ |
---|
1889 | | - update_slot_info(ctrl, p_slot); |
---|
1890 | 1867 | } |
---|
1891 | 1868 | |
---|
1892 | 1869 | ctrl->event_queue[loop].event_type = 0; |
---|
.. | .. |
---|
1895 | 1872 | } |
---|
1896 | 1873 | } /* End of FOR loop */ |
---|
1897 | 1874 | } |
---|
1898 | | - |
---|
1899 | | - return; |
---|
1900 | 1875 | } |
---|
1901 | 1876 | |
---|
1902 | 1877 | |
---|
.. | .. |
---|
1966 | 1941 | |
---|
1967 | 1942 | p_slot->state = STATIC_STATE; |
---|
1968 | 1943 | } |
---|
1969 | | - |
---|
1970 | | - return; |
---|
1971 | 1944 | } |
---|
1972 | 1945 | |
---|
1973 | 1946 | |
---|
.. | .. |
---|
2057 | 2030 | if (rc) |
---|
2058 | 2031 | dbg("%s: rc = %d\n", __func__, rc); |
---|
2059 | 2032 | |
---|
2060 | | - if (p_slot) |
---|
2061 | | - update_slot_info(ctrl, p_slot); |
---|
2062 | | - |
---|
2063 | 2033 | return rc; |
---|
2064 | 2034 | } |
---|
2065 | 2035 | |
---|
.. | .. |
---|
2124 | 2094 | } else if (!rc) { |
---|
2125 | 2095 | rc = 1; |
---|
2126 | 2096 | } |
---|
2127 | | - |
---|
2128 | | - if (p_slot) |
---|
2129 | | - update_slot_info(ctrl, p_slot); |
---|
2130 | 2097 | |
---|
2131 | 2098 | return rc; |
---|
2132 | 2099 | } |
---|