lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1300387346-1938-1-git-send-email-sascha-ml-reply-to-2011-2@silbe.org>
Date:	Thu, 17 Mar 2011 19:42:26 +0100
From:	Sascha Silbe <sascha-ml-reply-to-2011-2@...be.org>
To:	linux-mmc@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, Chris Ball <cjb@...top.org>,
	Nicolas Pitre <nico@...xnic.net>
Subject: [PATCH] mmc: enable ERASE caps for mvsdio host

From: Sascha Silbe <sascha-pgp@...be.org>

The Marvell SDIO host controller can transmit Erase commands to the card quite
fine.

Signed-off-by: Sascha Silbe <sascha-pgp@...be.org>
---
 drivers/mmc/host/mvsdio.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Tested on OpenRD-Base using a SanDisk 4GB class 4 card (retail). The
BLKDISCARD ioctl returned immediately, no timeout issue encountered.
I had to remove and reinsert the card to read the new (i.e. erased) data, but
that's most likely either by design or a bug on a different layer.


diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index eeb1147..758251d 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -735,7 +735,8 @@ static int __init mvsd_probe(struct platform_device *pdev)

 	mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
 	mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ |
-		    MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
+		    MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
+		    MMC_CAP_ERASE;

 	mmc->f_min = DIV_ROUND_UP(host->base_clock, MVSD_BASE_DIV_MAX);
 	mmc->f_max = maxfreq;
--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ