freebsd-nq/sys/dev/mmc
Marius Strobl 7f6921ae18 The read accessors generated by __BUS_ACCESSOR() have the problem that
they don't check the result of BUS_READ_IVAR(9) and silently return stack
garbage on failure in case a bus doesn't implement a particular instance
variable for example. With MMC bridges not providing MMCBR_IVAR_RETUNE_REQ,
yet, this in turn can cause mmc(4) to get into a state in which re-tuning
seems to be necessary but is inappropriate, causing mmc_wait_for_request()
to fail. Thus, don't use __BUS_ACCESSOR() for mmcbr_get_retune_req() and
instead provide a version of the latter which returns retune_req_none if
reading MMCBR_IVAR_RETUNE_REQ fails.
One more straight-forward solution would have been to change mmc(4) to not
call mmcbr_get_retune_req() if the current transfer mode doesn't require
re-tuning to begin with. However, for modes such as SDR50, it depends on
the controller whether periodic re-tuning is need. Therefore, knowledge of
whether a particular transfer mode does require re-tuning should be kept
to the bridge drivers.
This change is the generic version of r338271, as intended not requiring
bridge drivers to be touched (unless transfer modes beyond high speed are
to be supported that is).

Approved by:	re (gjb)
2018-08-24 21:08:05 +00:00
..
host Fix building GENERIC-MMCCAM on arm64 2018-05-25 19:00:28 +00:00
bridge.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
mmc_ioctl.h o Add support for eMMC HS200 and HS400 bus speed modes at 200 MHz to 2017-07-23 16:11:47 +00:00
mmc_private.h o Add support for eMMC HS200 and HS400 bus speed modes at 200 MHz to 2017-07-23 16:11:47 +00:00
mmc_subr.c - Correct the remainder of confusing and error prone mix-ups between 2017-08-02 21:11:51 +00:00
mmc_subr.h - Correct the remainder of confusing and error prone mix-ups between 2017-08-02 21:11:51 +00:00
mmc.c - Use le32dec(9) for decoding EXT_CSD values where it makes sense. [1] 2018-08-23 21:26:58 +00:00
mmcbr_if.m o Add support for eMMC HS200 and HS400 bus speed modes at 200 MHz to 2017-07-23 16:11:47 +00:00
mmcbrvar.h The read accessors generated by __BUS_ACCESSOR() have the problem that 2018-08-24 21:08:05 +00:00
mmcbus_if.m - Correct the remainder of confusing and error prone mix-ups between 2017-08-02 21:11:51 +00:00
mmcreg.h - If present, take advantage of the R/W cache of eMMC revision 1.5 and 2018-05-15 21:15:09 +00:00
mmcsd.c - Use le32dec(9) for decoding EXT_CSD values where it makes sense. [1] 2018-08-23 21:26:58 +00:00
mmcvar.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00