From: Tim Chen <tim.c.chen@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>, "H. Peter Anvin" <hpa@zytor.com>,
Akinobu Mita <akinobu.mita@gmail.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, x86@kernel.org,
linux-usb@vger.kernel.org, stable <stable@vger.kernel.org>
Subject: Re: [PATCH] pci-dma: Fix x86 dma_alloc_coherent to fully clear all pages returned
Date: Wed, 18 Feb 2015 15:59:20 -0800 [thread overview]
Message-ID: <1424303960.9530.125.camel@schen9-desk2.jf.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1502181543270.1245-100000@iolanthe.rowland.org>
On Wed, 2015-02-18 at 15:45 -0500, Alan Stern wrote:
> On Wed, 18 Feb 2015, Tim Chen wrote:
>
> > > Have you tried doing the experiments I suggested in
> > >
> > > http://marc.info/?l=linux-usb&m=142272448620716&w=2
> > >
> > > to determine where the problem occurs?
> > >
> >
> > I was bogged down with other things lately and I haven't got a chance to
> > test that. But as you said, there's very few places where xhci
> > call this memory allocation. So I think the problem has been fairly
> > narrowed down for the XHCI folks.
>
> I disagree. _You_ reported the error. How can you expect other people
> to figure out where it is with no help from you?
>
> I looked briefly at the xhci-hcd DMA allocation code. It does not
> contain any obvious mistakes.
>
> Alan Stern
>
The error and my quick fix is right here. And xhci still needs to be
fixed properly. I'll send out the patch below in a proper patch.
Tim
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 5cb3d7a..39e7196 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1658,7 +1658,7 @@ static int scratchpad_alloc(struct xhci_hcd *xhci,
gfp_t flags)
goto fail_sp;
xhci->scratchpad->sp_array = dma_alloc_coherent(dev,
- num_sp * sizeof(u64),
+ PAGE_ALIGN(num_sp * sizeof(u64)),
&xhci->scratchpad->sp_dma, flags);
if (!xhci->scratchpad->sp_array)
prev parent reply other threads:[~2015-02-18 23:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 19:54 Tim Chen
2015-01-30 19:58 ` Greg KH
2015-01-30 22:01 ` Tim Chen
2015-01-30 22:07 ` Greg KH
2015-01-30 22:16 ` Tim Chen
2015-01-30 22:39 ` Andi Kleen
2015-01-31 17:14 ` Alan Stern
2015-01-30 21:03 ` Sergei Shtylyov
2015-01-30 21:54 ` Tim Chen
2015-02-02 14:02 ` Jiri Slaby
2015-02-02 16:39 ` Sergei Shtylyov
2015-02-04 18:30 ` Tim Chen
2015-02-18 19:40 ` Tim Chen
2015-02-18 19:53 ` Alan Stern
2015-02-18 20:19 ` Tim Chen
2015-02-18 20:36 ` Greg Kroah-Hartman
2015-02-18 20:39 ` Andi Kleen
2015-02-18 21:15 ` Alan Stern
2015-02-18 20:45 ` Alan Stern
2015-02-18 23:59 ` Tim Chen [this message]
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=1424303960.9530.125.camel@schen9-desk2.jf.intel.com \
--to=tim.c.chen@linux.intel.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mathias.nyman@linux.intel.com \
--cc=mingo@elte.hu \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®