On Fri, Jun 28, 2013 at 2:33 AM, Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> wrote: > Yinghai Lu wrote: >> On Tue, Jun 25, 2013 at 9:22 AM, Mika Westerberg >> <mika.westerberg@xxxxxxxxxxxxxxx> wrote: >> > From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> >> > >> > Current acpiphp_check_bridge() implementation is pretty dumb: >> > - it enables the slot if it's not enabled and the slot status is >> > ACPI_STA_ALL; >> > - it disables the slot if it's enabled and slot is not in ACPI_STA_ALL >> > state. >> > >> > This behavior is not enough to handle Thunderbolt chaining case >> > properly. We need to actually rescan for new devices even if a device >> > has already in the slot. >> > >> > The new implementation disables and stops the slot if it's not in >> > ACPI_STA_ALL state. >> > >> > For ACPI_STA_ALL state we first trim devices which don't respond and >> > look for the ones after that. We do that even if slot already enabled >> > (SLOT_ENABLED). >> >> that is not right, some time BUS_CHECK is even sent root bus. >> in that case, stop all devices in slots and load driver again. >> >> like you put one card in one slots, but all devices in other slots get stop >> and enable again. > > We don't stop enabled devices, we only stop and remove devices which don't > respond. See patch 3/6. > > I don't see how it's harmful. Do you? then please check with disable_device to put back pci_dev ref, also may need to trim corresponding acpi devices. so this patch is helping: multiple plug-in and remove? Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html