This patch (as802) changes the poolname allocation for the shadow
budget in ehci-mem.c.  The name needs to be allocated dynamically, not
on the stack, because the memory management system continues to use it
after registration.

Also included are a couple of minor whitespace fixups (tabs instead of
spaces).

Signed-off-by: Alan Stern <[EMAIL PROTECTED]>

---

Monty, you might try going through all the code you changed.  There are 
_lots_ of places where you have spaces instead of tabs.

On a more serious note, when I do "rmmod ehci-hcd" I always get a warning 
message something like this:

        dma_pool_destroy ehci_fstn, c8c2c000 busy

I don't know what that's about; you'll have to fix it yourself.



Index: usb-2.6/drivers/usb/host/ehci.h
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci.h
+++ usb-2.6/drivers/usb/host/ehci.h
@@ -71,8 +71,9 @@ struct ehci_hcd {                     /* one per controlle
        int                     next_uframe;    /* scan periodic, start here */
        unsigned                periodic_sched; /* periodic activity count */
 
-        kmem_cache_t            *budget_pool;   /* Pool for shadow budget */
-        struct ehci_shadow_budget **budget;     /* pointer to the shadow budget
+       char                    poolname[20];   /* Shadow budget pool name */
+       kmem_cache_t            *budget_pool;   /* Pool for shadow budget */
+       struct ehci_shadow_budget **budget;     /* pointer to the shadow budget
                                                   of bandwidth placeholders */
 
        struct ehci_fstn        *periodic_restore_fstn;
Index: usb-2.6/drivers/usb/host/ehci-mem.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-mem.c
+++ usb-2.6/drivers/usb/host/ehci-mem.c
@@ -293,17 +293,11 @@ static int ehci_mem_init (struct ehci_hc
                goto fail;
        }
 
-       {
-               char poolname[20];
-
-               snprintf(poolname,20,"ehci_budget_%d",
-                        ehci_to_hcd(ehci)->self.busnum);
-
-               ehci->budget_pool =
-                       kmem_cache_create (poolname,
-                                          sizeof(struct ehci_shadow_budget),
-                                          0,0,NULL,NULL);
-       }
+       snprintf(ehci->poolname, sizeof(ehci->poolname), "ehci-budget-%d",
+                       ehci_to_hcd(ehci)->self.busnum);
+       ehci->budget_pool = kmem_cache_create(ehci->poolname,
+                       sizeof(struct ehci_shadow_budget),
+                       0, 0, NULL, NULL);
        if (!ehci->budget_pool)
                goto fail;
 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to