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
890abeb9
Commit
890abeb9
authored
Mar 14, 2004
by
Bartlomiej Zolnierkiewicz
Committed by
Jeff Garzik
Mar 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ide-disk.c: cleanup get_command()
parent
65ea2fa1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
21 deletions
+20
-21
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+20
-21
No files found.
drivers/ide/ide-disk.c
View file @
890abeb9
...
...
@@ -569,28 +569,27 @@ ide_startstop_t __ide_do_rw_disk (ide_drive_t *drive, struct request *rq, sector
}
EXPORT_SYMBOL_GPL
(
__ide_do_rw_disk
);
static
task_ioreg_t
get_command
(
ide_drive_t
*
drive
,
int
cmd
)
static
u8
get_command
(
ide_drive_t
*
drive
,
int
cmd
)
{
int
lba48bit
=
(
drive
->
addressing
==
1
)
?
1
:
0
;
if
((
cmd
==
READ
)
&&
drive
->
using_tcq
)
return
lba48bit
?
WIN_READDMA_QUEUED_EXT
:
WIN_READDMA_QUEUED
;
if
((
cmd
==
READ
)
&&
(
drive
->
using_dma
))
return
(
lba48bit
)
?
WIN_READDMA_EXT
:
WIN_READDMA
;
else
if
((
cmd
==
READ
)
&&
(
drive
->
mult_count
))
return
(
lba48bit
)
?
WIN_MULTREAD_EXT
:
WIN_MULTREAD
;
else
if
(
cmd
==
READ
)
return
(
lba48bit
)
?
WIN_READ_EXT
:
WIN_READ
;
else
if
((
cmd
==
WRITE
)
&&
drive
->
using_tcq
)
return
lba48bit
?
WIN_WRITEDMA_QUEUED_EXT
:
WIN_WRITEDMA_QUEUED
;
else
if
((
cmd
==
WRITE
)
&&
(
drive
->
using_dma
))
return
(
lba48bit
)
?
WIN_WRITEDMA_EXT
:
WIN_WRITEDMA
;
else
if
((
cmd
==
WRITE
)
&&
(
drive
->
mult_count
))
return
(
lba48bit
)
?
WIN_MULTWRITE_EXT
:
WIN_MULTWRITE
;
else
if
(
cmd
==
WRITE
)
return
(
lba48bit
)
?
WIN_WRITE_EXT
:
WIN_WRITE
;
else
return
WIN_NOP
;
unsigned
int
lba48
=
(
drive
->
addressing
==
1
)
?
1
:
0
;
if
(
cmd
==
READ
)
{
if
(
drive
->
using_tcq
)
return
lba48
?
WIN_READDMA_QUEUED_EXT
:
WIN_READDMA_QUEUED
;
if
(
drive
->
using_dma
)
return
lba48
?
WIN_READDMA_EXT
:
WIN_READDMA
;
if
(
drive
->
mult_count
)
return
lba48
?
WIN_MULTREAD_EXT
:
WIN_MULTREAD
;
return
lba48
?
WIN_READ_EXT
:
WIN_READ
;
}
else
{
if
(
drive
->
using_tcq
)
return
lba48
?
WIN_WRITEDMA_QUEUED_EXT
:
WIN_WRITEDMA_QUEUED
;
if
(
drive
->
using_dma
)
return
lba48
?
WIN_WRITEDMA_EXT
:
WIN_WRITEDMA
;
if
(
drive
->
mult_count
)
return
lba48
?
WIN_MULTWRITE_EXT
:
WIN_MULTWRITE
;
return
lba48
?
WIN_WRITE_EXT
:
WIN_WRITE
;
}
}
static
ide_startstop_t
chs_rw_disk
(
ide_drive_t
*
drive
,
struct
request
*
rq
,
unsigned
long
block
)
...
...
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