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
fb46492e
Commit
fb46492e
authored
Jan 11, 2003
by
Oliver Neukum
Committed by
Greg Kroah-Hartman
Jan 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB midi fixes
- correct write error path - use GFP_ATOMIC in interrupt
parent
4b62a8d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
drivers/usb/class/usb-midi.c
drivers/usb/class/usb-midi.c
+6
-6
No files found.
drivers/usb/class/usb-midi.c
View file @
fb46492e
...
...
@@ -337,7 +337,8 @@ static int usb_write( struct midi_out_endpoint *ep, unsigned char *buf, int len
if
(
status
)
{
printk
(
KERN_ERR
"usbmidi: Cannot submit urb (%d)
\n
"
,
status
);
ret
=
-
EFAULT
;
ret
=
-
EIO
;
goto
error
;
}
add_wait_queue
(
&
ep
->
wait
,
&
wait
);
...
...
@@ -354,6 +355,7 @@ static int usb_write( struct midi_out_endpoint *ep, unsigned char *buf, int len
set_current_state
(
TASK_RUNNING
);
remove_wait_queue
(
&
ep
->
wait
,
&
wait
);
error:
return
ret
;
}
...
...
@@ -369,7 +371,6 @@ static void usb_bulk_read(struct urb *urb, struct pt_regs *regs)
struct
midi_in_endpoint
*
ep
=
(
struct
midi_in_endpoint
*
)(
urb
->
context
);
unsigned
char
*
data
=
urb
->
transfer_buffer
;
int
i
,
j
,
wake
;
unsigned
long
int
flags
;
if
(
!
ep
->
urbSubmitted
)
{
return
;
...
...
@@ -377,7 +378,7 @@ static void usb_bulk_read(struct urb *urb, struct pt_regs *regs)
if
(
(
urb
->
status
==
0
)
&&
(
urb
->
actual_length
>
0
)
)
{
wake
=
0
;
spin_lock
_irqsave
(
&
ep
->
lock
,
flags
);
spin_lock
(
&
ep
->
lock
);
for
(
j
=
0
;
j
<
urb
->
actual_length
;
j
+=
4
)
{
int
cin
=
(
data
[
j
]
>>
0
)
&
0xf
;
...
...
@@ -397,7 +398,7 @@ static void usb_bulk_read(struct urb *urb, struct pt_regs *regs)
}
}
spin_unlock
_irqrestore
(
&
ep
->
lock
,
flags
);
spin_unlock
&
ep
->
lock
);
if
(
wake
)
{
wake_up
(
&
ep
->
wait
);
}
...
...
@@ -407,7 +408,7 @@ static void usb_bulk_read(struct urb *urb, struct pt_regs *regs)
urb
->
dev
=
ep
->
usbdev
;
urb
->
actual_length
=
0
;
usb_submit_urb
(
urb
,
GFP_
KERNEL
);
usb_submit_urb
(
urb
,
GFP_
ATOMIC
);
}
...
...
@@ -855,7 +856,6 @@ static int usb_midi_open(struct inode *inode, struct file *file)
add_wait_queue
(
&
open_wait
,
&
wait
);
up
(
&
open_sem
);
schedule
();
__set_current_state
(
TASK_RUNNING
);
remove_wait_queue
(
&
open_wait
,
&
wait
);
if
(
signal_pending
(
current
)
)
{
return
-
ERESTARTSYS
;
...
...
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