From: Joe Perches <joe@perches.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: linux-usb@vger.kernel.org,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] xhci: fix usb3 streams
Date: Mon, 02 Sep 2013 09:22:02 -0700 [thread overview]
Message-ID: <1378138922.1953.73.camel@joe-AO722> (raw)
In-Reply-To: <1378121129-32594-2-git-send-email-kraxel@redhat.com>
On Mon, 2013-09-02 at 13:25 +0200, Gerd Hoffmann wrote:
> xhci maintains a radix tree for each stream endpoint because it must
> be able to map a trb address to the stream ring. Each ring segment
> must be added to the ring for this to work. Currently xhci sticks
> only the first segment of each stream ring into the radix tree.
[]
> This patch adds a helper function to update the radix tree. It can
> both insert and remove ring segments. It loops over the segment list
> and handles all segments instead of just the first. It is called
> whenever an update is needed: When allocating a ring, when expanding
> a ring and when releasing a ring.
[]
> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
[]
> @@ -601,6 +609,33 @@ static int xhci_test_radix_tree(struct xhci_hcd *xhci,
> * extended systems (where the DMA address can be bigger than 32-bits),
> * if we allow the PCI dma mask to be bigger than 32-bits. So don't do that.
> */
> +
> +int xhci_update_stream_ring(struct xhci_ring *ring, bool insert)
> +{
> + struct xhci_segment *seg;
> + unsigned long key;
> + bool present;
> + int ret;
> +
> + BUG_ON(ring->trb_address_map == NULL);
BUG_ON is really not nice. Maybe:
if (WARN_ON_ONCE(ring->trb_address_map == NULL))
return 0;
next prev parent reply other threads:[~2013-09-02 16:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1378121129-32594-1-git-send-email-kraxel@redhat.com>
2013-09-02 11:25 ` Gerd Hoffmann
2013-09-02 16:22 ` Joe Perches [this message]
2013-09-02 11:25 ` [PATCH 2/5] uas: properly reinitialize in uas_eh_bus_reset_handler Gerd Hoffmann
2013-09-02 11:25 ` [PATCH 3/5] uas: rename work list lock + list field Gerd Hoffmann
2013-09-02 11:25 ` [PATCH 4/5] uas: add dead request list Gerd Hoffmann
2013-09-03 17:39 ` Sarah Sharp
2013-09-04 7:04 ` Gerd Hoffmann
2013-09-05 7:26 ` Oliver Neukum
2013-09-02 11:25 ` [PATCH 5/5] uas: remove BROKEN Gerd Hoffmann
[not found] <1378216005-10326-1-git-send-email-kraxel@redhat.com>
2013-09-03 13:46 ` [PATCH 1/5] xhci: fix usb3 streams Gerd Hoffmann
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=1378138922.1953.73.camel@joe-AO722 \
--to=joe@perches.com \
--cc=gregkh@linuxfoundation.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
/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®