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
4416fcb0
Commit
4416fcb0
authored
Oct 27, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the usb storage drivers due to interrupt urb no automatic resubmission change to the usb core.
parent
226152ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
drivers/usb/storage/transport.c
drivers/usb/storage/transport.c
+13
-5
No files found.
drivers/usb/storage/transport.c
View file @
4416fcb0
...
...
@@ -947,6 +947,7 @@ void usb_stor_abort_transport(struct us_data *us)
void
usb_stor_CBI_irq
(
struct
urb
*
urb
)
{
struct
us_data
*
us
=
(
struct
us_data
*
)
urb
->
context
;
int
status
;
US_DEBUGP
(
"USB IRQ received for device on host %d
\n
"
,
us
->
host_no
);
US_DEBUGP
(
"-- IRQ data length is %d
\n
"
,
urb
->
actual_length
);
...
...
@@ -960,13 +961,13 @@ void usb_stor_CBI_irq(struct urb *urb)
/* was this a wanted interrupt? */
if
(
!
test_and_clear_bit
(
US_FLIDX_IP_WANTED
,
&
us
->
flags
))
{
US_DEBUGP
(
"ERROR: Unwanted interrupt received!
\n
"
);
return
;
goto
exit
;
}
US_DEBUGP
(
"-- command aborted
\n
"
);
/* wake up the command thread */
up
(
&
us
->
ip_waitq
);
return
;
goto
exit
;
}
/* is the device removed? */
...
...
@@ -988,19 +989,19 @@ void usb_stor_CBI_irq(struct urb *urb)
/* reject improper IRQs */
if
(
urb
->
actual_length
!=
2
)
{
US_DEBUGP
(
"-- IRQ too short
\n
"
);
return
;
goto
exit
;
}
/* was this a command-completion interrupt? */
if
(
us
->
irqbuf
[
0
]
&&
(
us
->
subclass
!=
US_SC_UFI
))
{
US_DEBUGP
(
"-- not a command-completion IRQ
\n
"
);
return
;
goto
exit
;
}
/* was this a wanted interrupt? */
if
(
!
test_and_clear_bit
(
US_FLIDX_IP_WANTED
,
&
us
->
flags
))
{
US_DEBUGP
(
"ERROR: Unwanted interrupt received!
\n
"
);
return
;
goto
exit
;
}
/* copy the valid data */
...
...
@@ -1009,6 +1010,13 @@ void usb_stor_CBI_irq(struct urb *urb)
/* wake up the command thread */
up
(
&
(
us
->
ip_waitq
));
exit:
/* resubmit the urb */
status
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
if
(
status
)
err
(
"%s - usb_submit_urb failed with result %d"
,
__FUNCTION__
,
status
);
}
int
usb_stor_CBI_transport
(
Scsi_Cmnd
*
srb
,
struct
us_data
*
us
)
...
...
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