Commit e2c56c88 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.75

parent 497898b9
......@@ -240,6 +240,16 @@ CONFIG_BLK_DEV_ALI14XX
of the chipset, and permits faster I/O speeds to be set as well.
See the README.ide and ali14xx.c files for more info.
PROMISE DC4030 support (ALPHA)
CONFIG_BLK_DEV_PROMISE
This driver is enabled at runtime using the "ide0=dc4030" kernel
boot parameter. It enables support for the secondary IDE interface
of the chipset, and takes advantage of the caching features of the
card. This driver is known to incur timeouts/retries during heavy
I/O to drives attached to the secondary interface. CDROM and
TAPE devices are not supported yet.
See the README.ide and ali14xx.c files for more info.
XT harddisk support
CONFIG_BLK_DEV_XD
Very old 8 bit hard disk controllers used in the IBM XT
......
This diff is collapsed.
......@@ -107,6 +107,12 @@ M: net-patches@lxorguk.ukuu.org.uk
L: linux-ipx@vger.rutgers.edu [will change]
S: Maintained
IDE DRIVER [GENERAL]
P: Mark Lord
M: mlord@pobox.com
L: linux-kernel@vger.rutgers.edu
S: Maintained
ISDN SUBSYSTEM
P: Fritz Elfert
M: fritz@wuemaus.franken.de
......
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 74
SUBLEVEL = 75
ARCH = i386
......@@ -72,10 +72,11 @@ ROOT_DEV = CURRENT
# NFS_ROOT_NAME specifies the default name of the directory to mount
# as root via NFS, if the kernel does not get the "root=" option from
# the boot loader. The "%s" will be replaced by the IP-number of the
# local system.
# local system. Use empty string for default root path provided by BOOTP.
#
NFS_ROOT = -DNFS_ROOT="\"/tftpboot/%s\""
#NFS_ROOT = -DNFS_ROOT="\"/tftpboot/%s\""
NFS_ROOT = -DNFS_ROOT="\"\""
#
# INSTALL_PATH specifies where to place the updated kernel and system map
......
......@@ -10,14 +10,17 @@ public use. Different releases may have various and sometimes severe
bugs. It is *strongly* recommended that you back up the previous kernel
before installing any new 1.3.xx release.
If you need to use a proven and stable Linux kernel, please use either
1.0.9 or 1.2.xx. All features which will be in the 1.3.xx releases will
be contained in 1.4.xx when the code base has stabilized again.
If you decide to use 1.3, it is recommended that you join the kernel mailing
list. To do this, e-mail majordomo@vger.rutgers.edu, and put in the body
of the message "subscribe linux-kernel" or "subscribe linux-kernel-digest"
for a daily digest of the mailing list (it is a high-traffic list.)
If you need to use a proven and stable Linux kernel, please
use 1.0.9 or 1.2.13. All features found in the 1.3.xx releases
will be contained in 2.0 when the code base has stabilized again.
If you decide to use 1.3, it might be a good idea to follow the kernel
channel, available as newsgroup (under linux.dev.kernel) and as mailing
list. To subscribe to the latter, e-mail majordomo@vger.rutgers.edu,
and put in the body of the message "subscribe linux-kernel" or
"subscribe linux-kernel-digest" for a daily digest of the mailing list
(it is a high-traffic list). Note that getting subscribed or unsubscribed
sometimes takes days or even weeks.
WHAT IS LINUX?
......@@ -42,8 +45,8 @@ DOCUMENTATION:
Project) books. This README is not meant to be documentation on the
system: there are much better sources available.
- There are various readme's in the kernel doc/ subdirectory: these are
mainly used for kernel developers and some very kernel-specific
- There are various readme's in the kernel Documentation/ subdirectory:
these are mainly used for kernel developers and some very kernel-specific
installation notes for some drivers for example.
INSTALLING the kernel:
......
......@@ -42,6 +42,12 @@ rawboot:
msb my-special-boot:
@$(MAKEBOOT) msb
bootimage:
@$(MAKEBOOT) bootimage
srmboot:
@$(MAKEBOOT) srmboot
archclean:
@$(MAKEBOOT) clean
......
......@@ -34,6 +34,17 @@ msb: tools/lxboot tools/bootlx vmlinux.nh
( cat tools/lxboot tools/bootlx vmlinux.nh ) > /dev/rz0a
disklabel -rw rz0 'linux' tools/lxboot tools/bootlx
bootimage: tools/mkbb tools/lxboot tools/bootlx vmlinux.nh
( cat tools/lxboot tools/bootlx vmlinux.nh ) > bootimage
tools/mkbb bootimage tools/lxboot
srmboot: bootdevice bootimage
dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1
tools/mkbb $(BOOTDEV) tools/lxboot
bootdevice:
@test "$(BOOTDEV)" != "" || (echo You must specify BOOTDEV ; exit -1)
vmlinux.gz: vmlinux
gzip -fv vmlinux
......@@ -56,6 +67,9 @@ tools/bootlx: bootloader tools/build
tools/build: tools/build.c
$(HOSTCC) tools/build.c -o tools/build
tools/mkbb: tools/mkbb.c
$(HOSTCC) tools/mkbb.c -o tools/mkbb
bootloader: $(OBJECTS)
$(LD) $(LINKFLAGS) \
$(OBJECTS) \
......@@ -64,6 +78,7 @@ bootloader: $(OBJECTS)
(rm -f bootloader && exit 1)
clean:
rm -f $(TARGETS) bootloader tools/build
rm -f $(TARGETS) bootloader bootimage vmlinux.nh tools/build \
tools/mkbb tools/bootlx tools/lxboot
dep:
......@@ -129,3 +129,11 @@ dispatch:
ret $31,($26)
.end dispatch
.align 3
.globl tbi
.ent tbi
tbi:
.long PAL_tbi
ret ($26)
.end tbi
......@@ -13,6 +13,7 @@
#include <asm/system.h>
#include <asm/console.h>
#include <asm/hwrpb.h>
#include <asm/pgtable.h>
#include <stdarg.h>
......
/* This utility makes a bootblock suitable for the SRM console/miniloader */
/* Usage:
* mkbb <device> <lxboot>
*
* Where <device> is the name of the device to install the bootblock on,
* and <lxboot> is the name of a bootblock to merge in. This bootblock
* contains the offset and size of the bootloader. It must be exactly
* 512 bytes long.
*/
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
/* Minimal definition of disklabel, so we don't have to include
* asm/disklabel.h (confuses make)
*/
#ifndef MAXPARTITIONS
#define MAXPARTITIONS 8 /* max. # of partitions */
#endif
#ifndef u8
#define u8 unsigned char
#endif
#ifndef u16
#define u16 unsigned short
#endif
#ifndef u32
#define u32 unsigned int
#endif
struct disklabel {
u32 d_magic; /* must be DISKLABELMAGIC */
u16 d_type, d_subtype;
u8 d_typename[16];
u8 d_packname[16];
u32 d_secsize;
u32 d_nsectors;
u32 d_ntracks;
u32 d_ncylinders;
u32 d_secpercyl;
u32 d_secprtunit;
u16 d_sparespertrack;
u16 d_sparespercyl;
u32 d_acylinders;
u16 d_rpm, d_interleave, d_trackskew, d_cylskew;
u32 d_headswitch, d_trkseek, d_flags;
u32 d_drivedata[5];
u32 d_spare[5];
u32 d_magic2; /* must be DISKLABELMAGIC */
u16 d_checksum;
u16 d_npartitions;
u32 d_bbsize, d_sbsize;
struct d_partition {
u32 p_size;
u32 p_offset;
u32 p_fsize;
u8 p_fstype;
u8 p_frag;
u16 p_cpg;
} d_partitions[MAXPARTITIONS];
};
typedef union __bootblock {
struct {
char __pad1[64];
struct disklabel __label;
} __u1;
struct {
unsigned long __pad2[63];
unsigned long __checksum;
} __u2;
char bootblock_bytes[512];
unsigned long bootblock_quadwords[64];
} bootblock;
#define bootblock_label __u1.__label
#define bootblock_checksum __u2.__checksum
main(int argc, char ** argv)
{
bootblock bootblock_from_disk;
bootblock bootloader_image;
int dev, fd;
int i;
int nread;
/* Make sure of the arg count */
if(argc != 3) {
fprintf(stderr, "Usage: %s device lxboot\n", argv[0]);
exit(0);
}
/* First, open the device and make sure it's accessible */
dev = open(argv[1], O_RDWR);
if(dev < 0) {
perror(argv[1]);
exit(0);
}
/* Now open the lxboot and make sure it's reasonable */
fd = open(argv[2], O_RDONLY);
if(fd < 0) {
perror(argv[2]);
close(dev);
exit(0);
}
/* Read in the lxboot */
nread = read(fd, &bootloader_image, sizeof(bootblock));
if(nread != sizeof(bootblock)) {
perror("lxboot read");
fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread);
exit(0);
}
/* Read in the bootblock from disk. */
nread = read(dev, &bootblock_from_disk, sizeof(bootblock));
if(nread != sizeof(bootblock)) {
perror("bootblock read");
fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread);
exit(0);
}
/* Swap the bootblock's disklabel into the bootloader */
bootloader_image.bootblock_label = bootblock_from_disk.bootblock_label;
/* Calculate the bootblock checksum */
bootloader_image.bootblock_checksum = 0;
for(i = 0; i < 63; i++) {
bootloader_image.bootblock_checksum +=
bootloader_image.bootblock_quadwords[i];
}
/* Write the whole thing out! */
lseek(dev, 0L, SEEK_SET);
if(write(dev, &bootloader_image, sizeof(bootblock)) != sizeof(bootblock)) {
perror("bootblock write");
exit(0);
}
close(fd);
close(dev);
exit(0);
}
......@@ -56,8 +56,14 @@ then
define_bool CONFIG_ALPHA_EV5 y
define_bool CONFIG_ALPHA_ALCOR y
fi
# This needs to be defined for all EV4 and EV45 CPUs:
if [ "$CONFIG_ALPHA_JENSEN" = "y" ]
then
bool 'Using SRM as bootloader' CONFIG_ALPHA_SRM
fi
define_bool CONFIG_ALPHA_NEED_ROUNDING_EMULATION y
bool 'Echo console messages on /dev/ttyS1' CONFIG_SERIAL_ECHO
if [ "$CONFIG_PCI" = "y" ]; then
bool 'TGA Console Support' CONFIG_TGA_CONSOLE
......
......@@ -281,7 +281,7 @@ static void unexpected_irq(int irq, struct pt_regs * regs)
#endif
}
static inline void handle_irq(int irq, void *dev_id, struct pt_regs * regs)
static inline void handle_irq(int irq, struct pt_regs * regs)
{
struct irqaction * action = irq_action[irq];
......@@ -340,6 +340,8 @@ static inline void device_interrupt(int irq, int ack, struct pt_regs * regs)
unmask_irq(ack);
}
#ifdef CONFIG_PCI
/*
* Handle ISA interrupt via the PICs.
*/
......@@ -470,6 +472,8 @@ static inline void eb66_and_eb64p_device_interrupt(unsigned long vector,
restore_flags(flags);
}
#endif /* CONFIG_PCI */
/*
* Jensen is special: the vector is 0x8X0 for EISA interrupt X, and
* 0x9X0 for the local motherboard interrupts..
......
......@@ -128,8 +128,22 @@ void setup_arch(char **cmdline_p,
ROOT_DEV = to_kdev_t(0x0802); /* sda2 */
command_line[COMMAND_LINE_SIZE - 1] = '\0';
strcpy(command_line, COMMAND_LINE);
strcpy(saved_command_line, COMMAND_LINE);
/* Hack for Jensen... since we're restricted to 8 or 16
* chars for boot flags depending on the boot mode,
* we need some shorthand. This should do for
* installation. Later we'll add other abbreviaitions
* as well...
*/
if(strcmp(COMMAND_LINE, "INSTALL") == 0) {
strcpy(command_line, "root=/dev/fd0 load_ramdisk=1");
strcpy(saved_command_line, command_line);
}
else {
strcpy(command_line, COMMAND_LINE);
strcpy(saved_command_line, COMMAND_LINE);
}
printk("Command line: %s\n", command_line);
*cmdline_p = command_line;
*memory_start_p = (unsigned long) &_end;
......
......@@ -65,7 +65,7 @@ setup: setup.o
setup.o: setup.s
$(AS86) -o $@ $<
setup.s: setup.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
setup.s: setup.S video.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
$(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
bootsect: bootsect.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,6 +38,7 @@ CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDE_PCMCIA is not set
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_RZ1000=y
# CONFIG_BLK_DEV_TRITON is not set
......
......@@ -182,7 +182,7 @@ static void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
/*
* On SMP boards, irq13 is used for interprocessor interrupts (IPI's).
*/
static struct irqaction irq13 = { smp_message_irq, SA_INTERRUPT, 0, "IPI", NULL, NULL }:
static struct irqaction irq13 = { smp_message_irq, SA_INTERRUPT, 0, "IPI", NULL, NULL };
#else
......
......@@ -154,7 +154,14 @@ int cpu_idle(void *unused)
while(0x80000000 & smp_process_available);
cli();
while(set_bit(31,&smp_process_available))
while(test_bit(31,&smp_process_available));
while(test_bit(31,&smp_process_available))
{
/*
* Oops.. This is kind of important in some cases...
*/
if(clear_bit(smp_processor_id(), &smp_invalidate_needed))
local_invalidate();
}
if (0==(0x7fffffff & smp_process_available)){
clear_bit(31,&smp_process_available);
sti();
......
......@@ -36,6 +36,18 @@
#include <asm/pgtable.h>
#include <asm/smp.h>
/*
* Why isnt this somewhere standard ??
*/
extern __inline int max(int a,int b)
{
if(a>b)
return a;
return b;
}
int smp_found_config=0; /* Have we found an SMP box */
unsigned long cpu_present_map = 0; /* Bitmask of existing CPU's */
......@@ -46,7 +58,8 @@ volatile unsigned long cpu_callin_map[NR_CPUS] = {0,}; /* We always use 0 the re
volatile unsigned long smp_invalidate_needed; /* Used for the invalidate map thats also checked in the spinlock */
struct cpuinfo_x86 cpu_data[NR_CPUS]; /* Per cpu bogomips and other parameters */
static unsigned int num_processors = 1; /* Internal processor count */
static unsigned long io_apic_addr = 0; /* Address of the I/O apic (not yet used) */
int smp_top_cpu = 0; /* Highest used APIC id */
static unsigned long io_apic_addr = 0xFEC00000; /* Address of the I/O apic (not yet used) */
unsigned char boot_cpu_id = 0; /* Processor that is doing the boot up */
static unsigned char *kstack_base,*kstack_end; /* Kernel stack list pointers */
static int smp_activated = 0; /* Tripped once we need to start cross invalidating */
......@@ -319,25 +332,19 @@ void smp_scan_config(unsigned long base, unsigned long length)
switch(mpf->mpf_feature1)
{
case 1:
printk("ISA");
case 5:
printk("ISA\n");
break;
case 2:
printk("EISA with no IRQ8 chaining");
printk("EISA with no IRQ8 chaining\n");
break;
case 6:
case 3:
printk("EISA");
printk("EISA\n");
break;
case 4:
printk("MCA");
break;
case 5:
printk("ISA\nBus#1 is PCI");
break;
case 6:
printk("EISA\nBus #1 is PCI");
break;
case 7:
printk("MCA\nBus #1 is PCI");
printk("MCA\n");
break;
case 0:
break;
......@@ -346,14 +353,63 @@ void smp_scan_config(unsigned long base, unsigned long length)
mpf->mpf_feature1);
return;
}
if(mpf->mpf_feature1>4)
printk("Bus #1 is PCI\n");
/*
* Read the physical hardware table. If there isn't one
* the processors present are 0 and 1.
* Read the physical hardware table.
*/
if(mpf->mpf_physptr)
smp_read_mpc((void *)mpf->mpf_physptr);
else
cpu_present_map=3;
{
unsigned long cfg;
/*
* If no table present, determine
* what the CPU mapping is.
*/
/*
*
* HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
*
*/
/*
* Standard page mapping
* functions don't work yet.
* We know that page 0 is not
* used. Steal it for now!
*/
cfg=pg0[0];
pg0[0] = (apic_addr | 7);
local_invalidate();
boot_cpu_id = GET_APIC_ID(*((volatile unsigned long *) APIC_ID));
nlong = boot_cpu_id<<24; /* Dummy 'self' for bootup */
/*
* Give it back
*/
pg0[0]= cfg;
local_invalidate();
/*
*
* END OF HACK END OF HACK END OF HACK END OF HACK END OF HACK
*
*/
/*
* If boot CPU != 0, other CPU
* is 0, else other CPU is 1.
*/
if (boot_cpu_id)
cpu_present_map=1 | (1 << boot_cpu_id);
else
cpu_present_map=3;
}
printk("Processors: %d\n", num_processors);
/*
* Only use the first one found.
......@@ -610,8 +666,11 @@ void smp_boot_cpus(void)
* Don't even attempt to start the boot CPU!
*/
if (i == boot_cpu_id)
{
smp_top_cpu=max(smp_top_cpu,i);
continue;
}
if (cpu_present_map & (1 << i))
{
unsigned long send_status, accept_status;
......@@ -766,6 +825,8 @@ void smp_boot_cpus(void)
cpucount++;
/* number CPUs logically, starting from 1 (BSP is 0) */
cpu_number_map[i] = cpucount;
smp_top_cpu=max(smp_top_cpu,i);
}
else
{
......@@ -1098,7 +1159,7 @@ void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs)
if(clear_bit(i,(unsigned long *)&smp_invalidate_needed))
local_invalidate();
set_bit(i, (unsigned long *)&cpu_callin_map[0]);
cpu_callin_map[0]|=1<<smp_processor_id();
/* cpu_callin_map[0]|=1<<smp_processor_id();*/
break;
/*
......
......@@ -24,6 +24,7 @@
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/dma.h>
/*
* The SMP kernel can't handle the 4MB page table optimizations yet
......@@ -236,7 +237,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
start_mem += PAGE_SIZE;
}
for (tmp = 0 ; tmp < high_memory ; tmp += PAGE_SIZE) {
if (tmp >= 16*1024*1024)
if (tmp >= MAX_DMA_ADDRESS)
mem_map[MAP_NR(tmp)].dma = 0;
if (mem_map[MAP_NR(tmp)].reserved) {
if (tmp >= 0xA0000 && tmp < 0x100000)
......
......@@ -13,6 +13,7 @@ else
bool ' Use old disk-only driver on primary interface' CONFIG_BLK_DEV_HD_IDE
bool ' Include IDE/ATAPI CDROM support' CONFIG_BLK_DEV_IDECD
bool ' Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE
bool ' Support removeable IDE interfaces (PCMCIA)' CONFIG_BLK_DEV_IDE_PCMCIA
bool ' CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640
if [ "$CONFIG_PCI" = "y" ]; then
bool ' RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000
......@@ -26,6 +27,7 @@ else
bool ' QDI QD6580 support' CONFIG_BLK_DEV_QD6580
bool ' UMC 8672 support' CONFIG_BLK_DEV_UMC8672
bool ' ALI M1439/M1445 support' CONFIG_BLK_DEV_ALI14XX
bool ' PROMISE DC4030 support (ALPHA)' CONFIG_BLK_DEV_PROMISE
fi
fi
......
......@@ -85,6 +85,10 @@ ifeq ($(CONFIG_BLK_DEV_ALI14XX),y)
L_OBJS += ali14xx.o
endif
ifeq ($(CONFIG_BLK_DEV_PROMISE),y)
L_OBJS += promise.o
endif
ifeq ($(CONFIG_BLK_DEV_IDECD),y)
L_OBJS += ide-cd.o
endif
......
README.ide -- Information regarding ide.c and ide-cd.c (IDE driver in 1.3.xx)
README.ide -- Information regarding ide.c and ide-cd.c (IDE driver in 1.3/2.0)
================================================================================
Supported by: mlord@pobox.com -- disks, interfaces, probing
snyder@fnald0.fnal.gov -- cdroms, ATAPI, audio
......@@ -10,7 +10,7 @@ Supported by: mlord@pobox.com -- disks, interfaces, probing
See description later on below for handling BIG IDE drives with >1024 cyls.
Major features of ide.c & ide-cd.c:
Major features of ide.c & ide-cd.c ("NEW!" marks changes since 1.2.13):
NEW! - support for IDE ATAPI *tape* drives, courtesy of Gadi Oxman
(re-run MAKEDEV.ide to create the tape device entries in /dev/)
......@@ -58,6 +58,8 @@ NEW! - Bus-Master DMA support for Intel PCI Triton chipset IDE interfaces
NEW! - ide-cd.c now supports door locking and auto-loading.
- Also preliminary support for multisession
and direct reads of audio data.
NEW! - experimental support for Promise DC4030VL caching interface card
NEW! - email thanks/problems to: peterd@pnd-pc.demon.co.uk
NEW! - the hdparm-2.7 package can be used to set PIO modes for some chipsets.
For work in progress, see the comments in ide.c, ide-cd.c, and triton.c.
......@@ -233,11 +235,11 @@ Summary of ide driver parameters for kernel "command line":
"idex=noautotune" : driver will NOT attempt to tune interface speed
This is the default for most chipsets,
except the cmd640.
"idex=serialize" : do not overlap operations on idex and ide(x^1)
The following two are valid ONLY on ide0,
and the defaults for the base,ctl ports must not be altered.
"ide0=serialize" : do not overlap operations on ide0 and ide1.
"ide0=dtc2278" : probe/support DTC2278 interface
"ide0=ht6560b" : probe/support HT6560B interface
"ide0=cmd640_vlb" : *REQUIRED* for VLB cards with the CMD640 chip
......
/*
* linux/drivers/block/cmd640.c Version 0.07 Jan 27, 1996
* linux/drivers/block/cmd640.c Version 0.08 Mar 15, 1996
*
* Copyright (C) 1995-1996 Linus Torvalds & author (see below)
* Copyright (C) 1995-1996 Linus Torvalds & authors (see below)
*/
/*
......@@ -41,6 +41,8 @@
* CMD at their ftp site.
*
* Version 0.08 Added autotune/noautotune support. -ml
*
* Version 0.09 Try to be smarter about 2nd port enabling. -ml
*
*/
......@@ -299,13 +301,34 @@ static void cmd640_reset_controller(int iface_no)
#endif
}
/*
* Returns 1 if an IDE interface/drive exists at 0x170,
* Returns 0 otherwise.
*/
int secondary_port_responding (void)
{
/*
* Test for hardware at 0x170 (secondary IDE port).
* Leave the enable-bit alone if something responds.
*/
outb_p(0x0a,0x176); /* select drive0 */
udelay(1);
if (inb_p(0x176) == 0xff) {
outb_p(0x0b,0x176); /* select drive1 */
udelay(1);
if (inb_p(0x176) == 0xff)
return 0; /* nothing is there */
}
return 1; /* something is there */
}
/*
* Probe for Cmd640x and initialize it if found
*/
int ide_probe_for_cmd640x(void)
{
int second_port;
int second_port_toggled = 0;
byte b;
if (probe_for_cmd640_pci1()) {
......@@ -320,6 +343,7 @@ int ide_probe_for_cmd640x(void)
}
ide_hwifs[0].serialized = 1; /* ensure this *always* gets set */
ide_hwifs[1].serialized = 1; /* ensure this *always* gets set */
#if 0
/* Dump initial state of chip registers */
......@@ -358,11 +382,6 @@ int ide_probe_for_cmd640x(void)
put_cmd640_reg(ARTTIM1, 0xc0);
put_cmd640_reg(ARTTIM23, 0xcc); /* 0xc0? */
/*
* Do not initialize secondary controller for vlbus
*/
second_port = (bus_type != vlb);
/*
* Set the maximum allowed bus speed (it is safest until we
* find how to detect bus speed)
......@@ -375,10 +394,11 @@ int ide_probe_for_cmd640x(void)
*/
b = get_cmd640_reg(CNTRL);
if (second_port)
b |= CNTRL_ENA_2ND;
else
b &= ~CNTRL_ENA_2ND;
if (!secondary_port_responding()) {
b ^= CNTRL_ENA_2ND; /* toggle the bit */
second_port_toggled = 1;
}
/*
* Disable readahead for drives at primary interface
......@@ -401,7 +421,7 @@ int ide_probe_for_cmd640x(void)
/*
* Initialize 2nd IDE port, if required
*/
if (second_port) {
if (secondary_port_responding()) {
ide_hwifs[1].chipset = ide_cmd640;
ide_hwifs[1].tuneproc = &cmd640_tune_drive;
if (ide_hwifs[1].drives[0].autotune == 0)
......@@ -411,7 +431,6 @@ int ide_probe_for_cmd640x(void)
/* We reset timings, and disable read-ahead */
put_cmd640_reg(ARTTIM23, (DIS_RA2 | DIS_RA3));
put_cmd640_reg(DRWTIM23, 0);
cmd640_reset_controller(1);
}
......@@ -434,9 +453,10 @@ int ide_probe_for_cmd640x(void)
*/
put_cmd640_reg(CMDTIM, 0);
printk("\n ... serialized, secondary interface %s\n",
second_port ? "enabled" : "disabled");
/*
* Tell everyone what we did to their system
*/
printk("\n ... serialized, secondary port %s\n", second_port_toggled ? "toggled" : "untouched");
return 1;
}
......
......@@ -117,6 +117,7 @@ void init_dtc2278 (void)
restore_flags(flags);
ide_hwifs[0].serialized = 1;
ide_hwifs[1].serialized = 1;
ide_hwifs[0].chipset = ide_dtc2278;
ide_hwifs[1].chipset = ide_dtc2278;
ide_hwifs[0].tuneproc = &tune_dtc2278;
......
......@@ -152,6 +152,7 @@ static void ht6560b_selectproc (ide_drive_t *drive)
*/
outb (timing, IDE_SELECT_REG);
(void) inb (IDE_STATUS_REG);
OUT_BYTE(drive->select.all,IDE_SELECT_REG);
restore_flags (flags);
}
}
......@@ -226,6 +227,7 @@ void init_ht6560b (void)
ide_hwifs[0].tuneproc = &tune_ht6560b;
ide_hwifs[1].tuneproc = &tune_ht6560b;
ide_hwifs[0].serialized = 1;
ide_hwifs[1].serialized = 1;
} else
printk("ht6560b: not found\n");
}
......
......@@ -1443,44 +1443,6 @@ int cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc)
}
}
/****************************************************************************
* drive_cmd handling.
*
* Most of the functions accessed via drive_cmd are not valid for ATAPI
* devices. Only attempt to execute those which actually should be valid.
*/
static
void cdrom_do_drive_cmd (ide_drive_t *drive)
{
struct request *rq = HWGROUP(drive)->rq;
byte *args = rq->buffer;
if (args)
{
#if 0 /* This bit isn't done yet... */
if (args[0] == WIN_SETFEATURES &&
(args[2] == 0x66 || args[2] == 0xcc || args[2] == 0x02 ||
args[2] == 0xdd || args[2] == 0x5d))
{
OUT_BYTE (args[2], io_base + IDE_FEATURE_OFFSET);
<send cmd>
}
else
#endif
{
printk ("%s: Unsupported drive command %02x %02x %02x\n",
drive->name, args[0], args[1], args[2]);
rq->errors = 1;
}
}
cdrom_end_request (1, drive);
}
/****************************************************************************
* cdrom driver request routine.
......@@ -1500,9 +1462,6 @@ void ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block)
return;
}
else if (rq -> cmd == IDE_DRIVE_CMD)
cdrom_do_drive_cmd (drive);
else if (rq -> cmd != READ)
{
printk ("ide-cd: bad cmd %d\n", rq -> cmd);
......
......@@ -163,7 +163,7 @@
* The recommended user block size is returned by
* the MTIOCGET ioctl.
* Additional minor changes.
* Ver 1.3 Feb 9 96 Fixed pipelined read mode bug which prevented the
* Ver 1.3 Feb 9 96 Fixed pipelined read mode bug which prevented the
* use of some block sizes during a restore procedure.
* The character device interface will now present a
* continuous view of the media - any mix of block sizes
......@@ -180,6 +180,7 @@
* and can be enabled by using hdparm -d1 on the tape's
* block device interface. For more info, read the
* comments in triton.c.
* Ver 1.4 Mar 13 96 Fixed serialize support.
*
* We are currently in an *alpha* stage. The driver is not complete and not
* much tested. I would strongly suggest to:
......@@ -1825,6 +1826,7 @@ void idetape_poll_for_dsc (unsigned long data)
unsigned int major = HWIF(drive)->major;
idetape_tape_t *tape=&(drive->tape);
struct blk_dev_struct *bdev = &blk_dev[major];
struct request *next_rq;
unsigned long flags;
idetape_status_reg_t status;
......@@ -1839,7 +1841,7 @@ void idetape_poll_for_dsc (unsigned long data)
* we can safely access the tape.
*/
if (bdev->current_request == NULL) {
if (HWGROUP (drive)->rq == NULL) {
sti ();
idetape_poll_for_dsc_direct (data);
return;
......@@ -1928,8 +1930,13 @@ void idetape_poll_for_dsc (unsigned long data)
/*
* Fallback to method 1.
*/
if (bdev->current_request->next == NULL) {
next_rq=bdev->current_request;
if (next_rq == HWGROUP (drive)->rq)
next_rq=next_rq->next;
if (next_rq == NULL) {
/*
* There will not be another request after the currently
* ongoing request, so ide.c won't be able to sample
......@@ -3383,10 +3390,12 @@ void idetape_wait_for_pipeline (ide_drive_t *drive)
if (tape->active_data_request == NULL)
idetape_insert_pipeline_into_queue (drive);
if (tape->active_data_request == NULL)
return;
save_flags (flags);cli ();
if (tape->active_data_request == NULL) {
restore_flags (flags);
return;
}
if (tape->last_stage != NULL)
idetape_wait_for_request (&(tape->last_stage->rq));
......
......@@ -511,7 +511,7 @@ typedef struct {
#define POLL_HWIF_TAPE_DRIVE \
if (hwif->tape_drive != NULL) { \
if (hwif->tape_drive->tape.request_status) { \
OUT_BYTE(hwif->tape_drive->select.all,IDE_SELECT_REG); \
SELECT_DRIVE(hwif,hwif->tape_drive); \
hwif->tape_drive->tape.last_status=GET_STAT(); \
hwif->tape_drive->tape.request_status=0; \
} \
......
This diff is collapsed.
......@@ -74,7 +74,7 @@ typedef unsigned char byte; /* used everywhere */
* Definitions for accessing IDE controller registers
*/
#define HWIF(drive) ((ide_hwif_t *)drive->hwif)
#define HWIF(drive) ((ide_hwif_t *)((drive)->hwif))
#define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup))
#define IDE_DATA_OFFSET (0)
......@@ -102,10 +102,10 @@ typedef unsigned char byte; /* used everywhere */
#define IDE_ALTSTATUS_REG IDE_CONTROL_REG
#ifdef REALLY_FAST_IO
#define OUT_BYTE(b,p) outb((b),p)
#define OUT_BYTE(b,p) outb((b),(p))
#define IN_BYTE(p) (byte)inb(p)
#else
#define OUT_BYTE(b,p) outb_p((b),p)
#define OUT_BYTE(b,p) outb_p((b),(p))
#define IN_BYTE(p) (byte)inb_p(p)
#endif /* REALLY_FAST_IO */
......@@ -140,6 +140,18 @@ typedef unsigned char byte; /* used everywhere */
#define WAIT_WORSTCASE (30*HZ) /* 30sec - worst case when spinning up */
#define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */
#if defined(CONFIG_BLK_DEV_HT6560B) || defined(CONFIG_BLK_DEV_PROMISE)
#define SELECT_DRIVE(hwif,drive) \
{ \
if (hwif->selectproc) \
hwif->selectproc(drive); \
else \
OUT_BYTE((drive)->select.all, hwif->io_base+IDE_SELECT_OFFSET); \
}
#else
#define SELECT_DRIVE(hwif,drive) OUT_BYTE((drive)->select.all, hwif->io_base+IDE_SELECT_OFFSET);
#endif /* CONFIG_BLK_DEV_HT6560B || CONFIG_BLK_DEV_PROMISE */
#ifdef CONFIG_BLK_DEV_IDETAPE
#include "ide-tape.h"
#endif /* CONFIG_BLK_DEV_IDETAPE */
......@@ -340,7 +352,6 @@ typedef struct ide_drive_s {
#ifdef CONFIG_BLK_DEV_IDETAPE
idetape_tape_t tape; /* for ide-tape.c */
#endif /* CONFIG_BLK_DEV_IDETAPE */
} ide_drive_t;
/*
......@@ -377,8 +388,7 @@ typedef int (ide_dmaproc_t)(ide_dma_action_t, ide_drive_t *);
typedef void (ide_tuneproc_t)(ide_drive_t *, byte);
/*
* This is used to provide HT6560B interface support.
* It will probably also be used by the DC4030VL driver.
* This is used to provide HT6560B & PROMISE interface support.
*/
typedef void (ide_selectproc_t) (ide_drive_t *);
......@@ -388,7 +398,8 @@ typedef void (ide_selectproc_t) (ide_drive_t *);
*/
typedef enum { ide_unknown, ide_generic, ide_triton,
ide_cmd640, ide_dtc2278, ide_ali14xx,
ide_qd6580, ide_umc8672, ide_ht6560b }
ide_qd6580, ide_umc8672, ide_ht6560b,
ide_promise }
hwif_chipset_t;
typedef struct hwif_s {
......@@ -399,9 +410,9 @@ typedef struct hwif_s {
ide_drive_t drives[MAX_DRIVES]; /* drive info */
struct gendisk *gd; /* gendisk structure */
ide_tuneproc_t *tuneproc; /* routine to tune PIO mode for drives */
#ifdef CONFIG_BLK_DEV_HT6560B
#if defined(CONFIG_BLK_DEV_HT6560B) || defined(CONFIG_BLK_DEV_PROMISE)
ide_selectproc_t *selectproc; /* tweaks hardware to select drive */
#endif /* CONFIG_BLK_DEV_HT6560B */
#endif
ide_dmaproc_t *dmaproc; /* dma read/write/abort routine */
unsigned long *dmatable; /* dma physical region descriptor table */
unsigned short dma_base; /* base addr for dma ports (triton) */
......@@ -410,10 +421,14 @@ typedef struct hwif_s {
char name[5]; /* name of interface, eg. "ide0" */
byte index; /* 0 for ide0; 1 for ide1; ... */
hwif_chipset_t chipset; /* sub-module for tuning.. */
unsigned noprobe : 1; /* don't probe for this interface */
unsigned present : 1; /* this interface exists */
unsigned serialized : 1; /* valid only for ide_hwifs[0] */
unsigned no_unmask : 1; /* disallow setting unmask bits */
unsigned noprobe : 1; /* don't probe for this interface */
unsigned present : 1; /* this interface exists */
unsigned serialized : 1; /* serialized operation with mate hwif */
unsigned no_unmask : 1; /* disallow setting unmask bits */
unsigned got_irq : 1; /* 1 = already alloc'd our irq */
#ifdef CONFIG_BLK_DEV_PROMISE
unsigned is_promise2: 1; /* 2nd i/f on promose DC4030 */
#endif /* CONFIG_BLK_DEV_PROMISE */
#if (DISK_RECOVERY_TIME > 0)
unsigned long last_time; /* time when previous rq was done */
#endif
......@@ -435,6 +450,7 @@ typedef struct hwgroup_s {
ide_handler_t *handler;/* irq handler, if active */
ide_drive_t *drive; /* current drive */
ide_hwif_t *hwif; /* ptr to current hwif in linked-list */
ide_hwif_t *next_hwif; /* next selected hwif (for tape) */
struct request *rq; /* current request */
struct timer_list timer; /* failsafe timer */
struct request wrq; /* local copy of current write rq */
......@@ -584,6 +600,12 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
*/
void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err);
/*
* ide_multwrite() transfers a block of up to mcount sectors of data
* to a drive as part of a disk multwrite operation.
*/
void ide_multwrite (ide_drive_t *drive, unsigned int mcount);
#ifdef CONFIG_BLK_DEV_IDECD
/*
* These are routines in ide-cd.c invoked from ide.c
......
This diff is collapsed.
This diff is collapsed.
......@@ -48,6 +48,7 @@ void init_rz1000 (byte bus, byte fn)
ide_hwifs[0].no_unmask = 1;
ide_hwifs[1].no_unmask = 1;
ide_hwifs[0].serialized = 1;
ide_hwifs[1].serialized = 1;
ide_pci_access_error (rc);
printk("serialized, disabled unmasking\n");
} else
......
This diff is collapsed.
This diff is collapsed.
Sat Mar 16 14:33:13 1996 <aeb@cwi.nl>
* tty_io.c (disassociate_ctty): If disassociate_ctty is called by
exit, do not perform an implicit vhangup on a pty.
Fri Feb 9 14:15:47 1996 <tytso@rsts-11.mit.edu>
* serial.c (block_til_ready): Fixed another race condition which
......@@ -42,7 +47,7 @@ Sat Nov 4 17:14:45 1995 <tytso@rsts-11.mit.edu>
Wed Oct 11 12:45:24 1995 <tytso@rsts-11.mit.edu>
* tty_io.c (disassociate_ctty): If dissassociate_ctty is called by
* tty_io.c (disassociate_ctty): If disassociate_ctty is called by
exit, perform an implicit vhangup on the tty.
* pty.c (pty_close): When the master pty is closed, send a hangup
......
......@@ -1127,6 +1127,8 @@ static int apm_setup(void)
error = apm_enable_power_management();
if (error)
apm_error("enable power management", error);
if (error == APM_DISABLED)
return -1;
#endif
init_timer(&apm_timer);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment