Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at c9a28fa7b9ac19b676deefa0a171ce7df8755c08 85 lines 2.2 kB view raw
1/* 2 * Copyright (C) 1995-1998 Linus Torvalds & author (see below) 3 */ 4 5/* 6 * Principal Author: mlord@pobox.com (Mark Lord) 7 * 8 * See linux/MAINTAINERS for address of current maintainer. 9 * 10 * This file provides support for disabling the buggy read-ahead 11 * mode of the RZ1000 IDE chipset, commonly used on Intel motherboards. 12 * 13 * Dunno if this fixes both ports, or only the primary port (?). 14 */ 15 16#include <linux/types.h> 17#include <linux/module.h> 18#include <linux/kernel.h> 19#include <linux/delay.h> 20#include <linux/timer.h> 21#include <linux/mm.h> 22#include <linux/ioport.h> 23#include <linux/blkdev.h> 24#include <linux/hdreg.h> 25#include <linux/pci.h> 26#include <linux/ide.h> 27#include <linux/init.h> 28 29#include <asm/io.h> 30 31static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) 32{ 33 struct pci_dev *dev = to_pci_dev(hwif->dev); 34 u16 reg; 35 36 if (!pci_read_config_word (dev, 0x40, &reg) && 37 !pci_write_config_word(dev, 0x40, reg & 0xdfff)) { 38 printk(KERN_INFO "%s: disabled chipset read-ahead " 39 "(buggy RZ1000/RZ1001)\n", hwif->name); 40 } else { 41 if (hwif->mate) 42 hwif->mate->serialized = hwif->serialized = 1; 43 hwif->drives[0].no_unmask = 1; 44 hwif->drives[1].no_unmask = 1; 45 printk(KERN_INFO "%s: serialized, disabled unmasking " 46 "(buggy RZ1000/RZ1001)\n", hwif->name); 47 } 48} 49 50static const struct ide_port_info rz1000_chipset __devinitdata = { 51 .name = "RZ100x", 52 .init_hwif = init_hwif_rz1000, 53 .chipset = ide_rz1000, 54 .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE, 55}; 56 57static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id) 58{ 59 return ide_setup_pci_device(dev, &rz1000_chipset); 60} 61 62static const struct pci_device_id rz1000_pci_tbl[] = { 63 { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000), 0 }, 64 { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1001), 0 }, 65 { 0, }, 66}; 67MODULE_DEVICE_TABLE(pci, rz1000_pci_tbl); 68 69static struct pci_driver driver = { 70 .name = "RZ1000_IDE", 71 .id_table = rz1000_pci_tbl, 72 .probe = rz1000_init_one, 73}; 74 75static int __init rz1000_ide_init(void) 76{ 77 return ide_pci_register_driver(&driver); 78} 79 80module_init(rz1000_ide_init); 81 82MODULE_AUTHOR("Andre Hedrick"); 83MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE"); 84MODULE_LICENSE("GPL"); 85