2 * linux/drivers/block/ide-proc.c Version 1.03 January 2, 1998
4 * Copyright (C) 1997-1998 Mark Lord
8 * This is the /proc/ide/ filesystem implementation.
10 * The major reason this exists is to provide sufficient access
11 * to driver and config data, such that user-mode programs can
12 * be developed to handle chipset tuning for most PCI interfaces.
13 * This should provide better utilities, and less kernel bloat.
15 * The entire pci config space for a PCI interface chipset can be
16 * retrieved by just reading it. e.g. "cat /proc/ide3/config"
18 * To modify registers *safely*, do something like:
19 * echo "P40:88" >/proc/ide/ide3/config
20 * That expression writes 0x88 to pci config register 0x40
21 * on the chip which controls ide3. Multiple tuples can be issued,
22 * and the writes will be completed as an atomic set:
23 * echo "P40:88 P41:35 P42:00 P43:00" >/proc/ide/ide3/config
25 * All numbers must be specified using pairs of ascii hex digits.
26 * It is important to note that these writes will be performed
27 * after waiting for the IDE controller (both interfaces)
28 * to be completely idle, to ensure no corruption of I/O in progress.
30 * Non-PCI registers can also be written, using "R" in place of "P"
31 * in the above examples. The size of the port transfer is determined
32 * by the number of pairs of hex digits given for the data. If a two
33 * digit value is given, the write will be a byte operation; if four
34 * digits are used, the write will be performed as a 16-bit operation;
35 * and if eight digits are specified, a 32-bit "dword" write will be
36 * performed. Odd numbers of digits are not permitted.
38 * If there is an error *anywhere* in the string of registers/data
39 * then *none* of the writes will be performed.
41 * Drive/Driver settings can be retrieved by reading the drive's
42 * "settings" files. e.g. "cat /proc/ide0/hda/settings"
43 * To write a new value "val" into a specific setting "name", use:
44 * echo "name:val" >/proc/ide/ide0/hda/settings
46 * Also useful, "cat /proc/ide0/hda/[identify, smart_values,
47 * smart_thresholds, capabilities]" will issue an IDENTIFY /
48 * PACKET_IDENTIFY / SMART_READ_VALUES / SMART_READ_THRESHOLDS /
49 * SENSE CAPABILITIES command to /dev/hda, and then dump out the
50 * returned data as 256 16-bit words. The "hdparm" utility will
51 * be updated someday soon to use this mechanism.
53 * Feel free to develop and distribute fancy GUI configuration
54 * utilities for you favorite PCI chipsets. I'll be working on
55 * one for the Promise 20246 someday soon. -ml
59 #include <linux/config.h>
60 #include <asm/uaccess.h>
61 #include <linux/errno.h>
62 #include <linux/sched.h>
63 #include <linux/proc_fs.h>
64 #include <linux/stat.h>
66 #include <linux/pci.h>
67 #include <linux/ctype.h>
68 #include <linux/ide.h>
73 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
76 #ifdef CONFIG_BLK_DEV_VIA82C586
77 int (*via_display_info
)(char *, char **, off_t
, int, int) = NULL
;
78 #endif /* CONFIG_BLK_DEV_VIA82C586 */
80 #ifdef CONFIG_BLK_DEV_ALI15X3
81 int (*ali_display_info
)(char *, char **, off_t
, int, int) = NULL
;
82 #endif /* CONFIG_BLK_DEV_ALI15X3 */
84 static int ide_getxdigit(char c
)
90 digit
= tolower(c
) - 'a' + 10;
96 static int xx_xx_parse_error (const char *data
, unsigned long len
, const char *msg
)
100 if (len
>= sizeof(errbuf
))
101 len
= sizeof(errbuf
) - 1;
102 for (i
= 0; i
< len
; ++i
) {
111 printk("proc_ide: error: %s: '%s'\n", msg
, errbuf
);
115 static struct proc_dir_entry
* proc_ide_root
= NULL
;
117 static int proc_ide_write_config
118 (struct file
*file
, const char *buffer
, unsigned long count
, void *data
)
120 ide_hwif_t
*hwif
= (ide_hwif_t
*)data
;
122 unsigned long startn
= 0, n
, flags
;
123 const char *start
= NULL
, *msg
= NULL
;
125 if (!capable(CAP_SYS_ADMIN
))
128 * Skip over leading whitespace
130 while (count
&& isspace(*buffer
)) {
135 * Do one full pass to verify all parameters,
136 * then do another to actually write the regs.
138 save_flags(flags
); /* all CPUs */
142 unsigned long timeout
= jiffies
+ (3 * HZ
);
143 ide_hwgroup_t
*mygroup
= (ide_hwgroup_t
*)(hwif
->hwgroup
);
144 ide_hwgroup_t
*mategroup
= NULL
;
145 if (hwif
->mate
&& hwif
->mate
->hwgroup
)
146 mategroup
= (ide_hwgroup_t
*)(hwif
->mate
->hwgroup
);
147 cli(); /* all CPUs; ensure all writes are done together */
148 while (mygroup
->busy
|| (mategroup
&& mategroup
->busy
)) {
149 sti(); /* all CPUs */
150 if (0 < (signed long)(jiffies
- timeout
)) {
151 printk("/proc/ide/%s/config: channel(s) busy, cannot write\n", hwif
->name
);
152 restore_flags(flags
); /* all CPUs */
155 cli(); /* all CPUs */
162 unsigned int reg
= 0, val
= 0, is_pci
;
166 case 'R': is_pci
= 0;
168 case 'P': is_pci
= 1;
169 #ifdef CONFIG_BLK_DEV_IDEPCI
170 if (hwif
->pci_dev
&& !IDE_PCI_DEVID_EQ(hwif
->pci_devid
, IDE_PCI_DEVID_NULL
))
172 #endif /* CONFIG_BLK_DEV_IDEPCI */
173 msg
= "not a PCI device";
175 default: msg
= "expected 'R' or 'P'";
179 while (n
> 0 && (d
= ide_getxdigit(*p
)) >= 0) {
180 reg
= (reg
<< 4) | d
;
185 if (!digits
|| (digits
> 4) || (is_pci
&& reg
> 0xff)) {
186 msg
= "bad/missing register number";
189 if (n
-- == 0 || *p
++ != ':') {
194 while (n
> 0 && (d
= ide_getxdigit(*p
)) >= 0) {
195 val
= (val
<< 4) | d
;
200 if (digits
!= 2 && digits
!= 4 && digits
!= 8) {
201 msg
= "bad data, 2/4/8 digits required";
204 if (n
> 0 && !isspace(*p
)) {
205 msg
= "expected whitespace after data";
208 while (n
> 0 && isspace(*p
)) {
212 #ifdef CONFIG_BLK_DEV_IDEPCI
213 if (is_pci
&& (reg
& ((digits
>> 1) - 1))) {
214 msg
= "misaligned access";
217 #endif /* CONFIG_BLK_DEV_IDEPCI */
220 printk("proc_ide_write_config: type=%c, reg=0x%x, val=0x%x, digits=%d\n", is_pci
? 'PCI' : 'non-PCI', reg
, val
, digits
);
223 #ifdef CONFIG_BLK_DEV_IDEPCI
225 struct pci_dev
*dev
= hwif
->pci_dev
;
227 case 2: msg
= "byte";
228 rc
= pci_write_config_byte(dev
, reg
, val
);
230 case 4: msg
= "word";
231 rc
= pci_write_config_word(dev
, reg
, val
);
233 case 8: msg
= "dword";
234 rc
= pci_write_config_dword(dev
, reg
, val
);
238 restore_flags(flags
); /* all CPUs */
239 printk("proc_ide_write_config: error writing %s at bus %02x dev %02x reg 0x%x value 0x%x\n",
240 msg
, dev
->bus
->number
, dev
->devfn
, reg
, val
);
241 printk("proc_ide_write_config: error %d\n", rc
);
244 #endif /* CONFIG_BLK_DEV_IDEPCI */
245 } else { /* not pci */
247 case 2: outb(val
, reg
);
249 case 4: outw(val
, reg
);
251 case 8: outl(val
, reg
);
257 } while (!for_real
++);
258 restore_flags(flags
); /* all CPUs */
261 restore_flags(flags
); /* all CPUs */
262 printk("parse error\n");
263 return xx_xx_parse_error(start
, startn
, msg
);
266 static int proc_ide_read_config
267 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
272 #ifdef CONFIG_BLK_DEV_IDEPCI
273 ide_hwif_t
*hwif
= (ide_hwif_t
*)data
;
274 struct pci_dev
*dev
= hwif
->pci_dev
;
275 if (!IDE_PCI_DEVID_EQ(hwif
->pci_devid
, IDE_PCI_DEVID_NULL
) && dev
&& dev
->bus
) {
278 out
+= sprintf(out
, "pci bus %02x device %02x vid %04x did %04x channel %d\n",
279 dev
->bus
->number
, dev
->devfn
, hwif
->pci_devid
.vid
, hwif
->pci_devid
.did
, hwif
->channel
);
282 int rc
= pci_read_config_byte(dev
, reg
, &val
);
284 printk("proc_ide_read_config: error %d reading bus %02x dev %02x reg 0x%02x\n",
285 rc
, dev
->bus
->number
, dev
->devfn
, reg
);
286 out
+= sprintf(out
, "??%c", (++reg
& 0xf) ? ' ' : '\n');
288 out
+= sprintf(out
, "%02x%c", val
, (++reg
& 0xf) ? ' ' : '\n');
289 } while (reg
< 0x100);
291 #endif /* CONFIG_BLK_DEV_IDEPCI */
292 out
+= sprintf(out
, "(none)\n");
294 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
298 static int ide_getdigit(char c
)
308 static int proc_ide_read_drivers
309 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
313 ide_module_t
*p
= ide_modules
;
314 ide_driver_t
*driver
;
317 driver
= (ide_driver_t
*) p
->info
;
318 if (p
->type
== IDE_DRIVER_MODULE
&& driver
)
319 out
+= sprintf(out
, "%s version %s\n", driver
->name
, driver
->version
);
323 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
326 static int proc_ide_read_imodel
327 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
329 ide_hwif_t
*hwif
= (ide_hwif_t
*) data
;
333 switch (hwif
->chipset
) {
334 case ide_unknown
: name
= "(none)"; break;
335 case ide_generic
: name
= "generic"; break;
336 case ide_pci
: name
= "pci"; break;
337 case ide_cmd640
: name
= "cmd640"; break;
338 case ide_dtc2278
: name
= "dtc2278"; break;
339 case ide_ali14xx
: name
= "ali14xx"; break;
340 case ide_qd6580
: name
= "qd6580"; break;
341 case ide_umc8672
: name
= "umc8672"; break;
342 case ide_ht6560b
: name
= "ht6560b"; break;
343 case ide_pdc4030
: name
= "pdc4030"; break;
344 case ide_rz1000
: name
= "rz1000"; break;
345 case ide_trm290
: name
= "trm290"; break;
346 case ide_4drives
: name
= "4drives"; break;
347 default: name
= "(unknown)"; break;
349 len
= sprintf(page
, "%s\n", name
);
350 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
353 static int proc_ide_read_mate
354 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
356 ide_hwif_t
*hwif
= (ide_hwif_t
*) data
;
359 if (hwif
&& hwif
->mate
&& hwif
->mate
->present
)
360 len
= sprintf(page
, "%s\n", hwif
->mate
->name
);
362 len
= sprintf(page
, "(none)\n");
363 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
366 static int proc_ide_read_channel
367 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
369 ide_hwif_t
*hwif
= (ide_hwif_t
*) data
;
372 page
[0] = hwif
->channel
? '1' : '0';
375 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
378 static int proc_ide_get_identify(ide_drive_t
*drive
, byte
*buf
)
380 return ide_wait_cmd(drive
, (drive
->media
== ide_disk
) ? WIN_IDENTIFY
: WIN_PIDENTIFY
, 0, 0, 1, buf
);
383 static int proc_ide_read_identify
384 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
386 ide_drive_t
*drive
= (ide_drive_t
*)data
;
389 if (drive
&& !proc_ide_get_identify(drive
, page
)) {
390 unsigned short *val
= ((unsigned short *)page
) + 2;
391 char *out
= ((char *)val
) + (SECTOR_WORDS
* 4);
394 out
+= sprintf(out
, "%04x%c", le16_to_cpu(*val
), (++i
& 7) ? ' ' : '\n');
396 } while (i
< (SECTOR_WORDS
* 2));
400 len
= sprintf(page
, "\n");
401 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
404 static int proc_ide_read_settings
405 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
407 ide_drive_t
*drive
= (ide_drive_t
*) data
;
408 ide_settings_t
*setting
= (ide_settings_t
*) drive
->settings
;
410 int len
, rc
, mul_factor
, div_factor
;
412 out
+= sprintf(out
, "name\t\t\tvalue\t\tmin\t\tmax\t\tmode\n");
413 out
+= sprintf(out
, "----\t\t\t-----\t\t---\t\t---\t\t----\n");
415 mul_factor
= setting
->mul_factor
;
416 div_factor
= setting
->div_factor
;
417 out
+= sprintf(out
, "%-24s", setting
->name
);
418 if ((rc
= ide_read_setting(drive
, setting
)) >= 0)
419 out
+= sprintf(out
, "%-16d", rc
* mul_factor
/ div_factor
);
421 out
+= sprintf(out
, "%-16s", "write-only");
422 out
+= sprintf(out
, "%-16d%-16d", (setting
->min
* mul_factor
+ div_factor
- 1) / div_factor
, setting
->max
* mul_factor
/ div_factor
);
423 if (setting
->rw
& SETTING_READ
)
424 out
+= sprintf(out
, "r");
425 if (setting
->rw
& SETTING_WRITE
)
426 out
+= sprintf(out
, "w");
427 out
+= sprintf(out
, "\n");
428 setting
= setting
->next
;
431 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
436 static int proc_ide_write_settings
437 (struct file
*file
, const char *buffer
, unsigned long count
, void *data
)
439 ide_drive_t
*drive
= (ide_drive_t
*) data
;
440 char name
[MAX_LEN
+ 1];
441 int for_real
= 0, len
;
443 const char *start
= NULL
;
444 ide_settings_t
*setting
;
446 if (!capable(CAP_SYS_ADMIN
))
449 * Skip over leading whitespace
451 while (count
&& isspace(*buffer
)) {
456 * Do one full pass to verify all parameters,
457 * then do another to actually write the new settings.
465 unsigned int val
= 0;
468 while (n
> 0 && *p
!= ':') {
474 len
= IDE_MIN(p
- start
, MAX_LEN
);
475 strncpy(name
, start
, IDE_MIN(len
, MAX_LEN
));
485 while (n
> 0 && (d
= ide_getdigit(*p
)) >= 0) {
486 val
= (val
* 10) + d
;
491 if (n
> 0 && !isspace(*p
))
493 while (n
> 0 && isspace(*p
)) {
497 setting
= ide_find_setting_by_name(drive
, name
);
502 ide_write_setting(drive
, setting
, val
* setting
->div_factor
/ setting
->mul_factor
);
504 } while (!for_real
++);
507 printk("proc_ide_write_settings(): parse error\n");
511 int proc_ide_read_capacity
512 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
514 ide_drive_t
*drive
= (ide_drive_t
*) data
;
515 ide_driver_t
*driver
= (ide_driver_t
*) drive
->driver
;
519 len
= sprintf(page
, "(none)\n");
521 len
= sprintf(page
,"%li\n", ((ide_driver_t
*)drive
->driver
)->capacity(drive
));
522 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
525 int proc_ide_read_geometry
526 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
528 ide_drive_t
*drive
= (ide_drive_t
*) data
;
532 out
+= sprintf(out
,"physical %d/%d/%d\n", drive
->cyl
, drive
->head
, drive
->sect
);
533 out
+= sprintf(out
,"logical %d/%d/%d\n", drive
->bios_cyl
, drive
->bios_head
, drive
->bios_sect
);
535 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
538 static int proc_ide_read_dmodel
539 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
541 ide_drive_t
*drive
= (ide_drive_t
*) data
;
542 struct hd_driveid
*id
= drive
->id
;
545 len
= sprintf(page
, "%.40s\n", (id
&& id
->model
[0]) ? (char *)id
->model
: "(none)");
546 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
549 static int proc_ide_read_driver
550 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
552 ide_drive_t
*drive
= (ide_drive_t
*) data
;
553 ide_driver_t
*driver
= (ide_driver_t
*) drive
->driver
;
557 len
= sprintf(page
, "(none)\n");
559 len
= sprintf(page
, "%s version %s\n", driver
->name
, driver
->version
);
560 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
563 static int proc_ide_write_driver
564 (struct file
*file
, const char *buffer
, unsigned long count
, void *data
)
566 ide_drive_t
*drive
= (ide_drive_t
*) data
;
568 if (!capable(CAP_SYS_ADMIN
))
570 if (ide_replace_subdriver(drive
, buffer
))
575 static int proc_ide_read_media
576 (char *page
, char **start
, off_t off
, int count
, int *eof
, void *data
)
578 ide_drive_t
*drive
= (ide_drive_t
*) data
;
582 switch (drive
->media
) {
583 case ide_disk
: media
= "disk\n";
585 case ide_cdrom
: media
= "cdrom\n";
587 case ide_tape
: media
= "tape\n";
589 case ide_floppy
:media
= "floppy\n";
591 default: media
= "UNKNOWN\n";
596 PROC_IDE_READ_RETURN(page
,start
,off
,count
,eof
,len
);
599 static ide_proc_entry_t generic_drive_entries
[] = {
600 { "driver", S_IFREG
|S_IRUGO
, proc_ide_read_driver
, proc_ide_write_driver
},
601 { "identify", S_IFREG
|S_IRUSR
, proc_ide_read_identify
, NULL
},
602 { "media", S_IFREG
|S_IRUGO
, proc_ide_read_media
, NULL
},
603 { "model", S_IFREG
|S_IRUGO
, proc_ide_read_dmodel
, NULL
},
604 { "settings", S_IFREG
|S_IRUSR
|S_IWUSR
,proc_ide_read_settings
, proc_ide_write_settings
},
605 { NULL
, 0, NULL
, NULL
}
608 void ide_add_proc_entries(struct proc_dir_entry
*dir
, ide_proc_entry_t
*p
, void *data
)
610 struct proc_dir_entry
*ent
;
614 while (p
->name
!= NULL
) {
615 ent
= create_proc_entry(p
->name
, p
->mode
, dir
);
619 ent
->read_proc
= p
->read_proc
;
620 ent
->write_proc
= p
->write_proc
;
625 void ide_remove_proc_entries(struct proc_dir_entry
*dir
, ide_proc_entry_t
*p
)
629 while (p
->name
!= NULL
) {
630 remove_proc_entry(p
->name
, dir
);
635 static int proc_ide_readlink(struct proc_dir_entry
*de
, char *page
)
637 int n
= (de
->name
[2] - 'a') / 2;
638 return sprintf(page
, "ide%d/%s", n
, de
->name
);
641 static void create_proc_ide_drives(ide_hwif_t
*hwif
)
644 struct proc_dir_entry
*ent
;
645 struct proc_dir_entry
*parent
= hwif
->proc
;
647 for (d
= 0; d
< MAX_DRIVES
; d
++) {
648 ide_drive_t
*drive
= &hwif
->drives
[d
];
649 ide_driver_t
*driver
= drive
->driver
;
656 drive
->proc
= create_proc_entry(drive
->name
, S_IFDIR
, parent
);
658 ide_add_proc_entries(drive
->proc
, generic_drive_entries
, drive
);
660 ide_add_proc_entries(drive
->proc
, generic_subdriver_entries
, drive
);
661 ide_add_proc_entries(drive
->proc
, driver
->proc
, drive
);
664 ent
= create_proc_entry(drive
->name
, S_IFLNK
| S_IRUGO
| S_IWUGO
| S_IXUGO
, proc_ide_root
);
667 ent
->readlink_proc
= proc_ide_readlink
;
672 void destroy_proc_ide_drives(ide_hwif_t
*hwif
)
676 for (d
= 0; d
< MAX_DRIVES
; d
++) {
677 ide_drive_t
*drive
= &hwif
->drives
[d
];
678 ide_driver_t
*driver
= drive
->driver
;
683 ide_remove_proc_entries(drive
->proc
, driver
->proc
);
684 ide_remove_proc_entries(drive
->proc
, generic_drive_entries
);
685 remove_proc_entry(drive
->name
, proc_ide_root
);
686 remove_proc_entry(drive
->name
, hwif
->proc
);
691 static ide_proc_entry_t hwif_entries
[] = {
692 { "channel", S_IFREG
|S_IRUGO
, proc_ide_read_channel
, NULL
},
693 { "config", S_IFREG
|S_IRUGO
|S_IWUSR
,proc_ide_read_config
, proc_ide_write_config
},
694 { "mate", S_IFREG
|S_IRUGO
, proc_ide_read_mate
, NULL
},
695 { "model", S_IFREG
|S_IRUGO
, proc_ide_read_imodel
, NULL
},
696 { NULL
, 0, NULL
, NULL
}
699 void create_proc_ide_interfaces(void)
703 for (h
= 0; h
< MAX_HWIFS
; h
++) {
704 ide_hwif_t
*hwif
= &ide_hwifs
[h
];
705 int exist
= (hwif
->proc
!= NULL
);
710 hwif
->proc
= create_proc_entry(hwif
->name
, S_IFDIR
, proc_ide_root
);
714 ide_add_proc_entries(hwif
->proc
, hwif_entries
, hwif
);
715 create_proc_ide_drives(hwif
);
719 static void destroy_proc_ide_interfaces(void)
723 for (h
= 0; h
< MAX_HWIFS
; h
++) {
724 ide_hwif_t
*hwif
= &ide_hwifs
[h
];
725 int exist
= (hwif
->proc
!= NULL
);
727 /* if (!hwif->present)
732 destroy_proc_ide_drives(hwif
);
733 ide_remove_proc_entries(hwif
->proc
, hwif_entries
);
734 remove_proc_entry(hwif
->name
, proc_ide_root
);
740 void proc_ide_create(void)
742 struct proc_dir_entry
*ent
;
743 proc_ide_root
= create_proc_entry("ide", S_IFDIR
, 0);
744 if (!proc_ide_root
) return;
745 create_proc_ide_interfaces();
747 ent
= create_proc_entry("drivers", 0, proc_ide_root
);
749 ent
->read_proc
= proc_ide_read_drivers
;
750 #ifdef CONFIG_BLK_DEV_VIA82C586
751 if (via_display_info
) {
752 ent
= create_proc_entry("via", 0, proc_ide_root
);
753 ent
->get_info
= via_display_info
;
755 #endif /* CONFIG_BLK_DEV_VIA82C586 */
756 #ifdef CONFIG_BLK_DEV_ALI15X3
757 if (ali_display_info
) {
758 ent
= create_proc_entry("ali", 0, proc_ide_root
);
759 ent
->get_info
= ali_display_info
;
761 #endif /* CONFIG_BLK_DEV_ALI15X3 */
764 void proc_ide_destroy(void)
767 * Mmmm.. does this free up all resources,
768 * or do we need to do a more proper cleanup here ??
770 #ifdef CONFIG_BLK_DEV_VIA82C586
771 if (via_display_info
)
772 remove_proc_entry("ide/via",0);
773 #endif /* CONFIG_BLK_DEV_VIA82C586 */
774 #ifdef CONFIG_BLK_DEV_ALI15X3
775 if (ali_display_info
)
776 remove_proc_entry("ide/ali",0);
777 #endif /* CONFIG_BLK_DEV_ALI15X3 */
778 remove_proc_entry("ide/drivers", 0);
779 destroy_proc_ide_interfaces();
780 remove_proc_entry("ide", 0);