linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC
@ 2012-02-16  2:19 Jaehoon Chung
  2012-02-16  3:40 ` Seungwon Jeon
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jaehoon Chung @ 2012-02-16  2:19 UTC (permalink / raw)
  To: linux-mmc
  Cc: Chris Ball, Kyungmin Park, Will Newton, James Hogan,
	Seungwon Jeon

When disable CONFIG_MMC_DW_IDMAC, can see the compiler error.
Because in dw_mci_post_req(), called the dw_mci_get_dma_dir().
But that function is in #ifdef CONFIG_MMC_DW_IDMAC.

I think that function is generic function.
Not need the CONFIG_MMC_DW_IDMAC.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/mmc/host/dw_mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index f9457e5..692c3ba 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -295,7 +295,6 @@ static void dw_mci_stop_dma(struct dw_mci *host)
 	}
 }
 
-#ifdef CONFIG_MMC_DW_IDMAC
 static int dw_mci_get_dma_dir(struct mmc_data *data)
 {
 	if (data->flags & MMC_DATA_WRITE)
@@ -304,6 +303,7 @@ static int dw_mci_get_dma_dir(struct mmc_data *data)
 		return DMA_FROM_DEVICE;
 }
 
+#ifdef CONFIG_MMC_DW_IDMAC
 static void dw_mci_dma_cleanup(struct dw_mci *host)
 {
 	struct mmc_data *data = host->data;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC
  2012-02-16  2:19 mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC Jaehoon Chung
@ 2012-02-16  3:40 ` Seungwon Jeon
  2012-02-16 23:22 ` mmc: " James Hogan
  2012-02-20 12:10 ` James Hogan
  2 siblings, 0 replies; 6+ messages in thread
From: Seungwon Jeon @ 2012-02-16  3:40 UTC (permalink / raw)
  To: 'Jaehoon Chung', 'linux-mmc'
  Cc: 'Chris Ball', 'Kyungmin Park',
	'Will Newton', 'James Hogan'

Jaehoon Chung <jh80.chung@samsung.com> wrote:
> When disable CONFIG_MMC_DW_IDMAC, can see the compiler error.
> Because in dw_mci_post_req(), called the dw_mci_get_dma_dir().
> But that function is in #ifdef CONFIG_MMC_DW_IDMAC.
> 
> I think that function is generic function.
> Not need the CONFIG_MMC_DW_IDMAC.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

I tested it. Looks ok to me.

Acked-by: Seungwon Jeon <tgih.jun@samsung.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC
  2012-02-16  2:19 mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC Jaehoon Chung
  2012-02-16  3:40 ` Seungwon Jeon
@ 2012-02-16 23:22 ` James Hogan
  2012-02-17  1:17   ` Seungwon Jeon
  2012-02-20 12:10 ` James Hogan
  2 siblings, 1 reply; 6+ messages in thread
From: James Hogan @ 2012-02-16 23:22 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, Chris Ball, Kyungmin Park, Will Newton, James Hogan,
	Seungwon Jeon

On Thu, Feb 16, 2012 at 11:19:38AM +0900, Jaehoon Chung wrote:
> When disable CONFIG_MMC_DW_IDMAC, can see the compiler error.
> Because in dw_mci_post_req(), called the dw_mci_get_dma_dir().
> But that function is in #ifdef CONFIG_MMC_DW_IDMAC.
> 
> I think that function is generic function.
> Not need the CONFIG_MMC_DW_IDMAC.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

I've also tested and confirmed that this fixes a compiler error
introduced in 3ec7699d3bb1b0ee7f6e8588974a209d47fc64b2 ("mmc: dw_mmc:
Add support for pre_req and post_req"), however that patch also seems to
have regressed by disabled DMA when not using the internal DMAC. 

Specifically dw_mci_pre_dma_transfer() returns -ENOSYS when not using
internal DMAC, which makes dw_mci_submit_data_dma() now return early:

+       sg_len = dw_mci_pre_dma_transfer(host, data, 0);
+       if (sg_len < 0)
+               return sg_len;

I think that 3ec7699d3bb1b0ee7f6e8588974a209d47fc64b2 should be
removed/reverted until it is fixed.

Regards
James

> ---
>  drivers/mmc/host/dw_mmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index f9457e5..692c3ba 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -295,7 +295,6 @@ static void dw_mci_stop_dma(struct dw_mci *host)
>  	}
>  }
>  
> -#ifdef CONFIG_MMC_DW_IDMAC
>  static int dw_mci_get_dma_dir(struct mmc_data *data)
>  {
>  	if (data->flags & MMC_DATA_WRITE)
> @@ -304,6 +303,7 @@ static int dw_mci_get_dma_dir(struct mmc_data *data)
>  		return DMA_FROM_DEVICE;
>  }
>  
> +#ifdef CONFIG_MMC_DW_IDMAC
>  static void dw_mci_dma_cleanup(struct dw_mci *host)
>  {
>  	struct mmc_data *data = host->data;
> --
> 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] 6+ messages in thread

* RE: mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC
  2012-02-16 23:22 ` mmc: " James Hogan
@ 2012-02-17  1:17   ` Seungwon Jeon
  0 siblings, 0 replies; 6+ messages in thread
From: Seungwon Jeon @ 2012-02-17  1:17 UTC (permalink / raw)
  To: 'James Hogan', 'Jaehoon Chung'
  Cc: 'linux-mmc', 'Chris Ball',
	'Kyungmin Park', 'Will Newton',
	'James Hogan'

James Hogan <james@albanarts.com> wrote:
> On Thu, Feb 16, 2012 at 11:19:38AM +0900, Jaehoon Chung wrote:
> > When disable CONFIG_MMC_DW_IDMAC, can see the compiler error.
> > Because in dw_mci_post_req(), called the dw_mci_get_dma_dir().
> > But that function is in #ifdef CONFIG_MMC_DW_IDMAC.
> >
> > I think that function is generic function.
> > Not need the CONFIG_MMC_DW_IDMAC.
> >
> > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> 
> I've also tested and confirmed that this fixes a compiler error
> introduced in 3ec7699d3bb1b0ee7f6e8588974a209d47fc64b2 ("mmc: dw_mmc:
> Add support for pre_req and post_req"), however that patch also seems to
> have regressed by disabled DMA when not using the internal DMAC.
> 
> Specifically dw_mci_pre_dma_transfer() returns -ENOSYS when not using
> internal DMAC, which makes dw_mci_submit_data_dma() now return early:
> 
> +       sg_len = dw_mci_pre_dma_transfer(host, data, 0);
> +       if (sg_len < 0)
> +               return sg_len;
> 
> I think that 3ec7699d3bb1b0ee7f6e8588974a209d47fc64b2 should be
> removed/reverted until it is fixed.

Thank you for investigation.
It could be fixed.

Best regards,
Seungwon Jeon.
> 
> Regards
> James
> 
> > ---
> >  drivers/mmc/host/dw_mmc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> > index f9457e5..692c3ba 100644
> > --- a/drivers/mmc/host/dw_mmc.c
> > +++ b/drivers/mmc/host/dw_mmc.c
> > @@ -295,7 +295,6 @@ static void dw_mci_stop_dma(struct dw_mci *host)
> >  	}
> >  }
> >
> > -#ifdef CONFIG_MMC_DW_IDMAC
> >  static int dw_mci_get_dma_dir(struct mmc_data *data)
> >  {
> >  	if (data->flags & MMC_DATA_WRITE)
> > @@ -304,6 +303,7 @@ static int dw_mci_get_dma_dir(struct mmc_data *data)
> >  		return DMA_FROM_DEVICE;
> >  }
> >
> > +#ifdef CONFIG_MMC_DW_IDMAC
> >  static void dw_mci_dma_cleanup(struct dw_mci *host)
> >  {
> >  	struct mmc_data *data = host->data;
> > --
> > 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
> --
> 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] 6+ messages in thread

* Re: mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC
  2012-02-16  2:19 mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC Jaehoon Chung
  2012-02-16  3:40 ` Seungwon Jeon
  2012-02-16 23:22 ` mmc: " James Hogan
@ 2012-02-20 12:10 ` James Hogan
  2012-02-20 17:04   ` Chris Ball
  2 siblings, 1 reply; 6+ messages in thread
From: James Hogan @ 2012-02-20 12:10 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, Chris Ball, Kyungmin Park, Will Newton, Seungwon Jeon

On 16/02/12 02:19, Jaehoon Chung wrote:
> When disable CONFIG_MMC_DW_IDMAC, can see the compiler error.
> Because in dw_mci_post_req(), called the dw_mci_get_dma_dir().
> But that function is in #ifdef CONFIG_MMC_DW_IDMAC.
> 
> I think that function is generic function.
> Not need the CONFIG_MMC_DW_IDMAC.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

Acked-by: James Hogan <james.hogan@imgtec.com>

> ---
>  drivers/mmc/host/dw_mmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index f9457e5..692c3ba 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -295,7 +295,6 @@ static void dw_mci_stop_dma(struct dw_mci *host)
>  	}
>  }
>  
> -#ifdef CONFIG_MMC_DW_IDMAC
>  static int dw_mci_get_dma_dir(struct mmc_data *data)
>  {
>  	if (data->flags & MMC_DATA_WRITE)
> @@ -304,6 +303,7 @@ static int dw_mci_get_dma_dir(struct mmc_data *data)
>  		return DMA_FROM_DEVICE;
>  }
>  
> +#ifdef CONFIG_MMC_DW_IDMAC
>  static void dw_mci_dma_cleanup(struct dw_mci *host)
>  {
>  	struct mmc_data *data = host->data;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC
  2012-02-20 12:10 ` James Hogan
@ 2012-02-20 17:04   ` Chris Ball
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Ball @ 2012-02-20 17:04 UTC (permalink / raw)
  To: James Hogan
  Cc: Jaehoon Chung, linux-mmc, Kyungmin Park, Will Newton,
	Seungwon Jeon

Hi,

On Mon, Feb 20 2012, James Hogan wrote:
> On 16/02/12 02:19, Jaehoon Chung wrote:
>> When disable CONFIG_MMC_DW_IDMAC, can see the compiler error.
>> Because in dw_mci_post_req(), called the dw_mci_get_dma_dir().
>> But that function is in #ifdef CONFIG_MMC_DW_IDMAC.
>> 
>> I think that function is generic function.
>> Not need the CONFIG_MMC_DW_IDMAC.
>> 
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>
> Acked-by: James Hogan <james.hogan@imgtec.com>

Thanks, pushed to mmc-next for 3.3.  (And I'll take the second patch to
fix the no IDMAC regression too.)

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-20 17:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16  2:19 mmc: dw_mmc: fixed compile error when disable CONFIG_MMC_DW_IDMAC Jaehoon Chung
2012-02-16  3:40 ` Seungwon Jeon
2012-02-16 23:22 ` mmc: " James Hogan
2012-02-17  1:17   ` Seungwon Jeon
2012-02-20 12:10 ` James Hogan
2012-02-20 17:04   ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).