diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2005-09-13 04:25:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-13 11:22:28 -0400 |
commit | d7d7634c0f021d7d7ed781680d2c88940fc5fee8 (patch) | |
tree | 675463fe87c3c1a4313a39b274cdbeaf5918a797 /drivers/ide/ide-iops.c | |
parent | c352ec8ab87b065cd2edda171811f49ac7d0d5cd (diff) |
[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>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index b443b04a4c5a..0b0aa4f51628 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -601,44 +601,15 @@ EXPORT_SYMBOL(ide_wait_stat); | |||
601 | */ | 601 | */ |
602 | u8 eighty_ninty_three (ide_drive_t *drive) | 602 | u8 eighty_ninty_three (ide_drive_t *drive) |
603 | { | 603 | { |
604 | #if 0 | 604 | if(HWIF(drive)->udma_four == 0) |
605 | if (!HWIF(drive)->udma_four) | 605 | return 0; |
606 | if (!(drive->id->hw_config & 0x6000)) | ||
606 | return 0; | 607 | return 0; |
607 | |||
608 | if (drive->id->major_rev_num) { | ||
609 | int hssbd = 0; | ||
610 | int i; | ||
611 | /* | ||
612 | * Determine highest Supported SPEC | ||
613 | */ | ||
614 | for (i=1; i<=15; i++) | ||
615 | if (drive->id->major_rev_num & (1<<i)) | ||
616 | hssbd++; | ||
617 | |||
618 | switch (hssbd) { | ||
619 | case 7: | ||
620 | case 6: | ||
621 | case 5: | ||
622 | /* ATA-4 and older do not support above Ultra 33 */ | ||
623 | default: | ||
624 | return 0; | ||
625 | } | ||
626 | } | ||
627 | |||
628 | return ((u8) ( | ||
629 | #ifndef CONFIG_IDEDMA_IVB | ||
630 | (drive->id->hw_config & 0x4000) && | ||
631 | #endif /* CONFIG_IDEDMA_IVB */ | ||
632 | (drive->id->hw_config & 0x6000)) ? 1 : 0); | ||
633 | |||
634 | #else | ||
635 | |||
636 | return ((u8) ((HWIF(drive)->udma_four) && | ||
637 | #ifndef CONFIG_IDEDMA_IVB | 608 | #ifndef CONFIG_IDEDMA_IVB |
638 | (drive->id->hw_config & 0x4000) && | 609 | if(!(drive->id->hw_config & 0x4000)) |
610 | return 0; | ||
639 | #endif /* CONFIG_IDEDMA_IVB */ | 611 | #endif /* CONFIG_IDEDMA_IVB */ |
640 | (drive->id->hw_config & 0x6000)) ? 1 : 0); | 612 | return 1; |
641 | #endif | ||
642 | } | 613 | } |
643 | 614 | ||
644 | EXPORT_SYMBOL(eighty_ninty_three); | 615 | EXPORT_SYMBOL(eighty_ninty_three); |