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
3192efb4
Commit
3192efb4
authored
Mar 21, 2003
by
Alan Cox
Committed by
Linus Torvalds
Mar 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] update ide-dma support
parent
223a2a38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
drivers/ide/ide-dma.c
drivers/ide/ide-dma.c
+15
-10
No files found.
drivers/ide/ide-dma.c
View file @
3192efb4
...
@@ -75,7 +75,6 @@
...
@@ -75,7 +75,6 @@
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
...
@@ -419,7 +418,7 @@ static int config_drive_for_dma (ide_drive_t *drive)
...
@@ -419,7 +418,7 @@ static int config_drive_for_dma (ide_drive_t *drive)
struct
hd_driveid
*
id
=
drive
->
id
;
struct
hd_driveid
*
id
=
drive
->
id
;
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
if
(
id
&&
(
id
->
capability
&
1
)
&&
hwif
->
autodma
)
{
if
((
id
->
capability
&
1
)
&&
hwif
->
autodma
)
{
/* Consult the list of known "bad" drives */
/* Consult the list of known "bad" drives */
if
(
hwif
->
ide_dma_bad_drive
(
drive
))
if
(
hwif
->
ide_dma_bad_drive
(
drive
))
return
hwif
->
ide_dma_off
(
drive
);
return
hwif
->
ide_dma_off
(
drive
);
...
@@ -977,14 +976,12 @@ int ide_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
...
@@ -977,14 +976,12 @@ int ide_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
{
{
printk
(
KERN_INFO
" %s: MMIO-DMA at 0x%08lx-0x%08lx"
,
printk
(
KERN_INFO
" %s: MMIO-DMA at 0x%08lx-0x%08lx"
,
hwif
->
name
,
base
,
base
+
ports
-
1
);
hwif
->
name
,
base
,
base
+
ports
-
1
);
if
(
check_mem_region
(
base
,
ports
))
{
if
(
!
request_mem_region
(
base
,
ports
,
hwif
->
name
))
printk
(
" -- Error, MMIO ports already in use.
\n
"
);
goto
fail
;
return
1
;
}
request_mem_region
(
base
,
ports
,
hwif
->
name
);
hwif
->
dma_base
=
base
;
hwif
->
dma_base
=
base
;
if
((
hwif
->
cds
->
extra
)
&&
(
hwif
->
channel
==
0
))
{
if
((
hwif
->
cds
->
extra
)
&&
(
hwif
->
channel
==
0
))
{
request_region
(
base
+
16
,
hwif
->
cds
->
extra
,
hwif
->
cds
->
name
);
if
(
!
request_region
(
base
+
16
,
hwif
->
cds
->
extra
,
hwif
->
cds
->
name
))
goto
release_mem
;
hwif
->
dma_extra
=
hwif
->
cds
->
extra
;
hwif
->
dma_extra
=
hwif
->
cds
->
extra
;
}
}
...
@@ -993,10 +990,18 @@ int ide_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
...
@@ -993,10 +990,18 @@ int ide_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
else
else
hwif
->
dma_master
=
base
;
hwif
->
dma_master
=
base
;
if
(
hwif
->
dma_base2
)
{
if
(
hwif
->
dma_base2
)
{
if
(
!
check_mem_region
(
hwif
->
dma_base2
,
ports
))
if
(
!
request_mem_region
(
hwif
->
dma_base2
,
ports
,
hwif
->
name
))
request_mem_region
(
hwif
->
dma_base2
,
ports
,
hwif
->
name
)
;
goto
release_io
;
}
}
return
0
;
return
0
;
release_mem:
release_mem_region
(
base
,
ports
);
release_io:
release_region
(
base
+
16
,
hwif
->
cds
->
extra
);
fail:
printk
(
" -- Error, MMIO ports already in use.
\n
"
);
return
1
;
}
}
int
ide_iomio_dma
(
ide_hwif_t
*
hwif
,
unsigned
long
base
,
unsigned
int
ports
)
int
ide_iomio_dma
(
ide_hwif_t
*
hwif
,
unsigned
long
base
,
unsigned
int
ports
)
...
...
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