Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411481 > unrolled thread
| Started by | Bjorn Andersson <bjorn.andersson@linaro.org> |
|---|---|
| First post | 2016-06-01 21:10 +0200 |
| Last post | 2016-06-02 10:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/3] mmc: fix mmc mode selection for HS-DDR and higher Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-06-01 21:10 +0200
Re: [PATCH 1/3] mmc: fix mmc mode selection for HS-DDR and higher Chen-Yu Tsai <wens@csie.org> - 2016-06-02 10:10 +0200
| From | Bjorn Andersson <bjorn.andersson@linaro.org> |
|---|---|
| Date | 2016-06-01 21:10 +0200 |
| Subject | Re: [PATCH 1/3] mmc: fix mmc mode selection for HS-DDR and higher |
| Message-ID | <rFjGG-41O-31@gated-at.bofh.it> |
On Sun, May 29, 2016 at 12:04 AM, Chen-Yu Tsai <wens@csie.org> wrote: > When IS_ERR_VALUE was removed from the mmc core code, it was replaced > with a simple not-zero check. This does not work, as the value checked > is the return value for mmc_select_bus_width, which returns the set > bit width on success. This made eMMC modes higher than HS-DDR unusable. > > Fix this by checking for a positive return value instead. mmc_select_bus_width() can return 0 on "success" as well and the previous check was !IS_ERR_VALUE(err), which coverts that. So I believe these checks should be for err >= 0 rather than just > 0. Either way this fixes the boot failures seen on my Qualcomm based boards with v4.7-rc1. Regards, Bjorn
[toc] | [next] | [standalone]
| From | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| Date | 2016-06-02 10:10 +0200 |
| Message-ID | <rFvRw-3oj-33@gated-at.bofh.it> |
| In reply to | #1411481 |
On Thu, Jun 2, 2016 at 2:58 AM, Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > On Sun, May 29, 2016 at 12:04 AM, Chen-Yu Tsai <wens@csie.org> wrote: >> When IS_ERR_VALUE was removed from the mmc core code, it was replaced >> with a simple not-zero check. This does not work, as the value checked >> is the return value for mmc_select_bus_width, which returns the set >> bit width on success. This made eMMC modes higher than HS-DDR unusable. >> >> Fix this by checking for a positive return value instead. > > mmc_select_bus_width() can return 0 on "success" as well and the > previous check was !IS_ERR_VALUE(err), which coverts that. So I > believe these checks should be for err >= 0 rather than just > 0. From the comments above the function: "Zero is returned instead of error value if the wide width is not supported." The documents I found, which were more vendor datasheets, only list bit widths 4 and 8 for high speed SDR/DDR and HS200. Not sure what the MMC spec actually says though, as I do not have it. Regards ChenYu > > > Either way this fixes the boot failures seen on my Qualcomm based > boards with v4.7-rc1. > > Regards, > Bjorn
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web