From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbbCPF4V (ORCPT ); Mon, 16 Mar 2015 01:56:21 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:28593 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753129AbbCPF4Q (ORCPT ); Mon, 16 Mar 2015 01:56:16 -0400 X-AuditID: cbfee691-f79b86d000004a5a-88-5506707ea72d Message-id: <5506707D.40708@samsung.com> Date: Mon, 16 Mar 2015 14:56:13 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-version: 1.0 To: Doug Anderson Cc: Seungwon Jeon , Ulf Hansson , Alim Akhtar , Sonny Rao , Andrew Bresticker , Heiko Stuebner , Addy Ke , Alexandru Stan , Javier Martinez Canillas , "open list:ARM/Rockchip SoC..." , "linux-arm-kernel@lists.infradead.org" , Chris Ball , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mmc: dw_mmc: Consider HLE errors to be data and command errors References: <1426002490-2014-1-git-send-email-dianders@chromium.org> <5502CA4E.9060401@samsung.com> In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLIsWRmVeSWpSXmKPExsWyRsSkRLeugC3UYMEOMYuV7/8yWiz7/53J 4sG8bWwWDS8msVpMuLyd0eLssoNsFv8fvWa1OPq7wGLT42usFpd3zWGzOPK/n9Hi04P/zBZP zsxktPhw/yKzxfG14Q78HrMbLrJ4/H1+ncXjzrU9bB6bl9R73Hi1kMnj76z9LB59W1Yxemy/ No/Z4/MmuQDOKC6blNSczLLUIn27BK6Mpu7rrAV3JCq2ffnA0sB4SriLkZNDQsBE4tK2N+wQ tpjEhXvr2boYuTiEBJYyShzd/pQFpmha9wt2iMR0R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xGYT0JHY/u04mC0qECYx8eZjqHpBiR+T77GA2CICmhLPGl4y gwxlFljOKtF04ChYQlggVKLlRwfU6jWMEnfXnmMESXAKBEu07n4CZHMAdahLTJmSCxJmFpCX 2LzmLfMERoFZSHbMQqiahaRqASPzKkbR1ILkguKk9FxDveLE3OLSvHS95PzcTYzgRPJMagfj ygaLQ4wCHIxKPLwrpdhChVgTy4orcw8xSnAwK4nwsnxjDRXiTUmsrEotyo8vKs1JLT7EaAoM gYnMUqLJ+cAkl1cSb2hsYmZkaWRuaGFkbK4kzqtk3xYiJJCeWJKanZpakFoE08fEwSnVwNh/ ZdPBCyr/OC3uPj8YPHequZ+qZsmDrq9p/u3bi5LiizlTJ69dxsC6nUPW8Fus0c8LnjpdslMe /Q/5pc4WI8TIPbdl/WX9qTf+Lw8VNk889yfWtsA/4ZX6HJG2m818/qtnaJyenjvtFe+KHtEV doIbCq+eLTRVvTAxSpP5wjzj3GSvaElVBiWW4oxEQy3mouJEAOgFXrA6AwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Doug. On 03/14/2015 05:27 AM, Doug Anderson wrote: > Hi, > > On Fri, Mar 13, 2015 at 4:30 AM, Jaehoon Chung wrote: >> Hi, Doug. >> >> On 03/11/2015 12:48 AM, Doug Anderson wrote: >>> The dw_mmc driver enables HLE errors as part of DW_MCI_ERROR_FLAGS but >>> nothing in the interrupt handler actually handles them and ACKs them. >>> That means that if we ever get an HLE error we'll just keep getting >>> interrupts and we'll wedge things. >>> >>> We really don't expect HLE errors but if we ever get them we shouldn't >>> silently ignore them. >>> >>> Note that I have seen HLE errors while constantly ejecting and >>> inserting cards (ejecting while inserting, etc). >> >> Right, It is occurred when card inserting/ejecting.(This case is the case of removable card.) >> Did you test with eMMC? We needs to consider how control HLE error. > > I'm running it on systems with eMMC, SD Cards, and SDIO WiFi. HLE > doesn't show up in normal circumstances, only in ejecting the SD card > at the wrong time. ...since you can't eject eMMC, I didn't see > problems there. When card is inserting/removing, HLE is often occurred. Since there is some request into queue when card is removed.(in my understanding.) It's also related with controlling clock. > >> But I think this patch can't solve all of HLE problem. > > Agreed. HLE means that the controller is pretty wedged and (as I > understand it) means that there's something else we're doing wrong > elsewhere in the dw_mmc driver (like writing more data to an already > busy controller). We should probably track down and find those cases, > too. > > I agree also that this code probably won't fix the controller in all > cases of HLE errors. ...but I'm not 100% certain of the best way to > really do that, do you know? > > ...but in any case the absolute worst thing to do is what the driver > is already doing: unmask the HLE interrupt but never handle it > anywhere... My patch is at least better than that... Agreed, your patch should be at least better than now. But if pending is set HLE error bit, it should hit the cases of DW_MCI_DATA_ERROR_FLAGS & DW_MCI_CMD_ERROR_FLAGS. and i think send_stop_abort() can't run, doesn't? (If HLE is occurred at non-removable card, controller can't do anything.) If i can reproduce HLE error, i can check more detailedly.(Trying to reproduce it.) I don't find fully solution yet. But finding the solution is my or our(?) part/role in future. Actually, i'm using the ctrl reset at my local tree, when HLE error is occurred. (Also it's not solution..) According to TRM, "HLE is raised, software then has to reload the command." We needs to consider how reload the command without lost previous request. > > If you have another suggested way to make HLE error handling better > (or avoid them to begin with) I'm happy to test! :) I will try to find HLE error handling..if you also have other opinion, let me know, plz. I needs to listen other opinion, it's great helpful to me.. :) Thank you a lot! Best Regards, Jaehoon Chung > > > -Doug >