Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1408831 > unrolled thread
| Started by | Jaehoon Chung <jh80.chung@samsung.com> |
|---|---|
| First post | 2016-05-30 09:50 +0200 |
| Last post | 2016-05-31 03:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mmc: core: fix the wrong error control Jaehoon Chung <jh80.chung@samsung.com> - 2016-05-30 09:50 +0200
Re: [PATCH] mmc: core: fix the wrong error control Shawn Lin <shawn.lin@kernel-upstream.org> - 2016-05-30 11:50 +0200
Re: [PATCH] mmc: core: fix the wrong error control Jaehoon Chung <jh80.chung@samsung.com> - 2016-05-31 03:10 +0200
| From | Jaehoon Chung <jh80.chung@samsung.com> |
|---|---|
| Date | 2016-05-30 09:50 +0200 |
| Subject | [PATCH] mmc: core: fix the wrong error control |
| Message-ID | <rEq7x-1cH-35@gated-at.bofh.it> |
After applied "remove lots of IS_ERR_VALUE abuses", it shoold be
misoperation. (commit 287980e49)
If mmc_bus_test is successful, it returned the bus-witdh bit.
The below log is error log
[ 2.542260] mmc0: mmc_select_hs200 failed, error 3
[ 2.542275] mmc0: error 3 whilst initialising MMC card
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/core/mmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index c984321..aafb73d 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1276,7 +1276,7 @@ static int mmc_select_hs200(struct mmc_card *card)
* switch to HS200 mode if bus width is set successfully.
*/
err = mmc_select_bus_width(card);
- if (!err) {
+ if (err > 0) {
val = EXT_CSD_TIMING_HS200 |
card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
@@ -1583,7 +1583,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
} else if (mmc_card_hs(card)) {
/* Select the desired bus width optionally */
err = mmc_select_bus_width(card);
- if (!err) {
+ if (err > 0) {
err = mmc_select_hs_ddr(card);
if (err)
goto free_card;
--
1.9.1
[toc] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@kernel-upstream.org> |
|---|---|
| Date | 2016-05-30 11:50 +0200 |
| Message-ID | <rErZE-2oF-19@gated-at.bofh.it> |
| In reply to | #1408831 |
Hi,
在 2016/5/30 15:40, Jaehoon Chung 写道:
> After applied "remove lots of IS_ERR_VALUE abuses", it shoold be
> misoperation. (commit 287980e49)
> If mmc_bus_test is successful, it returned the bus-witdh bit.
>
> The below log is error log
> [ 2.542260] mmc0: mmc_select_hs200 failed, error 3
> [ 2.542275] mmc0: error 3 whilst initialising MMC card
>
The same as this patch[0]?
[0]https://patchwork.kernel.org/patch/9139673/
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> drivers/mmc/core/mmc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index c984321..aafb73d 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1276,7 +1276,7 @@ static int mmc_select_hs200(struct mmc_card *card)
> * switch to HS200 mode if bus width is set successfully.
> */
> err = mmc_select_bus_width(card);
> - if (!err) {
> + if (err > 0) {
> val = EXT_CSD_TIMING_HS200 |
> card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
> err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
> @@ -1583,7 +1583,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> } else if (mmc_card_hs(card)) {
> /* Select the desired bus width optionally */
> err = mmc_select_bus_width(card);
> - if (!err) {
> + if (err > 0) {
> err = mmc_select_hs_ddr(card);
> if (err)
> goto free_card;
>
[toc] | [prev] | [next] | [standalone]
| From | Jaehoon Chung <jh80.chung@samsung.com> |
|---|---|
| Date | 2016-05-31 03:10 +0200 |
| Message-ID | <rEGlY-3Nt-9@gated-at.bofh.it> |
| In reply to | #1408952 |
On 05/30/2016 06:45 PM, Shawn Lin wrote:
> Hi,
>
> 在 2016/5/30 15:40, Jaehoon Chung 写道:
>> After applied "remove lots of IS_ERR_VALUE abuses", it shoold be
>> misoperation. (commit 287980e49)
>> If mmc_bus_test is successful, it returned the bus-witdh bit.
>>
>> The below log is error log
>> [ 2.542260] mmc0: mmc_select_hs200 failed, error 3
>> [ 2.542275] mmc0: error 3 whilst initialising MMC card
>>
>
> The same as this patch[0]?
Yes, discard this patch. Thanks for noticing this.
Best Regards,
Jaehoon Chung
>
> [0]https://patchwork.kernel.org/patch/9139673/
>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> ---
>> drivers/mmc/core/mmc.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> index c984321..aafb73d 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -1276,7 +1276,7 @@ static int mmc_select_hs200(struct mmc_card *card)
>> * switch to HS200 mode if bus width is set successfully.
>> */
>> err = mmc_select_bus_width(card);
>> - if (!err) {
>> + if (err > 0) {
>> val = EXT_CSD_TIMING_HS200 |
>> card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
>> err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
>> @@ -1583,7 +1583,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>> } else if (mmc_card_hs(card)) {
>> /* Select the desired bus width optionally */
>> err = mmc_select_bus_width(card);
>> - if (!err) {
>> + if (err > 0) {
>> err = mmc_select_hs_ddr(card);
>> if (err)
>> goto free_card;
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web