Commit 65e5f2e3b457b6b20a5c4481312189d141a33d24

Authored by Jordan Crouse
Committed by Bartlomiej Zolnierkiewicz
1 parent 38f9d412be

[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>

Showing 3 changed files with 12 additions and 14 deletions Side-by-side Diff

drivers/ide/ide-dma.c
... ... @@ -90,11 +90,6 @@
90 90 #include <asm/io.h>
91 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 93 static const struct drive_list_entry drive_whitelist [] = {
99 94  
100 95 { "Micropolis 2112A" , "ALL" },
... ... @@ -139,7 +134,7 @@
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 138 * @id: drive identifier
144 139 * @drive_table: list to inspect
145 140 *
... ... @@ -147,7 +142,7 @@
147 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 147 for ( ; drive_table->id_model ; drive_table++)
153 148 if ((!strcmp(drive_table->id_model, id->model)) &&
... ... @@ -157,6 +152,8 @@
157 152 return 0;
158 153 }
159 154  
  155 +EXPORT_SYMBOL_GPL(ide_in_drive_list);
  156 +
160 157 /**
161 158 * ide_dma_intr - IDE DMA interrupt handler
162 159 * @drive: the drive the interrupt is for
... ... @@ -663,7 +660,7 @@
663 660 {
664 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 664 if (blacklist) {
668 665 printk(KERN_WARNING "%s: Disabling (U)DMA for %s (blacklisted)\n",
669 666 drive->name, id->model);
... ... @@ -677,7 +674,7 @@
677 674 int __ide_dma_good_drive (ide_drive_t *drive)
678 675 {
679 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 680 EXPORT_SYMBOL(__ide_dma_good_drive);
include/asm-mips/mach-au1x00/au1xxx_ide.h
... ... @@ -87,11 +87,6 @@
87 87 } _auide_hwif;
88 88  
89 89 #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
90   -struct drive_list_entry {
91   - const char * id_model;
92   - const char * id_firmware;
93   -};
94   -
95 90 /* HD white list */
96 91 static const struct drive_list_entry dma_white_list [] = {
97 92 /*
... ... @@ -1371,6 +1371,12 @@
1371 1371 #define GOOD_DMA_DRIVE 1
1372 1372  
1373 1373 #ifdef CONFIG_BLK_DEV_IDEDMA
  1374 +struct drive_list_entry {
  1375 + const char *id_model;
  1376 + const char *id_firmware;
  1377 +};
  1378 +
  1379 +int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *);
1374 1380 int __ide_dma_bad_drive(ide_drive_t *);
1375 1381 int __ide_dma_good_drive(ide_drive_t *);
1376 1382 int ide_use_dma(ide_drive_t *);