Commit 97dbe09f authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] remove old style and unused bad drive list

parent 179b6179
...@@ -90,9 +90,6 @@ ...@@ -90,9 +90,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#define CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
struct drive_list_entry { struct drive_list_entry {
char * id_model; char * id_model;
char * id_firmware; char * id_firmware;
...@@ -165,40 +162,6 @@ static int in_drive_list(struct hd_driveid *id, struct drive_list_entry * drive_ ...@@ -165,40 +162,6 @@ static int in_drive_list(struct hd_driveid *id, struct drive_list_entry * drive_
return 0; 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 * ide_dma_intr - IDE DMA interrupt handler
* @drive: the drive the interrupt is for * @drive: the drive the interrupt is for
...@@ -282,6 +245,7 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq) ...@@ -282,6 +245,7 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq)
hwif->sg_dma_direction = PCI_DMA_TODEVICE; hwif->sg_dma_direction = PCI_DMA_TODEVICE;
else else
hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; hwif->sg_dma_direction = PCI_DMA_FROMDEVICE;
#if 1 #if 1
if (sector_count > 256) if (sector_count > 256)
BUG(); BUG();
...@@ -832,24 +796,11 @@ int __ide_dma_bad_drive (ide_drive_t *drive) ...@@ -832,24 +796,11 @@ int __ide_dma_bad_drive (ide_drive_t *drive)
{ {
struct hd_driveid *id = drive->id; struct hd_driveid *id = drive->id;
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
int blacklist = in_drive_list(id, drive_blacklist); int blacklist = in_drive_list(id, drive_blacklist);
if (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); 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; return 0;
} }
...@@ -858,19 +809,7 @@ EXPORT_SYMBOL(__ide_dma_bad_drive); ...@@ -858,19 +809,7 @@ EXPORT_SYMBOL(__ide_dma_bad_drive);
int __ide_dma_good_drive (ide_drive_t *drive) int __ide_dma_good_drive (ide_drive_t *drive)
{ {
struct hd_driveid *id = drive->id; struct hd_driveid *id = drive->id;
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
return in_drive_list(id, drive_whitelist); 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); EXPORT_SYMBOL(__ide_dma_good_drive);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment