Re: [rfc/rft/patch 02/19] usb: musb: reorganizing code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Nov 17, 2009 at 02:24:20PM +0100, ext Sergei Shtylyov wrote:
Hello.

Felipe Balbi wrote:

From: Arnaud Mandy <ext-arnaud.2.mandy@xxxxxxxxx>

moving use_dma parameter to beginning of the file

   This patch is not just about moving the parameter...

Signed-off-by: Arnaud Mandy <ext-arnaud.2.mandy@xxxxxxxxx>
Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
---
 drivers/usb/musb/musb_core.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 3a61ddb..2838059 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -114,6 +114,13 @@

 #define TA_WAIT_BCON(m) max_t(int, (m)->a_wait_bcon,
OTG_TIME_A_WAIT_BCON)

+#ifndef CONFIG_MUSB_PIO_ONLY
+static int __initdata use_dma = 1;
+#else
+static int __initdata use_dma;

   Given the fact that DMA drivers are only enabled if
CONFIG_MUSB_PIO_ONLY=n, this parameter's existance when
CONFIG_MUSB_PIO_ONLY=y doesn't make sense since no DMA driver would be
compiled in this case. Hence I'm inclined to NAK this patch.

good catch. The condition is wrong.

   Sigh, it seems you misundertood me. The condition was right, there just

yes... it seems so, sorry for that.

shouldn't have been the #else branch and the whole parameter declaration
should be enclosed into #ifndef. Your new patch is wrong as it now disables
DMA by default when CONFIG_MUSB_PIO_ONLY=n and enables it when
CONFIG_MUSB_PIO_ONLY=y (where it doesn't make sence).

the idea of having that parameter always there is that even though you build musb without dma, you can still enable it by passing a module parameter. We wanted to get rid of the ifdeferry.

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux