2 * linux/drivers/ide/pci/rz1000.c Version 0.06 January 12, 2003
4 * Copyright (C) 1995-1998 Linus Torvalds & author (see below)
8 * Principal Author: mlord@pobox.com (Mark Lord)
10 * See linux/MAINTAINERS for address of current maintainer.
12 * This file provides support for disabling the buggy read-ahead
13 * mode of the RZ1000 IDE chipset, commonly used on Intel motherboards.
15 * Dunno if this fixes both ports, or only the primary port (?).
18 #include <linux/types.h>
19 #include <linux/module.h>
20 #include <linux/kernel.h>
21 #include <linux/delay.h>
22 #include <linux/timer.h>
24 #include <linux/ioport.h>
25 #include <linux/blkdev.h>
26 #include <linux/hdreg.h>
27 #include <linux/pci.h>
28 #include <linux/ide.h>
29 #include <linux/init.h>
33 static void __devinit
init_hwif_rz1000 (ide_hwif_t
*hwif
)
36 struct pci_dev
*dev
= hwif
->pci_dev
;
38 hwif
->chipset
= ide_rz1000
;
39 if (!pci_read_config_word (dev
, 0x40, ®
) &&
40 !pci_write_config_word(dev
, 0x40, reg
& 0xdfff)) {
41 printk(KERN_INFO
"%s: disabled chipset read-ahead "
42 "(buggy RZ1000/RZ1001)\n", hwif
->name
);
45 hwif
->drives
[0].no_unmask
= 1;
46 hwif
->drives
[1].no_unmask
= 1;
47 printk(KERN_INFO
"%s: serialized, disabled unmasking "
48 "(buggy RZ1000/RZ1001)\n", hwif
->name
);
52 static ide_pci_device_t rz1000_chipset __devinitdata
= {
54 .init_hwif
= init_hwif_rz1000
,
60 static int __devinit
rz1000_init_one(struct pci_dev
*dev
, const struct pci_device_id
*id
)
62 return ide_setup_pci_device(dev
, &rz1000_chipset
);
65 static struct pci_device_id rz1000_pci_tbl
[] = {
66 { PCI_VENDOR_ID_PCTECH
, PCI_DEVICE_ID_PCTECH_RZ1000
, PCI_ANY_ID
, PCI_ANY_ID
, 0, 0, 0},
67 { PCI_VENDOR_ID_PCTECH
, PCI_DEVICE_ID_PCTECH_RZ1001
, PCI_ANY_ID
, PCI_ANY_ID
, 0, 0, 0},
70 MODULE_DEVICE_TABLE(pci
, rz1000_pci_tbl
);
72 static struct pci_driver driver
= {
74 .id_table
= rz1000_pci_tbl
,
75 .probe
= rz1000_init_one
,
78 static int __init
rz1000_ide_init(void)
80 return ide_pci_register_driver(&driver
);
83 module_init(rz1000_ide_init
);
85 MODULE_AUTHOR("Andre Hedrick");
86 MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE");
87 MODULE_LICENSE("GPL");