* [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC
@ 2012-02-20 2:01 Seungwon Jeon
2012-02-20 5:59 ` Namjae Jeon
[not found] ` <CAAG0J9-wRLj29=LztT4Ppi7q6Q=4dm29vHODk9KdVAGWKMJgUw@mail.gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Seungwon Jeon @ 2012-02-20 2:01 UTC (permalink / raw)
To: 'linux-mmc'
Cc: 'Chris Ball', 'James Hogan',
'Will Newton'
dw_mci_pre_dma_transfer() is valid only if internal DMA. In case of
using other DMA it returns -ENOSYS. It prevents the DMA operations.
This patch makes dw_mci_pre_dma_transfer() effective in all DMA case.
Reported-by: James Hogan <james@albanarts.com>
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 692c3ba..bf3c9b4 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -429,6 +429,15 @@ static int dw_mci_idmac_init(struct dw_mci *host)
return 0;
}
+static struct dw_mci_dma_ops dw_mci_idmac_ops = {
+ .init = dw_mci_idmac_init,
+ .start = dw_mci_idmac_start_dma,
+ .stop = dw_mci_idmac_stop_dma,
+ .complete = dw_mci_idmac_complete_dma,
+ .cleanup = dw_mci_dma_cleanup,
+};
+#endif /* CONFIG_MMC_DW_IDMAC */
+
static int dw_mci_pre_dma_transfer(struct dw_mci *host,
struct mmc_data *data,
bool next)
@@ -468,22 +477,6 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host,
return sg_len;
}
-static struct dw_mci_dma_ops dw_mci_idmac_ops = {
- .init = dw_mci_idmac_init,
- .start = dw_mci_idmac_start_dma,
- .stop = dw_mci_idmac_stop_dma,
- .complete = dw_mci_idmac_complete_dma,
- .cleanup = dw_mci_dma_cleanup,
-};
-#else
-static int dw_mci_pre_dma_transfer(struct dw_mci *host,
- struct mmc_data *data,
- bool next)
-{
- return -ENOSYS;
-}
-#endif /* CONFIG_MMC_DW_IDMAC */
-
static void dw_mci_pre_req(struct mmc_host *mmc,
struct mmc_request *mrq,
bool is_first_req)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC
2012-02-20 2:01 [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC Seungwon Jeon
@ 2012-02-20 5:59 ` Namjae Jeon
[not found] ` <CAAG0J9-wRLj29=LztT4Ppi7q6Q=4dm29vHODk9KdVAGWKMJgUw@mail.gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Namjae Jeon @ 2012-02-20 5:59 UTC (permalink / raw)
To: Seungwon Jeon; +Cc: linux-mmc, Chris Ball, James Hogan, Will Newton
2012/2/20 Seungwon Jeon <tgih.jun@samsung.com>:
> dw_mci_pre_dma_transfer() is valid only if internal DMA. In case of
> using other DMA it returns -ENOSYS. It prevents the DMA operations.
> This patch makes dw_mci_pre_dma_transfer() effective in all DMA case.
>
> Reported-by: James Hogan <james@albanarts.com>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Hi. Seungwon.
This patch make sense.
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
> ---
> drivers/mmc/host/dw_mmc.c | 25 +++++++++----------------
> 1 files changed, 9 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 692c3ba..bf3c9b4 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -429,6 +429,15 @@ static int dw_mci_idmac_init(struct dw_mci *host)
> return 0;
> }
>
> +static struct dw_mci_dma_ops dw_mci_idmac_ops = {
> + .init = dw_mci_idmac_init,
> + .start = dw_mci_idmac_start_dma,
> + .stop = dw_mci_idmac_stop_dma,
> + .complete = dw_mci_idmac_complete_dma,
> + .cleanup = dw_mci_dma_cleanup,
> +};
> +#endif /* CONFIG_MMC_DW_IDMAC */
> +
> static int dw_mci_pre_dma_transfer(struct dw_mci *host,
> struct mmc_data *data,
> bool next)
> @@ -468,22 +477,6 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host,
> return sg_len;
> }
>
> -static struct dw_mci_dma_ops dw_mci_idmac_ops = {
> - .init = dw_mci_idmac_init,
> - .start = dw_mci_idmac_start_dma,
> - .stop = dw_mci_idmac_stop_dma,
> - .complete = dw_mci_idmac_complete_dma,
> - .cleanup = dw_mci_dma_cleanup,
> -};
> -#else
> -static int dw_mci_pre_dma_transfer(struct dw_mci *host,
> - struct mmc_data *data,
> - bool next)
> -{
> - return -ENOSYS;
> -}
> -#endif /* CONFIG_MMC_DW_IDMAC */
> -
> static void dw_mci_pre_req(struct mmc_host *mmc,
> struct mmc_request *mrq,
> bool is_first_req)
> --
> 1.7.0.4
>
>
> --
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC
[not found] ` <CAAG0J9-wRLj29=LztT4Ppi7q6Q=4dm29vHODk9KdVAGWKMJgUw@mail.gmail.com>
@ 2012-02-20 12:10 ` James Hogan
2012-02-20 17:07 ` Chris Ball
0 siblings, 1 reply; 4+ messages in thread
From: James Hogan @ 2012-02-20 12:10 UTC (permalink / raw)
To: Seungwon Jeon; +Cc: linux-mmc, Chris Ball, James Hogan, Will Newton
Hi,
On 20/02/12 12:03, Seungwon Jeon wrote:
> dw_mci_pre_dma_transfer() is valid only if internal DMA. In case of
> using other DMA it returns -ENOSYS. It prevents the DMA operations.
> This patch makes dw_mci_pre_dma_transfer() effective in all DMA case.
>
> Reported-by: James Hogan <james@albanarts.com>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
I've tested, and this seems to work for me (no IDMAC) as long as your
other patch is applied first of course ("fixed compile error when
disable CONFIG_MMC_DW_IDMAC").
Probably worth fixing the typo in the subject too (s/disableing/disabling/).
Otherwise, Acked-by: James Hogan <james.hogan@imgtec.com>
Thanks
James
> ---
> drivers/mmc/host/dw_mmc.c | 25 +++++++++----------------
> 1 files changed, 9 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 692c3ba..bf3c9b4 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -429,6 +429,15 @@ static int dw_mci_idmac_init(struct dw_mci *host)
> return 0;
> }
>
> +static struct dw_mci_dma_ops dw_mci_idmac_ops = {
> + .init = dw_mci_idmac_init,
> + .start = dw_mci_idmac_start_dma,
> + .stop = dw_mci_idmac_stop_dma,
> + .complete = dw_mci_idmac_complete_dma,
> + .cleanup = dw_mci_dma_cleanup,
> +};
> +#endif /* CONFIG_MMC_DW_IDMAC */
> +
> static int dw_mci_pre_dma_transfer(struct dw_mci *host,
> struct mmc_data *data,
> bool next)
> @@ -468,22 +477,6 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host,
> return sg_len;
> }
>
> -static struct dw_mci_dma_ops dw_mci_idmac_ops = {
> - .init = dw_mci_idmac_init,
> - .start = dw_mci_idmac_start_dma,
> - .stop = dw_mci_idmac_stop_dma,
> - .complete = dw_mci_idmac_complete_dma,
> - .cleanup = dw_mci_dma_cleanup,
> -};
> -#else
> -static int dw_mci_pre_dma_transfer(struct dw_mci *host,
> - struct mmc_data *data,
> - bool next)
> -{
> - return -ENOSYS;
> -}
> -#endif /* CONFIG_MMC_DW_IDMAC */
> -
> static void dw_mci_pre_req(struct mmc_host *mmc,
> struct mmc_request *mrq,
> bool is_first_req)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC
2012-02-20 12:10 ` James Hogan
@ 2012-02-20 17:07 ` Chris Ball
0 siblings, 0 replies; 4+ messages in thread
From: Chris Ball @ 2012-02-20 17:07 UTC (permalink / raw)
To: James Hogan; +Cc: Seungwon Jeon, linux-mmc, James Hogan, Will Newton
Hi,
On Mon, Feb 20 2012, James Hogan wrote:
> Hi,
>
> On 20/02/12 12:03, Seungwon Jeon wrote:
>> dw_mci_pre_dma_transfer() is valid only if internal DMA. In case of
>> using other DMA it returns -ENOSYS. It prevents the DMA operations.
>> This patch makes dw_mci_pre_dma_transfer() effective in all DMA case.
>>
>> Reported-by: James Hogan <james@albanarts.com>
>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>
> I've tested, and this seems to work for me (no IDMAC) as long as your
> other patch is applied first of course ("fixed compile error when
> disable CONFIG_MMC_DW_IDMAC").
>
> Probably worth fixing the typo in the subject too (s/disableing/disabling/).
>
> Otherwise, Acked-by: James Hogan <james.hogan@imgtec.com>
Thanks, pushed to mmc-next for 3.3 with the subject line fix, and with
explicit mention of the regression and the patch that caused it.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-20 17:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-20 2:01 [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC Seungwon Jeon
2012-02-20 5:59 ` Namjae Jeon
[not found] ` <CAAG0J9-wRLj29=LztT4Ppi7q6Q=4dm29vHODk9KdVAGWKMJgUw@mail.gmail.com>
2012-02-20 12:10 ` James Hogan
2012-02-20 17:07 ` Chris Ball
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.