All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sunxi: Declare ERASE capability
@ 2014-08-20 13:39 ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2014-08-20 13:39 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Maxime Ripard
  Cc: david.lanzendoerfer, Hans de Goede, Chen-Yu Tsai, linux-mmc,
	linux-arm-kernel

Declare ERASE capability so we can use filesystems with the discard
option and the fstrim tool.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/mmc/host/sunxi-mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 024f67c..7bf5c1c 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
 	/* 400kHz ~ 50MHz */
 	mmc->f_min		=   400000;
 	mmc->f_max		= 50000000;
-	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
+	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
+				  MMC_CAP_ERASE;
 
 	ret = mmc_of_parse(mmc);
 	if (ret)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] mmc: sunxi: Declare ERASE capability
@ 2014-08-20 13:39 ` Chen-Yu Tsai
  0 siblings, 0 replies; 12+ messages in thread
From: Chen-Yu Tsai @ 2014-08-20 13:39 UTC (permalink / raw)
  To: linux-arm-kernel

Declare ERASE capability so we can use filesystems with the discard
option and the fstrim tool.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/mmc/host/sunxi-mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 024f67c..7bf5c1c 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
 	/* 400kHz ~ 50MHz */
 	mmc->f_min		=   400000;
 	mmc->f_max		= 50000000;
-	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
+	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
+				  MMC_CAP_ERASE;
 
 	ret = mmc_of_parse(mmc);
 	if (ret)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] mmc: sunxi: Declare ERASE capability
  2014-08-20 13:39 ` Chen-Yu Tsai
@ 2014-08-20 14:10   ` David Lanzendörfer
  -1 siblings, 0 replies; 12+ messages in thread
From: David Lanzendörfer @ 2014-08-20 14:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Ulf Hansson, linux-mmc, Chris Ball, Hans de Goede, Maxime Ripard,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1210 bytes --]

Hi
> Declare ERASE capability so we can use filesystems with the discard
> option and the fstrim tool.
I totally agree with you that information about such capabilities should be
exposed but maybe it would be wiser to use DT instead of hardcoding it?
I mean a WiFi device won't support erase functionality...
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-October/068210.html

> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  drivers/mmc/host/sunxi-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 024f67c..7bf5c1c 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
> /* 400kHz ~ 50MHz */
>  	mmc->f_min		=   400000;
>  	mmc->f_max		= 50000000;
> -	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
> +	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
> +				  MMC_CAP_ERASE;
> 
>  	ret = mmc_of_parse(mmc);
>  	if (ret)

-- 
David Lanzendörfer
OpenSourceSupport GmbH
System engineer and supporter
http://www.o2s.ch/

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] mmc: sunxi: Declare ERASE capability
@ 2014-08-20 14:10   ` David Lanzendörfer
  0 siblings, 0 replies; 12+ messages in thread
From: David Lanzendörfer @ 2014-08-20 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi
> Declare ERASE capability so we can use filesystems with the discard
> option and the fstrim tool.
I totally agree with you that information about such capabilities should be
exposed but maybe it would be wiser to use DT instead of hardcoding it?
I mean a WiFi device won't support erase functionality...
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-October/068210.html

> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  drivers/mmc/host/sunxi-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 024f67c..7bf5c1c 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
> /* 400kHz ~ 50MHz */
>  	mmc->f_min		=   400000;
>  	mmc->f_max		= 50000000;
> -	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
> +	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
> +				  MMC_CAP_ERASE;
> 
>  	ret = mmc_of_parse(mmc);
>  	if (ret)

-- 
David Lanzend?rfer
OpenSourceSupport GmbH
System engineer and supporter
http://www.o2s.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140820/f6b553d1/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mmc: sunxi: Declare ERASE capability
  2014-08-20 14:10   ` David Lanzendörfer
@ 2014-08-20 14:20     ` Ulf Hansson
  -1 siblings, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2014-08-20 14:20 UTC (permalink / raw)
  To: David Lanzendörfer
  Cc: Chen-Yu Tsai, Chris Ball, Maxime Ripard, linux-mmc,
	linux-arm-kernel, Hans de Goede

On 20 August 2014 16:10, David Lanzendörfer <david.lanzendoerfer@o2s.ch> wrote:
> Hi
>> Declare ERASE capability so we can use filesystems with the discard
>> option and the fstrim tool.
> I totally agree with you that information about such capabilities should be
> exposed but maybe it would be wiser to use DT instead of hardcoding it?

Nope, this is pure software support. No HW config.

What we should do future wise, is to remove the MMC_CAP_ERASE
entirely. Due to current existing bugs, mainly in mmc core layer
regarding erase, we can't do it yet.

> I mean a WiFi device won't support erase functionality...

That's already covered by the mmc core layer. No worries.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] mmc: sunxi: Declare ERASE capability
@ 2014-08-20 14:20     ` Ulf Hansson
  0 siblings, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2014-08-20 14:20 UTC (permalink / raw)
  To: linux-arm-kernel

On 20 August 2014 16:10, David Lanzend?rfer <david.lanzendoerfer@o2s.ch> wrote:
> Hi
>> Declare ERASE capability so we can use filesystems with the discard
>> option and the fstrim tool.
> I totally agree with you that information about such capabilities should be
> exposed but maybe it would be wiser to use DT instead of hardcoding it?

Nope, this is pure software support. No HW config.

What we should do future wise, is to remove the MMC_CAP_ERASE
entirely. Due to current existing bugs, mainly in mmc core layer
regarding erase, we can't do it yet.

> I mean a WiFi device won't support erase functionality...

That's already covered by the mmc core layer. No worries.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mmc: sunxi: Declare ERASE capability
  2014-08-20 13:39 ` Chen-Yu Tsai
@ 2014-08-23 14:11   ` Hans de Goede
  -1 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2014-08-23 14:11 UTC (permalink / raw)
  To: Chen-Yu Tsai, Chris Ball, Ulf Hansson, Maxime Ripard
  Cc: linux-mmc, linux-arm-kernel, david.lanzendoerfer

Hi,

On 08/20/2014 03:39 PM, Chen-Yu Tsai wrote:
> Declare ERASE capability so we can use filesystems with the discard
> option and the fstrim tool.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Good one:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans

> ---
>  drivers/mmc/host/sunxi-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 024f67c..7bf5c1c 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
>  	/* 400kHz ~ 50MHz */
>  	mmc->f_min		=   400000;
>  	mmc->f_max		= 50000000;
> -	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
> +	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
> +				  MMC_CAP_ERASE;
>  
>  	ret = mmc_of_parse(mmc);
>  	if (ret)
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] mmc: sunxi: Declare ERASE capability
@ 2014-08-23 14:11   ` Hans de Goede
  0 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2014-08-23 14:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 08/20/2014 03:39 PM, Chen-Yu Tsai wrote:
> Declare ERASE capability so we can use filesystems with the discard
> option and the fstrim tool.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Good one:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans

> ---
>  drivers/mmc/host/sunxi-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 024f67c..7bf5c1c 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
>  	/* 400kHz ~ 50MHz */
>  	mmc->f_min		=   400000;
>  	mmc->f_max		= 50000000;
> -	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
> +	mmc->caps	       |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
> +				  MMC_CAP_ERASE;
>  
>  	ret = mmc_of_parse(mmc);
>  	if (ret)
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mmc: sunxi: Declare ERASE capability
  2014-08-20 13:39 ` Chen-Yu Tsai
@ 2014-08-29 11:10   ` Ulf Hansson
  -1 siblings, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2014-08-29 11:10 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Chris Ball, Maxime Ripard, linux-mmc, linux-arm-kernel,
	Hans de Goede, David Lanzendörfer

On 20 August 2014 15:39, Chen-Yu Tsai <wens@csie.org> wrote:
> Declare ERASE capability so we can use filesystems with the discard
> option and the fstrim tool.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Thanks! Applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sunxi-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 024f67c..7bf5c1c 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
>         /* 400kHz ~ 50MHz */
>         mmc->f_min              =   400000;
>         mmc->f_max              = 50000000;
> -       mmc->caps              |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
> +       mmc->caps              |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
> +                                 MMC_CAP_ERASE;
>
>         ret = mmc_of_parse(mmc);
>         if (ret)
> --
> 2.1.0
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] mmc: sunxi: Declare ERASE capability
@ 2014-08-29 11:10   ` Ulf Hansson
  0 siblings, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2014-08-29 11:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 20 August 2014 15:39, Chen-Yu Tsai <wens@csie.org> wrote:
> Declare ERASE capability so we can use filesystems with the discard
> option and the fstrim tool.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Thanks! Applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sunxi-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 024f67c..7bf5c1c 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
>         /* 400kHz ~ 50MHz */
>         mmc->f_min              =   400000;
>         mmc->f_max              = 50000000;
> -       mmc->caps              |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
> +       mmc->caps              |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
> +                                 MMC_CAP_ERASE;
>
>         ret = mmc_of_parse(mmc);
>         if (ret)
> --
> 2.1.0
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mmc: sunxi: Declare ERASE capability
  2014-08-20 14:20     ` Ulf Hansson
@ 2014-08-29 23:16       ` David Lanzendörfer
  -1 siblings, 0 replies; 12+ messages in thread
From: David Lanzendörfer @ 2014-08-29 23:16 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Chen-Yu Tsai, Chris Ball, Maxime Ripard, linux-mmc,
	linux-arm-kernel, Hans de Goede

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

Hi
> > I totally agree with you that information about such capabilities should
> > be
> > exposed but maybe it would be wiser to use DT instead of hardcoding it?
> 
> Nope, this is pure software support. No HW config.
Okey!
> What we should do future wise, is to remove the MMC_CAP_ERASE
> entirely. Due to current existing bugs, mainly in mmc core layer
> regarding erase, we can't do it yet.
I see.
> > I mean a WiFi device won't support erase functionality...
> 
> That's already covered by the mmc core layer. No worries.
Splendid!
Ok then. Let's have it in our driver so far until we can get rid of this flag
for good.

cheers
-- 
David Lanzendörfer
OpenSourceSupport GmbH
System engineer and supporter
http://www.o2s.ch/

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] mmc: sunxi: Declare ERASE capability
@ 2014-08-29 23:16       ` David Lanzendörfer
  0 siblings, 0 replies; 12+ messages in thread
From: David Lanzendörfer @ 2014-08-29 23:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi
> > I totally agree with you that information about such capabilities should
> > be
> > exposed but maybe it would be wiser to use DT instead of hardcoding it?
> 
> Nope, this is pure software support. No HW config.
Okey!
> What we should do future wise, is to remove the MMC_CAP_ERASE
> entirely. Due to current existing bugs, mainly in mmc core layer
> regarding erase, we can't do it yet.
I see.
> > I mean a WiFi device won't support erase functionality...
> 
> That's already covered by the mmc core layer. No worries.
Splendid!
Ok then. Let's have it in our driver so far until we can get rid of this flag
for good.

cheers
-- 
David Lanzend?rfer
OpenSourceSupport GmbH
System engineer and supporter
http://www.o2s.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140830/239fdd5a/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-08-29 23:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 13:39 [PATCH] mmc: sunxi: Declare ERASE capability Chen-Yu Tsai
2014-08-20 13:39 ` Chen-Yu Tsai
2014-08-20 14:10 ` David Lanzendörfer
2014-08-20 14:10   ` David Lanzendörfer
2014-08-20 14:20   ` Ulf Hansson
2014-08-20 14:20     ` Ulf Hansson
2014-08-29 23:16     ` David Lanzendörfer
2014-08-29 23:16       ` David Lanzendörfer
2014-08-23 14:11 ` Hans de Goede
2014-08-23 14:11   ` Hans de Goede
2014-08-29 11:10 ` Ulf Hansson
2014-08-29 11:10   ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.