Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3394732ybl; Mon, 20 Jan 2020 23:23:20 -0800 (PST) X-Google-Smtp-Source: APXvYqweHOo6JKRpJ9k4hh4kh8WRVyKaO/+Zr+z94MShQ7AOFI90ZiWTvNYknxitFXgkGFwebWhM X-Received: by 2002:aca:6744:: with SMTP id b4mr2040240oiy.99.1579591400499; Mon, 20 Jan 2020 23:23:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579591400; cv=none; d=google.com; s=arc-20160816; b=xtTOjsi1JfXfsIecWlSVNCfrUviTTtwO61rhXPLFROlmNx+nlBHX9Lh2eg5Cb7e+mH e2GOHSGr9gWIsComFHKnDXtN8K+EJJ69a5KP3oDjw/biyz1CBnS6wr3+NvjxZOFkhFSp pCnFOcJ/nq7yQv7LywXYrFQxL4sC/nRmEt1A/Gr0zoKMXMrq11h11UgKy7oF91YK5BRo WjhHVv+LY0m4+nV7rUPl2cak0zARX+zsXfDKt/OC15J2x9mjq20ynqwOAe53b1uGfqSm 4R4CRQ5EPWO/dcOopQJybOaI3acLoDCENzj41aLdUfrOqC6BXb35pKdhQ0BhRzUhDr51 kt4g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RTFuTKew6Bbm3rHXc1VuNfPD8aZnX6svfZSE96XCyyo=; b=Eyo8RWoRfVLLLZ8/9SQvsa2S10S7kl7hbuIm6V5x5RbtweUWcXuBuXe9ZTXL3njOiE yQUWwQMuh3cQZYA9FQM4r8q/G2DWtbOXjyO8Kuqadl2fd/zUUr6Oxu1zs4J7TQ8hPI/G Djtclg71nJpvJ/438xMHAF1Eyf552IRrT7ExdssF4TXwLx2twoAgkYt7G0y+U7+Q8UI0 A5/MRPgaTT4c8t4bk3qba1UA6MYkXdItLob5fhx59SZZtViY9Z8zxFqDUHRSVcnb4v1P UT4JaQRl+HB/p+p9wDRjK247exl55AmV2ysmmYOiOPlFW8lMf5JtB0tqhnA/vZhM+LZh FeXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=G6GJ0WK0; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si21155359otm.263.2020.01.20.23.23.07; Mon, 20 Jan 2020 23:23:20 -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=@mediatek.com header.s=dk header.b=G6GJ0WK0; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbgAUHVu (ORCPT + 99 others); Tue, 21 Jan 2020 02:21:50 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:12752 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725789AbgAUHVu (ORCPT ); Tue, 21 Jan 2020 02:21:50 -0500 X-UUID: 7f0d56b122ea46fb82bc2fb160158317-20200121 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=RTFuTKew6Bbm3rHXc1VuNfPD8aZnX6svfZSE96XCyyo=; b=G6GJ0WK0KJLZHBZHmKZEHKQeb4uL81/0+KuDml2kO3lqqls2rmeHT7qjXZCGRjvPPCKCT4yuve7e7RtrIj8s2Q1HHudI6Ir3vgdTqIpCLhM00xmyz7Tl5FAXsFJv1b42jxHrTD3hk6bWY/Wiub4o/g5n7iu2LLiTtMvEajDytCg=; X-UUID: 7f0d56b122ea46fb82bc2fb160158317-20200121 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1503164164; Tue, 21 Jan 2020 15:21:47 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 21 Jan 2020 15:21:06 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 21 Jan 2020 15:19:25 +0800 From: Yong Mao To: Ulf Hansson CC: Chaotian Jing , Matthias Brugger , , , , , , yong mao Subject: [PATCH] mmc: mediatek: fix SDIO irq issue Date: Tue, 21 Jan 2020 15:20:58 +0800 Message-ID: <1579591258-30940-2-git-send-email-yong.mao@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1579591258-30940-1-git-send-email-yong.mao@mediatek.com> References: <1579591258-30940-1-git-send-email-yong.mao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogeW9uZyBtYW8gPHlvbmcubWFvQG1lZGlhdGVrLmNvbT4NCg0KSG9zdCBjb250cm9sbGVy IG1heSBsb3N0IGludGVycnVwdCBpbiBzb21lIHNwZWNhaWwgY2FzZS4NCkFkZCBTRElPIGlycSBy ZWNoZWNrIG1lY2hhbmlzbSB0byBtYWtlIHN1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