All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
To: ext Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
Cc: "linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>,
	Maulik Mankad <x0082077-l0cyMroinI0@public.gmane.org>,
	Nilkesh Patra <nilkesh.patra-l0cyMroinI0@public.gmane.org>,
	"Balbi Felipe (Nokia-D/Helsinki)"
	<felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] USB: musb: allow unaligned memory data transfers
Date: Thu, 14 Jan 2010 13:23:54 +0200	[thread overview]
Message-ID: <20100114112354.GG19526@nokia.com> (raw)
In-Reply-To: <1263310937-7249-1-git-send-email-vikram.pandita-l0cyMroinI0@public.gmane.org>

Hi,

On Tue, Jan 12, 2010 at 04:42:17PM +0100, ext Vikram Pandita wrote:
>diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
>index a237550..f118ae2 100644
>--- a/drivers/usb/musb/musbhsdma.c
>+++ b/drivers/usb/musb/musbhsdma.c
>@@ -166,6 +166,8 @@ static int dma_channel_program(struct dma_channel *channel,
> 				dma_addr_t dma_addr, u32 len)
> {
> 	struct musb_dma_channel *musb_channel = channel->private_data;
>+	struct musb_dma_controller *controller = musb_channel->controller;
>+	struct musb *musb = controller->private_data;
>
> 	DBG(2, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n",
> 		musb_channel->epnum,
>@@ -175,6 +177,15 @@ static int dma_channel_program(struct dma_channel *channel,
> 	BUG_ON(channel->status == MUSB_DMA_STATUS_UNKNOWN ||
> 		channel->status == MUSB_DMA_STATUS_BUSY);
>
>+	/* On MUSB:RTL1.8 and above, DMA has to be word aligned */
>+	if ((dma_addr % 4) &&
>+		(musb->hwvers >= MUSB_HWVERS_1800)) {

is it only inventra dma that suffers from this ? If not, we could move 
this check before even calling the dma routine.

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

  parent reply	other threads:[~2010-01-14 11:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 15:42 [PATCH] USB: musb: allow unaligned memory data transfers Vikram Pandita
     [not found] ` <1263310937-7249-1-git-send-email-vikram.pandita-l0cyMroinI0@public.gmane.org>
2010-01-14 11:23   ` Felipe Balbi [this message]
2010-01-14 13:36     ` Gadiyar, Anand
     [not found]       ` <5A47E75E594F054BAF48C5E4FC4B92AB031E2EB521-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-01-14 13:49         ` Sergei Shtylyov
     [not found]           ` <4B4F20DE.6040001-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-01-14 13:53             ` Gadiyar, Anand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100114112354.GG19526@nokia.com \
    --to=felipe.balbi-xnzwkgviw5gavxtiumwx3w@public.gmane.org \
    --cc=gadiyar-l0cyMroinI0@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nilkesh.patra-l0cyMroinI0@public.gmane.org \
    --cc=vikram.pandita-l0cyMroinI0@public.gmane.org \
    --cc=x0082077-l0cyMroinI0@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.