[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-usb
Subject:    Re: [PATCH RFC/RFT] MUSB: Do not enable TX and RX DMA at the same
From:       Felipe Balbi <felipe.balbi () nokia ! com>
Date:       2009-11-30 10:44:07
Message-ID: 20091130104407.GB15533 () nokia ! com
[Download RAW message or body]

Hi,

On Mon, Nov 30, 2009 at 08:22:09AM +0100, ext Anand Gadiyar wrote:
> static int dma_channel_program(struct dma_channel *channel,
> 				u16 packet_sz, u8 mode,
> 				dma_addr_t dma_addr, u32 len)
> {
> 	struct musb_dma_channel *musb_channel = channel->private_data;
>+	struct musb_dma_controller *controller = musb_channel->controller;
>
> 	DBG(2, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n",
> 		musb_channel->epnum,
>@@ -175,6 +201,9 @@ static int dma_channel_program(struct dm
> 	BUG_ON(channel->status == MUSB_DMA_STATUS_UNKNOWN ||
> 		channel->status == MUSB_DMA_STATUS_BUSY);
>
>+	if (!musb_okay_to_use_dma(controller, musb_channel->transmit))
>+		return false;

how about returning error code. Maybe -EINVAL ??

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

Configure | About | News | Add a list | Sponsored by KoreLogic