History log of /dflybsd-src/sys/dev/disk/mmcsd/mmcsd.c (Results 1 – 16 of 16)
Revision Date Author Comments
# 85ccd313 21-May-2017 Imre Vadász <imre@vdsz.com>

A step to correctly handling command timeouts in the MMC layer.

- Now that properly issuing CMD6 is crucial (so data isn't written to
the wrong partition for example), make a step into the

A step to correctly handling command timeouts in the MMC layer.

- Now that properly issuing CMD6 is crucial (so data isn't written to
the wrong partition for example), make a step into the direction of
correctly handling the timeout for these commands in the MMC layer.
Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as
recommended by relevant specifications. However, quite some work is
left to be done in this regard; all other R1B-type commands done by
the MMC layer also should be followed by a SEND_STATUS (CMD13), the
erase timeout calculations/handling as documented in specifications
are entirely ignored so far, the MMC layer doesn't provide timeouts
applicable up to the bridge drivers and at least sdhci(4) currently
is hardcoding 1 s as timeout for all command types unconditionally.
Let alone already available return codes often not being checked in
the MMC layer ...

- For devices following the eMMC specification v4.41 or later, year 0
is 2013 rather than 1997; so correct this for assembling the device
ID string properly.

* This omits all the parts specific to eMMC "partitions" from the FreeBSD
change.

* Add the Intel sdhci controller ids to sdhci_pci.c to set the
SDHCI_QUIRK_WAIT_WHILE_BUSY quirk there.
This also disables DMA on apollo lake sdhci, while there and whitelists
ADMA2 on Bay Trail and Braswell sdhci controllers.

Taken-From: FreeBSD (svn r315430)

show more ...


# 4d3ae590 21-May-2017 Imre Vadász <imre@vdsz.com>

More style, comments, includes and unused params fixes for sdhci and mmc.

Taken-From: FreeBSD (svn r314811)


# 033b33dc 18-Mar-2017 Sascha Wildner <saw@online.de>

kernel/mmcsd: Add some dummy values for d_nheads and d_secpertrack.

Values taken from nvme(4). newfs_msdos(8) uses these, and the way
we call it from the installer (not specifying them explicitly) b

kernel/mmcsd: Add some dummy values for d_nheads and d_secpertrack.

Values taken from nvme(4). newfs_msdos(8) uses these, and the way
we call it from the installer (not specifying them explicitly) broke
installing to an SD card.

Reported-by: Pontus Lundkvist <p@article.se>

show more ...


# d92b8907 10-Jan-2017 Matthew Dillon <dillon@apollo.backplane.com>

mmcsd - Wasn't quite MPSAFE, fix startup race (2)

* Needed to rearrange one more thing to report capacity properly.


# e9348d8e 10-Jan-2017 Matthew Dillon <dillon@apollo.backplane.com>

mmcsd - Wasn't quite MPSAFE, fix startup race

* mmcsd was attaching the drive before finishing the softc setup. Being
MPSAFE, the system tried to probe the mmcsd before it could finish the
setu

mmcsd - Wasn't quite MPSAFE, fix startup race

* mmcsd was attaching the drive before finishing the softc setup. Being
MPSAFE, the system tried to probe the mmcsd before it could finish the
setup.

* Fixed by shifting things around a little.

show more ...


# 92aa89bf 09-Jan-2017 Imre Vadász <imre@vdsz.com>

mmcsd(4): Declare device D_MPSAFE. Move start_transaction to mmcsd thread.

* SD card commands are issued in the mmcsd thread after it takes the bio
command from the queue, so we should do the devs

mmcsd(4): Declare device D_MPSAFE. Move start_transaction to mmcsd thread.

* SD card commands are issued in the mmcsd thread after it takes the bio
command from the queue, so we should do the devstat_start_transaction()
there, instead of directly in mmcsd_strategy().

show more ...


# 1019f171 29-Oct-2016 Matthew Dillon <dillon@apollo.backplane.com>

kernel - adjust sdhc timeouts, cleanup

* Remove my retries stuff from the mmc code. Try to reduce the controller
timeout in the sdhc code.

* Remove the mplock in the mmcsd code, it isn't needed.


# fd4b9758 29-Oct-2016 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix mmcsd read/write issues

* b_resid was not being set to 0 on a successful read or write, resulting
in random short-read and short-write returns for requests. Fixing this
fixes nomin

kernel - Fix mmcsd read/write issues

* b_resid was not being set to 0 on a successful read or write, resulting
in random short-read and short-write returns for requests. Fixing this
fixes nominal block I/O via the mmcsd disk device.

* bus/mmc now uses tsleep() instead of DELAY for the 10ms pause in
request/command wait loops.

* bus/mmc reduces the TIMEOUT from 10 seconds to 1 second after the first
TIMEOUT, only increasing it back to 10 seconds when timeouts stop
occurring. This reduces boot-time delays when a mmc port is dead or
powered down.

show more ...


# 6e3e8b7c 17-Mar-2016 Imre Vadász <imre@vdsz.com>

mmcsd(4): Fix typo in disk_create() args. Allows accessing >1 SD-/MMC-card.

* sc->unit was always 0, so only mmcsd0 was accessible.


# d3c9c58e 20-Feb-2013 Sascha Wildner <saw@online.de>

kernel: Use DEVMETHOD_END in the drivers.


# 4c69c8bc 23-Jan-2012 Sascha Wildner <saw@online.de>

kernel: Use bioq_takefirst() in a few more places.


# aa2b9d05 24-Jun-2011 Sascha Wildner <saw@online.de>

kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).

This is just cosmetics for easier reading.


# c60da766 01-Dec-2010 Sascha Wildner <saw@online.de>

mmcsd(4): Enhance readability by using a variable for the buf pointer.


# cd8ab232 28-Aug-2010 Matthew Dillon <dillon@apollo.backplane.com>

kernel - unwind kthread_create() mplock

* All kthread_create*() calls and kproc_start() calls now create
threads which do not hold the mplock at startup.

* Add get_mplock()/rel_mplock() to thread

kernel - unwind kthread_create() mplock

* All kthread_create*() calls and kproc_start() calls now create
threads which do not hold the mplock at startup.

* Add get_mplock()/rel_mplock() to threads which are not yet mpsafe.

* Remove rel_mplock() calls from thread startups which were making
themselves mpsafe by releasing the mplock.

* Kernel eventhandler API is now MPSAFE

* Kernel kproc API is now MPSAFE

* Rename a few thread procedures to make their function more obvious.

show more ...


# deee3ff2 20-Apr-2010 Sascha Wildner <saw@online.de>

mmcsd(4): Add device statistics.


# d6644679 16-Apr-2010 Sascha Wildner <saw@online.de>

Bring in FreeBSD's MMC (MultiMediaCard) stack.

mmc(4) - The MMC bus
sdhci(4) - Host controller driver
mmcsd(4) - Memory card disk device driver

SD, SDHC and MMC cards should be supported (tested

Bring in FreeBSD's MMC (MultiMediaCard) stack.

mmc(4) - The MMC bus
sdhci(4) - Host controller driver
mmcsd(4) - Memory card disk device driver

SD, SDHC and MMC cards should be supported (tested with an SDHC card).

show more ...