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
3b822c88
Commit
3b822c88
authored
Aug 13, 2003
by
Alexander Viro
Committed by
Linus Torvalds
Aug 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Fix pd.c for new queue allocation
From A1tmblwd@netscape.net
parent
89eea93b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
drivers/block/paride/pd.c
drivers/block/paride/pd.c
+22
-12
No files found.
drivers/block/paride/pd.c
View file @
3b822c88
...
@@ -654,7 +654,7 @@ static int pd_probe_drive(struct pd_unit *disk)
...
@@ -654,7 +654,7 @@ static int pd_probe_drive(struct pd_unit *disk)
return
pd_identify
(
disk
);
return
pd_identify
(
disk
);
}
}
static
struct
request_queue
pd_queue
;
static
struct
request_queue
*
pd_queue
;
static
int
pd_detect
(
void
)
static
int
pd_detect
(
void
)
{
{
...
@@ -704,7 +704,7 @@ static int pd_detect(void)
...
@@ -704,7 +704,7 @@ static int pd_detect(void)
set_capacity
(
p
,
disk
->
capacity
);
set_capacity
(
p
,
disk
->
capacity
);
disk
->
gd
=
p
;
disk
->
gd
=
p
;
p
->
private_data
=
disk
;
p
->
private_data
=
disk
;
p
->
queue
=
&
pd_queue
;
p
->
queue
=
pd_queue
;
add_disk
(
p
);
add_disk
(
p
);
}
}
}
}
...
@@ -782,7 +782,7 @@ static inline void next_request(int success)
...
@@ -782,7 +782,7 @@ static inline void next_request(int success)
spin_lock_irqsave
(
&
pd_lock
,
saved_flags
);
spin_lock_irqsave
(
&
pd_lock
,
saved_flags
);
end_request
(
pd_req
,
success
);
end_request
(
pd_req
,
success
);
pd_busy
=
0
;
pd_busy
=
0
;
do_pd_request
(
&
pd_queue
);
do_pd_request
(
pd_queue
);
spin_unlock_irqrestore
(
&
pd_lock
,
saved_flags
);
spin_unlock_irqrestore
(
&
pd_lock
,
saved_flags
);
}
}
...
@@ -890,20 +890,30 @@ static int __init pd_init(void)
...
@@ -890,20 +890,30 @@ static int __init pd_init(void)
{
{
if
(
disable
)
if
(
disable
)
return
-
1
;
return
-
1
;
if
(
register_blkdev
(
major
,
name
))
return
-
1
;
blk_init_queue
(
&
pd_queue
,
do_pd_request
,
&
pd_lock
);
pd_queue
=
blk_init_queue
(
do_pd_request
,
&
pd_lock
);
blk_queue_max_sectors
(
&
pd_queue
,
cluster
);
if
(
!
pd_queue
)
goto
out1
;
blk_queue_max_sectors
(
pd_queue
,
cluster
);
if
(
register_blkdev
(
major
,
name
))
goto
out2
;
printk
(
"%s: %s version %s, major %d, cluster %d, nice %d
\n
"
,
printk
(
"%s: %s version %s, major %d, cluster %d, nice %d
\n
"
,
name
,
name
,
PD_VERSION
,
major
,
cluster
,
nice
);
name
,
name
,
PD_VERSION
,
major
,
cluster
,
nice
);
pd_init_units
();
pd_init_units
();
if
(
!
pd_detect
())
{
if
(
!
pd_detect
())
goto
out3
;
return
0
;
out3:
unregister_blkdev
(
major
,
name
);
unregister_blkdev
(
major
,
name
);
out2:
blk_cleanup_queue
(
pd_queue
);
out1:
return
-
1
;
return
-
1
;
}
return
0
;
}
}
static
void
__exit
pd_exit
(
void
)
static
void
__exit
pd_exit
(
void
)
...
@@ -920,7 +930,7 @@ static void __exit pd_exit(void)
...
@@ -920,7 +930,7 @@ static void __exit pd_exit(void)
pi_release
(
disk
->
pi
);
pi_release
(
disk
->
pi
);
}
}
}
}
blk_cleanup_queue
(
&
pd_queue
);
blk_cleanup_queue
(
pd_queue
);
}
}
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
...
...
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