]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r322209
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 11 Aug 2017 00:41:43 +0000 (00:41 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 11 Aug 2017 00:41:43 +0000 (00:41 +0000)
commit749923f8d88879b881fd6809e1502cf5fa0ce2ad
tree28dde34010f269321b151985d7f274fd7d1b4d5a
parentbfedfeff334146eb73b9895a9a6053040ad58c13
MFC: r322209

- If available, use TRIM instead of ERASE for implementing BIO_DELETE.
  This also involves adding a quirk table as TRIM is broken for some
  Kingston eMMC devices, though. Compared to ERASE (declared "legacy"
  in the eMMC specification v5.1), TRIM has the advantage of operating
  on write sectors rather than on erase sectors, which typically are
  of a much larger size. Thus, employing TRIM, we don't need to fiddle
  with coalescing BIO_DELETE requests that are also of (write) sector
  units into erase sectors, which might not even add up in all cases.
- For some SanDisk iNAND devices, the CMD38 argument, e. g. ERASE,
  TRIM etc., has to be specified via EXT_CSD[113], which now is also
  handled via a quirk.
- My initial understanding was that for eMMC partitions, the granularity
  should be used as erase sector size, e. g. 128 KB for boot partitions.
  However, rereading the relevant parts of the eMMC specification v5.1,
  this isn't actually correct. So drop the code which used partition
  granularities for delmaxsize and stripesize. For the most part, this
  change is a NOP, though, because a) for ERASE, mmcsd_delete() used
  the erase sector size unconditionally for all partitions anyway and
  b) g_disk_limit() doesn't actually take the stripesize into account.
- Take some more advantage of mmcsd_errmsg() in mmcsd(4) for making
  error codes human readable.

git-svn-id: svn://svn.freebsd.org/base/stable/10@322389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/mmc/bridge.h
sys/dev/mmc/mmc.c
sys/dev/mmc/mmcreg.h
sys/dev/mmc/mmcsd.c
sys/dev/mmc/mmcvar.h