Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Revert part of previous; the SD card spec reco...
details: https://anonhg.NetBSD.org/src/rev/788cf2668dd9
branches: trunk
changeset: 354670:788cf2668dd9
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jun 24 23:25:01 2017 +0000
description:
Revert part of previous; the SD card spec recommends not to issue a DISCARD
command to the file system area.
diffstat:
sys/dev/sdmmc/sdmmc_mem.c | 15 ++-------------
sys/dev/sdmmc/sdmmcvar.h | 3 +--
2 files changed, 3 insertions(+), 15 deletions(-)
diffs (69 lines):
diff -r f657c923d1f8 -r 788cf2668dd9 sys/dev/sdmmc/sdmmc_mem.c
--- a/sys/dev/sdmmc/sdmmc_mem.c Sat Jun 24 23:07:35 2017 +0000
+++ b/sys/dev/sdmmc/sdmmc_mem.c Sat Jun 24 23:25:01 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc_mem.c,v 1.59 2017/06/24 23:07:35 jmcneill Exp $ */
+/* $NetBSD: sdmmc_mem.c,v 1.60 2017/06/24 23:25:01 jmcneill Exp $ */
/* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -45,7 +45,7 @@
/* Routines for SD/MMC memory cards. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.59 2017/06/24 23:07:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.60 2017/06/24 23:25:01 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -1373,7 +1373,6 @@
const int uhs_speed_grade = SSR_UHS_SPEED_GRADE(ssr);
const int video_speed_class = SSR_VIDEO_SPEED_CLASS(ssr);
const int app_perf_class = SSR_APP_PERF_CLASS(ssr);
- const int discard_support = SSR_DISCARD_SUPPORT(ssr);
switch (speed_class) {
case SSR_SPEED_CLASS_0: speed_class_val = 0; break;
@@ -1406,16 +1405,8 @@
printf(", V%d", video_speed_class);
if (app_perf_class)
printf(", A%d", app_perf_class);
- if (discard_support)
- printf(", DISCARD");
printf("\n");
- /*
- * Set function flags
- */
- if (discard_support)
- SET(sf->flags, SFF_DISCARD);
-
return 0;
}
@@ -2186,8 +2177,6 @@
/* Start the erase operation */
memset(&cmd, 0, sizeof(cmd));
cmd.c_opcode = MMC_ERASE;
- if (ISSET(sf->flags, SFF_DISCARD))
- cmd.c_arg = SD_ERASE_DISCARD;
cmd.c_flags = SCF_CMD_AC | SCF_RSP_R1B;
error = sdmmc_mmc_command(sc, &cmd);
if (error)
diff -r f657c923d1f8 -r 788cf2668dd9 sys/dev/sdmmc/sdmmcvar.h
--- a/sys/dev/sdmmc/sdmmcvar.h Sat Jun 24 23:07:35 2017 +0000
+++ b/sys/dev/sdmmc/sdmmcvar.h Sat Jun 24 23:25:01 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmcvar.h,v 1.26 2017/06/24 23:07:35 jmcneill Exp $ */
+/* $NetBSD: sdmmcvar.h,v 1.27 2017/06/24 23:25:01 jmcneill Exp $ */
/* $OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -185,7 +185,6 @@
int flags;
#define SFF_ERROR 0x0001 /* function is poo; ignore it */
#define SFF_SDHC 0x0002 /* SD High Capacity card */
-#define SFF_DISCARD 0x0004 /* SD card supports discard erase */
SIMPLEQ_ENTRY(sdmmc_function) sf_list;
/* SD card I/O function members */
int number; /* I/O function number or -1 */
Home |
Main Index |
Thread Index |
Old Index