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
d9d1babe
Commit
d9d1babe
authored
Jun 15, 2003
by
Stefan Becker
Committed by
Greg Kroah-Hartman
Jun 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: Patch to cdc-acm.c to detect ACM part of USB WMC devices
parent
effb49b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
92 deletions
+95
-92
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.c
+95
-92
No files found.
drivers/usb/class/cdc-acm.c
View file @
d9d1babe
...
...
@@ -548,7 +548,7 @@ static int acm_probe (struct usb_interface *intf,
struct
usb_host_config
*
cfacm
;
struct
usb_host_interface
*
ifcom
,
*
ifdata
;
struct
usb_endpoint_descriptor
*
epctrl
,
*
epread
,
*
epwrite
;
int
readsize
,
ctrlsize
,
minor
,
i
;
int
readsize
,
ctrlsize
,
minor
,
i
,
j
;
unsigned
char
*
buf
;
dev
=
interface_to_usbdev
(
intf
);
...
...
@@ -558,23 +558,25 @@ static int acm_probe (struct usb_interface *intf,
dbg
(
"probing config %d"
,
cfacm
->
desc
.
bConfigurationValue
);
if
(
cfacm
->
desc
.
bNumInterfaces
!=
2
||
usb_interface_claimed
(
cfacm
->
interface
+
0
)
||
usb_interface_claimed
(
cfacm
->
interface
+
1
))
for
(
j
=
0
;
j
<
cfacm
->
desc
.
bNumInterfaces
-
1
;
j
++
)
{
if
(
usb_interface_claimed
(
cfacm
->
interface
+
j
)
||
usb_interface_claimed
(
cfacm
->
interface
+
j
+
1
))
continue
;
ifcom
=
cfacm
->
interface
[
0
].
altsetting
+
0
;
ifdata
=
cfacm
->
interface
[
1
].
altsetting
+
0
;
ifcom
=
cfacm
->
interface
[
j
].
altsetting
+
0
;
ifdata
=
cfacm
->
interface
[
j
+
1
].
altsetting
+
0
;
if
(
ifdata
->
desc
.
bInterfaceClass
!=
10
||
ifdata
->
desc
.
bNumEndpoints
<
2
)
{
ifcom
=
cfacm
->
interface
[
1
].
altsetting
+
0
;
ifdata
=
cfacm
->
interface
[
0
].
altsetting
+
0
;
ifcom
=
cfacm
->
interface
[
j
+
1
].
altsetting
+
0
;
ifdata
=
cfacm
->
interface
[
j
].
altsetting
+
0
;
if
(
ifdata
->
desc
.
bInterfaceClass
!=
10
||
ifdata
->
desc
.
bNumEndpoints
<
2
)
continue
;
}
if
(
ifcom
->
desc
.
bInterfaceClass
!=
2
||
ifcom
->
desc
.
bInterfaceSubClass
!=
2
||
ifcom
->
desc
.
bInterfaceProtocol
!=
1
||
ifcom
->
desc
.
bNumEndpoints
<
1
)
ifcom
->
desc
.
bInterfaceProtocol
<
1
||
ifcom
->
desc
.
bInterfaceProtocol
>
6
||
ifcom
->
desc
.
bNumEndpoints
<
1
)
continue
;
epctrl
=
&
ifcom
->
endpoint
[
0
].
desc
;
...
...
@@ -608,7 +610,7 @@ static int acm_probe (struct usb_interface *intf,
ctrlsize
=
epctrl
->
wMaxPacketSize
;
readsize
=
epread
->
wMaxPacketSize
;
acm
->
writesize
=
epwrite
->
wMaxPacketSize
;
acm
->
iface
=
cfacm
->
interface
;
acm
->
iface
=
cfacm
->
interface
+
j
;
acm
->
minor
=
minor
;
acm
->
dev
=
dev
;
...
...
@@ -673,6 +675,7 @@ static int acm_probe (struct usb_interface *intf,
usb_set_intfdata
(
intf
,
acm
);
return
0
;
}
}
return
-
EIO
;
}
...
...
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