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
bfb77631
Commit
bfb77631
authored
May 13, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
Merge kroah.com:/home/linux/linux/BK/bleed-2.5
into kroah.com:/home/linux/linux/BK/gregkh-2.5
parents
29b25594
75b1cec5
Changes
31
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
480 additions
and
264 deletions
+480
-264
drivers/usb/class/Kconfig
drivers/usb/class/Kconfig
+1
-1
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.c
+28
-14
drivers/usb/class/usb-midi.c
drivers/usb/class/usb-midi.c
+41
-21
drivers/usb/class/usblp.c
drivers/usb/class/usblp.c
+18
-10
drivers/usb/core/hcd-pci.c
drivers/usb/core/hcd-pci.c
+2
-1
drivers/usb/gadget/Kconfig
drivers/usb/gadget/Kconfig
+10
-11
drivers/usb/gadget/net2280.c
drivers/usb/gadget/net2280.c
+32
-10
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hcd.c
+0
-1
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hcd.c
+0
-1
drivers/usb/host/ohci-sa1111.c
drivers/usb/host/ohci-sa1111.c
+4
-2
drivers/usb/input/hid-core.c
drivers/usb/input/hid-core.c
+31
-11
drivers/usb/input/hid-input.c
drivers/usb/input/hid-input.c
+2
-1
drivers/usb/input/hid-lgff.c
drivers/usb/input/hid-lgff.c
+4
-2
drivers/usb/input/hid-tmff.c
drivers/usb/input/hid-tmff.c
+2
-1
drivers/usb/input/hiddev.c
drivers/usb/input/hiddev.c
+18
-9
drivers/usb/input/pid.c
drivers/usb/input/pid.c
+4
-2
drivers/usb/input/usbkbd.c
drivers/usb/input/usbkbd.c
+2
-1
drivers/usb/media/ov511.c
drivers/usb/media/ov511.c
+206
-126
drivers/usb/media/se401.c
drivers/usb/media/se401.c
+9
-10
drivers/usb/media/vicam.c
drivers/usb/media/vicam.c
+2
-1
drivers/usb/misc/auerswald.c
drivers/usb/misc/auerswald.c
+22
-11
drivers/usb/misc/uss720.c
drivers/usb/misc/uss720.c
+1
-1
drivers/usb/net/catc.c
drivers/usb/net/catc.c
+8
-4
drivers/usb/net/kaweth.c
drivers/usb/net/kaweth.c
+2
-1
drivers/usb/serial/belkin_sa.c
drivers/usb/serial/belkin_sa.c
+5
-2
drivers/usb/serial/console.c
drivers/usb/serial/console.c
+6
-3
drivers/usb/serial/cyberjack.c
drivers/usb/serial/cyberjack.c
+6
-3
drivers/usb/serial/io_ti.c
drivers/usb/serial/io_ti.c
+2
-1
drivers/usb/serial/ir-usb.c
drivers/usb/serial/ir-usb.c
+2
-1
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.c
+1
-1
drivers/usb/storage/unusual_devs.h
drivers/usb/storage/unusual_devs.h
+9
-0
No files found.
drivers/usb/class/Kconfig
View file @
bfb77631
...
@@ -90,6 +90,6 @@ config USB_PRINTER
...
@@ -90,6 +90,6 @@ config USB_PRINTER
This code is also available as a module ( = code which can be
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
inserted in and removed from the running kernel whenever you want).
The module will be called
printer
. If you want to compile it as a
The module will be called
usblp
. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
module, say M here and read <file:Documentation/modules.txt>.
drivers/usb/class/cdc-acm.c
View file @
bfb77631
...
@@ -252,7 +252,8 @@ static void acm_read_bulk(struct urb *urb, struct pt_regs *regs)
...
@@ -252,7 +252,8 @@ static void acm_read_bulk(struct urb *urb, struct pt_regs *regs)
unsigned
char
*
data
=
urb
->
transfer_buffer
;
unsigned
char
*
data
=
urb
->
transfer_buffer
;
int
i
=
0
;
int
i
=
0
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
urb
->
status
)
if
(
urb
->
status
)
dbg
(
"nonzero read bulk status received: %d"
,
urb
->
status
);
dbg
(
"nonzero read bulk status received: %d"
,
urb
->
status
);
...
@@ -286,7 +287,8 @@ static void acm_write_bulk(struct urb *urb, struct pt_regs *regs)
...
@@ -286,7 +287,8 @@ static void acm_write_bulk(struct urb *urb, struct pt_regs *regs)
{
{
struct
acm
*
acm
=
(
struct
acm
*
)
urb
->
context
;
struct
acm
*
acm
=
(
struct
acm
*
)
urb
->
context
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
urb
->
status
)
if
(
urb
->
status
)
dbg
(
"nonzero write bulk status received: %d"
,
urb
->
status
);
dbg
(
"nonzero write bulk status received: %d"
,
urb
->
status
);
...
@@ -299,7 +301,8 @@ static void acm_softint(void *private)
...
@@ -299,7 +301,8 @@ static void acm_softint(void *private)
struct
acm
*
acm
=
private
;
struct
acm
*
acm
=
private
;
struct
tty_struct
*
tty
=
acm
->
tty
;
struct
tty_struct
*
tty
=
acm
->
tty
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
!
ACM_READY
(
acm
))
return
;
if
((
tty
->
flags
&
(
1
<<
TTY_DO_WRITE_WAKEUP
))
&&
tty
->
ldisc
.
write_wakeup
)
if
((
tty
->
flags
&
(
1
<<
TTY_DO_WRITE_WAKEUP
))
&&
tty
->
ldisc
.
write_wakeup
)
(
tty
->
ldisc
.
write_wakeup
)(
tty
);
(
tty
->
ldisc
.
write_wakeup
)(
tty
);
...
@@ -315,7 +318,8 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
...
@@ -315,7 +318,8 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
{
{
struct
acm
*
acm
=
acm_table
[
tty
->
index
];
struct
acm
*
acm
=
acm_table
[
tty
->
index
];
if
(
!
acm
||
!
acm
->
dev
)
return
-
EINVAL
;
if
(
!
acm
||
!
acm
->
dev
)
return
-
EINVAL
;
tty
->
driver_data
=
acm
;
tty
->
driver_data
=
acm
;
acm
->
tty
=
tty
;
acm
->
tty
=
tty
;
...
@@ -350,7 +354,8 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)
...
@@ -350,7 +354,8 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)
{
{
struct
acm
*
acm
=
tty
->
driver_data
;
struct
acm
*
acm
=
tty
->
driver_data
;
if
(
!
acm
||
!
acm
->
used
)
return
;
if
(
!
acm
||
!
acm
->
used
)
return
;
if
(
!--
acm
->
used
)
{
if
(
!--
acm
->
used
)
{
if
(
acm
->
dev
)
{
if
(
acm
->
dev
)
{
...
@@ -373,9 +378,12 @@ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned c
...
@@ -373,9 +378,12 @@ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned c
{
{
struct
acm
*
acm
=
tty
->
driver_data
;
struct
acm
*
acm
=
tty
->
driver_data
;
if
(
!
ACM_READY
(
acm
))
return
-
EINVAL
;
if
(
!
ACM_READY
(
acm
))
if
(
acm
->
writeurb
->
status
==
-
EINPROGRESS
)
return
0
;
return
-
EINVAL
;
if
(
!
count
)
return
0
;
if
(
acm
->
writeurb
->
status
==
-
EINPROGRESS
)
return
0
;
if
(
!
count
)
return
0
;
count
=
(
count
>
acm
->
writesize
)
?
acm
->
writesize
:
count
;
count
=
(
count
>
acm
->
writesize
)
?
acm
->
writesize
:
count
;
...
@@ -397,28 +405,32 @@ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned c
...
@@ -397,28 +405,32 @@ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned c
static
int
acm_tty_write_room
(
struct
tty_struct
*
tty
)
static
int
acm_tty_write_room
(
struct
tty_struct
*
tty
)
{
{
struct
acm
*
acm
=
tty
->
driver_data
;
struct
acm
*
acm
=
tty
->
driver_data
;
if
(
!
ACM_READY
(
acm
))
return
-
EINVAL
;
if
(
!
ACM_READY
(
acm
))
return
-
EINVAL
;
return
acm
->
writeurb
->
status
==
-
EINPROGRESS
?
0
:
acm
->
writesize
;
return
acm
->
writeurb
->
status
==
-
EINPROGRESS
?
0
:
acm
->
writesize
;
}
}
static
int
acm_tty_chars_in_buffer
(
struct
tty_struct
*
tty
)
static
int
acm_tty_chars_in_buffer
(
struct
tty_struct
*
tty
)
{
{
struct
acm
*
acm
=
tty
->
driver_data
;
struct
acm
*
acm
=
tty
->
driver_data
;
if
(
!
ACM_READY
(
acm
))
return
-
EINVAL
;
if
(
!
ACM_READY
(
acm
))
return
-
EINVAL
;
return
acm
->
writeurb
->
status
==
-
EINPROGRESS
?
acm
->
writeurb
->
transfer_buffer_length
:
0
;
return
acm
->
writeurb
->
status
==
-
EINPROGRESS
?
acm
->
writeurb
->
transfer_buffer_length
:
0
;
}
}
static
void
acm_tty_throttle
(
struct
tty_struct
*
tty
)
static
void
acm_tty_throttle
(
struct
tty_struct
*
tty
)
{
{
struct
acm
*
acm
=
tty
->
driver_data
;
struct
acm
*
acm
=
tty
->
driver_data
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
!
ACM_READY
(
acm
))
return
;
acm
->
throttle
=
1
;
acm
->
throttle
=
1
;
}
}
static
void
acm_tty_unthrottle
(
struct
tty_struct
*
tty
)
static
void
acm_tty_unthrottle
(
struct
tty_struct
*
tty
)
{
{
struct
acm
*
acm
=
tty
->
driver_data
;
struct
acm
*
acm
=
tty
->
driver_data
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
!
ACM_READY
(
acm
))
return
;
acm
->
throttle
=
0
;
acm
->
throttle
=
0
;
if
(
acm
->
readurb
->
status
!=
-
EINPROGRESS
)
if
(
acm
->
readurb
->
status
!=
-
EINPROGRESS
)
acm_read_bulk
(
acm
->
readurb
,
NULL
);
acm_read_bulk
(
acm
->
readurb
,
NULL
);
...
@@ -427,7 +439,8 @@ static void acm_tty_unthrottle(struct tty_struct *tty)
...
@@ -427,7 +439,8 @@ static void acm_tty_unthrottle(struct tty_struct *tty)
static
void
acm_tty_break_ctl
(
struct
tty_struct
*
tty
,
int
state
)
static
void
acm_tty_break_ctl
(
struct
tty_struct
*
tty
,
int
state
)
{
{
struct
acm
*
acm
=
tty
->
driver_data
;
struct
acm
*
acm
=
tty
->
driver_data
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
acm_send_break
(
acm
,
state
?
0xffff
:
0
))
if
(
acm_send_break
(
acm
,
state
?
0xffff
:
0
))
dbg
(
"send break failed"
);
dbg
(
"send break failed"
);
}
}
...
@@ -496,7 +509,8 @@ static void acm_tty_set_termios(struct tty_struct *tty, struct termios *termios_
...
@@ -496,7 +509,8 @@ static void acm_tty_set_termios(struct tty_struct *tty, struct termios *termios_
struct
acm_line
newline
;
struct
acm_line
newline
;
int
newctrl
=
acm
->
ctrlout
;
int
newctrl
=
acm
->
ctrlout
;
if
(
!
ACM_READY
(
acm
))
return
;
if
(
!
ACM_READY
(
acm
))
return
;
newline
.
speed
=
cpu_to_le32p
(
acm_tty_speed
+
newline
.
speed
=
cpu_to_le32p
(
acm_tty_speed
+
(
termios
->
c_cflag
&
CBAUD
&
~
CBAUDEX
)
+
(
termios
->
c_cflag
&
CBAUDEX
?
15
:
0
));
(
termios
->
c_cflag
&
CBAUD
&
~
CBAUDEX
)
+
(
termios
->
c_cflag
&
CBAUDEX
?
15
:
0
));
...
...
drivers/usb/class/usb-midi.c
View file @
bfb77631
...
@@ -1355,8 +1355,10 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1355,8 +1355,10 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
next
=
p2
+
p2
[
0
];
next
=
p2
+
p2
[
0
];
length
-=
p2
[
0
];
length
-=
p2
[
0
];
if
(
p2
[
0
]
<
2
)
break
;
if
(
p2
[
0
]
<
2
)
if
(
p2
[
1
]
!=
USB_DT_CS_INTERFACE
)
break
;
break
;
if
(
p2
[
1
]
!=
USB_DT_CS_INTERFACE
)
break
;
if
(
p2
[
2
]
==
MIDI_IN_JACK
&&
p2
[
0
]
>=
6
)
{
if
(
p2
[
2
]
==
MIDI_IN_JACK
&&
p2
[
0
]
>=
6
)
{
jack
=
p2
[
4
];
jack
=
p2
[
4
];
#ifdef HAVE_JACK_STRINGS
#ifdef HAVE_JACK_STRINGS
...
@@ -1366,7 +1368,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1366,7 +1368,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
jack
,
(
p2
[
3
]
==
EMBEDDED_JACK
)
?
"EMBEDDED"
:
"EXTERNAL"
);
jack
,
(
p2
[
3
]
==
EMBEDDED_JACK
)
?
"EMBEDDED"
:
"EXTERNAL"
);
}
else
if
(
p2
[
2
]
==
MIDI_OUT_JACK
&&
p2
[
0
]
>=
6
)
{
}
else
if
(
p2
[
2
]
==
MIDI_OUT_JACK
&&
p2
[
0
]
>=
6
)
{
pins
=
p2
[
5
];
pins
=
p2
[
5
];
if
(
p2
[
0
]
<
(
6
+
2
*
pins
)
)
continue
;
if
(
p2
[
0
]
<
(
6
+
2
*
pins
)
)
continue
;
jack
=
p2
[
4
];
jack
=
p2
[
4
];
#ifdef HAVE_JACK_STRINGS
#ifdef HAVE_JACK_STRINGS
jack2string
[
jack
]
=
p2
[
5
+
2
*
pins
];
jack2string
[
jack
]
=
p2
[
5
+
2
*
pins
];
...
@@ -1375,9 +1378,11 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1375,9 +1378,11 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
jack
,
(
p2
[
3
]
==
EMBEDDED_JACK
)
?
"EMBEDDED"
:
"EXTERNAL"
,
pins
);
jack
,
(
p2
[
3
]
==
EMBEDDED_JACK
)
?
"EMBEDDED"
:
"EXTERNAL"
,
pins
);
}
else
if
(
p2
[
2
]
==
ELEMENT_DESCRIPTOR
&&
p2
[
0
]
>=
10
)
{
}
else
if
(
p2
[
2
]
==
ELEMENT_DESCRIPTOR
&&
p2
[
0
]
>=
10
)
{
pins
=
p2
[
4
];
pins
=
p2
[
4
];
if
(
p2
[
0
]
<
(
9
+
2
*
pins
)
)
continue
;
if
(
p2
[
0
]
<
(
9
+
2
*
pins
)
)
continue
;
nbytes
=
p2
[
8
+
2
*
pins
];
nbytes
=
p2
[
8
+
2
*
pins
];
if
(
p2
[
0
]
<
(
10
+
2
*
pins
+
nbytes
)
)
continue
;
if
(
p2
[
0
]
<
(
10
+
2
*
pins
+
nbytes
)
)
continue
;
longBits
=
0L
;
longBits
=
0L
;
for
(
offset
=
0
,
shift
=
0
;
offset
<
nbytes
&&
offset
<
8
;
offset
++
,
shift
+=
8
)
{
for
(
offset
=
0
,
shift
=
0
;
offset
<
nbytes
&&
offset
<
8
;
offset
++
,
shift
+=
8
)
{
longBits
|=
((
long
)(
p2
[
9
+
2
*
pins
+
offset
]))
<<
shift
;
longBits
|=
((
long
)(
p2
[
9
+
2
*
pins
+
offset
]))
<<
shift
;
...
@@ -1408,7 +1413,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1408,7 +1413,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
if
(
p2
&&
next
&&
(
p2
>
next
)
)
if
(
p2
&&
next
&&
(
p2
>
next
)
)
p2
=
0
;
p2
=
0
;
if
(
p1
[
0
]
<
9
||
!
p2
||
p2
[
0
]
<
4
)
continue
;
if
(
p1
[
0
]
<
9
||
!
p2
||
p2
[
0
]
<
4
)
continue
;
if
(
(
p1
[
2
]
&
0x80
)
==
0x80
)
{
if
(
(
p1
[
2
]
&
0x80
)
==
0x80
)
{
if
(
iep
<
15
)
{
if
(
iep
<
15
)
{
...
@@ -1417,7 +1423,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1417,7 +1423,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
pins
=
16
;
pins
=
16
;
u
->
in
[
iep
].
endpoint
=
p1
[
2
];
u
->
in
[
iep
].
endpoint
=
p1
[
2
];
u
->
in
[
iep
].
cableId
=
(
1
<<
pins
)
-
1
;
u
->
in
[
iep
].
cableId
=
(
1
<<
pins
)
-
1
;
if
(
u
->
in
[
iep
].
cableId
)
iep
++
;
if
(
u
->
in
[
iep
].
cableId
)
iep
++
;
if
(
iep
<
15
)
{
if
(
iep
<
15
)
{
u
->
in
[
iep
].
endpoint
=
-
1
;
u
->
in
[
iep
].
endpoint
=
-
1
;
u
->
in
[
iep
].
cableId
=
-
1
;
u
->
in
[
iep
].
cableId
=
-
1
;
...
@@ -1430,7 +1437,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1430,7 +1437,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
pins
=
16
;
pins
=
16
;
u
->
out
[
oep
].
endpoint
=
p1
[
2
];
u
->
out
[
oep
].
endpoint
=
p1
[
2
];
u
->
out
[
oep
].
cableId
=
(
1
<<
pins
)
-
1
;
u
->
out
[
oep
].
cableId
=
(
1
<<
pins
)
-
1
;
if
(
u
->
out
[
oep
].
cableId
)
oep
++
;
if
(
u
->
out
[
oep
].
cableId
)
oep
++
;
if
(
oep
<
15
)
{
if
(
oep
<
15
)
{
u
->
out
[
oep
].
endpoint
=
-
1
;
u
->
out
[
oep
].
endpoint
=
-
1
;
u
->
out
[
oep
].
cableId
=
-
1
;
u
->
out
[
oep
].
cableId
=
-
1
;
...
@@ -1446,7 +1454,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1446,7 +1454,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
next
=
find_descriptor
(
buffer
,
bufSize
,
p1
,
USB_DT_ENDPOINT
,
next
=
find_descriptor
(
buffer
,
bufSize
,
p1
,
USB_DT_ENDPOINT
,
ifnum
,
altSetting
);
ifnum
,
altSetting
);
if
(
p1
[
0
]
<
7
)
continue
;
if
(
p1
[
0
]
<
7
)
continue
;
if
(
(
p1
[
2
]
&
0x80
)
==
0x80
)
{
if
(
(
p1
[
2
]
&
0x80
)
==
0x80
)
{
if
(
iep
<
15
)
{
if
(
iep
<
15
)
{
...
@@ -1455,7 +1464,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1455,7 +1464,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
pins
=
16
;
pins
=
16
;
u
->
in
[
iep
].
endpoint
=
p1
[
2
];
u
->
in
[
iep
].
endpoint
=
p1
[
2
];
u
->
in
[
iep
].
cableId
=
(
1
<<
pins
)
-
1
;
u
->
in
[
iep
].
cableId
=
(
1
<<
pins
)
-
1
;
if
(
u
->
in
[
iep
].
cableId
)
iep
++
;
if
(
u
->
in
[
iep
].
cableId
)
iep
++
;
if
(
iep
<
15
)
{
if
(
iep
<
15
)
{
u
->
in
[
iep
].
endpoint
=
-
1
;
u
->
in
[
iep
].
endpoint
=
-
1
;
u
->
in
[
iep
].
cableId
=
-
1
;
u
->
in
[
iep
].
cableId
=
-
1
;
...
@@ -1468,7 +1478,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1468,7 +1478,8 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
pins
=
16
;
pins
=
16
;
u
->
out
[
oep
].
endpoint
=
p1
[
2
];
u
->
out
[
oep
].
endpoint
=
p1
[
2
];
u
->
out
[
oep
].
cableId
=
(
1
<<
pins
)
-
1
;
u
->
out
[
oep
].
cableId
=
(
1
<<
pins
)
-
1
;
if
(
u
->
out
[
oep
].
cableId
)
oep
++
;
if
(
u
->
out
[
oep
].
cableId
)
oep
++
;
if
(
oep
<
15
)
{
if
(
oep
<
15
)
{
u
->
out
[
oep
].
endpoint
=
-
1
;
u
->
out
[
oep
].
endpoint
=
-
1
;
u
->
out
[
oep
].
cableId
=
-
1
;
u
->
out
[
oep
].
cableId
=
-
1
;
...
@@ -1486,7 +1497,7 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
...
@@ -1486,7 +1497,7 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
return
u
;
return
u
;
error_end:
error_end:
if
(
u
)
kfree
(
u
);
kfree
(
u
);
return
NULL
;
return
NULL
;
}
}
...
@@ -1501,7 +1512,8 @@ static int on_bits( unsigned short v )
...
@@ -1501,7 +1512,8 @@ static int on_bits( unsigned short v )
int
ret
=
0
;
int
ret
=
0
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
for
(
i
=
0
;
i
<
16
;
i
++
)
{
if
(
v
&
(
1
<<
i
)
)
ret
++
;
if
(
v
&
(
1
<<
i
)
)
ret
++
;
}
}
return
ret
;
return
ret
;
...
@@ -1578,7 +1590,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
...
@@ -1578,7 +1590,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
if
(
alt
<
0
)
{
if
(
alt
<
0
)
{
alt
=
get_alt_setting
(
d
,
u
->
interface
);
alt
=
get_alt_setting
(
d
,
u
->
interface
);
}
}
if
(
alt
<
0
)
{
return
-
ENXIO
;
}
if
(
alt
<
0
)
return
-
ENXIO
;
/* Configure interface */
/* Configure interface */
if
(
usb_set_interface
(
d
,
u
->
interface
,
alt
)
<
0
)
{
if
(
usb_set_interface
(
d
,
u
->
interface
,
alt
)
<
0
)
{
...
@@ -1596,7 +1609,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
...
@@ -1596,7 +1609,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
&&
u
->
in
[
inEndpoints
].
cableId
>=
0
)
{
&&
u
->
in
[
inEndpoints
].
cableId
>=
0
)
{
inDevs
+=
on_bits
((
unsigned
short
)
u
->
in
[
inEndpoints
].
cableId
);
inDevs
+=
on_bits
((
unsigned
short
)
u
->
in
[
inEndpoints
].
cableId
);
mins
[
inEndpoints
]
=
alloc_midi_in_endpoint
(
d
,
u
->
in
[
inEndpoints
].
endpoint
);
mins
[
inEndpoints
]
=
alloc_midi_in_endpoint
(
d
,
u
->
in
[
inEndpoints
].
endpoint
);
if
(
mins
[
inEndpoints
]
==
NULL
)
{
goto
error_end
;
}
if
(
mins
[
inEndpoints
]
==
NULL
)
goto
error_end
;
inEndpoints
++
;
inEndpoints
++
;
}
}
...
@@ -1605,7 +1619,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
...
@@ -1605,7 +1619,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
&&
u
->
out
[
outEndpoints
].
cableId
>=
0
)
{
&&
u
->
out
[
outEndpoints
].
cableId
>=
0
)
{
outDevs
+=
on_bits
((
unsigned
short
)
u
->
out
[
outEndpoints
].
cableId
);
outDevs
+=
on_bits
((
unsigned
short
)
u
->
out
[
outEndpoints
].
cableId
);
mouts
[
outEndpoints
]
=
alloc_midi_out_endpoint
(
d
,
u
->
out
[
outEndpoints
].
endpoint
);
mouts
[
outEndpoints
]
=
alloc_midi_out_endpoint
(
d
,
u
->
out
[
outEndpoints
].
endpoint
);
if
(
mouts
[
outEndpoints
]
==
NULL
)
{
goto
error_end
;
}
if
(
mouts
[
outEndpoints
]
==
NULL
)
goto
error_end
;
outEndpoints
++
;
outEndpoints
++
;
}
}
...
@@ -1707,7 +1722,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
...
@@ -1707,7 +1722,8 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
mout
=
mouts
[
outEndpoint
];
mout
=
mouts
[
outEndpoint
];
mdevs
[
i
]
=
allocMidiDev
(
s
,
min
,
mout
,
inCableId
,
outCableId
);
mdevs
[
i
]
=
allocMidiDev
(
s
,
min
,
mout
,
inCableId
,
outCableId
);
if
(
mdevs
[
i
]
==
NULL
)
{
goto
error_end
;
}
if
(
mdevs
[
i
]
==
NULL
)
goto
error_end
;
}
}
...
@@ -1962,11 +1978,15 @@ static int detect_by_hand(struct usb_device *d, unsigned int ifnum, struct usb_m
...
@@ -1962,11 +1978,15 @@ static int detect_by_hand(struct usb_device *d, unsigned int ifnum, struct usb_m
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
ualt
<
0
)
{
ualt
=
-
1
;
}
if
(
ualt
<
0
)
ualt
=
-
1
;
if
(
umin
<
0
||
umin
>
15
)
{
umin
=
0x01
|
USB_DIR_IN
;
}
if
(
umin
<
0
||
umin
>
15
)
if
(
umout
<
0
||
umout
>
15
)
{
umout
=
0x01
;
}
umin
=
0x01
|
USB_DIR_IN
;
if
(
ucable
<
0
||
ucable
>
15
)
{
ucable
=
0
;
}
if
(
umout
<
0
||
umout
>
15
)
umout
=
0x01
;
if
(
ucable
<
0
||
ucable
>
15
)
ucable
=
0
;
u
.
deviceName
=
0
;
/* A flag for alloc_usb_midi_device to get device name
u
.
deviceName
=
0
;
/* A flag for alloc_usb_midi_device to get device name
from device. */
from device. */
...
...
drivers/usb/class/usblp.c
View file @
bfb77631
...
@@ -298,8 +298,10 @@ static int usblp_check_status(struct usblp *usblp, int err)
...
@@ -298,8 +298,10 @@ static int usblp_check_status(struct usblp *usblp, int err)
status
=
*
usblp
->
statusbuf
;
status
=
*
usblp
->
statusbuf
;
if
(
~
status
&
LP_PERRORP
)
{
if
(
~
status
&
LP_PERRORP
)
{
newerr
=
3
;
newerr
=
3
;
if
(
status
&
LP_POUTPA
)
newerr
=
1
;
if
(
status
&
LP_POUTPA
)
if
(
~
status
&
LP_PSELECD
)
newerr
=
2
;
newerr
=
1
;
if
(
~
status
&
LP_PSELECD
)
newerr
=
2
;
}
}
if
(
newerr
!=
err
)
if
(
newerr
!=
err
)
...
@@ -926,8 +928,8 @@ static int usblp_probe(struct usb_interface *intf,
...
@@ -926,8 +928,8 @@ static int usblp_probe(struct usb_interface *intf,
if
(
usblp
->
readbuf
)
if
(
usblp
->
readbuf
)
usb_buffer_free
(
usblp
->
dev
,
USBLP_BUF_SIZE
,
usb_buffer_free
(
usblp
->
dev
,
USBLP_BUF_SIZE
,
usblp
->
readbuf
,
usblp
->
writeurb
->
transfer_dma
);
usblp
->
readbuf
,
usblp
->
writeurb
->
transfer_dma
);
if
(
usblp
->
statusbuf
)
kfree
(
usblp
->
statusbuf
);
kfree
(
usblp
->
statusbuf
);
if
(
usblp
->
device_id_string
)
kfree
(
usblp
->
device_id_string
);
kfree
(
usblp
->
device_id_string
);
usb_free_urb
(
usblp
->
writeurb
);
usb_free_urb
(
usblp
->
writeurb
);
usb_free_urb
(
usblp
->
readurb
);
usb_free_urb
(
usblp
->
readurb
);
kfree
(
usblp
);
kfree
(
usblp
);
...
@@ -987,10 +989,12 @@ static int usblp_select_alts(struct usblp *usblp)
...
@@ -987,10 +989,12 @@ static int usblp_select_alts(struct usblp *usblp)
continue
;
continue
;
if
(
!
(
epd
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
))
{
if
(
!
(
epd
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
))
{
if
(
!
epwrite
)
epwrite
=
epd
;
if
(
!
epwrite
)
epwrite
=
epd
;
}
else
{
}
else
{
if
(
!
epread
)
epread
=
epd
;
if
(
!
epread
)
epread
=
epd
;
}
}
}
}
...
@@ -1020,9 +1024,12 @@ static int usblp_select_alts(struct usblp *usblp)
...
@@ -1020,9 +1024,12 @@ static int usblp_select_alts(struct usblp *usblp)
return
proto_bias
;
return
proto_bias
;
/* Ordering is important here. */
/* Ordering is important here. */
if
(
usblp
->
protocol
[
2
].
alt_setting
!=
-
1
)
return
2
;
if
(
usblp
->
protocol
[
2
].
alt_setting
!=
-
1
)
if
(
usblp
->
protocol
[
1
].
alt_setting
!=
-
1
)
return
1
;
return
2
;
if
(
usblp
->
protocol
[
3
].
alt_setting
!=
-
1
)
return
3
;
if
(
usblp
->
protocol
[
1
].
alt_setting
!=
-
1
)
return
1
;
if
(
usblp
->
protocol
[
3
].
alt_setting
!=
-
1
)
return
3
;
/* If nothing is available, then don't bind to this device. */
/* If nothing is available, then don't bind to this device. */
return
-
1
;
return
-
1
;
...
@@ -1036,7 +1043,8 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)
...
@@ -1036,7 +1043,8 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)
return
-
EINVAL
;
return
-
EINVAL
;
alts
=
usblp
->
protocol
[
protocol
].
alt_setting
;
alts
=
usblp
->
protocol
[
protocol
].
alt_setting
;
if
(
alts
<
0
)
return
-
EINVAL
;
if
(
alts
<
0
)
return
-
EINVAL
;
r
=
usb_set_interface
(
usblp
->
dev
,
usblp
->
ifnum
,
alts
);
r
=
usb_set_interface
(
usblp
->
dev
,
usblp
->
ifnum
,
alts
);
if
(
r
<
0
)
{
if
(
r
<
0
)
{
err
(
"can't set desired altsetting %d on interface %d"
,
err
(
"can't set desired altsetting %d on interface %d"
,
...
...
drivers/usb/core/hcd-pci.c
View file @
bfb77631
...
@@ -209,7 +209,8 @@ void usb_hcd_pci_remove (struct pci_dev *dev)
...
@@ -209,7 +209,8 @@ void usb_hcd_pci_remove (struct pci_dev *dev)
return
;
return
;
dev_info
(
hcd
->
controller
,
"remove, state %x
\n
"
,
hcd
->
state
);
dev_info
(
hcd
->
controller
,
"remove, state %x
\n
"
,
hcd
->
state
);
if
(
in_interrupt
())
BUG
();
if
(
in_interrupt
())
BUG
();
hub
=
hcd
->
self
.
root_hub
;
hub
=
hcd
->
self
.
root_hub
;
hcd
->
state
=
USB_STATE_QUIESCING
;
hcd
->
state
=
USB_STATE_QUIESCING
;
...
...
drivers/usb/gadget/Kconfig
View file @
bfb77631
...
@@ -35,9 +35,8 @@ menuconfig USB_GADGET
...
@@ -35,9 +35,8 @@ menuconfig USB_GADGET
#
#
# USB Peripheral Controller Support
# USB Peripheral Controller Support
#
#
# FIXME convert to tristate choice when "choice" behaves as specified
choice
#
prompt "USB Peripheral Controller Support"
comment "USB Peripheral Controller Support"
depends on USB_GADGET
depends on USB_GADGET
config USB_NET2280
config USB_NET2280
...
@@ -55,19 +54,17 @@ config USB_NET2280
...
@@ -55,19 +54,17 @@ config USB_NET2280
dynamically linked module called "net2280" and force all
dynamically linked module called "net2280" and force all
gadget drivers to also be dynamically linked.
gadget drivers to also be dynamically linked.
endchoice
#
#
# USB Gadget Drivers
# USB Gadget Drivers
#
#
# FIXME only one of these may be statically linked; choice/endchoice.
choice
#
prompt "USB Gadget Drivers"
comment "USB Gadget Drivers"
depends on USB_GADGET
depends on USB_GADGET
default USB_ETH
# FIXME want better dependency/config approach for drivers. with only
# FIXME want a cleaner dependency/config approach for drivers.
# two knobs to tweak (driver y/m/n, and a hardware symbol) there's no
# good excuse for Kconfig to cause such trouble here. there are clear
# bugs (coredumps, multiple choices enabled, and more) in its (boolean)
# "choice" logic too ...
config USB_ZERO
config USB_ZERO
tristate "Gadget Zero (DEVELOPMENT)"
tristate "Gadget Zero (DEVELOPMENT)"
...
@@ -150,4 +147,6 @@ config USB_ETH_SA1100
...
@@ -150,4 +147,6 @@ config USB_ETH_SA1100
depends on USB_ETH && USB_SA1100
depends on USB_ETH && USB_SA1100
default y
default y
endchoice
# endmenuconfig
# endmenuconfig
drivers/usb/gadget/net2280.c
View file @
bfb77631
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
#include <asm/unaligned.h>
#include <asm/unaligned.h>
#define
DRIVER_DESC "NetChip 2280 USB Peripheral Controller"
#define
DRIVER_DESC "NetChip 2280 USB Peripheral Controller"
#define DRIVER_VERSION "May Day 2003"
#define DRIVER_VERSION "May Day 2003"
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
...
@@ -98,6 +98,15 @@ static int use_dma = 1;
...
@@ -98,6 +98,15 @@ static int use_dma = 1;
/* "modprobe net2280 use_dma=n" etc */
/* "modprobe net2280 use_dma=n" etc */
module_param
(
use_dma
,
bool
,
S_IRUGO
|
S_IWUSR
);
module_param
(
use_dma
,
bool
,
S_IRUGO
|
S_IWUSR
);
/* mode 0 == ep-{a,b,c,d} 1K fifo each
* mode 1 == ep-{a,b} 2K fifo each, ep-{c,d} unavailable
* mode 2 == ep-a 2K fifo, ep-{b,c} 1K each, ep-d unavailable
*/
static
ushort
fifo_mode
=
0
;
/* "modprobe net2280 fifo_mode=1" etc */
module_param
(
fifo_mode
,
ushort
,
0644
);
#define DIR_STRING(bAddress) (((bAddress) & USB_DIR_IN) ? "in" : "out")
#define DIR_STRING(bAddress) (((bAddress) & USB_DIR_IN) ? "in" : "out")
#if defined(USE_SYSFS_DEBUG_FILES) || defined (DEBUG)
#if defined(USE_SYSFS_DEBUG_FILES) || defined (DEBUG)
...
@@ -384,7 +393,7 @@ net2280_free_request (struct usb_ep *_ep, struct usb_request *_req)
...
@@ -384,7 +393,7 @@ net2280_free_request (struct usb_ep *_ep, struct usb_request *_req)
struct
net2280_request
*
req
;
struct
net2280_request
*
req
;
ep
=
container_of
(
_ep
,
struct
net2280_ep
,
ep
);
ep
=
container_of
(
_ep
,
struct
net2280_ep
,
ep
);
if
(
!
ep
||
!
_req
||
(
!
ep
->
desc
&&
ep
->
num
!=
0
)
)
if
(
!
ep
||
!
_req
)
return
;
return
;
req
=
container_of
(
_req
,
struct
net2280_request
,
req
);
req
=
container_of
(
_req
,
struct
net2280_request
,
req
);
...
@@ -411,7 +420,7 @@ net2280_free_request (struct usb_ep *_ep, struct usb_request *_req)
...
@@ -411,7 +420,7 @@ net2280_free_request (struct usb_ep *_ep, struct usb_request *_req)
#if defined(CONFIG_X86)
#if defined(CONFIG_X86)
#define USE_KMALLOC
#define USE_KMALLOC
#elif define(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
#elif define
d
(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
#define USE_KMALLOC
#define USE_KMALLOC
/* FIXME there are other cases, including an x86-64 one ... */
/* FIXME there are other cases, including an x86-64 one ... */
...
@@ -493,6 +502,7 @@ write_fifo (struct net2280_ep *ep, struct usb_request *req)
...
@@ -493,6 +502,7 @@ write_fifo (struct net2280_ep *ep, struct usb_request *req)
{
{
struct
net2280_ep_regs
*
regs
=
ep
->
regs
;
struct
net2280_ep_regs
*
regs
=
ep
->
regs
;
u8
*
buf
;
u8
*
buf
;
u32
tmp
;
unsigned
count
,
total
;
unsigned
count
,
total
;
/* INVARIANT: fifo is currently empty. (testable) */
/* INVARIANT: fifo is currently empty. (testable) */
...
@@ -516,14 +526,17 @@ write_fifo (struct net2280_ep *ep, struct usb_request *req)
...
@@ -516,14 +526,17 @@ write_fifo (struct net2280_ep *ep, struct usb_request *req)
* should normally be full (4 bytes) and successive partial
* should normally be full (4 bytes) and successive partial
* lines are ok only in certain cases.
* lines are ok only in certain cases.
*/
*/
writel
(
get_unaligned
((
u32
*
)
buf
),
&
regs
->
ep_data
);
tmp
=
get_unaligned
((
u32
*
)
buf
);
cpu_to_le32s
(
&
tmp
);
writel
(
tmp
,
&
regs
->
ep_data
);
buf
+=
4
;
buf
+=
4
;
count
-=
4
;
count
-=
4
;
}
}
/* last fifo entry is "short" unless we wrote a full packet */
/* last fifo entry is "short" unless we wrote a full packet */
if
(
total
<
ep
->
ep
.
maxpacket
)
{
if
(
total
<
ep
->
ep
.
maxpacket
)
{
u32
tmp
=
count
?
get_unaligned
((
u32
*
)
buf
)
:
count
;
tmp
=
count
?
get_unaligned
((
u32
*
)
buf
)
:
count
;
cpu_to_le32s
(
&
tmp
);
set_fifo_bytecount
(
ep
,
count
&
0x03
);
set_fifo_bytecount
(
ep
,
count
&
0x03
);
writel
(
tmp
,
&
regs
->
ep_data
);
writel
(
tmp
,
&
regs
->
ep_data
);
}
}
...
@@ -623,12 +636,15 @@ read_fifo (struct net2280_ep *ep, struct net2280_request *req)
...
@@ -623,12 +636,15 @@ read_fifo (struct net2280_ep *ep, struct net2280_request *req)
req
,
req
->
req
.
actual
,
req
->
req
.
length
);
req
,
req
->
req
.
actual
,
req
->
req
.
length
);
while
(
count
>=
4
)
{
while
(
count
>=
4
)
{
put_unaligned
(
readl
(
&
regs
->
ep_data
),
(
u32
*
)
buf
);
tmp
=
readl
(
&
regs
->
ep_data
);
cpu_to_le32s
(
&
tmp
);
put_unaligned
(
tmp
,
(
u32
*
)
buf
);
buf
+=
4
;
buf
+=
4
;
count
-=
4
;
count
-=
4
;
}
}
if
(
count
)
{
if
(
count
)
{
tmp
=
readl
(
&
regs
->
ep_data
);
tmp
=
readl
(
&
regs
->
ep_data
);
cpu_to_le32s
(
&
tmp
);
do
{
do
{
*
buf
++
=
(
u8
)
tmp
;
*
buf
++
=
(
u8
)
tmp
;
tmp
>>=
8
;
tmp
>>=
8
;
...
@@ -1193,11 +1209,13 @@ net2280_fifo_status (struct usb_ep *_ep)
...
@@ -1193,11 +1209,13 @@ net2280_fifo_status (struct usb_ep *_ep)
ep
=
container_of
(
_ep
,
struct
net2280_ep
,
ep
);
ep
=
container_of
(
_ep
,
struct
net2280_ep
,
ep
);
if
(
!
_ep
||
(
!
ep
->
desc
&&
ep
->
num
!=
0
))
if
(
!
_ep
||
(
!
ep
->
desc
&&
ep
->
num
!=
0
))
return
-
E
INVAL
;
return
-
E
NODEV
;
if
(
!
ep
->
dev
->
driver
||
ep
->
dev
->
gadget
.
speed
==
USB_SPEED_UNKNOWN
)
if
(
!
ep
->
dev
->
driver
||
ep
->
dev
->
gadget
.
speed
==
USB_SPEED_UNKNOWN
)
return
-
ESHUTDOWN
;
return
-
ESHUTDOWN
;
avail
=
readl
(
&
ep
->
regs
->
ep_avail
);
avail
=
readl
(
&
ep
->
regs
->
ep_avail
)
&
((
1
<<
12
)
-
1
);
if
(
avail
>
ep
->
fifo_size
)
return
-
EOVERFLOW
;
if
(
ep
->
is_in
)
if
(
ep
->
is_in
)
avail
=
ep
->
fifo_size
-
avail
;
avail
=
ep
->
fifo_size
-
avail
;
return
avail
;
return
avail
;
...
@@ -1260,7 +1278,7 @@ static int net2280_wakeup (struct usb_gadget *_gadget)
...
@@ -1260,7 +1278,7 @@ static int net2280_wakeup (struct usb_gadget *_gadget)
if
(
!
_gadget
)
if
(
!
_gadget
)
return
0
;
return
0
;
dev
=
container_of
(
_gadget
,
struct
net2280
,
gadget
);
dev
=
container_of
(
_gadget
,
struct
net2280
,
gadget
);
writel
(
1
<<
GENERATE_RESUME
,
dev
->
usb
->
usbstat
);
writel
(
1
<<
GENERATE_RESUME
,
&
dev
->
usb
->
usbstat
);
/* pci writes may still be posted */
/* pci writes may still be posted */
return
0
;
return
0
;
...
@@ -1649,7 +1667,7 @@ static void usb_reset (struct net2280 *dev)
...
@@ -1649,7 +1667,7 @@ static void usb_reset (struct net2280 *dev)
writel
(
tmp
,
&
dev
->
regs
->
devinit
);
writel
(
tmp
,
&
dev
->
regs
->
devinit
);
/* standard fifo and endpoint allocations */
/* standard fifo and endpoint allocations */
set_fifo_mode
(
dev
,
0
);
set_fifo_mode
(
dev
,
(
fifo_mode
<=
2
)
?
fifo_mode
:
0
);
}
}
static
void
usb_reinit
(
struct
net2280
*
dev
)
static
void
usb_reinit
(
struct
net2280
*
dev
)
...
@@ -2119,6 +2137,10 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat)
...
@@ -2119,6 +2137,10 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat)
,
&
ep
->
regs
->
ep_stat
);
,
&
ep
->
regs
->
ep_stat
);
u
.
raw
[
0
]
=
readl
(
&
dev
->
usb
->
setup0123
);
u
.
raw
[
0
]
=
readl
(
&
dev
->
usb
->
setup0123
);
u
.
raw
[
1
]
=
readl
(
&
dev
->
usb
->
setup4567
);
u
.
raw
[
1
]
=
readl
(
&
dev
->
usb
->
setup4567
);
cpu_to_le32s
(
&
u
.
raw
[
0
]);
cpu_to_le32s
(
&
u
.
raw
[
1
]);
le16_to_cpus
(
&
u
.
r
.
wValue
);
le16_to_cpus
(
&
u
.
r
.
wValue
);
le16_to_cpus
(
&
u
.
r
.
wIndex
);
le16_to_cpus
(
&
u
.
r
.
wIndex
);
le16_to_cpus
(
&
u
.
r
.
wLength
);
le16_to_cpus
(
&
u
.
r
.
wLength
);
...
...
drivers/usb/host/ehci-hcd.c
View file @
bfb77631
...
@@ -887,7 +887,6 @@ ehci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
...
@@ -887,7 +887,6 @@ ehci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
/* ASSERT: any requests/urbs are being unlinked */
/* ASSERT: any requests/urbs are being unlinked */
/* ASSERT: nobody can be submitting urbs for this any more */
/* ASSERT: nobody can be submitting urbs for this any more */
ehci_dbg
(
ehci
,
"ep %02x disable
\n
"
,
ep
);
epnum
=
ep
&
USB_ENDPOINT_NUMBER_MASK
;
epnum
=
ep
&
USB_ENDPOINT_NUMBER_MASK
;
if
(
epnum
!=
0
&&
(
ep
&
USB_DIR_IN
))
if
(
epnum
!=
0
&&
(
ep
&
USB_DIR_IN
))
epnum
|=
0x10
;
epnum
|=
0x10
;
...
...
drivers/usb/host/ohci-hcd.c
View file @
bfb77631
...
@@ -323,7 +323,6 @@ ohci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
...
@@ -323,7 +323,6 @@ ohci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
/* ASSERT: any requests/urbs are being unlinked */
/* ASSERT: any requests/urbs are being unlinked */
/* ASSERT: nobody can be submitting urbs for this any more */
/* ASSERT: nobody can be submitting urbs for this any more */
ohci_dbg
(
ohci
,
"ep %02x disable
\n
"
,
ep
);
epnum
<<=
1
;
epnum
<<=
1
;
if
(
epnum
!=
0
&&
!
(
ep
&
USB_DIR_IN
))
if
(
epnum
!=
0
&&
!
(
ep
&
USB_DIR_IN
))
epnum
|=
1
;
epnum
|=
1
;
...
...
drivers/usb/host/ohci-sa1111.c
View file @
bfb77631
...
@@ -209,7 +209,8 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
...
@@ -209,7 +209,8 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
err2:
err2:
hcd_buffer_destroy
(
hcd
);
hcd_buffer_destroy
(
hcd
);
if
(
hcd
)
driver
->
hcd_free
(
hcd
);
if
(
hcd
)
driver
->
hcd_free
(
hcd
);
err1:
err1:
sa1111_stop_hc
(
dev
);
sa1111_stop_hc
(
dev
);
release_mem_region
(
dev
->
res
.
start
,
dev
->
res
.
end
-
dev
->
res
.
start
+
1
);
release_mem_region
(
dev
->
res
.
start
,
dev
->
res
.
end
-
dev
->
res
.
start
+
1
);
...
@@ -237,7 +238,8 @@ void usb_hcd_sa1111_remove (struct usb_hcd *hcd, struct sa1111_dev *dev)
...
@@ -237,7 +238,8 @@ void usb_hcd_sa1111_remove (struct usb_hcd *hcd, struct sa1111_dev *dev)
info
(
"remove: %s, state %x"
,
hcd
->
self
.
bus_name
,
hcd
->
state
);
info
(
"remove: %s, state %x"
,
hcd
->
self
.
bus_name
,
hcd
->
state
);
if
(
in_interrupt
())
BUG
();
if
(
in_interrupt
())
BUG
();
hub
=
hcd
->
self
.
root_hub
;
hub
=
hcd
->
self
.
root_hub
;
hcd
->
state
=
USB_STATE_QUIESCING
;
hcd
->
state
=
USB_STATE_QUIESCING
;
...
...
drivers/usb/input/hid-core.c
View file @
bfb77631
...
@@ -61,7 +61,8 @@ static struct hid_report *hid_register_report(struct hid_device *device, unsigne
...
@@ -61,7 +61,8 @@ static struct hid_report *hid_register_report(struct hid_device *device, unsigne
return
NULL
;
return
NULL
;
memset
(
report
,
0
,
sizeof
(
struct
hid_report
));
memset
(
report
,
0
,
sizeof
(
struct
hid_report
));
if
(
id
!=
0
)
report_enum
->
numbered
=
1
;
if
(
id
!=
0
)
report_enum
->
numbered
=
1
;
report
->
id
=
id
;
report
->
id
=
id
;
report
->
type
=
type
;
report
->
type
=
type
;
...
@@ -539,11 +540,13 @@ static void hid_free_device(struct hid_device *device)
...
@@ -539,11 +540,13 @@ static void hid_free_device(struct hid_device *device)
for
(
j
=
0
;
j
<
256
;
j
++
)
{
for
(
j
=
0
;
j
<
256
;
j
++
)
{
struct
hid_report
*
report
=
report_enum
->
report_id_hash
[
j
];
struct
hid_report
*
report
=
report_enum
->
report_id_hash
[
j
];
if
(
report
)
hid_free_report
(
report
);
if
(
report
)
hid_free_report
(
report
);
}
}
}
}
if
(
device
->
rdesc
)
kfree
(
device
->
rdesc
);
if
(
device
->
rdesc
)
kfree
(
device
->
rdesc
);
kfree
(
device
);
kfree
(
device
);
}
}
...
@@ -741,7 +744,8 @@ static __inline__ __s32 snto32(__u32 value, unsigned n)
...
@@ -741,7 +744,8 @@ static __inline__ __s32 snto32(__u32 value, unsigned n)
static
__inline__
__u32
s32ton
(
__s32
value
,
unsigned
n
)
static
__inline__
__u32
s32ton
(
__s32
value
,
unsigned
n
)
{
{
__s32
a
=
value
>>
(
n
-
1
);
__s32
a
=
value
>>
(
n
-
1
);
if
(
a
&&
a
!=
-
1
)
return
value
<
0
?
1
<<
(
n
-
1
)
:
(
1
<<
(
n
-
1
))
-
1
;
if
(
a
&&
a
!=
-
1
)
return
value
<
0
?
1
<<
(
n
-
1
)
:
(
1
<<
(
n
-
1
))
-
1
;
return
value
&
((
1
<<
n
)
-
1
);
return
value
&
((
1
<<
n
)
-
1
);
}
}
...
@@ -769,7 +773,10 @@ static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u3
...
@@ -769,7 +773,10 @@ static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u3
static
__inline__
int
search
(
__s32
*
array
,
__s32
value
,
unsigned
n
)
static
__inline__
int
search
(
__s32
*
array
,
__s32
value
,
unsigned
n
)
{
{
while
(
n
--
)
if
(
*
array
++
==
value
)
return
0
;
while
(
n
--
)
{
if
(
*
array
++
==
value
)
return
0
;
}
return
-
1
;
return
-
1
;
}
}
...
@@ -814,9 +821,11 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
...
@@ -814,9 +821,11 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
if
(
HID_MAIN_ITEM_VARIABLE
&
field
->
flags
)
{
if
(
HID_MAIN_ITEM_VARIABLE
&
field
->
flags
)
{
if
(
field
->
flags
&
HID_MAIN_ITEM_RELATIVE
)
{
if
(
field
->
flags
&
HID_MAIN_ITEM_RELATIVE
)
{
if
(
!
value
[
n
])
continue
;
if
(
!
value
[
n
])
continue
;
}
else
{
}
else
{
if
(
value
[
n
]
==
field
->
value
[
n
])
continue
;
if
(
value
[
n
]
==
field
->
value
[
n
])
continue
;
}
}
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
n
],
value
[
n
],
regs
);
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
n
],
value
[
n
],
regs
);
continue
;
continue
;
...
@@ -1324,6 +1333,11 @@ void hid_init_reports(struct hid_device *hid)
...
@@ -1324,6 +1333,11 @@ void hid_init_reports(struct hid_device *hid)
#define USB_VENDOR_ID_TOPMAX 0x0663
#define USB_VENDOR_ID_TOPMAX 0x0663
#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
#define USB_VENDOR_ID_HAPP 0x078b
#define USB_DEVICE_ID_UGCI_DRIVING 0x0010
#define USB_DEVICE_ID_UGCI_FLYING 0x0020
#define USB_DEVICE_ID_UGCI_FIGHTING 0x0030
#define USB_VENDOR_ID_MGE 0x0463
#define USB_VENDOR_ID_MGE 0x0463
#define USB_DEVICE_ID_MGE_UPS 0xffff
#define USB_DEVICE_ID_MGE_UPS 0xffff
#define USB_DEVICE_ID_MGE_UPS1 0x0001
#define USB_DEVICE_ID_MGE_UPS1 0x0001
...
@@ -1357,11 +1371,11 @@ struct hid_blacklist {
...
@@ -1357,11 +1371,11 @@ struct hid_blacklist {
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PL
+
3
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PL
+
3
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PL
+
4
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PL
+
4
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PL
+
5
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PL
+
5
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
1
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
1
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
2
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
2
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
3
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
3
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
4
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
4
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
5
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_KBGEAR
,
USB_DEVICE_ID_KBGEAR_JAMSTUDIO
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_KBGEAR
,
USB_DEVICE_ID_KBGEAR_JAMSTUDIO
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_AIPTEK
,
USB_DEVICE_ID_AIPTEK_6000
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_AIPTEK
,
USB_DEVICE_ID_AIPTEK_6000
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_GRIFFIN
,
USB_DEVICE_ID_POWERMATE
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_GRIFFIN
,
USB_DEVICE_ID_POWERMATE
,
HID_QUIRK_IGNORE
},
...
@@ -1373,6 +1387,9 @@ struct hid_blacklist {
...
@@ -1373,6 +1387,9 @@ struct hid_blacklist {
{
USB_VENDOR_ID_MGE
,
USB_DEVICE_ID_MGE_UPS
,
HID_QUIRK_HIDDEV
},
{
USB_VENDOR_ID_MGE
,
USB_DEVICE_ID_MGE_UPS
,
HID_QUIRK_HIDDEV
},
{
USB_VENDOR_ID_MGE
,
USB_DEVICE_ID_MGE_UPS1
,
HID_QUIRK_HIDDEV
},
{
USB_VENDOR_ID_MGE
,
USB_DEVICE_ID_MGE_UPS1
,
HID_QUIRK_HIDDEV
},
{
USB_VENDOR_ID_TOPMAX
,
USB_DEVICE_ID_TOPMAX_COBRAPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_TOPMAX
,
USB_DEVICE_ID_TOPMAX_COBRAPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_HAPP
,
USB_DEVICE_ID_UGCI_DRIVING
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_HAPP
,
USB_DEVICE_ID_UGCI_FLYING
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_HAPP
,
USB_DEVICE_ID_UGCI_FIGHTING
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
100
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
100
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
200
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
200
,
HID_QUIRK_IGNORE
},
...
@@ -1558,9 +1575,12 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
...
@@ -1558,9 +1575,12 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
fail:
fail:
if
(
hid
->
urbin
)
usb_free_urb
(
hid
->
urbin
);
if
(
hid
->
urbin
)
if
(
hid
->
urbout
)
usb_free_urb
(
hid
->
urbout
);
usb_free_urb
(
hid
->
urbin
);
if
(
hid
->
urbctrl
)
usb_free_urb
(
hid
->
urbctrl
);
if
(
hid
->
urbout
)
usb_free_urb
(
hid
->
urbout
);
if
(
hid
->
urbctrl
)
usb_free_urb
(
hid
->
urbctrl
);
hid_free_buffers
(
dev
,
hid
);
hid_free_buffers
(
dev
,
hid
);
hid_free_device
(
hid
);
hid_free_device
(
hid
);
...
...
drivers/usb/input/hid-input.c
View file @
bfb77631
...
@@ -351,7 +351,8 @@ static void hidinput_configure_usage(struct hid_device *device, struct hid_field
...
@@ -351,7 +351,8 @@ static void hidinput_configure_usage(struct hid_device *device, struct hid_field
usage
->
code
=
find_next_zero_bit
(
bit
,
max
+
1
,
usage
->
code
);
usage
->
code
=
find_next_zero_bit
(
bit
,
max
+
1
,
usage
->
code
);
}
}
if
(
usage
->
code
>
max
)
return
;
if
(
usage
->
code
>
max
)
return
;
if
(
usage
->
type
==
EV_ABS
)
{
if
(
usage
->
type
==
EV_ABS
)
{
int
a
=
field
->
logical_minimum
;
int
a
=
field
->
logical_minimum
;
...
...
drivers/usb/input/hid-lgff.c
View file @
bfb77631
...
@@ -154,7 +154,8 @@ int hid_lgff_init(struct hid_device* hid)
...
@@ -154,7 +154,8 @@ int hid_lgff_init(struct hid_device* hid)
}
}
private
=
kmalloc
(
sizeof
(
struct
lgff_device
),
GFP_KERNEL
);
private
=
kmalloc
(
sizeof
(
struct
lgff_device
),
GFP_KERNEL
);
if
(
!
private
)
return
-
1
;
if
(
!
private
)
return
-
1
;
memset
(
private
,
0
,
sizeof
(
struct
lgff_device
));
memset
(
private
,
0
,
sizeof
(
struct
lgff_device
));
hid
->
ff_private
=
private
;
hid
->
ff_private
=
private
;
...
@@ -216,7 +217,8 @@ static struct hid_report* hid_lgff_duplicate_report(struct hid_report* report)
...
@@ -216,7 +217,8 @@ static struct hid_report* hid_lgff_duplicate_report(struct hid_report* report)
struct
hid_report
*
ret
;
struct
hid_report
*
ret
;
ret
=
kmalloc
(
sizeof
(
struct
lgff_device
),
GFP_KERNEL
);
ret
=
kmalloc
(
sizeof
(
struct
lgff_device
),
GFP_KERNEL
);
if
(
!
ret
)
return
NULL
;
if
(
!
ret
)
return
NULL
;
*
ret
=
*
report
;
*
ret
=
*
report
;
ret
->
field
[
0
]
=
kmalloc
(
sizeof
(
struct
hid_field
),
GFP_KERNEL
);
ret
->
field
[
0
]
=
kmalloc
(
sizeof
(
struct
hid_field
),
GFP_KERNEL
);
...
...
drivers/usb/input/hid-tmff.c
View file @
bfb77631
...
@@ -112,7 +112,8 @@ int hid_tmff_init(struct hid_device *hid)
...
@@ -112,7 +112,8 @@ int hid_tmff_init(struct hid_device *hid)
struct
list_head
*
pos
;
struct
list_head
*
pos
;
private
=
kmalloc
(
sizeof
(
struct
tmff_device
),
GFP_KERNEL
);
private
=
kmalloc
(
sizeof
(
struct
tmff_device
),
GFP_KERNEL
);
if
(
!
private
)
return
-
ENOMEM
;
if
(
!
private
)
return
-
ENOMEM
;
memset
(
private
,
0
,
sizeof
(
struct
tmff_device
));
memset
(
private
,
0
,
sizeof
(
struct
tmff_device
));
hid
->
ff_private
=
private
;
hid
->
ff_private
=
private
;
...
...
drivers/usb/input/hiddev.c
View file @
bfb77631
...
@@ -96,16 +96,19 @@ hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo)
...
@@ -96,16 +96,19 @@ hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo)
case
HID_REPORT_ID_FIRST
:
case
HID_REPORT_ID_FIRST
:
list
=
report_enum
->
report_list
.
next
;
list
=
report_enum
->
report_list
.
next
;
if
(
list
==
&
report_enum
->
report_list
)
return
NULL
;
if
(
list
==
&
report_enum
->
report_list
)
return
NULL
;
rinfo
->
report_id
=
((
struct
hid_report
*
)
list
)
->
id
;
rinfo
->
report_id
=
((
struct
hid_report
*
)
list
)
->
id
;
break
;
break
;
case
HID_REPORT_ID_NEXT
:
case
HID_REPORT_ID_NEXT
:
list
=
(
struct
list_head
*
)
list
=
(
struct
list_head
*
)
report_enum
->
report_id_hash
[
rinfo
->
report_id
&
HID_REPORT_ID_MASK
];
report_enum
->
report_id_hash
[
rinfo
->
report_id
&
HID_REPORT_ID_MASK
];
if
(
list
==
NULL
)
return
NULL
;
if
(
list
==
NULL
)
return
NULL
;
list
=
list
->
next
;
list
=
list
->
next
;
if
(
list
==
&
report_enum
->
report_list
)
return
NULL
;
if
(
list
==
&
report_enum
->
report_list
)
return
NULL
;
rinfo
->
report_id
=
((
struct
hid_report
*
)
list
)
->
id
;
rinfo
->
report_id
=
((
struct
hid_report
*
)
list
)
->
id
;
break
;
break
;
...
@@ -311,7 +314,8 @@ static ssize_t hiddev_read(struct file * file, char * buffer, size_t count, loff
...
@@ -311,7 +314,8 @@ static ssize_t hiddev_read(struct file * file, char * buffer, size_t count, loff
event_size
=
((
list
->
flags
&
HIDDEV_FLAG_UREF
)
!=
0
)
?
event_size
=
((
list
->
flags
&
HIDDEV_FLAG_UREF
)
!=
0
)
?
sizeof
(
struct
hiddev_usage_ref
)
:
sizeof
(
struct
hiddev_event
);
sizeof
(
struct
hiddev_usage_ref
)
:
sizeof
(
struct
hiddev_event
);
if
(
count
<
event_size
)
return
0
;
if
(
count
<
event_size
)
return
0
;
while
(
retval
==
0
)
{
while
(
retval
==
0
)
{
if
(
list
->
head
==
list
->
tail
)
{
if
(
list
->
head
==
list
->
tail
)
{
...
@@ -404,7 +408,8 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
...
@@ -404,7 +408,8 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
struct
hid_field
*
field
;
struct
hid_field
*
field
;
int
i
;
int
i
;
if
(
!
hiddev
->
exist
)
return
-
EIO
;
if
(
!
hiddev
->
exist
)
return
-
EIO
;
switch
(
cmd
)
{
switch
(
cmd
)
{
...
@@ -646,18 +651,22 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
...
@@ -646,18 +651,22 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
if
(
_IOC_NR
(
cmd
)
==
_IOC_NR
(
HIDIOCGNAME
(
0
)))
{
if
(
_IOC_NR
(
cmd
)
==
_IOC_NR
(
HIDIOCGNAME
(
0
)))
{
int
len
;
int
len
;
if
(
!
hid
->
name
)
return
0
;
if
(
!
hid
->
name
)
return
0
;
len
=
strlen
(
hid
->
name
)
+
1
;
len
=
strlen
(
hid
->
name
)
+
1
;
if
(
len
>
_IOC_SIZE
(
cmd
))
len
=
_IOC_SIZE
(
cmd
);
if
(
len
>
_IOC_SIZE
(
cmd
))
len
=
_IOC_SIZE
(
cmd
);
return
copy_to_user
((
char
*
)
arg
,
hid
->
name
,
len
)
?
return
copy_to_user
((
char
*
)
arg
,
hid
->
name
,
len
)
?
-
EFAULT
:
len
;
-
EFAULT
:
len
;
}
}
if
(
_IOC_NR
(
cmd
)
==
_IOC_NR
(
HIDIOCGPHYS
(
0
)))
{
if
(
_IOC_NR
(
cmd
)
==
_IOC_NR
(
HIDIOCGPHYS
(
0
)))
{
int
len
;
int
len
;
if
(
!
hid
->
phys
)
return
0
;
if
(
!
hid
->
phys
)
return
0
;
len
=
strlen
(
hid
->
phys
)
+
1
;
len
=
strlen
(
hid
->
phys
)
+
1
;
if
(
len
>
_IOC_SIZE
(
cmd
))
len
=
_IOC_SIZE
(
cmd
);
if
(
len
>
_IOC_SIZE
(
cmd
))
len
=
_IOC_SIZE
(
cmd
);
return
copy_to_user
((
char
*
)
arg
,
hid
->
phys
,
len
)
?
return
copy_to_user
((
char
*
)
arg
,
hid
->
phys
,
len
)
?
-
EFAULT
:
len
;
-
EFAULT
:
len
;
}
}
...
...
drivers/usb/input/pid.c
View file @
bfb77631
...
@@ -117,7 +117,8 @@ static int hid_pid_erase(struct input_dev *dev, int id)
...
@@ -117,7 +117,8 @@ static int hid_pid_erase(struct input_dev *dev, int id)
unsigned
wanted_report
=
HID_UP_PID
|
FF_PID_USAGE_BLOCK_FREE
;
/* PID Block Free Report */
unsigned
wanted_report
=
HID_UP_PID
|
FF_PID_USAGE_BLOCK_FREE
;
/* PID Block Free Report */
int
ret
;
int
ret
;
if
(
!
CHECK_OWNERSHIP
(
id
,
pid
))
return
-
EACCES
;
if
(
!
CHECK_OWNERSHIP
(
id
,
pid
))
return
-
EACCES
;
/* Find report */
/* Find report */
ret
=
hid_find_report_by_usage
(
hid
,
wanted_report
,
&
report
,
HID_OUTPUT_REPORT
);
ret
=
hid_find_report_by_usage
(
hid
,
wanted_report
,
&
report
,
HID_OUTPUT_REPORT
);
...
@@ -214,7 +215,8 @@ static int hid_pid_upload_effect(struct input_dev *dev,
...
@@ -214,7 +215,8 @@ static int hid_pid_upload_effect(struct input_dev *dev,
}
}
else
{
else
{
/* We want to update an effect */
/* We want to update an effect */
if
(
!
CHECK_OWNERSHIP
(
effect
->
id
,
pid_private
))
return
-
EACCES
;
if
(
!
CHECK_OWNERSHIP
(
effect
->
id
,
pid_private
))
return
-
EACCES
;
/* Parameter type cannot be updated */
/* Parameter type cannot be updated */
if
(
effect
->
type
!=
pid_private
->
effects
[
effect
->
id
].
effect
.
type
)
if
(
effect
->
type
!=
pid_private
->
effects
[
effect
->
id
].
effect
.
type
)
...
...
drivers/usb/input/usbkbd.c
View file @
bfb77631
...
@@ -137,7 +137,8 @@ int usb_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, i
...
@@ -137,7 +137,8 @@ int usb_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, i
{
{
struct
usb_kbd
*
kbd
=
dev
->
private
;
struct
usb_kbd
*
kbd
=
dev
->
private
;
if
(
type
!=
EV_LED
)
return
-
1
;
if
(
type
!=
EV_LED
)
return
-
1
;
kbd
->
newleds
=
(
!!
test_bit
(
LED_KANA
,
dev
->
led
)
<<
3
)
|
(
!!
test_bit
(
LED_COMPOSE
,
dev
->
led
)
<<
3
)
|
kbd
->
newleds
=
(
!!
test_bit
(
LED_KANA
,
dev
->
led
)
<<
3
)
|
(
!!
test_bit
(
LED_COMPOSE
,
dev
->
led
)
<<
3
)
|
...
...
drivers/usb/media/ov511.c
View file @
bfb77631
This diff is collapsed.
Click to expand it.
drivers/usb/media/se401.c
View file @
bfb77631
...
@@ -170,7 +170,8 @@ static int se401_read_proc(char *page, char **start, off_t off, int count,
...
@@ -170,7 +170,8 @@ static int se401_read_proc(char *page, char **start, off_t off, int count,
len
-=
off
;
len
-=
off
;
if
(
len
<
count
)
{
if
(
len
<
count
)
{
*
eof
=
1
;
*
eof
=
1
;
if
(
len
<=
0
)
return
0
;
if
(
len
<=
0
)
return
0
;
}
else
}
else
len
=
count
;
len
=
count
;
...
@@ -749,7 +750,8 @@ static inline void decode_JangGu_vlc (struct usb_se401 *se401, unsigned char *da
...
@@ -749,7 +750,8 @@ static inline void decode_JangGu_vlc (struct usb_se401 *se401, unsigned char *da
}
}
}
else
{
}
else
{
if
(
vlc_cod
==
2
)
{
if
(
vlc_cod
==
2
)
{
if
(
!
bit
)
vlc_data
=-
(
1
<<
vlc_size
)
+
1
;
if
(
!
bit
)
vlc_data
=
-
(
1
<<
vlc_size
)
+
1
;
vlc_cod
--
;
vlc_cod
--
;
}
}
vlc_size
--
;
vlc_size
--
;
...
@@ -1046,15 +1048,12 @@ static int se401_open(struct inode *inode, struct file *file)
...
@@ -1046,15 +1048,12 @@ static int se401_open(struct inode *inode, struct file *file)
if
(
se401
->
user
)
if
(
se401
->
user
)
return
-
EBUSY
;
return
-
EBUSY
;
se401
->
user
=
1
;
se401
->
fbuf
=
rvmalloc
(
se401
->
maxframesize
*
SE401_NUMFRAMES
);
se401
->
fbuf
=
rvmalloc
(
se401
->
maxframesize
*
SE401_NUMFRAMES
);
if
(
se401
->
fbuf
)
if
(
!
se401
->
fbuf
)
err
=-
ENOMEM
;
if
(
0
!=
err
)
{
se401
->
user
=
0
;
}
else
{
file
->
private_data
=
dev
;
file
->
private_data
=
dev
;
}
else
err
=
-
ENOMEM
;
se401
->
user
=
!
err
;
return
err
;
return
err
;
}
}
...
...
drivers/usb/media/vicam.c
View file @
bfb77631
...
@@ -1139,7 +1139,8 @@ vicam_create_proc_entry(struct vicam_camera *cam)
...
@@ -1139,7 +1139,8 @@ vicam_create_proc_entry(struct vicam_camera *cam)
cam
->
proc_dir
=
create_proc_entry
(
name
,
S_IFDIR
,
vicam_proc_root
);
cam
->
proc_dir
=
create_proc_entry
(
name
,
S_IFDIR
,
vicam_proc_root
);
if
(
!
cam
->
proc_dir
)
return
;
// We should probably return an error here
if
(
!
cam
->
proc_dir
)
return
;
// FIXME: We should probably return an error here
ent
=
ent
=
create_proc_entry
(
"shutter"
,
S_IFREG
|
S_IRUGO
,
cam
->
proc_dir
);
create_proc_entry
(
"shutter"
,
S_IFREG
|
S_IRUGO
,
cam
->
proc_dir
);
...
...
drivers/usb/misc/auerswald.c
View file @
bfb77631
...
@@ -572,7 +572,8 @@ static int auerchain_setup (pauerchain_t acp, unsigned int numElements)
...
@@ -572,7 +572,8 @@ static int auerchain_setup (pauerchain_t acp, unsigned int numElements)
/* fill the list of free elements */
/* fill the list of free elements */
for
(;
numElements
;
numElements
--
)
{
for
(;
numElements
;
numElements
--
)
{
acep
=
(
pauerchainelement_t
)
kmalloc
(
sizeof
(
auerchainelement_t
),
GFP_KERNEL
);
acep
=
(
pauerchainelement_t
)
kmalloc
(
sizeof
(
auerchainelement_t
),
GFP_KERNEL
);
if
(
!
acep
)
goto
ac_fail
;
if
(
!
acep
)
goto
ac_fail
;
memset
(
acep
,
0
,
sizeof
(
auerchainelement_t
));
memset
(
acep
,
0
,
sizeof
(
auerchainelement_t
));
INIT_LIST_HEAD
(
&
acep
->
list
);
INIT_LIST_HEAD
(
&
acep
->
list
);
list_add_tail
(
&
acep
->
list
,
&
acp
->
free_list
);
list_add_tail
(
&
acep
->
list
,
&
acp
->
free_list
);
...
@@ -780,16 +781,20 @@ static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned
...
@@ -780,16 +781,20 @@ static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned
/* fill the list of free elements */
/* fill the list of free elements */
for
(;
numElements
;
numElements
--
)
{
for
(;
numElements
;
numElements
--
)
{
bep
=
(
pauerbuf_t
)
kmalloc
(
sizeof
(
auerbuf_t
),
GFP_KERNEL
);
bep
=
(
pauerbuf_t
)
kmalloc
(
sizeof
(
auerbuf_t
),
GFP_KERNEL
);
if
(
!
bep
)
goto
bl_fail
;
if
(
!
bep
)
goto
bl_fail
;
memset
(
bep
,
0
,
sizeof
(
auerbuf_t
));
memset
(
bep
,
0
,
sizeof
(
auerbuf_t
));
bep
->
list
=
bcp
;
bep
->
list
=
bcp
;
INIT_LIST_HEAD
(
&
bep
->
buff_list
);
INIT_LIST_HEAD
(
&
bep
->
buff_list
);
bep
->
bufp
=
(
char
*
)
kmalloc
(
bufsize
,
GFP_KERNEL
);
bep
->
bufp
=
(
char
*
)
kmalloc
(
bufsize
,
GFP_KERNEL
);
if
(
!
bep
->
bufp
)
goto
bl_fail
;
if
(
!
bep
->
bufp
)
goto
bl_fail
;
bep
->
dr
=
(
struct
usb_ctrlrequest
*
)
kmalloc
(
sizeof
(
struct
usb_ctrlrequest
),
GFP_KERNEL
);
bep
->
dr
=
(
struct
usb_ctrlrequest
*
)
kmalloc
(
sizeof
(
struct
usb_ctrlrequest
),
GFP_KERNEL
);
if
(
!
bep
->
dr
)
goto
bl_fail
;
if
(
!
bep
->
dr
)
goto
bl_fail
;
bep
->
urbp
=
usb_alloc_urb
(
0
,
GFP_KERNEL
);
bep
->
urbp
=
usb_alloc_urb
(
0
,
GFP_KERNEL
);
if
(
!
bep
->
urbp
)
goto
bl_fail
;
if
(
!
bep
->
urbp
)
goto
bl_fail
;
list_add_tail
(
&
bep
->
buff_list
,
&
bcp
->
free_buff_list
);
list_add_tail
(
&
bep
->
buff_list
,
&
bcp
->
free_buff_list
);
}
}
return
0
;
return
0
;
...
@@ -1242,7 +1247,8 @@ static void auerchar_ctrlread_dispatch (pauerscon_t scp, pauerbuf_t bp)
...
@@ -1242,7 +1247,8 @@ static void auerchar_ctrlread_dispatch (pauerscon_t scp, pauerbuf_t bp)
static
void
auerswald_delete
(
pauerswald_t
cp
)
static
void
auerswald_delete
(
pauerswald_t
cp
)
{
{
dbg
(
"auerswald_delete"
);
dbg
(
"auerswald_delete"
);
if
(
cp
==
NULL
)
return
;
if
(
cp
==
NULL
)
return
;
/* Wake up all processes waiting for a buffer */
/* Wake up all processes waiting for a buffer */
wake_up
(
&
cp
->
bufferwait
);
wake_up
(
&
cp
->
bufferwait
);
...
@@ -1261,7 +1267,8 @@ static void auerswald_delete( pauerswald_t cp)
...
@@ -1261,7 +1267,8 @@ static void auerswald_delete( pauerswald_t cp)
static
void
auerchar_delete
(
pauerchar_t
ccp
)
static
void
auerchar_delete
(
pauerchar_t
ccp
)
{
{
dbg
(
"auerchar_delete"
);
dbg
(
"auerchar_delete"
);
if
(
ccp
==
NULL
)
return
;
if
(
ccp
==
NULL
)
return
;
/* wake up pending synchronous reads */
/* wake up pending synchronous reads */
ccp
->
removed
=
1
;
ccp
->
removed
=
1
;
...
@@ -1335,7 +1342,8 @@ static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp)
...
@@ -1335,7 +1342,8 @@ static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp)
dbg
(
"auerswald_removeservice called"
);
dbg
(
"auerswald_removeservice called"
);
/* check if we have a service allocated */
/* check if we have a service allocated */
if
(
scp
->
id
==
AUH_UNASSIGNED
)
return
;
if
(
scp
->
id
==
AUH_UNASSIGNED
)
return
;
/* If there is a device: close the channel */
/* If there is a device: close the channel */
if
(
cp
->
usbdev
)
{
if
(
cp
->
usbdev
)
{
...
@@ -1494,7 +1502,8 @@ static int auerchar_ioctl (struct inode *inode, struct file *file, unsigned int
...
@@ -1494,7 +1502,8 @@ static int auerchar_ioctl (struct inode *inode, struct file *file, unsigned int
u
=
0
;
/* no data */
u
=
0
;
/* no data */
if
(
ccp
->
readbuf
)
{
if
(
ccp
->
readbuf
)
{
int
restlen
=
ccp
->
readbuf
->
len
-
ccp
->
readoffset
;
int
restlen
=
ccp
->
readbuf
->
len
-
ccp
->
readoffset
;
if
(
restlen
>
0
)
u
=
1
;
if
(
restlen
>
0
)
u
=
1
;
}
}
if
(
!
u
)
{
if
(
!
u
)
{
if
(
!
list_empty
(
&
ccp
->
bufctl
.
rec_buff_list
))
{
if
(
!
list_empty
(
&
ccp
->
bufctl
.
rec_buff_list
))
{
...
@@ -1787,7 +1796,8 @@ static ssize_t auerchar_write (struct file *file, const char *buf, size_t len, l
...
@@ -1787,7 +1796,8 @@ static ssize_t auerchar_write (struct file *file, const char *buf, size_t len, l
}
}
/* protect against too big write requests */
/* protect against too big write requests */
if
(
len
>
cp
->
maxControlLength
)
len
=
cp
->
maxControlLength
;
if
(
len
>
cp
->
maxControlLength
)
len
=
cp
->
maxControlLength
;
/* Fill the buffer */
/* Fill the buffer */
if
(
copy_from_user
(
bp
->
bufp
+
AUH_SIZE
,
buf
,
len
))
{
if
(
copy_from_user
(
bp
->
bufp
+
AUH_SIZE
,
buf
,
len
))
{
...
@@ -2096,7 +2106,8 @@ static void auerswald_disconnect (struct usb_interface *intf)
...
@@ -2096,7 +2106,8 @@ static void auerswald_disconnect (struct usb_interface *intf)
/* Inform all waiting readers */
/* Inform all waiting readers */
for
(
u
=
0
;
u
<
AUH_TYPESIZE
;
u
++
)
{
for
(
u
=
0
;
u
<
AUH_TYPESIZE
;
u
++
)
{
pauerscon_t
scp
=
cp
->
services
[
u
];
pauerscon_t
scp
=
cp
->
services
[
u
];
if
(
scp
)
scp
->
disconnect
(
scp
);
if
(
scp
)
scp
->
disconnect
(
scp
);
}
}
}
}
}
}
...
...
drivers/usb/misc/uss720.c
View file @
bfb77631
...
@@ -146,7 +146,7 @@ static int change_mode(struct parport *pp, int m)
...
@@ -146,7 +146,7 @@ static int change_mode(struct parport *pp, int m)
if
(
m
<=
ECR_PS2
&&
!
(
priv
->
reg
[
1
]
&
0x20
))
{
if
(
m
<=
ECR_PS2
&&
!
(
priv
->
reg
[
1
]
&
0x20
))
{
/* This mode resets the FIFO, so we may
/* This mode resets the FIFO, so we may
* have to wait for it to drain first. */
* have to wait for it to drain first. */
long
expire
=
jiffies
+
pp
->
physport
->
cad
->
timeout
;
unsigned
long
expire
=
jiffies
+
pp
->
physport
->
cad
->
timeout
;
switch
(
mode
)
{
switch
(
mode
)
{
case
ECR_PPF
:
/* Parallel Port FIFO mode */
case
ECR_PPF
:
/* Parallel Port FIFO mode */
case
ECR_ECP
:
/* ECP Parallel Port mode */
case
ECR_ECP
:
/* ECP Parallel Port mode */
...
...
drivers/usb/net/catc.c
View file @
bfb77631
...
@@ -828,10 +828,14 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
...
@@ -828,10 +828,14 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
if
((
!
catc
->
ctrl_urb
)
||
(
!
catc
->
tx_urb
)
||
if
((
!
catc
->
ctrl_urb
)
||
(
!
catc
->
tx_urb
)
||
(
!
catc
->
rx_urb
)
||
(
!
catc
->
irq_urb
))
{
(
!
catc
->
rx_urb
)
||
(
!
catc
->
irq_urb
))
{
err
(
"No free urbs available."
);
err
(
"No free urbs available."
);
if
(
catc
->
ctrl_urb
)
usb_free_urb
(
catc
->
ctrl_urb
);
if
(
catc
->
ctrl_urb
)
if
(
catc
->
tx_urb
)
usb_free_urb
(
catc
->
tx_urb
);
usb_free_urb
(
catc
->
ctrl_urb
);
if
(
catc
->
rx_urb
)
usb_free_urb
(
catc
->
rx_urb
);
if
(
catc
->
tx_urb
)
if
(
catc
->
irq_urb
)
usb_free_urb
(
catc
->
irq_urb
);
usb_free_urb
(
catc
->
tx_urb
);
if
(
catc
->
rx_urb
)
usb_free_urb
(
catc
->
rx_urb
);
if
(
catc
->
irq_urb
)
usb_free_urb
(
catc
->
irq_urb
);
kfree
(
netdev
);
kfree
(
netdev
);
kfree
(
catc
);
kfree
(
catc
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
...
drivers/usb/net/kaweth.c
View file @
bfb77631
...
@@ -811,7 +811,8 @@ static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
...
@@ -811,7 +811,8 @@ static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
{
{
__u16
packet_filter_bitmap
=
kaweth
->
packet_filter_bitmap
;
__u16
packet_filter_bitmap
=
kaweth
->
packet_filter_bitmap
;
kaweth
->
packet_filter_bitmap
=
0
;
kaweth
->
packet_filter_bitmap
=
0
;
if
(
packet_filter_bitmap
==
0
)
return
;
if
(
packet_filter_bitmap
==
0
)
return
;
{
{
int
result
;
int
result
;
...
...
drivers/usb/serial/belkin_sa.c
View file @
bfb77631
...
@@ -285,10 +285,13 @@ static void belkin_sa_read_int_callback (struct urb *urb, struct pt_regs *regs)
...
@@ -285,10 +285,13 @@ static void belkin_sa_read_int_callback (struct urb *urb, struct pt_regs *regs)
goto
exit
;
goto
exit
;
}
}
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
;
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
;
serial
=
port
->
serial
;
serial
=
port
->
serial
;
if
(
serial_paranoia_check
(
serial
,
__FUNCTION__
))
return
;
if
(
serial_paranoia_check
(
serial
,
__FUNCTION__
))
return
;
usb_serial_debug_data
(
__FILE__
,
__FUNCTION__
,
urb
->
actual_length
,
data
);
usb_serial_debug_data
(
__FILE__
,
__FUNCTION__
,
urb
->
actual_length
,
data
);
...
...
drivers/usb/serial/console.c
View file @
bfb77631
...
@@ -76,9 +76,12 @@ static int __init usb_console_setup(struct console *co, char *options)
...
@@ -76,9 +76,12 @@ static int __init usb_console_setup(struct console *co, char *options)
s
=
options
;
s
=
options
;
while
(
*
s
>=
'0'
&&
*
s
<=
'9'
)
while
(
*
s
>=
'0'
&&
*
s
<=
'9'
)
s
++
;
s
++
;
if
(
*
s
)
parity
=
*
s
++
;
if
(
*
s
)
if
(
*
s
)
bits
=
*
s
++
-
'0'
;
parity
=
*
s
++
;
if
(
*
s
)
doflow
=
(
*
s
++
==
'r'
);
if
(
*
s
)
bits
=
*
s
++
-
'0'
;
if
(
*
s
)
doflow
=
(
*
s
++
==
'r'
);
}
}
/* build a cflag setting */
/* build a cflag setting */
...
...
drivers/usb/serial/cyberjack.c
View file @
bfb77631
...
@@ -284,7 +284,8 @@ static void cyberjack_read_int_callback( struct urb *urb, struct pt_regs *regs )
...
@@ -284,7 +284,8 @@ static void cyberjack_read_int_callback( struct urb *urb, struct pt_regs *regs )
struct
usb_serial
*
serial
;
struct
usb_serial
*
serial
;
unsigned
char
*
data
=
urb
->
transfer_buffer
;
unsigned
char
*
data
=
urb
->
transfer_buffer
;
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
;
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
;
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
...
@@ -293,7 +294,8 @@ static void cyberjack_read_int_callback( struct urb *urb, struct pt_regs *regs )
...
@@ -293,7 +294,8 @@ static void cyberjack_read_int_callback( struct urb *urb, struct pt_regs *regs )
return
;
return
;
serial
=
port
->
serial
;
serial
=
port
->
serial
;
if
(
serial_paranoia_check
(
serial
,
__FUNCTION__
))
return
;
if
(
serial_paranoia_check
(
serial
,
__FUNCTION__
))
return
;
usb_serial_debug_data
(
__FILE__
,
__FUNCTION__
,
urb
->
actual_length
,
data
);
usb_serial_debug_data
(
__FILE__
,
__FUNCTION__
,
urb
->
actual_length
,
data
);
...
@@ -372,7 +374,8 @@ static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
...
@@ -372,7 +374,8 @@ static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
/* Reduce urbs to do by one. */
/* Reduce urbs to do by one. */
priv
->
rdtodo
-=
urb
->
actual_length
;
priv
->
rdtodo
-=
urb
->
actual_length
;
/* Just to be sure */
/* Just to be sure */
if
(
priv
->
rdtodo
<
0
)
priv
->
rdtodo
=
0
;
if
(
priv
->
rdtodo
<
0
)
priv
->
rdtodo
=
0
;
dbg
(
"%s - rdtodo: %d"
,
__FUNCTION__
,
priv
->
rdtodo
);
dbg
(
"%s - rdtodo: %d"
,
__FUNCTION__
,
priv
->
rdtodo
);
...
...
drivers/usb/serial/io_ti.c
View file @
bfb77631
...
@@ -1553,7 +1553,8 @@ static __u8 MapLineStatus (__u8 ti_lsr)
...
@@ -1553,7 +1553,8 @@ static __u8 MapLineStatus (__u8 ti_lsr)
__u8
lsr
=
0
;
__u8
lsr
=
0
;
#define MAP_FLAG(flagUmp, flagUart) \
#define MAP_FLAG(flagUmp, flagUart) \
if (ti_lsr & flagUmp) lsr |= flagUart;
if (ti_lsr & flagUmp) \
lsr |= flagUart;
MAP_FLAG
(
UMP_UART_LSR_OV_MASK
,
LSR_OVER_ERR
)
/* overrun */
MAP_FLAG
(
UMP_UART_LSR_OV_MASK
,
LSR_OVER_ERR
)
/* overrun */
MAP_FLAG
(
UMP_UART_LSR_PE_MASK
,
LSR_PAR_ERR
)
/* parity error */
MAP_FLAG
(
UMP_UART_LSR_PE_MASK
,
LSR_PAR_ERR
)
/* parity error */
...
...
drivers/usb/serial/ir-usb.c
View file @
bfb77631
...
@@ -461,7 +461,8 @@ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
...
@@ -461,7 +461,8 @@ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
* contains a busy indicator and baud rate change.
* contains a busy indicator and baud rate change.
* See section 5.4.1.2 of the USB IrDA spec.
* See section 5.4.1.2 of the USB IrDA spec.
*/
*/
if
((
*
data
&
0x0f
)
>
0
)
ir_baud
=
*
data
&
0x0f
;
if
((
*
data
&
0x0f
)
>
0
)
ir_baud
=
*
data
&
0x0f
;
usb_serial_debug_data
(
usb_serial_debug_data
(
__FILE__
,
__FILE__
,
...
...
drivers/usb/serial/pl2303.c
View file @
bfb77631
...
@@ -579,7 +579,7 @@ static void pl2303_break_ctl (struct usb_serial_port *port, int break_state)
...
@@ -579,7 +579,7 @@ static void pl2303_break_ctl (struct usb_serial_port *port, int break_state)
state
=
BREAK_ON
;
state
=
BREAK_ON
;
dbg
(
"%s - turning break %s"
,
state
==
BREAK_OFF
?
"off"
:
"on"
,
__FUNCTION__
);
dbg
(
"%s - turning break %s"
,
state
==
BREAK_OFF
?
"off"
:
"on"
,
__FUNCTION__
);
result
=
usb_control_msg
(
serial
->
dev
,
usb_
rcv
ctrlpipe
(
serial
->
dev
,
0
),
result
=
usb_control_msg
(
serial
->
dev
,
usb_
snd
ctrlpipe
(
serial
->
dev
,
0
),
BREAK_REQUEST
,
BREAK_REQUEST_TYPE
,
state
,
BREAK_REQUEST
,
BREAK_REQUEST_TYPE
,
state
,
0
,
NULL
,
0
,
100
);
0
,
NULL
,
0
,
100
);
if
(
result
)
if
(
result
)
...
...
drivers/usb/storage/unusual_devs.h
View file @
bfb77631
...
@@ -332,6 +332,15 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000,
...
@@ -332,6 +332,15 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000,
US_SC_8070
,
US_PR_CBI
,
NULL
,
US_SC_8070
,
US_PR_CBI
,
NULL
,
US_FL_FIX_INQUIRY
),
US_FL_FIX_INQUIRY
),
/* Pentax Optio S digital camera
* submitted by Stefan M. Brandl <smb@smbnet.de>
*/
UNUSUAL_DEV
(
0x0a17
,
0x0006
,
0x0000
,
0xffff
,
"Pentax"
,
"Optio S"
,
US_SC_8070
,
US_PR_CB
,
NULL
,
US_FL_MODE_XLATE
|
US_FL_FIX_INQUIRY
),
#ifdef CONFIG_USB_STORAGE_ISD200
#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV
(
0x05ab
,
0x0031
,
0x0100
,
0x0110
,
UNUSUAL_DEV
(
0x05ab
,
0x0031
,
0x0100
,
0x0110
,
"In-System"
,
"In-System"
,
...
...
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