Re: [PATCH] mmc: core: add auto bkops support

2016-06-27 Thread Alex Lemberg
Hi Ulf and Adrian, On 6/27/16, 12:08 PM, "Ulf Hansson" wrote: >[...] > If I am not wrong, in current implementation of runtime suspend, the driver stops BKOPS (send HPI) just before sending sleep command, see _mmc_suspend(), depends on

Re: [PATCH] mmc: core: add auto bkops support

2016-06-27 Thread Alex Lemberg
Hi Ulf and Adrian, On 6/27/16, 12:08 PM, "Ulf Hansson" wrote: >[...] > If I am not wrong, in current implementation of runtime suspend, the driver stops BKOPS (send HPI) just before sending sleep command, see _mmc_suspend(), depends on “MMC_CAP_AGGRESSIVE_PM” flag. In this

Re: [PATCH] mmc: core: add auto bkops support

2016-06-27 Thread Ulf Hansson
[...] >>> If I am not wrong, in current implementation of runtime suspend, >>> the driver stops BKOPS (send HPI) just before sending sleep command, >>> see _mmc_suspend(), depends on “MMC_CAP_AGGRESSIVE_PM” flag. >>> In this case, the eMMC device will not have enough time to perform internal >>>

Re: [PATCH] mmc: core: add auto bkops support

2016-06-27 Thread Ulf Hansson
[...] >>> If I am not wrong, in current implementation of runtime suspend, >>> the driver stops BKOPS (send HPI) just before sending sleep command, >>> see _mmc_suspend(), depends on “MMC_CAP_AGGRESSIVE_PM” flag. >>> In this case, the eMMC device will not have enough time to perform internal >>>

Re: [PATCH] mmc: core: add auto bkops support

2016-06-27 Thread Ulf Hansson
[...] one possible way is to control it by mmc-utils on user space? So we should add a cmd for mmc-utils there? >>> >>> >>> That would be consistent with manual bkops. >>> >> >>> From my first impression I agree, as that is the policy we have been >> >> sticking to when writing to

Re: [PATCH] mmc: core: add auto bkops support

2016-06-27 Thread Ulf Hansson
[...] one possible way is to control it by mmc-utils on user space? So we should add a cmd for mmc-utils there? >>> >>> >>> That would be consistent with manual bkops. >>> >> >>> From my first impression I agree, as that is the policy we have been >> >> sticking to when writing to

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Adrian Hunter
On 23/06/16 04:33, Shawn Lin wrote: > 在 2016/6/22 22:08, Alex Lemberg 写道: >> HI Shawn, >> >> On 6/21/16, 4:44 AM, "Shawn Lin" wrote: >> >>> On 2016/6/20 21:33, Alex Lemberg wrote: Hi Shawn, […] >>> + >>> +static int mmc_stop_auto_bkops(struct

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Adrian Hunter
On 23/06/16 04:33, Shawn Lin wrote: > 在 2016/6/22 22:08, Alex Lemberg 写道: >> HI Shawn, >> >> On 6/21/16, 4:44 AM, "Shawn Lin" wrote: >> >>> On 2016/6/20 21:33, Alex Lemberg wrote: Hi Shawn, […] >>> + >>> +static int mmc_stop_auto_bkops(struct mmc_card *card) >>> +{

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Shawn Lin
在 2016/6/22 18:21, Ulf Hansson 写道: On 13 June 2016 at 14:25, Adrian Hunter wrote: On 13/06/16 11:58, Shawn Lin wrote: 在 2016/6/13 16:17, Adrian Hunter 写道: On 13/06/16 10:48, Shawn Lin wrote: On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Shawn Lin
在 2016/6/22 18:21, Ulf Hansson 写道: On 13 June 2016 at 14:25, Adrian Hunter wrote: On 13/06/16 11:58, Shawn Lin wrote: 在 2016/6/13 16:17, Adrian Hunter 写道: On 13/06/16 10:48, Shawn Lin wrote: On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin wrote: JEDEC eMMC v5.1

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Shawn Lin
在 2016/6/22 22:08, Alex Lemberg 写道: HI Shawn, On 6/21/16, 4:44 AM, "Shawn Lin" wrote: On 2016/6/20 21:33, Alex Lemberg wrote: Hi Shawn, […] + +static int mmc_stop_auto_bkops(struct mmc_card *card) +{ + int err = 0; + + if

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Shawn Lin
在 2016/6/22 22:08, Alex Lemberg 写道: HI Shawn, On 6/21/16, 4:44 AM, "Shawn Lin" wrote: On 2016/6/20 21:33, 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

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Ulf Hansson
[...] >>> >From my first impression I agree, as that is the policy we have been sticking to when writing to persistent EXT_CSD registers. Although, in this case, I am actually wondering on what is the best approach. Is there really ever a case when we don't want auto BKOPS

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Ulf Hansson
[...] >>> >From my first impression I agree, as that is the policy we have been sticking to when writing to persistent EXT_CSD registers. Although, in this case, I am actually wondering on what is the best approach. Is there really ever a case when we don't want auto BKOPS

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Alex Lemberg
On 6/22/16, 5:28 PM, "Ulf Hansson" wrote: >On 22 June 2016 at 16:20, Alex Lemberg wrote: >> >> >> On 6/22/16, 1:21 PM, "Ulf Hansson" wrote: >> >>>On 13 June 2016 at 14:25, Adrian Hunter wrote:

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Alex Lemberg
On 6/22/16, 5:28 PM, "Ulf Hansson" wrote: >On 22 June 2016 at 16:20, Alex Lemberg wrote: >> >> >> On 6/22/16, 1:21 PM, "Ulf Hansson" wrote: >> >>>On 13 June 2016 at 14:25, Adrian Hunter wrote: On 13/06/16 11:58, Shawn Lin wrote: > 在 2016/6/13 16:17, Adrian Hunter 写道: >> On

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Ulf Hansson
On 22 June 2016 at 16:20, Alex Lemberg wrote: > > > On 6/22/16, 1:21 PM, "Ulf Hansson" wrote: > >>On 13 June 2016 at 14:25, Adrian Hunter wrote: >>> On 13/06/16 11:58, Shawn Lin wrote: 在 2016/6/13 16:17, Adrian

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Ulf Hansson
On 22 June 2016 at 16:20, Alex Lemberg wrote: > > > On 6/22/16, 1:21 PM, "Ulf Hansson" wrote: > >>On 13 June 2016 at 14:25, Adrian Hunter wrote: >>> On 13/06/16 11:58, Shawn Lin wrote: 在 2016/6/13 16:17, Adrian Hunter 写道: > On 13/06/16 10:48, Shawn Lin wrote: >> On 2016/6/13 14:29,

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Alex Lemberg
On 6/22/16, 1:21 PM, "Ulf Hansson" wrote: >On 13 June 2016 at 14:25, Adrian Hunter wrote: >> On 13/06/16 11:58, Shawn Lin wrote: >>> 在 2016/6/13 16:17, Adrian Hunter 写道: On 13/06/16 10:48, Shawn Lin wrote: > On 2016/6/13 14:29, Adrian

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Alex Lemberg
On 6/22/16, 1:21 PM, "Ulf Hansson" wrote: >On 13 June 2016 at 14:25, Adrian Hunter wrote: >> On 13/06/16 11:58, Shawn Lin wrote: >>> 在 2016/6/13 16:17, Adrian Hunter 写道: On 13/06/16 10:48, Shawn Lin wrote: > On 2016/6/13 14:29, Adrian Hunter wrote: >> On 06/06/16 06:07, Shawn Lin

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Alex Lemberg
HI Shawn, On 6/21/16, 4:44 AM, "Shawn Lin" wrote: >On 2016/6/20 21:33, 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)

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Alex Lemberg
HI Shawn, On 6/21/16, 4:44 AM, "Shawn Lin" wrote: >On 2016/6/20 21:33, 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;

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Ulf Hansson
On 13 June 2016 at 14:25, Adrian Hunter wrote: > On 13/06/16 11:58, Shawn Lin wrote: >> 在 2016/6/13 16:17, Adrian Hunter 写道: >>> On 13/06/16 10:48, Shawn Lin wrote: On 2016/6/13 14:29, Adrian Hunter wrote: > On 06/06/16 06:07, Shawn Lin wrote: >> JEDEC eMMC

Re: [PATCH] mmc: core: add auto bkops support

2016-06-22 Thread Ulf Hansson
On 13 June 2016 at 14:25, Adrian Hunter wrote: > On 13/06/16 11:58, Shawn Lin wrote: >> 在 2016/6/13 16:17, Adrian Hunter 写道: >>> On 13/06/16 10:48, Shawn Lin wrote: On 2016/6/13 14:29, Adrian Hunter wrote: > On 06/06/16 06:07, Shawn Lin wrote: >> JEDEC eMMC v5.1 introduce an

Re: [PATCH] mmc: core: add auto bkops support

2016-06-20 Thread Shawn Lin
On 2016/6/20 21:33, 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

Re: [PATCH] mmc: core: add auto bkops support

2016-06-20 Thread Shawn Lin
On 2016/6/20 21:33, 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

Re: [PATCH] mmc: core: add auto bkops support

2016-06-20 Thread Jaehoon Chung
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

Re: [PATCH] mmc: core: add auto bkops support

2016-06-20 Thread Jaehoon Chung
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

Re: [PATCH] mmc: core: add auto bkops support

2016-06-20 Thread Alex Lemberg
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? >> >

Re: [PATCH] mmc: core: add auto bkops support

2016-06-20 Thread Alex Lemberg
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? >> >

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Adrian Hunter
On 13/06/16 11:58, Shawn Lin wrote: > 在 2016/6/13 16:17, Adrian Hunter 写道: >> On 13/06/16 10:48, Shawn Lin wrote: >>> On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin wrote: > JEDEC eMMC v5.1 introduce an autonomously initiated method > for background operations.

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Adrian Hunter
On 13/06/16 11:58, Shawn Lin wrote: > 在 2016/6/13 16:17, Adrian Hunter 写道: >> On 13/06/16 10:48, Shawn Lin wrote: >>> On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin wrote: > JEDEC eMMC v5.1 introduce an autonomously initiated method > for background operations.

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Shawn Lin
在 2016/6/13 16:17, Adrian Hunter 写道: On 13/06/16 10:48, Shawn Lin wrote: On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin wrote: JEDEC eMMC v5.1 introduce an autonomously initiated method for background operations. Host that wants to enable the device to perform

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Shawn Lin
在 2016/6/13 16:17, Adrian Hunter 写道: On 13/06/16 10:48, Shawn Lin wrote: On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin wrote: JEDEC eMMC v5.1 introduce an autonomously initiated method for background operations. Host that wants to enable the device to perform

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Adrian Hunter
On 13/06/16 10:48, Shawn Lin wrote: > On 2016/6/13 14:29, Adrian Hunter wrote: >> On 06/06/16 06:07, Shawn Lin wrote: >>> JEDEC eMMC v5.1 introduce an autonomously initiated method >>> for background operations. >>> >>> Host that wants to enable the device to perform background >>> operations

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Adrian Hunter
On 13/06/16 10:48, Shawn Lin wrote: > On 2016/6/13 14:29, Adrian Hunter wrote: >> On 06/06/16 06:07, Shawn Lin wrote: >>> JEDEC eMMC v5.1 introduce an autonomously initiated method >>> for background operations. >>> >>> Host that wants to enable the device to perform background >>> operations

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Shawn Lin
On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin wrote: JEDEC eMMC v5.1 introduce an autonomously initiated method for background operations. Host that wants to enable the device to perform background operations during device idle time, should signal the device by setting

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Shawn Lin
On 2016/6/13 14:29, Adrian Hunter wrote: On 06/06/16 06:07, Shawn Lin wrote: JEDEC eMMC v5.1 introduce an autonomously initiated method for background operations. Host that wants to enable the device to perform background operations during device idle time, should signal the device by setting

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Adrian Hunter
On 06/06/16 06:07, Shawn Lin wrote: > JEDEC eMMC v5.1 introduce an autonomously initiated method > for background operations. > > Host that wants to enable the device to perform background > operations during device idle time, should signal the device > by setting AUTO_EN in BKOPS_EN field

Re: [PATCH] mmc: core: add auto bkops support

2016-06-13 Thread Adrian Hunter
On 06/06/16 06:07, Shawn Lin wrote: > JEDEC eMMC v5.1 introduce an autonomously initiated method > for background operations. > > Host that wants to enable the device to perform background > operations during device idle time, should signal the device > by setting AUTO_EN in BKOPS_EN field

Re: [PATCH] mmc: core: add auto bkops support

2016-06-11 Thread Shawn Lin
Hi Alex, On 2016/6/8 22:46, Alex Lemberg wrote: Hi Shawn, Is the intention in this patch to stop using MANUAL_BKOPS for all eMMC5.1+ devices, and only use AUTO_BKOPS? Please see several questions inline. Yup, my intention is to use auto bkops for emmc 5.1+ if possible. On 6/6/16, 6:07

Re: [PATCH] mmc: core: add auto bkops support

2016-06-11 Thread Shawn Lin
Hi Alex, On 2016/6/8 22:46, Alex Lemberg wrote: Hi Shawn, Is the intention in this patch to stop using MANUAL_BKOPS for all eMMC5.1+ devices, and only use AUTO_BKOPS? Please see several questions inline. Yup, my intention is to use auto bkops for emmc 5.1+ if possible. On 6/6/16, 6:07

Re: [PATCH] mmc: core: add auto bkops support

2016-06-08 Thread Alex Lemberg
Hi Shawn, Is the intention in this patch to stop using MANUAL_BKOPS for all eMMC5.1+ devices, and only use AUTO_BKOPS? Please see several questions inline. On 6/6/16, 6:07 AM, "linux-mmc-ow...@vger.kernel.org on behalf of Shawn Lin"

Re: [PATCH] mmc: core: add auto bkops support

2016-06-08 Thread Alex Lemberg
Hi Shawn, Is the intention in this patch to stop using MANUAL_BKOPS for all eMMC5.1+ devices, and only use AUTO_BKOPS? Please see several questions inline. On 6/6/16, 6:07 AM, "linux-mmc-ow...@vger.kernel.org on behalf of Shawn Lin" wrote: >JEDEC eMMC v5.1 introduce an autonomously

[PATCH] mmc: core: add auto bkops support

2016-06-05 Thread Shawn Lin
JEDEC eMMC v5.1 introduce an autonomously initiated method for background operations. Host that wants to enable the device to perform background operations during device idle time, should signal the device by setting AUTO_EN in BKOPS_EN field EXT_CSD[163] to 1b. When this bit is set, the device

[PATCH] mmc: core: add auto bkops support

2016-06-05 Thread Shawn Lin
JEDEC eMMC v5.1 introduce an autonomously initiated method for background operations. Host that wants to enable the device to perform background operations during device idle time, should signal the device by setting AUTO_EN in BKOPS_EN field EXT_CSD[163] to 1b. When this bit is set, the device