Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
015377da
Commit
015377da
authored
Aug 13, 2002
by
Oliver Neukum
Committed by
Greg Kroah-Hartman
Aug 13, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Problem with CDC Ethernet driver (CDCEther.c)
- fixed deadlock
parent
6c3ec486
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
drivers/usb/net/cdc-ether.c
drivers/usb/net/cdc-ether.c
+7
-3
No files found.
drivers/usb/net/cdc-ether.c
View file @
015377da
...
@@ -436,7 +436,10 @@ static void CDCEther_set_multicast( struct net_device *net )
...
@@ -436,7 +436,10 @@ static void CDCEther_set_multicast( struct net_device *net )
// Tell the kernel to stop sending us frames while we get this
// Tell the kernel to stop sending us frames while we get this
// all set up.
// 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. */
/* Note: do not reorder, GCC is clever about common statements. */
if
(
net
->
flags
&
IFF_PROMISC
)
{
if
(
net
->
flags
&
IFF_PROMISC
)
{
...
@@ -469,7 +472,7 @@ static void CDCEther_set_multicast( struct net_device *net )
...
@@ -469,7 +472,7 @@ static void CDCEther_set_multicast( struct net_device *net )
MODE_FLAG_DIRECTED
|
MODE_FLAG_DIRECTED
|
MODE_FLAG_BROADCAST
|
MODE_FLAG_BROADCAST
|
MODE_FLAG_MULTICAST
;
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
;
for
(
i
=
0
,
mclist
=
net
->
mc_list
;
mclist
&&
i
<
net
->
mc_count
;
mclist
&&
i
<
net
->
mc_count
;
i
++
,
mclist
=
mclist
->
next
)
{
i
++
,
mclist
=
mclist
->
next
)
{
...
@@ -477,6 +480,7 @@ static void CDCEther_set_multicast( struct net_device *net )
...
@@ -477,6 +480,7 @@ static void CDCEther_set_multicast( struct net_device *net )
}
}
#if 0
#if 0
usb_control_msg(ether_dev->usb,
usb_control_msg(ether_dev->usb,
// FIXME: We hold a spinlock. You must not use a synchronous API
usb_sndctrlpipe(ether_dev->usb, 0),
usb_sndctrlpipe(ether_dev->usb, 0),
SET_ETHERNET_MULTICAST_FILTER, /* request */
SET_ETHERNET_MULTICAST_FILTER, /* request */
USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE, /* request type */
USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE, /* request type */
...
@@ -493,7 +497,7 @@ static void CDCEther_set_multicast( struct net_device *net )
...
@@ -493,7 +497,7 @@ static void CDCEther_set_multicast( struct net_device *net )
CDC_SetEthernetPacketFilter(ether_dev);
CDC_SetEthernetPacketFilter(ether_dev);
#endif
#endif
// Tell the kernel to start giving frames to us again.
// Tell the kernel to start giving frames to us again.
netif_wake_queue
(
net
);
//
netif_wake_queue(net);
}
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment