# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.474.2.6 -> 1.474.2.7 # drivers/usb/net/cdc-ether.c 1.18 -> 1.19 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/08/13 oliver@neukum.name 1.474.2.7 # [PATCH] Problem with CDC Ethernet driver (CDCEther.c) # # - fixed deadlock # -------------------------------------------- # diff -Nru a/drivers/usb/net/cdc-ether.c b/drivers/usb/net/cdc-ether.c --- a/drivers/usb/net/cdc-ether.c Tue Aug 13 15:33:56 2002 +++ b/drivers/usb/net/cdc-ether.c Tue Aug 13 15:33:56 2002 @@ -436,7 +436,10 @@ // Tell the kernel to stop sending us frames while we get this // all set up. - netif_stop_queue(net); +// netif_stop_queue(net); + +// FIXME: We hold xmit_lock. If you want to do the queue stuff you need +// to enable it from a completion handler /* Note: do not reorder, GCC is clever about common statements. */ if (net->flags & IFF_PROMISC) { @@ -469,7 +472,7 @@ MODE_FLAG_DIRECTED | MODE_FLAG_BROADCAST | MODE_FLAG_MULTICAST; - buff = kmalloc(6 * net->mc_count, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); + buff = kmalloc(6 * net->mc_count, GFP_ATOMIC); for (i = 0, mclist = net->mc_list; mclist && i < net->mc_count; i++, mclist = mclist->next) { @@ -477,6 +480,7 @@ } #if 0 usb_control_msg(ether_dev->usb, +// FIXME: We hold a spinlock. You must not use a synchronous API usb_sndctrlpipe(ether_dev->usb, 0), SET_ETHERNET_MULTICAST_FILTER, /* request */ USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE, /* request type */ @@ -493,7 +497,7 @@ CDC_SetEthernetPacketFilter(ether_dev); #endif // Tell the kernel to start giving frames to us again. - netif_wake_queue(net); +// netif_wake_queue(net); } //////////////////////////////////////////////////////////////////////////////