diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 91 |
1 files changed, 5 insertions, 86 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index e8c88ff2f6b6..1defba3eefe7 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -87,9 +87,9 @@ static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR, | |||
87 | IDE8_MAJOR, IDE9_MAJOR }; | 87 | IDE8_MAJOR, IDE9_MAJOR }; |
88 | 88 | ||
89 | DEFINE_MUTEX(ide_cfg_mtx); | 89 | DEFINE_MUTEX(ide_cfg_mtx); |
90 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); | ||
91 | 90 | ||
92 | int noautodma = 0; | 91 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); |
92 | EXPORT_SYMBOL(ide_lock); | ||
93 | 93 | ||
94 | ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */ | 94 | ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */ |
95 | 95 | ||
@@ -698,59 +698,6 @@ set_val: | |||
698 | 698 | ||
699 | EXPORT_SYMBOL(generic_ide_ioctl); | 699 | EXPORT_SYMBOL(generic_ide_ioctl); |
700 | 700 | ||
701 | /* | ||
702 | * ide_setup() gets called VERY EARLY during initialization, | ||
703 | * to handle kernel "command line" strings beginning with "ide". | ||
704 | * | ||
705 | * Remember to update Documentation/ide/ide.txt if you change something here. | ||
706 | */ | ||
707 | static int __init ide_setup(char *s) | ||
708 | { | ||
709 | printk(KERN_INFO "ide_setup: %s", s); | ||
710 | |||
711 | #ifdef CONFIG_BLK_DEV_IDEDOUBLER | ||
712 | if (!strcmp(s, "ide=doubler")) { | ||
713 | extern int ide_doubler; | ||
714 | |||
715 | printk(" : Enabled support for IDE doublers\n"); | ||
716 | ide_doubler = 1; | ||
717 | goto obsolete_option; | ||
718 | } | ||
719 | #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ | ||
720 | |||
721 | if (!strcmp(s, "ide=nodma")) { | ||
722 | printk(" : Prevented DMA\n"); | ||
723 | noautodma = 1; | ||
724 | goto obsolete_option; | ||
725 | } | ||
726 | |||
727 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
728 | if (!strcmp(s, "ide=noacpi")) { | ||
729 | //printk(" : Disable IDE ACPI support.\n"); | ||
730 | ide_noacpi = 1; | ||
731 | goto obsolete_option; | ||
732 | } | ||
733 | if (!strcmp(s, "ide=acpigtf")) { | ||
734 | //printk(" : Enable IDE ACPI _GTF support.\n"); | ||
735 | ide_acpigtf = 1; | ||
736 | goto obsolete_option; | ||
737 | } | ||
738 | if (!strcmp(s, "ide=acpionboot")) { | ||
739 | //printk(" : Call IDE ACPI methods on boot.\n"); | ||
740 | ide_acpionboot = 1; | ||
741 | goto obsolete_option; | ||
742 | } | ||
743 | #endif /* CONFIG_BLK_DEV_IDEACPI */ | ||
744 | |||
745 | printk(" -- BAD OPTION\n"); | ||
746 | return 1; | ||
747 | obsolete_option: | ||
748 | printk(" -- OBSOLETE OPTION, WILL BE REMOVED SOON!\n"); | ||
749 | return 1; | ||
750 | } | ||
751 | |||
752 | EXPORT_SYMBOL(ide_lock); | ||
753 | |||
754 | static int ide_bus_match(struct device *dev, struct device_driver *drv) | 701 | static int ide_bus_match(struct device *dev, struct device_driver *drv) |
755 | { | 702 | { |
756 | return 1; | 703 | return 1; |
@@ -1087,32 +1034,7 @@ out_port_class: | |||
1087 | return ret; | 1034 | return ret; |
1088 | } | 1035 | } |
1089 | 1036 | ||
1090 | #ifdef MODULE | 1037 | static void __exit ide_exit(void) |
1091 | static char *options = NULL; | ||
1092 | module_param(options, charp, 0); | ||
1093 | MODULE_LICENSE("GPL"); | ||
1094 | |||
1095 | static void __init parse_options (char *line) | ||
1096 | { | ||
1097 | char *next = line; | ||
1098 | |||
1099 | if (line == NULL || !*line) | ||
1100 | return; | ||
1101 | while ((line = next) != NULL) { | ||
1102 | if ((next = strchr(line,' ')) != NULL) | ||
1103 | *next++ = 0; | ||
1104 | if (!ide_setup(line)) | ||
1105 | printk (KERN_INFO "Unknown option '%s'\n", line); | ||
1106 | } | ||
1107 | } | ||
1108 | |||
1109 | int __init init_module (void) | ||
1110 | { | ||
1111 | parse_options(options); | ||
1112 | return ide_init(); | ||
1113 | } | ||
1114 | |||
1115 | void __exit cleanup_module (void) | ||
1116 | { | 1038 | { |
1117 | proc_ide_destroy(); | 1039 | proc_ide_destroy(); |
1118 | 1040 | ||
@@ -1121,10 +1043,7 @@ void __exit cleanup_module (void) | |||
1121 | bus_unregister(&ide_bus_type); | 1043 | bus_unregister(&ide_bus_type); |
1122 | } | 1044 | } |
1123 | 1045 | ||
1124 | #else /* !MODULE */ | ||
1125 | |||
1126 | __setup("", ide_setup); | ||
1127 | |||
1128 | module_init(ide_init); | 1046 | module_init(ide_init); |
1047 | module_exit(ide_exit); | ||
1129 | 1048 | ||
1130 | #endif /* MODULE */ | 1049 | MODULE_LICENSE("GPL"); |