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
Kirill Smelkov
linux
Commits
bedbeab4
Commit
bedbeab4
authored
Aug 14, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Aug 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] acsi per-disk gendisks
parent
d572f1a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
20 deletions
+24
-20
drivers/block/acsi.c
drivers/block/acsi.c
+24
-19
fs/partitions/check.c
fs/partitions/check.c
+0
-1
No files found.
drivers/block/acsi.c
View file @
bedbeab4
...
...
@@ -244,9 +244,10 @@ typedef union {
char
*
acsi_buffer
;
unsigned
long
phys_acsi_buffer
;
static
int
NDevices
=
0
;
static
struct
hd_struct
acsi_part
[
MAX_DEV
<<
4
]
=
{
{
0
,
0
},
};
static
int
access_count
[
MAX_DEV
]
=
{
0
,
};
static
int
NDevices
;
static
struct
hd_struct
acsi_part
[
MAX_DEV
<<
4
];
static
char
acsi_names
[
MAX_DEV
*
4
];
static
int
access_count
[
MAX_DEV
];
static
int
CurrentNReq
;
static
int
CurrentNSect
;
...
...
@@ -1345,13 +1346,7 @@ static int acsi_mode_sense( int target, int lun, SENSE_DATA *sd )
extern
struct
block_device_operations
acsi_fops
;
static
struct
gendisk
acsi_gendisk
=
{
major:
MAJOR_NR
,
major_name:
"ad"
,
minor_shift:
4
,
part:
acsi_part
,
fops:
&
acsi_fops
,
};
static
struct
gendisk
acsi_gendisk
[
MAX_DEV
];
#define MAX_SCSI_DEVICE_CODE 10
...
...
@@ -1700,12 +1695,22 @@ static void acsi_geninit(void)
NDevices
,
n_slm
);
#endif
for
(
i
=
0
;
i
<
NDevices
;
++
i
)
register_disk
(
&
acsi_gendisk
,
mk_kdev
(
MAJOR_NR
,
i
<<
4
),
(
acsi_info
[
i
].
type
==
HARDDISK
)
?
1
<<
4
:
1
,
&
acsi_fops
,
for
(
i
=
0
;
i
<
NDevices
;
++
i
)
{
struct
gendisk
*
disk
=
acsi_gendisk
+
i
;
sprintf
(
acsi_names
+
4
*
i
,
"ad%c"
,
'a'
+
i
);
disk
->
major
=
MAJOR_NR
;
disk
->
first_minor
=
i
<<
4
;
disk
->
major_name
=
acsi_names
+
4
*
i
;
disk
->
minor_shift
=
(
acsi_info
[
i
].
type
==
HARDDISK
)
?
4
:
0
;
disk
->
part
=
acsi_part
+
(
i
<<
4
);
disk
->
fops
=
&
acsi_fops
;
disk
->
nr_real
=
1
;
add_gendisk
(
disk
);
register_disk
(
disk
,
mk_kdev
(
disk
->
major
,
disk
->
first_minor
),
1
<<
disk
->
minor_shift
,
disk
->
fops
,
acsi_info
[
i
].
size
);
acsi_gendisk
.
nr_real
=
NDevices
;
}
}
#ifdef CONFIG_ATARI_SLM_MODULE
...
...
@@ -1744,8 +1749,6 @@ int acsi_init( void )
STramMask
=
ATARIHW_PRESENT
(
EXTD_DMA
)
?
0x00000000
:
0xff000000
;
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
),
do_acsi_request
,
&
acsi_lock
);
add_gendisk
(
&
acsi_gendisk
);
#ifdef CONFIG_ATARI_SLM
err
=
slm_init
();
#endif
...
...
@@ -1771,6 +1774,7 @@ int init_module(void)
void
cleanup_module
(
void
)
{
int
i
;
del_timer
(
&
acsi_timer
);
blk_cleanup_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
));
atari_stram_free
(
acsi_buffer
);
...
...
@@ -1778,7 +1782,8 @@ void cleanup_module(void)
if
(
unregister_blkdev
(
MAJOR_NR
,
"ad"
)
!=
0
)
printk
(
KERN_ERR
"acsi: cleanup_module failed
\n
"
);
del_gendisk
(
&
acsi_gendisk
);
for
(
i
=
0
;
i
<
NDevices
;
i
++
)
del_gendisk
(
acsi_gendisk
+
i
);
}
#endif
...
...
fs/partitions/check.c
View file @
bedbeab4
...
...
@@ -137,7 +137,6 @@ char *disk_name (struct gendisk *hd, int minor, char *buf)
sprintf
(
s
,
"%s%d"
,
"md"
,
unit
);
maj
=
s
;
break
;
case
ACSI_MAJOR
:
case
I2O_MAJOR
:
case
DASD_MAJOR
:
sprintf
(
s
,
"%s%c"
,
hd
->
major_name
,
unit
+
'a'
);
...
...
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