diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2005-12-14 20:16:18 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2005-12-14 20:16:18 -0500 |
commit | 65e5f2e3b457b6b20a5c4481312189d141a33d24 (patch) | |
tree | cce866efd8eea1815cb054a274e165bdbba16180 /drivers/ide | |
parent | 38f9d412be1ed29ee3b41782f22fd85b1c95fbed (diff) |
[PATCH] ide: core modifications for AU1200
bart: slightly modified by me
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-dma.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 1e1531334c25..0523da77425a 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -90,11 +90,6 @@ | |||
90 | #include <asm/io.h> | 90 | #include <asm/io.h> |
91 | #include <asm/irq.h> | 91 | #include <asm/irq.h> |
92 | 92 | ||
93 | struct drive_list_entry { | ||
94 | const char *id_model; | ||
95 | const char *id_firmware; | ||
96 | }; | ||
97 | |||
98 | static const struct drive_list_entry drive_whitelist [] = { | 93 | static const struct drive_list_entry drive_whitelist [] = { |
99 | 94 | ||
100 | { "Micropolis 2112A" , "ALL" }, | 95 | { "Micropolis 2112A" , "ALL" }, |
@@ -139,7 +134,7 @@ static const struct drive_list_entry drive_blacklist [] = { | |||
139 | }; | 134 | }; |
140 | 135 | ||
141 | /** | 136 | /** |
142 | * in_drive_list - look for drive in black/white list | 137 | * ide_in_drive_list - look for drive in black/white list |
143 | * @id: drive identifier | 138 | * @id: drive identifier |
144 | * @drive_table: list to inspect | 139 | * @drive_table: list to inspect |
145 | * | 140 | * |
@@ -147,7 +142,7 @@ static const struct drive_list_entry drive_blacklist [] = { | |||
147 | * Returns 1 if the drive is found in the table. | 142 | * Returns 1 if the drive is found in the table. |
148 | */ | 143 | */ |
149 | 144 | ||
150 | static int in_drive_list(struct hd_driveid *id, const struct drive_list_entry *drive_table) | 145 | int ide_in_drive_list(struct hd_driveid *id, const struct drive_list_entry *drive_table) |
151 | { | 146 | { |
152 | for ( ; drive_table->id_model ; drive_table++) | 147 | for ( ; drive_table->id_model ; drive_table++) |
153 | if ((!strcmp(drive_table->id_model, id->model)) && | 148 | if ((!strcmp(drive_table->id_model, id->model)) && |
@@ -157,6 +152,8 @@ static int in_drive_list(struct hd_driveid *id, const struct drive_list_entry *d | |||
157 | return 0; | 152 | return 0; |
158 | } | 153 | } |
159 | 154 | ||
155 | EXPORT_SYMBOL_GPL(ide_in_drive_list); | ||
156 | |||
160 | /** | 157 | /** |
161 | * ide_dma_intr - IDE DMA interrupt handler | 158 | * ide_dma_intr - IDE DMA interrupt handler |
162 | * @drive: the drive the interrupt is for | 159 | * @drive: the drive the interrupt is for |
@@ -663,7 +660,7 @@ int __ide_dma_bad_drive (ide_drive_t *drive) | |||
663 | { | 660 | { |
664 | struct hd_driveid *id = drive->id; | 661 | struct hd_driveid *id = drive->id; |
665 | 662 | ||
666 | int blacklist = in_drive_list(id, drive_blacklist); | 663 | int blacklist = ide_in_drive_list(id, drive_blacklist); |
667 | if (blacklist) { | 664 | if (blacklist) { |
668 | printk(KERN_WARNING "%s: Disabling (U)DMA for %s (blacklisted)\n", | 665 | printk(KERN_WARNING "%s: Disabling (U)DMA for %s (blacklisted)\n", |
669 | drive->name, id->model); | 666 | drive->name, id->model); |
@@ -677,7 +674,7 @@ EXPORT_SYMBOL(__ide_dma_bad_drive); | |||
677 | int __ide_dma_good_drive (ide_drive_t *drive) | 674 | int __ide_dma_good_drive (ide_drive_t *drive) |
678 | { | 675 | { |
679 | struct hd_driveid *id = drive->id; | 676 | struct hd_driveid *id = drive->id; |
680 | return in_drive_list(id, drive_whitelist); | 677 | return ide_in_drive_list(id, drive_whitelist); |
681 | } | 678 | } |
682 | 679 | ||
683 | EXPORT_SYMBOL(__ide_dma_good_drive); | 680 | EXPORT_SYMBOL(__ide_dma_good_drive); |