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
nexedi
linux
Commits
97dbe09f
Commit
97dbe09f
authored
Feb 17, 2003
by
Alan Cox
Committed by
Linus Torvalds
Feb 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] remove old style and unused bad drive list
parent
179b6179
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
63 deletions
+2
-63
drivers/ide/ide-dma.c
drivers/ide/ide-dma.c
+2
-63
No files found.
drivers/ide/ide-dma.c
View file @
97dbe09f
...
...
@@ -90,9 +90,6 @@
#include <asm/io.h>
#include <asm/irq.h>
#define CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
struct
drive_list_entry
{
char
*
id_model
;
char
*
id_firmware
;
...
...
@@ -165,40 +162,6 @@ static int in_drive_list(struct hd_driveid *id, struct drive_list_entry * drive_
return
0
;
}
#else
/* !CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */
/*
* good_dma_drives() lists the model names (from "hdparm -i")
* of drives which do not support mode2 DMA but which are
* known to work fine with this interface under Linux.
*/
const
char
*
good_dma_drives
[]
=
{
"Micropolis 2112A"
,
"CONNER CTMA 4000"
,
"CONNER CTT8000-A"
,
"ST34342A"
,
/* for Sun Ultra */
NULL
};
/*
* bad_dma_drives() lists the model names (from "hdparm -i")
* of drives which supposedly support (U)DMA but which are
* known to corrupt data with this interface under Linux.
*
* This is an empirical list. Its generated from bug reports. That means
* while it reflects actual problem distributions it doesn't answer whether
* the drive or the controller, or cabling, or software, or some combination
* thereof is the fault. If you don't happen to agree with the kernel's
* opinion of your drive - use hdparm to turn DMA on.
*/
const
char
*
bad_dma_drives
[]
=
{
"WDC AC11000H"
,
"WDC AC22100H"
,
"WDC AC32100H"
,
"WDC AC32500H"
,
"WDC AC33100H"
,
"WDC AC31600H"
,
NULL
};
#endif
/* CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */
/**
* ide_dma_intr - IDE DMA interrupt handler
* @drive: the drive the interrupt is for
...
...
@@ -282,6 +245,7 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq)
hwif
->
sg_dma_direction
=
PCI_DMA_TODEVICE
;
else
hwif
->
sg_dma_direction
=
PCI_DMA_FROMDEVICE
;
#if 1
if
(
sector_count
>
256
)
BUG
();
...
...
@@ -832,24 +796,11 @@ int __ide_dma_bad_drive (ide_drive_t *drive)
{
struct
hd_driveid
*
id
=
drive
->
id
;
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
int
blacklist
=
in_drive_list
(
id
,
drive_blacklist
);
if
(
blacklist
)
{
printk
(
"%s: Disabling (U)DMA for %s
\n
"
,
drive
->
name
,
id
->
model
);
printk
(
KERN_WARNING
"%s: Disabling (U)DMA for %s
\n
"
,
drive
->
name
,
id
->
model
);
return
(
blacklist
);
}
#else
/* !CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */
const
char
**
list
;
/* Consult the list of known "bad" drives */
list
=
bad_dma_drives
;
while
(
*
list
)
{
if
(
!
strcmp
(
*
list
++
,
id
->
model
))
{
printk
(
"%s: Disabling (U)DMA for %s
\n
"
,
drive
->
name
,
id
->
model
);
return
1
;
}
}
#endif
/* CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */
return
0
;
}
...
...
@@ -858,19 +809,7 @@ EXPORT_SYMBOL(__ide_dma_bad_drive);
int
__ide_dma_good_drive
(
ide_drive_t
*
drive
)
{
struct
hd_driveid
*
id
=
drive
->
id
;
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
return
in_drive_list
(
id
,
drive_whitelist
);
#else
/* !CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */
const
char
**
list
;
/* Consult the list of known "good" drives */
list
=
good_dma_drives
;
while
(
*
list
)
{
if
(
!
strcmp
(
*
list
++
,
id
->
model
))
return
1
;
}
#endif
/* CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */
return
0
;
}
EXPORT_SYMBOL
(
__ide_dma_good_drive
);
...
...
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