Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3486671imu; Sun, 11 Nov 2018 16:11:49 -0800 (PST) X-Google-Smtp-Source: AJdET5dL8Vj3iC90a6J/CDAc1SAestqg4CVgUdVGGh8V2byCMAQ810HhBlUXGOpMO+ToqP72Y51x X-Received: by 2002:a62:fc95:: with SMTP id e143-v6mr17604227pfh.132.1541981508986; Sun, 11 Nov 2018 16:11:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981508; cv=none; d=google.com; s=arc-20160816; b=Xl/G5qKDNX7bvxnEMGkT73XjRIxD6TE5o+7zl1o9reJnaOT3Yj2NNMX9LU7fFdmsgi sKm4Qh0DVVoTU3xiGHvltQi8UY76DJiZW6SO+S/xbKNCHZEeUJKVwZKTiYQLmbInYGEv epA5wS3JHWlmwwKQpyQhrS+mKR8p3GXo39WiDgm1MigKAldQErnWeWJGGCcxaLbVsOth k452WnXk7palKIXd92JnQfzyZOnFl3Kz1yld0oLU1FG17USJx25wJ1c+HXrJ5Q7C+Ell JsYmDWi582G0jTRWyoiX3PvyhiCbOu2XddVXlxfDN6hmMMebkF36aAthcEpq1yPqmOVK VEqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3uWLQJyqso2yRK9UHgV7B/cQKcimYLrukTl20BGEZds=; b=rfuelWALMpWOI9DN73VoAPcHThyymqKgusChMUZKyEa65EkoyKM3oF+oq3kEvI6jfX f/iDC1SpN4U5z9xTnMmnYQPlBmxCO/jeh6etS7hvND/MjkFi07P8xmuWAOo0za9Jl7w1 O2bTETNNLu7+buY2fkyZCQLgYi5b+YxLr6RxbXzLPasOwHjXKIO2ZQEcrqD/GKyEPNod 8yn2owFUC0IE/jhEP120QLDqqTAN2b/Y96Oi9V802y9xxE6TOx7HAXdFQku3FZ/P2d8O fy5kL4ufQmFTy0qLxbRN+9qLeOWiJW0m4OAh+052oRRAPrNetkmmZzyX40ELJSroE4mg f20A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xkdHpFu+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11-v6si13525653pgs.179.2018.11.11.16.11.33; Sun, 11 Nov 2018 16:11:48 -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=xkdHpFu+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731280AbeKLKBk (ORCPT + 99 others); Mon, 12 Nov 2018 05:01:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:60278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730599AbeKLIRX (ORCPT ); Mon, 12 Nov 2018 03:17:23 -0500 Received: from localhost (unknown [206.108.79.134]) (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 79D9421582; Sun, 11 Nov 2018 22:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975247; bh=jeXfFLvaqa0weiquCPdLv1YnOC6yHFfjSjsrXZT9Vng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xkdHpFu+PBVc8OCVQDn2UpeQzGV9cfi0brn5yQE2q25Jqy4mLVYfVNLi6vqcsSR7P K+QxmacuBR8UzInRM2ANIBU32k+aosl6+7916iNDZbQyxEIqSOo1oYFmv8sv0mn4bK oZPGdIOSh5NMpTDq3a+8gJJkHDYtwJzKbrrzqd98= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Zhao , Ulf Hansson , Sasha Levin Subject: [PATCH 4.19 070/361] mmc: sdhci-pci-o2micro: Add quirk for O2 Micro dev 0x8620 rev 0x01 Date: Sun, 11 Nov 2018 14:16:57 -0800 Message-Id: <20181111221629.851793510@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yu Zhao [ Upstream commit 5169894982bb67486d93cc1e10151712bb86bcb6 ] This device reports SDHCI_CLOCK_INT_STABLE even though it's not ready to take SDHCI_CLOCK_CARD_EN. The symptom is that reading SDHCI_CLOCK_CONTROL after enabling the clock shows absence of the bit from the register (e.g. expecting 0x0000fa07 = 0x0000fa03 | SDHCI_CLOCK_CARD_EN but only observed the first operand). mmc1: Timeout waiting for hardware cmd interrupt. mmc1: sdhci: ============ SDHCI REGISTER DUMP =========== mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00000603 mmc1: sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000 mmc1: sdhci: Argument: 0x00000000 | Trn mode: 0x00000000 mmc1: sdhci: Present: 0x01ff0001 | Host ctl: 0x00000001 mmc1: sdhci: Power: 0x0000000f | Blk gap: 0x00000000 mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x0000fa03 mmc1: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000 mmc1: sdhci: Int enab: 0x00ff0083 | Sig enab: 0x00ff0083 mmc1: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000 mmc1: sdhci: Caps: 0x25fcc8bf | Caps_1: 0x00002077 mmc1: sdhci: Cmd: 0x00000000 | Max curr: 0x005800c8 mmc1: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000 mmc1: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000 mmc1: sdhci: Host ctl2: 0x00000008 mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000 mmc1: sdhci: ============================================ The problem happens during wakeup from S3. Adding a delay quirk after power up reliably fixes the problem. Signed-off-by: Yu Zhao Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-pci-o2micro.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/mmc/host/sdhci-pci-o2micro.c +++ b/drivers/mmc/host/sdhci-pci-o2micro.c @@ -490,6 +490,9 @@ int sdhci_pci_o2_probe(struct sdhci_pci_ pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch); break; case PCI_DEVICE_ID_O2_SEABIRD0: + if (chip->pdev->revision == 0x01) + chip->quirks |= SDHCI_QUIRK_DELAY_AFTER_POWER; + /* fall through */ case PCI_DEVICE_ID_O2_SEABIRD1: /* UnLock WP */ ret = pci_read_config_byte(chip->pdev,