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
f8756916
Commit
f8756916
authored
Sep 27, 2013
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes-for-3.12' of
git://gitorious.org/linux-can/linux-can
parents
207070f5
f37d6e70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
drivers/net/can/usb/peak_usb/pcan_usb_core.c
drivers/net/can/usb/peak_usb/pcan_usb_core.c
+11
-4
No files found.
drivers/net/can/usb/peak_usb/pcan_usb_core.c
View file @
f8756916
...
@@ -463,7 +463,7 @@ static int peak_usb_start(struct peak_usb_device *dev)
...
@@ -463,7 +463,7 @@ static int peak_usb_start(struct peak_usb_device *dev)
if
(
i
<
PCAN_USB_MAX_TX_URBS
)
{
if
(
i
<
PCAN_USB_MAX_TX_URBS
)
{
if
(
i
==
0
)
{
if
(
i
==
0
)
{
netdev_err
(
netdev
,
"couldn't setup any tx URB
\n
"
);
netdev_err
(
netdev
,
"couldn't setup any tx URB
\n
"
);
return
err
;
goto
err_tx
;
}
}
netdev_warn
(
netdev
,
"tx performance may be slow
\n
"
);
netdev_warn
(
netdev
,
"tx performance may be slow
\n
"
);
...
@@ -472,7 +472,7 @@ static int peak_usb_start(struct peak_usb_device *dev)
...
@@ -472,7 +472,7 @@ static int peak_usb_start(struct peak_usb_device *dev)
if
(
dev
->
adapter
->
dev_start
)
{
if
(
dev
->
adapter
->
dev_start
)
{
err
=
dev
->
adapter
->
dev_start
(
dev
);
err
=
dev
->
adapter
->
dev_start
(
dev
);
if
(
err
)
if
(
err
)
goto
failed
;
goto
err_adapter
;
}
}
dev
->
state
|=
PCAN_USB_STATE_STARTED
;
dev
->
state
|=
PCAN_USB_STATE_STARTED
;
...
@@ -481,19 +481,26 @@ static int peak_usb_start(struct peak_usb_device *dev)
...
@@ -481,19 +481,26 @@ static int peak_usb_start(struct peak_usb_device *dev)
if
(
dev
->
adapter
->
dev_set_bus
)
{
if
(
dev
->
adapter
->
dev_set_bus
)
{
err
=
dev
->
adapter
->
dev_set_bus
(
dev
,
1
);
err
=
dev
->
adapter
->
dev_set_bus
(
dev
,
1
);
if
(
err
)
if
(
err
)
goto
failed
;
goto
err_adapter
;
}
}
dev
->
can
.
state
=
CAN_STATE_ERROR_ACTIVE
;
dev
->
can
.
state
=
CAN_STATE_ERROR_ACTIVE
;
return
0
;
return
0
;
failed
:
err_adapter
:
if
(
err
==
-
ENODEV
)
if
(
err
==
-
ENODEV
)
netif_device_detach
(
dev
->
netdev
);
netif_device_detach
(
dev
->
netdev
);
netdev_warn
(
netdev
,
"couldn't submit control: %d
\n
"
,
err
);
netdev_warn
(
netdev
,
"couldn't submit control: %d
\n
"
,
err
);
for
(
i
=
0
;
i
<
PCAN_USB_MAX_TX_URBS
;
i
++
)
{
usb_free_urb
(
dev
->
tx_contexts
[
i
].
urb
);
dev
->
tx_contexts
[
i
].
urb
=
NULL
;
}
err_tx:
usb_kill_anchored_urbs
(
&
dev
->
rx_submitted
);
return
err
;
return
err
;
}
}
...
...
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