Message ID | 1408541960-14788-1-git-send-email-wens@csie.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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)
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 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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) > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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
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)
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(-)