Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp289648imu; Tue, 27 Nov 2018 12:26:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/WH9KLqTxYQE61XM1pFrnV3pNgPdp5dKMb2MpMDE973sMcGcCktKV1Aar1XOkgjMaUVnL14 X-Received: by 2002:a62:c3:: with SMTP id 186mr17744710pfa.24.1543350403520; Tue, 27 Nov 2018 12:26:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543350403; cv=none; d=google.com; s=arc-20160816; b=GWYOMBxX8dN+2QpaEjBXmGpKei7zdguvTdyCrewFepo+nNHaCnbDnQtqIRqxjLylT9 3xw6emAQZTCFWeMVt9a8b8aAUtPCC+HH3PLFzJwkrr62PBhmhD/qgAAfI5mJrq7iHtgh vhm9mCaGrzcE8KzIggf20GM29d8ttq5jXRWqGUHid4OUVgcfPEs/Pll+EyQnUjtgqbFT qUUyzVEGnnTqKuQ8LYtdJAuuc6uOZbfQiWXsww44F7GlzH33i8SNPA1/50FsGVsh8OzP UWxyUKM7tVxc9LMi5//I6xsBTlaiuun2yleqYcjC0P+dFLSejDSLii9rBab6Hhp7rTzy 7pWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eR4tFBj8CPS8pCLoaB9RciQzXEVcmXG72sdhPcjEa94=; b=yWJbp31fKwifJ/ATXBsPMJVe1ppxz3S8zDNE/1OLabFV+u5Gc5uw3/h2tjq4MYeXGQ NCcS89JK9jOEZkokrtWKcmNWhbePCetOYZG0sw5eWIMw66bbA+AD9xMub7sm2xFUfTL/ 1nuWwhSN6HLIBPh4YGOI0IYkMKznk30iokXNn9Q2Jfa4AXhQ503yeanJlo3/h0F42rce IhpmZugFxIFauN6hLI+Byez5/alYl37B5O0tvf8yHyBlhrMB0YyvdxfaJnVUmWnIgKWP 539Ps9gqOaMHXETZKmubfiiYKOKJRsITD/1pL199vU0A19G0+hYWaRNATv+8+Lmka5Sw h+ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s7KANS72; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q70si4569892pgq.526.2018.11.27.12.26.28; Tue, 27 Nov 2018 12:26:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s7KANS72; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbeK1HYV (ORCPT + 99 others); Wed, 28 Nov 2018 02:24:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:57858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbeK1HYU (ORCPT ); Wed, 28 Nov 2018 02:24:20 -0500 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3D7D420873; Tue, 27 Nov 2018 20:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543350316; bh=lhOOZSdDHB39hiHUJ1gc3PVNwldijxaEv1yJeDjOJbE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s7KANS72ytXRKFgaBrsx5PAwmMrR/rUpEQ5DNEPfLZuRwUAe2UHrfB8dMoL1hIbx9 N+XjnphPOSs+nj5D8Injv0MvHOPTburaDA3v2gcPEZK3cwGLFbnOjK2kXeDMf8ZuVe Pna4FXPyQKObIFI4Utb3wGK7wjut/eZ/2oTK9Ubs= Date: Tue, 27 Nov 2018 14:25:14 -0600 From: Bjorn Helgaas To: "Rafael J. Wysocki" Cc: LKML , Linux PCI , Patrick Talbert Subject: Re: [Bug] SD card reader in Acer Aspire S5 broken in 4.20-rc Message-ID: <20181127202514.GB112381@google.com> References: <2960808.4YCFhzuD0k@aspire.rjw.lan> <1675729.7aZxPkvRd8@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1675729.7aZxPkvRd8@aspire.rjw.lan> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 26, 2018 at 11:37:20PM +0100, Rafael J. Wysocki wrote: > On Monday, November 26, 2018 7:03:58 PM CET Rafael J. Wysocki wrote: > > Hi Bjorn, > > > > The SD card reader in my Acer Aspire S5 doesn't work with 4.20-rc. > > > > Here's what lspci -v says about it (in a bad kernel): > > > > 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader > > (rev 01) > > Subsystem: Acer Incorporated [ALI] Device 0704 > > Flags: bus master, fast devsel, latency 0, IRQ 35 > > Memory at d9001000 (32-bit, non-prefetchable) [size=4K] > > Capabilities: [40] Power Management version 3 > > Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+ > > Capabilities: [70] Express Endpoint, MSI 00 > > Capabilities: [100] Advanced Error Reporting > > Capabilities: [140] Device Serial Number 00-00-00-01-00-4c-e0-00 > > Kernel driver in use: rtsx_pci > > Kernel modules: rtsx_pci Thanks a lot for bisecting this! With a good kernel (v4.19 or v4.20-rc with 17c91487364f reverted), would you mind collecting "lspci -vv" output, the dmesg log with "pci=earlydump", and the FADT dump? I'm interested in the initial state of the device at handoff from BIOS, and what Linux changes even when aspm_disabled is set. If we can't figure out a way to fix both this issue and the one fixed by 17c91487364f, I guess the fallback will be to revert 17c91487364f since it's better to allow a system that was previously broken to remain broken than it is to break a system that previously worked. But obviously I hope we can figure out a solution that fixes both cases. > > When it doesn't work, it doesn't generate any interrupts on device insertion > > and removal and this seems to be reproducible 100% of the time. > > So reverting 17c91487364f (PCI/ASPM: Do not initialize link state when > aspm_disabled is set) on top of 4.20-rc4 makes the problem go away. > > I guess that the device in question needs pcie_aspm_cap_init() to be > called for it even though the FADT says "NO_ASPM".