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
8baf628d
Commit
8baf628d
authored
Feb 11, 2002
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small batch of IDE code cleanups from Pavel Machek
parent
ec5637ef
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+8
-13
drivers/ide/ide-proc.c
drivers/ide/ide-proc.c
+1
-2
include/linux/ide.h
include/linux/ide.h
+2
-2
No files found.
drivers/ide/ide-disk.c
View file @
8baf628d
...
...
@@ -123,29 +123,24 @@ static ide_startstop_t lba_48_rw_disk (ide_drive_t *drive, struct request *rq, u
*/
static
ide_startstop_t
do_rw_disk
(
ide_drive_t
*
drive
,
struct
request
*
rq
,
unsigned
long
block
)
{
if
(
rq
->
flags
&
REQ_CMD
)
goto
good_command
;
if
(
!
(
rq
->
flags
&
REQ_CMD
))
{
blk_dump_rq_flags
(
rq
,
"do_rw_disk, bad command"
);
ide_end_request
(
0
,
HWGROUP
(
drive
));
return
ide_stopped
;
}
good_command:
#ifdef CONFIG_BLK_DEV_PDC4030
if
(
IS_PDC4030_DRIVE
)
{
extern
ide_startstop_t
promise_rw_disk
(
ide_drive_t
*
,
struct
request
*
,
unsigned
long
);
return
promise_rw_disk
(
drive
,
rq
,
block
);
}
#endif
/* CONFIG_BLK_DEV_PDC4030 */
if
((
drive
->
id
->
cfs_enable_2
&
0x0400
)
&&
(
drive
->
addressing
))
/* 48-bit LBA */
return
lba_48_rw_disk
(
drive
,
rq
,
(
unsigned
long
long
)
block
);
return
lba_48_rw_disk
(
drive
,
rq
,
block
);
if
(
drive
->
select
.
b
.
lba
)
/* 28-bit LBA */
return
lba_28_rw_disk
(
drive
,
rq
,
(
unsigned
long
)
block
);
return
lba_28_rw_disk
(
drive
,
rq
,
block
);
/* 28-bit CHS : DIE DIE DIE piece of legacy crap!!! */
return
chs_rw_disk
(
drive
,
rq
,
(
unsigned
long
)
block
);
return
chs_rw_disk
(
drive
,
rq
,
block
);
}
static
task_ioreg_t
get_command
(
ide_drive_t
*
drive
,
int
cmd
)
...
...
drivers/ide/ide-proc.c
View file @
8baf628d
...
...
@@ -629,7 +629,7 @@ static int proc_ide_read_driver
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
{
ide_drive_t
*
drive
=
(
ide_drive_t
*
)
data
;
ide_driver_t
*
driver
=
(
ide_driver_t
*
)
drive
->
driver
;
ide_driver_t
*
driver
=
drive
->
driver
;
int
len
;
if
(
!
driver
)
...
...
@@ -746,7 +746,6 @@ void recreate_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive)
struct
proc_dir_entry
*
ent
;
struct
proc_dir_entry
*
parent
=
hwif
->
proc
;
char
name
[
64
];
// ide_driver_t *driver = drive->driver;
if
(
drive
->
present
&&
!
drive
->
proc
)
{
drive
->
proc
=
proc_mkdir
(
drive
->
name
,
parent
);
...
...
include/linux/ide.h
View file @
8baf628d
...
...
@@ -424,12 +424,12 @@ typedef struct ide_drive_s {
unsigned
long
capacity
;
/* total number of sectors */
unsigned
long
long
capacity48
;
/* total number of sectors */
unsigned
int
drive_data
;
/* for use by tuneproc/selectproc as needed */
void
*
hwif
;
/* actually (ide_hwif_t *) */
struct
hwif_s
*
hwif
;
/* actually (ide_hwif_t *) */
wait_queue_head_t
wqueue
;
/* used to wait for drive in open() */
struct
hd_driveid
*
id
;
/* drive model identification info */
struct
hd_struct
*
part
;
/* drive partition table */
char
name
[
4
];
/* drive name, such as "hda" */
void
*
driver
;
/* (ide_driver_t *) */
struct
ide_driver_s
*
driver
;
/* (ide_driver_t *) */
void
*
driver_data
;
/* extra driver data */
devfs_handle_t
de
;
/* directory for device */
struct
proc_dir_entry
*
proc
;
/* /proc/ide/ directory entry */
...
...
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