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
96289687
Commit
96289687
authored
Oct 17, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Make sbpcd look more like 2.5 driver
Most work done by Paul Gortmaker. More work needed.
parent
5ad3ab82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
drivers/cdrom/sbpcd.c
drivers/cdrom/sbpcd.c
+21
-9
No files found.
drivers/cdrom/sbpcd.c
View file @
96289687
...
...
@@ -354,6 +354,13 @@
* Marcin Dalecki
*/
/*
* Add bio/kdev_t changes for 2.5.x required to make it work again.
* Still room for improvement in the request handling here if anyone
* actually cares. Bring your own chainsaw. Paul G. 02/2002
*/
#include <linux/module.h>
#include <linux/version.h>
...
...
@@ -462,6 +469,8 @@ MODULE_PARM(max_drives, "i");
#define NUM_PROBE (sizeof(sbpcd) / sizeof(int))
static
spinlock_t
sbpcd_lock
=
SPIN_LOCK_UNLOCKED
;
/*==========================================================================*/
#define INLINE inline
...
...
@@ -4853,21 +4862,19 @@ static void do_sbpcd_request(request_queue_t * q)
printk
(
" do_sbpcd_request[%di](%p:%ld+%ld), Pid:%d, Time:%li
\n
"
,
xnr
,
CURRENT
,
CURRENT
->
sector
,
CURRENT
->
nr_sectors
,
current
->
pid
,
jiffies
);
#endif
if
(
blk_queue_empty
(
QUEUE
))
return
;
req
=
CURRENT
;
/* take out our request so no other */
blkdev_dequeue_request
(
req
);
/* task can fuck it up GTL */
req
=
CURRENT
;
if
(
req
->
sector
==
-
1
)
end_request
(
CURRENT
,
0
);
spin_unlock_irq
(
q
->
queue_lock
);
down
(
&
ioctl_read_sem
);
if
(
r
eq
->
cmd
!=
READ
)
if
(
r
q_data_dir
(
CURRENT
)
!=
READ
)
{
msg
(
DBG_INF
,
"bad cmd %d
\n
"
,
req
->
cmd
);
msg
(
DBG_INF
,
"bad cmd %d
\n
"
,
req
->
cmd
[
0
]
);
goto
err_done
;
}
p
=
D_S
+
minor
(
req
->
rq_dev
);
...
...
@@ -5752,6 +5759,12 @@ int __init sbpcd_init(void)
if
(
i
>=
0
)
p
->
CD_changed
=
1
;
}
if
(
!
request_region
(
CDo_command
,
4
,
major_name
))
{
printk
(
KERN_WARNING
"sbpcd: Unable to request region 0x%x
\n
"
,
CDo_command
);
return
-
EIO
;
}
/*
* Turn on the CD audio channels.
* The addresses are obtained from SOUND_BASE (see sbpcd.h).
...
...
@@ -5772,9 +5785,8 @@ int __init sbpcd_init(void)
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
),
do_sbpcd_request
,
&
sbpcd_lock
);
request_region
(
CDo_command
,
4
,
major_name
);
devfs_handle
=
devfs_mk_dir
(
NULL
,
"sbp"
,
NULL
);
for
(
j
=
0
;
j
<
NR_SBPCD
;
j
++
)
{
struct
cdrom_device_info
*
sbpcd_infop
;
...
...
@@ -5885,6 +5897,7 @@ void sbpcd_exit(void)
msg
(
DBG_INF
,
"%s module released.
\n
"
,
major_name
);
}
module_init
(
__sbpcd_init
)
/*HACK!*/
;
module_exit
(
sbpcd_exit
);
...
...
@@ -5899,8 +5912,7 @@ static int sbpcd_media_changed(struct cdrom_device_info *cdi, int disc_nr)
{
p
->
CD_changed
=
0
;
msg
(
DBG_CHK
,
"medium changed (drive %s)
\n
"
,
cdi
->
name
);
/* BUG! Should invalidate buffers! --AJK */
/* Why should it do the above at all?! --mdcki */
invalidate_buffers
(
full_dev
);
current_drive
->
diskstate_flags
&=
~
toc_bit
;
current_drive
->
diskstate_flags
&=
~
cd_size_bit
;
#if SAFE_MIXED
...
...
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