Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756480AbdDMJXM (ORCPT ); Thu, 13 Apr 2017 05:23:12 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:59180 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751371AbdDMJXJ (ORCPT ); Thu, 13 Apr 2017 05:23:09 -0400 Date: Thu, 13 Apr 2017 17:17:59 +0800 From: Jisheng Zhang To: Adrian Hunter CC: , , , Subject: Re: [PATCH 2/2] mmc: sdhci: provide isr for card-detect interrupts Message-ID: <20170413171759.1e98aa36@xhacker> In-Reply-To: <772c085c-beba-cfe8-23ca-0c46a96145fe@intel.com> References: <20170411102056.2869-1-jszhang@marvell.com> <20170411102056.2869-3-jszhang@marvell.com> <772c085c-beba-cfe8-23ca-0c46a96145fe@intel.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-13_08:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704130078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 907 Lines: 22 On Tue, 11 Apr 2017 13:31:16 +0300 Adrian Hunter wrote: > On 11/04/17 13:20, Jisheng Zhang wrote: > > We found one issue on BG4CT platforms with GPIO for sdcar card detect > > interrupt: remove sdcard when there's read write access to the sdcard, > > sometimes the card remove event can't be handled for a long time, so > > the system still think the sdcard is still plugged in. It turns out > > that the sdhci_card_event() is missing in common slot gpio's card > > detect isr. > > ->card_event() is called by mmc_rescan(). Why is that too late? Indeed, maybe the "too late" here is not accurate. Compared with host's CD interrupt handling, the GPIO CD interrupt handling differs in when to call sdhci_card_event(): in previous case, it's called in ISR, in later it's in workqueue. Now, I agree it's not necessary to put into ISR. So let's ignore the two patches. Thanks for your review, Jisheng