Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3439094imu; Sun, 11 Nov 2018 15:07:10 -0800 (PST) X-Google-Smtp-Source: AJdET5dnzPtBaTc7OfHYfAtXIubS5uXJrxauffxvJxM0p+5AVg9MxaGKYthLYlJtsVa2EAK2Z4vt X-Received: by 2002:a62:6455:: with SMTP id y82-v6mr5670796pfb.249.1541977630338; Sun, 11 Nov 2018 15:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977630; cv=none; d=google.com; s=arc-20160816; b=lVxzkS2xds/XPYLldq61vMzf/YVNzF4XUvVbkxMWTRWtjMkKXIk8lWdIqKjYJj8PWd LCmiXQun6Q6lHuaNpr/kQCgwgvIbWoU3YmbHIDnXmdRIVppLxZH/2pYFE+hZe5CeEGVZ whyF8O6gP86WmF47w+qxXhw/pR1Ly6l5Nh9TiEbqvMWvjl0YG9jrHax3bkDDX3XyfNhF Y4JDq2JAfKlmflwDPFSsWApNkV/6zUR8wQgmmLXK+B1Wh+hUdibMUFxpPb4LyWWuEDwb pYQbaXacVvsEqRKMUtkZscRaaO9hgwAW9OgKd5GtBLt6bYNFiW5ZHX0BiMLj6ZIs9oiV dhfg== 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=Hi/Q90vgsnvHsP5FKNiw3LjkKX653d1ShB0tHlx69QY=; b=a+p5g58JEI4vnF4MPsg6LKTp9LCNYz4E8JLhAlvFtNvgmEunJ1mKraAVaYICvghu0Z bvcSVcSMDz/T0Rt+fqlc8I3YvBhAWq8jm+Z81BryCViyoVPtcvQPwlWUb8GZHZSj9pjC gZeuuicdBirody3A/L7gCOaGusSCN6emtekJ4D9L9AOmFAykjgo3DDVmwALk4MOUT5AS Na0X165CCG2X9ukobfUHlb9i5i6R/8rDp1zTehLDDNbL2dAEHgwxReiJ8GikBT9UQEO4 Y9qb1NrVudp2EYq1sfjt8+QXepLjsn7FUMmWK4nMzCNW+u8sxyA6jte4rzSn4vRULz2i mQvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cy7AEPX4; 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 o69-v6si18306462pfo.78.2018.11.11.15.06.55; Sun, 11 Nov 2018 15:07:10 -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=Cy7AEPX4; 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 S2390548AbeKLI4m (ORCPT + 99 others); Mon, 12 Nov 2018 03:56:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:51200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390368AbeKLIWM (ORCPT ); Mon, 12 Nov 2018 03:22:12 -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 CFDA521707; Sun, 11 Nov 2018 22:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975535; bh=ynGVD8sSfULFcPvSBokfvW8OWHJ3sogPsaMi+fbwMVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cy7AEPX4z6U4XjzOCrf1W7xrGETuM2W+PdNWGk5U2shkNdI9IT9BCvqB3/85xVGcp /F6AhD2Pktk3/ucia68V5/GSXUaHWgg0emGibLTaM+P2ifaTvo2wgVOvy/z1A/vZfM XAdZqZnmalNpVricnk40eLnKPo0AiHIU7t9ZUWTY= 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.14 052/222] mmc: sdhci-pci-o2micro: Add quirk for O2 Micro dev 0x8620 rev 0x01 Date: Sun, 11 Nov 2018 14:22:29 -0800 Message-Id: <20181111221652.742978106@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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 @@ -334,6 +334,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,