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
23f9e70c
Commit
23f9e70c
authored
Nov 25, 2002
by
Alan Cox
Committed by
Linus Torvalds
Nov 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Make IDEDMA handled by a tuning option not masses of ifdef
parent
4df628e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
3 deletions
+35
-3
drivers/ide/ide-cd.c
drivers/ide/ide-cd.c
+0
-2
drivers/ide/ide-lib.c
drivers/ide/ide-lib.c
+35
-1
No files found.
drivers/ide/ide-cd.c
View file @
23f9e70c
...
...
@@ -2965,10 +2965,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive)
printk
(
", %dkB Cache"
,
be16_to_cpu
(
cap
.
buffer_size
));
#ifdef CONFIG_BLK_DEV_IDEDMA
if
(
drive
->
using_dma
)
(
void
)
HWIF
(
drive
)
->
ide_dma_verbose
(
drive
);
#endif
/* CONFIG_BLK_DEV_IDEDMA */
printk
(
"
\n
"
);
return
nslots
;
...
...
drivers/ide/ide-lib.c
View file @
23f9e70c
...
...
@@ -300,7 +300,7 @@ static int ide_scan_pio_blacklist (char *model)
}
/**
* ide_get_best_pio_mode - get PIO mode fro drive
* ide_get_best_pio_mode - get PIO mode fro
m
drive
* @driver: drive to consider
* @mode_wanted: preferred mode
* @max_mode: highest allowed
...
...
@@ -387,6 +387,15 @@ u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_p
EXPORT_SYMBOL_GPL
(
ide_get_best_pio_mode
);
/**
* ide_toggle_bounce - handle bounce buffering
* @drive: drive to update
* @on: on/off boolean
*
* Enable or disable bounce buffering for the device. Drives move
* between PIO and DMA and that changes the rules we need.
*/
void
ide_toggle_bounce
(
ide_drive_t
*
drive
,
int
on
)
{
u64
addr
=
BLK_BOUNCE_HIGH
;
/* dma64_addr_t */
...
...
@@ -402,3 +411,28 @@ void ide_toggle_bounce(ide_drive_t *drive, int on)
}
EXPORT_SYMBOL
(
ide_toggle_bounce
);
/**
* ide_set_xfer_rate - set transfer rate
* @drive: drive to set
* @speed: speed to attempt to set
*
* General helper for setting the speed of an IDE device. This
* function knows about user enforced limits from the configuration
* which speedproc() does not. High level drivers should never
* invoke speedproc() directly.
*/
int
ide_set_xfer_rate
(
ide_drive_t
*
drive
,
u8
rate
)
{
#ifndef CONFIG_BLK_DEV_IDEDMA
rate
=
min
(
rate
,
(
u8
)
XFER_PIO_4
);
#endif
if
(
HWIF
(
drive
)
->
speedproc
)
return
HWIF
(
drive
)
->
speedproc
(
drive
,
rate
);
else
return
-
1
;
}
EXPORT_SYMBOL_GPL
(
ide_set_xfer_rate
);
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