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
nexedi
linux
Commits
85cd4b37
Commit
85cd4b37
authored
Mar 24, 2003
by
Brad Hards
Committed by
Greg Kroah-Hartman
Mar 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: CDC Ethernet zero packet fix
parent
16964d68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
drivers/usb/net/cdc-ether.c
drivers/usb/net/cdc-ether.c
+4
-15
No files found.
drivers/usb/net/cdc-ether.c
View file @
85cd4b37
...
...
@@ -269,22 +269,8 @@ static void CDCEther_tx_timeout( struct net_device *net )
static
int
CDCEther_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
net
)
{
ether_dev_t
*
ether_dev
=
net
->
priv
;
int
count
;
int
res
;
// If we are told to transmit an ethernet frame that fits EXACTLY
// into an integer number of USB packets, we force it to send one
// more byte so the device will get a runt USB packet signalling the
// end of the ethernet frame
if
(
(
skb
->
len
)
^
(
ether_dev
->
data_ep_out_size
)
)
{
// It was not an exact multiple
// no need to add anything extra
count
=
skb
->
len
;
}
else
{
// Add one to make it NOT an exact multiple
count
=
skb
->
len
+
1
;
}
// Tell the kernel, "No more frames 'til we are done
// with this one.'
netif_stop_queue
(
net
);
...
...
@@ -299,7 +285,10 @@ static int CDCEther_start_xmit( struct sk_buff *skb, struct net_device *net )
write_bulk_callback
,
ether_dev
);
// Tell the URB how much it will be transporting today
ether_dev
->
tx_urb
->
transfer_buffer_length
=
count
;
ether_dev
->
tx_urb
->
transfer_buffer_length
=
skb
->
len
;
/* Deal with the zero length problem, I hope */
ether_dev
->
tx_urb
->
transfer_flags
|=
URB_ZERO_PACKET
;
// Send the URB on its merry way.
if
((
res
=
usb_submit_urb
(
ether_dev
->
tx_urb
,
GFP_ATOMIC
)))
{
...
...
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