From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754890AbcFUAtl (ORCPT ); Mon, 20 Jun 2016 20:49:41 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:53901 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbcFUAtU (ORCPT ); Mon, 20 Jun 2016 20:49:20 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfee68f-f79476d000001429-16-57688c79b03d Content-transfer-encoding: 8BIT Message-id: <57688C78.1020006@samsung.com> Date: Tue, 21 Jun 2016 09:38:16 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Alex Lemberg , Shawn Lin , Ulf Hansson Cc: Adrian Hunter , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Doug Anderson , "linux-rockchip@lists.infradead.org" Subject: Re: [PATCH] mmc: core: add auto bkops support References: <1465182439-27963-1-git-send-email-shawn.lin@rock-chips.com> <7078F2B9-63B6-4170-BFA1-5AC370F0D4DD@sandisk.com> In-reply-to: <7078F2B9-63B6-4170-BFA1-5AC370F0D4DD@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsWyRsSkULeyJyPcYEOfuMXJJ2vYLG4++MFm cXbZQTaLy7vmsFkc+d/PaPHpwX9miztP1rNaHF8b7sDhMbvhIovH4j0vmTzuXNvD5rF5Sb3H 31n7WTymrTnP5PF5k1wAexSXTUpqTmZZapG+XQJXxrv1DWwFVzgrNt3/zdTAuIe9i5GTQ0LA ROLEkUvMELaYxIV769m6GLk4hARWMEosb7jKClO0/sYPVojELEaJSYvfMYEkeAUEJX5MvsfS xcjBwSwgL3HkUjaEqS4xZUouRPkDRon3v74xQ5RrSdy+Pp8NxGYRUJW48eM3I4jNJqAjsf3b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7puFcN8CRuZVjBKpBckFxUnpuYZ5qeV6xYm5xaV56XrJ +bmbGMEx/0xqB+PBXe6HGAU4GJV4eCsMM8KFWBPLiitzDzFKcDArifDadwCFeFMSK6tSi/Lj i0pzUosPMZoCPTiRWUo0OR+YjvJK4g2NTcyMLI3MDS2MjM2VxHkf/18XJiSQnliSmp2aWpBa BNPHxMEp1cC46YFalrHhNs5yntIM3c4JrSq7n91w+7QmKHyFdGx43IYN5srN5wUulHvMaaz9 yioXWJDuETOnNEBmjeFbdxPXqz3bWDXXNX65k7c0YsaCxD1vbcS+Kps1Lmzefe9WbVncwah7 j2ZxKIq0Wy5se/XvwEFBlQ3Gslsc1pos0kyOYdmVV/F8QY8SS3FGoqEWc1FxIgCkn114DwMA AA== 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 On 06/20/2016 10:33 PM, Alex Lemberg wrote: > Hi Shawn, > > […] > >>>> + >>>> +static int mmc_stop_auto_bkops(struct mmc_card *card) >>>> +{ >>>> + int err = 0; >>>> + >>>> + if (!card->ext_csd.auto_bkops_en) >>>> + return 0; >>>> + >>> >>> Shouldn’t the BKOPS_STATUS be checked prior to disabling the BKOPS activity of the device? >>> >> >> Hrmm.. I read the whole section of spec for it, and I did find this >> requirement for manul bkops but not for the auto one. So what should we >> do if using the auto one? >> > > In case of AUTO BKOPS, the eMMC Device should perform internal GC > in the same way as in case of MANUAL BKOPS. > The only difference is a host awareness. > Although there is no requirement in the spec, I think the driver can > give some time to the device to perform/complete its internal GC during the idle time. > Thus I think we can check the BKOPS_STATUS on Runtime suspend. I'm not sure we can check BKOPS_STATUS when use the AUTO_BKOPS. I have also read the SPEC, but it's not clearly for checking the BKOPS_STATUS. Just i understood that it should be operated without a host's awareness. Best Regards, Jaehoon Chung > > […] > > Thanks, > Alex >