diff mbox

[4/7] usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContext

Message ID 1379962447-5431-5-git-send-email-hdegoede@redhat.com
State New
Headers show

Commit Message

Hans de Goede Sept. 23, 2013, 6:54 p.m. UTC
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 hw/usb/hcd-xhci.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Gerd Hoffmann Sept. 24, 2013, 9:37 a.m. UTC | #1
On Mo, 2013-09-23 at 20:54 +0200, Hans de Goede wrote:
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Patch doesn't apply.

That are bits for the (not fully implemented yet) secondary stream
arrays btw.  We might complete the implementation instead of kicking
them out.  I have no idea whenever there is a reasonable way to test
that though ...

cheers,
  Gerd
Hans de Goede Oct. 8, 2013, 7:36 p.m. UTC | #2
Hi,

On 09/24/2013 11:37 AM, Gerd Hoffmann wrote:
> On Mo, 2013-09-23 at 20:54 +0200, Hans de Goede wrote:
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Patch doesn't apply.

Sorry, my bad, I had some other changes in my local tree
which I was not yet ready to send and this depended on them.

I'm ready to send the whole bunch of patches in one go now,
which I'll do directly after this mail.

> That are bits for the (not fully implemented yet) secondary stream
> arrays btw.

I know, but ...

 > We might complete the implementation instead of kicking
> them out.

Looking at the spec, I don't think any guest drivers will implement
secondary streams, the lsa can handle any reasonable amount of streams
just fine. The whole secondary stream thing is only interesting
if you want to do insane amount streams, or have stream id ranges
with holes in them.

> I have no idea whenever there is a reasonable way to test
> that though ...

I agree, and I'm not sure there ever will be. So I vote for not worrying
about secondary streams until we actually encounter a guest which uses
them (at which point we should have a way to test through that guest).

So my vote goes to just removing this cruft for now.

Regards,

Hans
diff mbox

Patch

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 286d272..b343235 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -374,7 +374,6 @@  struct XHCIStreamContext {
     dma_addr_t pctx;
     unsigned int sct;
     XHCIRing ring;
-    XHCIStreamContext *sstreams;
 };
 
 struct XHCIEPContext {
@@ -1117,7 +1116,6 @@  static void xhci_reset_streams(XHCIEPContext *epctx)
 
     for (i = 0; i < epctx->nr_pstreams; i++) {
         epctx->pstreams[i].sct = -1;
-        g_free(epctx->pstreams[i].sstreams);
     }
 }
 
@@ -1170,15 +1168,9 @@  static TRBCCode xhci_alloc_streams(XHCIEPContext *epctx, dma_addr_t base)
 static void xhci_free_streams(XHCIEPContext *epctx)
 {
     USBEndpoint *ep;
-    int i;
 
     assert(epctx->pstreams != NULL);
 
-    if (!epctx->lsa) {
-        for (i = 0; i < epctx->nr_pstreams; i++) {
-            g_free(epctx->pstreams[i].sstreams);
-        }
-    }
     g_free(epctx->pstreams);
     epctx->pstreams = NULL;
     epctx->nr_pstreams = 0;