Hi,

this should avoid memory allocations.
For iso-URBs GFP_ATOMIC might hurt,
yet it's necessary if holding a spinlock around
usb_submit_urb() is legal.
The second replacement changes nothing.
Within an irqsave spinlock, it's always ATOMIC anyway.

        Regards
                Oliver

--- usb-uhci.c.alt      Fri Nov  9 18:20:15 2001
+++ usb-uhci.c  Wed Dec 12 03:24:58 2001
@@ -1508,7 +1508,7 @@
        if (ret)
                goto err;
 
-       tdm = (uhci_desc_t **) kmalloc (urb->number_of_packets * sizeof 
(uhci_desc_t*), KMALLOC_FLAG);
+       tdm = (uhci_desc_t **) kmalloc (urb->number_of_packets * sizeof 
+(uhci_desc_t*), GFP_ATOMIC);
 
        if (!tdm) {
                ret = -ENOMEM;
@@ -1660,9 +1660,9 @@
        }
 
 #ifdef DEBUG_SLAB
-       urb_priv = kmem_cache_alloc(urb_priv_kmem, SLAB_FLAG);
+       urb_priv = kmem_cache_alloc(urb_priv_kmem, GFP_ATOMIC);
 #else
-       urb_priv = kmalloc (sizeof (urb_priv_t), KMALLOC_FLAG);
+       urb_priv = kmalloc (sizeof (urb_priv_t), GFP_ATOMIC);
 #endif
        if (!urb_priv) {
                usb_dec_dev_use (urb->dev);

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to