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
aee3603b
Commit
aee3603b
authored
Jul 31, 2003
by
Alan Cox
Committed by
Linus Torvalds
Jul 31, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix invalid/illegal oddments in USB
parent
97a7a9c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
drivers/usb/misc/usbtest.c
drivers/usb/misc/usbtest.c
+1
-1
drivers/usb/net/usbnet.c
drivers/usb/net/usbnet.c
+12
-3
No files found.
drivers/usb/misc/usbtest.c
View file @
aee3603b
...
...
@@ -471,7 +471,7 @@ static int ch9_postconfig (struct usbtest_dev *dev)
* they're ordered meaningfully in this array
*/
if
(
iface
->
altsetting
[
i
].
desc
.
bAlternateSetting
!=
i
)
{
dbg
(
"%s, i
llegal
alt [%d].bAltSetting = %d"
,
dbg
(
"%s, i
nvalid
alt [%d].bAltSetting = %d"
,
dev
->
id
,
i
,
iface
->
altsetting
[
i
].
desc
.
bAlternateSetting
);
...
...
drivers/usb/net/usbnet.c
View file @
aee3603b
...
...
@@ -890,7 +890,7 @@ static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
le32_to_cpus
(
&
header
->
packet_count
);
if
((
header
->
packet_count
>
GL_MAX_TRANSMIT_PACKETS
)
||
(
header
->
packet_count
<
0
))
{
dbg
(
"genelink: i
llegal
received packet count %d"
,
dbg
(
"genelink: i
nvalid
received packet count %d"
,
header
->
packet_count
);
return
0
;
}
...
...
@@ -907,7 +907,7 @@ static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
// this may be a broken packet
if
(
size
>
GL_MAX_PACKET_LEN
)
{
dbg
(
"genelink: i
llegal
rx length %d"
,
size
);
dbg
(
"genelink: i
nvalid
rx length %d"
,
size
);
return
0
;
}
...
...
@@ -943,7 +943,7 @@ static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
skb_pull
(
skb
,
4
);
if
(
skb
->
len
>
GL_MAX_PACKET_LEN
)
{
dbg
(
"genelink: i
llegal
rx length %d"
,
skb
->
len
);
dbg
(
"genelink: i
nvalid
rx length %d"
,
skb
->
len
);
return
0
;
}
return
1
;
...
...
@@ -2769,6 +2769,15 @@ static const struct usb_device_id products [] = {
.
bInterfaceSubClass
=
0x0a
,
.
bInterfaceProtocol
=
0x00
,
.
driver_info
=
(
unsigned
long
)
&
zaurus_slc700_info
,
},
{
.
match_flags
=
USB_DEVICE_ID_MATCH_INT_INFO
|
USB_DEVICE_ID_MATCH_DEVICE
,
.
idVendor
=
0x04DD
,
.
idProduct
=
0x9031
,
.
bInterfaceClass
=
0x02
,
.
bInterfaceSubClass
=
0x0a
,
.
bInterfaceProtocol
=
0x00
,
.
driver_info
=
(
unsigned
long
)
&
zaurus_sla300_info
,
},
#endif
...
...
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