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
5f680f7a
Commit
5f680f7a
authored
Sep 11, 2002
by
Oliver Neukum
Committed by
Greg Kroah-Hartman
Sep 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] open/close fix for kaweth
this handles the error case.
parent
4caedfb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
drivers/usb/net/kaweth.c
drivers/usb/net/kaweth.c
+12
-6
No files found.
drivers/usb/net/kaweth.c
View file @
5f680f7a
...
...
@@ -493,7 +493,7 @@ static void int_callback(struct urb *u)
/****************************************************************
* kaweth_resubmit_rx_urb
****************************************************************/
static
void
kaweth_resubmit_rx_urb
(
struct
kaweth_device
*
kaweth
,
static
int
kaweth_resubmit_rx_urb
(
struct
kaweth_device
*
kaweth
,
int
mem_flags
)
{
int
result
;
...
...
@@ -513,6 +513,8 @@ static void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth,
}
else
{
kaweth
->
suspend_lowmem
=
0
;
}
return
result
;
}
static
void
kaweth_async_set_rx_mode
(
struct
kaweth_device
*
kaweth
);
...
...
@@ -592,14 +594,15 @@ static void kaweth_usb_receive(struct urb *urb)
static
int
kaweth_open
(
struct
net_device
*
net
)
{
struct
kaweth_device
*
kaweth
=
(
struct
kaweth_device
*
)
net
->
priv
;
int
res
;
kaweth_dbg
(
"Dev usage: %d"
,
kaweth
->
dev
->
refcnt
.
counter
);
kaweth_dbg
(
"Opening network device."
);
MOD_INC_USE_COUNT
;
kaweth_resubmit_rx_urb
(
kaweth
,
GFP_KERNEL
)
;
res
=
kaweth_resubmit_rx_urb
(
kaweth
,
GFP_KERNEL
)
;
if
(
res
)
return
-
EIO
;
FILL_INT_URB
(
kaweth
->
irq_urb
,
...
...
@@ -611,7 +614,11 @@ static int kaweth_open(struct net_device *net)
kaweth
,
HZ
/
4
);
usb_submit_urb
(
kaweth
->
irq_urb
,
GFP_KERNEL
);
res
=
usb_submit_urb
(
kaweth
->
irq_urb
,
GFP_KERNEL
);
if
(
res
)
{
usb_unlink_urb
(
kaweth
->
rx_urb
);
return
-
EIO
;
}
netif_start_queue
(
net
);
...
...
@@ -635,7 +642,6 @@ static int kaweth_close(struct net_device *net)
kaweth
->
status
&=
~
KAWETH_STATUS_CLOSING
;
MOD_DEC_USE_COUNT
;
printk
(
"Dev usage: %d"
,
kaweth
->
dev
->
refcnt
.
counter
);
...
...
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