From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755240Ab3F1Jat (ORCPT ); Fri, 28 Jun 2013 05:30:49 -0400 Received: from mga02.intel.com ([134.134.136.20]:53474 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755138Ab3F1Jar (ORCPT ); Fri, 28 Jun 2013 05:30:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,958,1363158000"; d="scan'208";a="360980185" From: "Kirill A. Shutemov" To: Yinghai Lu Cc: Mika Westerberg , Greg Kroah-Hartman , Bjorn Helgaas , "Rafael J. Wysocki" , Jesse Barnes , John Ronciak , Miles J Penner , Bruce Allan , "Kirill A. Shutemov" , Heikki Krogerus , Linux Kernel Mailing List , "linux-pci@vger.kernel.org" , the arch/x86 maintainers In-Reply-To: References: <1372177330-28013-1-git-send-email-mika.westerberg@linux.intel.com> <1372177330-28013-5-git-send-email-mika.westerberg@linux.intel.com> Subject: Re: [PATCH 4/6] PCI: acpiphp: check for new devices on enabled host Content-Transfer-Encoding: 7bit Message-Id: <20130628093319.D4DE6E0090@blue.fi.intel.com> Date: Fri, 28 Jun 2013 12:33:19 +0300 (EEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yinghai Lu wrote: > On Tue, Jun 25, 2013 at 9:22 AM, Mika Westerberg > wrote: > > From: "Kirill A. Shutemov" > > > > 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? -- Kirill A. Shutemov