root/drivers/block/rz1000.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. ide_pci_access_error
  2. init_rz1000

   1 /*
   2  *  linux/drivers/block/rz1000.c        Version 0.03  Mar 20, 1996
   3  *
   4  *  Copyright (C) 1995-1996  Linus Torvalds & author (see below)
   5  */
   6 
   7 /*
   8  *  Principal Author/Maintainer:  mlord@pobox.com (Mark Lord)
   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 
  14 #undef REALLY_SLOW_IO           /* most systems can safely undef this */
  15 
  16 #include <linux/types.h>
  17 #include <linux/kernel.h>
  18 #include <linux/delay.h>
  19 #include <linux/timer.h>
  20 #include <linux/mm.h>
  21 #include <linux/ioport.h>
  22 #include <linux/blkdev.h>
  23 #include <linux/hdreg.h>
  24 #include <asm/io.h>
  25 #include <linux/bios32.h>
  26 #include <linux/pci.h>
  27 #include "ide.h"
  28 
  29 static void ide_pci_access_error (int rc)
     /* [previous][next][first][last][top][bottom][index][help] */
  30 {
  31         printk("ide: pcibios access failed - %s\n", pcibios_strerror(rc));
  32 }
  33 
  34 void init_rz1000 (byte bus, byte fn)
     /* [previous][next][first][last][top][bottom][index][help] */
  35 {
  36         int rc;
  37         unsigned short reg;
  38 
  39         printk("ide0: buggy RZ1000 interface: ");
  40         if ((rc = pcibios_read_config_word (bus, fn, PCI_COMMAND, &reg))) {
  41                 ide_pci_access_error (rc);
  42         } else if (!(reg & 1)) {
  43                 printk("not enabled\n");
  44         } else {
  45                 if ((rc = pcibios_read_config_word(bus, fn, 0x40, &reg))
  46                  || (rc =  pcibios_write_config_word(bus, fn, 0x40, reg & 0xdfff)))
  47                 {
  48                         ide_hwifs[0].no_unmask = 1;
  49                         ide_hwifs[1].no_unmask = 1;
  50                         ide_hwifs[0].serialized = 1;
  51                         ide_hwifs[1].serialized = 1;
  52                         ide_pci_access_error (rc);
  53                         printk("serialized, disabled unmasking\n");
  54                 } else
  55                         printk("disabled read-ahead\n");
  56         }
  57 }

/* [previous][next][first][last][top][bottom][index][help] */