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
aa759ff3
Commit
aa759ff3
authored
Feb 04, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Feb 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] paride cleanup and fixes (15/25)
Equivalent transformation: next_request() call expanded.
parent
7e396129
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
drivers/block/paride/pd.c
drivers/block/paride/pd.c
+13
-20
No files found.
drivers/block/paride/pd.c
View file @
aa759ff3
...
...
@@ -212,16 +212,28 @@ static void ps_set_intr(void)
static
struct
pd_unit
*
pd_current
;
/* current request's drive */
static
PIA
*
pi_current
;
/* current request's PIA */
static
struct
request
*
pd_req
;
/* current request */
static
struct
request_queue
*
pd_queue
;
static
void
run_fsm
(
void
)
{
while
(
1
)
{
enum
action
res
;
unsigned
long
saved_flags
;
int
stop
=
0
;
switch
(
res
=
phase
())
{
case
Ok
:
case
Fail
:
pi_unclaim
(
pi_current
);
next_request
(
res
);
spin_lock_irqsave
(
&
pd_lock
,
saved_flags
);
end_request
(
pd_req
,
res
);
pd_req
=
elv_next_request
(
pd_queue
);
if
(
!
pd_req
)
stop
=
1
;
spin_unlock_irqrestore
(
&
pd_lock
,
saved_flags
);
if
(
stop
)
return
;
phase
=
do_pd_io
;
ps_set_intr
();
return
;
case
Wait
:
pi_unclaim
(
pi_current
);
...
...
@@ -703,8 +715,6 @@ static int pd_probe_drive(struct pd_unit *disk)
return
pd_identify
(
disk
);
}
static
struct
request_queue
*
pd_queue
;
static
int
pd_detect
(
void
)
{
int
k
,
unit
;
...
...
@@ -802,23 +812,6 @@ static int pd_next_buf(void)
return
0
;
}
static
inline
void
next_request
(
int
success
)
{
unsigned
long
saved_flags
;
spin_lock_irqsave
(
&
pd_lock
,
saved_flags
);
end_request
(
pd_req
,
success
);
pd_req
=
elv_next_request
(
pd_queue
);
if
(
!
pd_req
)
{
spin_unlock_irqrestore
(
&
pd_lock
,
saved_flags
);
return
;
}
spin_unlock_irqrestore
(
&
pd_lock
,
saved_flags
);
phase
=
do_pd_io
;
ps_set_intr
();
}
static
enum
action
do_pd_io
(
void
)
{
pd_current
=
pd_req
->
rq_disk
->
private_data
;
...
...
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