[PATCH] ide: clean up the garbage in eighty_ninty_three
Replace the foot long pile of festering garbage in eighty_ninty_three with some actual clean code. All the ifdefs are fixed and havent changed since 2.4 Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -601,44 +601,15 @@ EXPORT_SYMBOL(ide_wait_stat);
|
|||||||
*/
|
*/
|
||||||
u8 eighty_ninty_three (ide_drive_t *drive)
|
u8 eighty_ninty_three (ide_drive_t *drive)
|
||||||
{
|
{
|
||||||
#if 0
|
if(HWIF(drive)->udma_four == 0)
|
||||||
if (!HWIF(drive)->udma_four)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
if (!(drive->id->hw_config & 0x6000))
|
||||||
if (drive->id->major_rev_num) {
|
|
||||||
int hssbd = 0;
|
|
||||||
int i;
|
|
||||||
/*
|
|
||||||
* Determine highest Supported SPEC
|
|
||||||
*/
|
|
||||||
for (i=1; i<=15; i++)
|
|
||||||
if (drive->id->major_rev_num & (1<<i))
|
|
||||||
hssbd++;
|
|
||||||
|
|
||||||
switch (hssbd) {
|
|
||||||
case 7:
|
|
||||||
case 6:
|
|
||||||
case 5:
|
|
||||||
/* ATA-4 and older do not support above Ultra 33 */
|
|
||||||
default:
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ((u8) (
|
|
||||||
#ifndef CONFIG_IDEDMA_IVB
|
#ifndef CONFIG_IDEDMA_IVB
|
||||||
(drive->id->hw_config & 0x4000) &&
|
if(!(drive->id->hw_config & 0x4000))
|
||||||
|
return 0;
|
||||||
#endif /* CONFIG_IDEDMA_IVB */
|
#endif /* CONFIG_IDEDMA_IVB */
|
||||||
(drive->id->hw_config & 0x6000)) ? 1 : 0);
|
return 1;
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
return ((u8) ((HWIF(drive)->udma_four) &&
|
|
||||||
#ifndef CONFIG_IDEDMA_IVB
|
|
||||||
(drive->id->hw_config & 0x4000) &&
|
|
||||||
#endif /* CONFIG_IDEDMA_IVB */
|
|
||||||
(drive->id->hw_config & 0x6000)) ? 1 : 0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL(eighty_ninty_three);
|
EXPORT_SYMBOL(eighty_ninty_three);
|
||||||
|
Reference in New Issue
Block a user