Messages in this thread Patch in this message | | | Date | Mon, 14 Sep 1998 15:36:26 -0500 (CDT) | From | "Andre M. Hedrick" <> | Subject | Re: Small patch for drivers/block/ide-probe.c |
| |
On Sun, 13 Sep 1998, Bill Hawes wrote:
> Andre M. Hedrick wrote: > > > This has been in a bigger patch of mine for a long time that I have been > > working to get in the kernel before 2.2.0 > > > > http://www.dyer.vanderbilt.edu/server/udma > > Andre, > > It's often better to split a big patch up into smaller related pieces, > especially if part of the patch is an important bug fix and other parts > are of less certain merit. > > This makes it a lot easier for Linus to verify the correctness of the > changes, and means that the bug fixes will get out sooner.
Done.........this contains the following :
endian fixes ide-floppy.c Zip Drive firmware bug 23.D ide-floppy.c endian fixes ide-cdrom.c & ide-cd.h UDMA, (U)DMA reporting correction ide-disk.c multi-count enable correction ide-disk.c add timing functions for VIA via82c586.c (new) added VIA as experimental Config.in added VIA building Makefile added lost probes from 2.0.x ide-probe.c fixed device naming errors for disk genhd.c fixed AEC6210UF support ide-pci.c fixed PDC20246 (double reporting) ide-pci.c allow off-board ide-pci booting ide-pci.c added UDMA/DMA drive blacklisting ide-dma.c
forgot what I did, but minor ide.c updated header ide.h
informed kernel of additions to genhd.c init/main.c
updated headers include/linux/pci.h include/linux/hdreg.h include/linux/cdrom.h
updated drivers/pci/oldproc.c updated uniformity drivers/cdrom/cdrom.c
Note that some of this is work done by Erik A. and Geert U.
Cheers, Andre
PS: I just boot this patch and it works fine for me......... diff -urN linux-2.1.121-pristine/Documentation/Configure.help linux/Documentation/Configure.help --- linux-2.1.121-pristine/Documentation/Configure.help Fri Sep 4 17:32:26 1998 +++ linux/Documentation/Configure.help Mon Sep 14 10:49:39 1998 @@ -507,6 +507,27 @@ Please read the comments at the top of drivers/block/ns87415.c. +VIA82C586 chipset support (EXPERIMENTAL) +CONFIG_BLK_DEV_VIA82C586 + This adds initial timing settings for VIA (U)DMA onboard ide + controllers that are ATA3 compliant. May work with ATA4 systems, + but not tested to date. + + This requires CONFIG_IDEDMA_AUTO to be enabled. + Please read the comments at the top of drivers/block/via82C586.c + + If unsure, say N. + +HPT343 chipset support (EXPERIMENTAL) +CONFIG_BLK_DEV_HPT343 + This driver adds up to 4 more eide devices sharing a single interrupt. + The HPT343 chipset in it's current form is a non-bootable PCI + UDMA controller. This driver requires dynamic tuning of the + chipset during the ide-probe at boot. It is reported to support + DVD II drives, by the manufacturer. + + Please read the comments at the top of drivers/block/hpt343.c + QDI QD6580 support CONFIG_BLK_DEV_QD6580 This driver is enabled at runtime using the "ide0=qd6580" kernel @@ -527,6 +548,44 @@ of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster I/O speeds to be set as well. See the files Documentation/ide.txt and ali14xx.c for more info. + +Amiga builtin Gayle IDE interface support +CONFIG_BLK_DEV_GAYLE + This is the IDE driver for the builtin IDE interface on some Amiga + models. It supports both the `A1200 style' (used in A600 and A1200) + and `A4000 style' (used in A4000 and A4000T) of the Gayle IDE + interface. + Say Y if you have such an Amiga model and want to use IDE devices + (hard disks, CD-ROM drives, etc.) that are connected to the builtin + IDE interface. + +Falcon IDE interface support +CONFIG_BLK_DEV_FALCON_IDE + This is the IDE driver for the builtin IDE interface on the Atari + Falcon. + Say Y if you have a Falcon and want to use IDE devices (hard disks, + CD-ROM drives, etc.) that are connected to the builtin IDE interface. + +Amiga Buddha/Catweasel IDE interface support (EXPERIMENTAL) +CONFIG_BLK_DEV_BUDDHA + This is the IDE driver for the IDE interfaces on the Buddha and + Catweasel expansion boards. It supports up to two interfaces on the + Buddha and three on the Catweasel. + Say Y if you have a Buddha or Catweasel expansion board and want to + use IDE devices (hard disks, CD-ROM drives, etc.) that are connected + to one of its IDE interfaces. + +Amiga IDE Doubler support (EXPERIMENTAL) +CONFIG_BLK_DEV_IDEDOUBLER + This driver provides support for the so called `IDE doublers' (made by + various manufacturers, e.g. Eyetech) that can be connected to the + builtin IDE interface of some Amiga models. Using such an IDE doubler, + you can connect up to four instead of two IDE devices on the Amiga's + builtin IDE interface. + Note that the normal Amiga Gayle IDE driver may not work correctly if + you have an IDE doubler and don't enable this driver! + Say Y if you have an IDE doubler. The driver is enabled at kernel + runtime using the "ide=doubler" kernel boot parameter. Apple Macintosh builtin IDE interface support (EXPERIMENTAL) CONFIG_BLK_DEV_MAC_IDE diff -urN linux-2.1.121-pristine/drivers/block/Config.in linux/drivers/block/Config.in --- linux-2.1.121-pristine/drivers/block/Config.in Thu Aug 27 13:03:56 1998 +++ linux/drivers/block/Config.in Mon Sep 14 11:32:53 1998 @@ -41,6 +41,7 @@ if [ "$CONFIG_BLK_DEV_IDEDMA" = "y" ]; then bool ' Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290 bool ' NS87415 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_NS87415 + bool ' VIA82C586 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_VIA82C586 fi fi fi diff -urN linux-2.1.121-pristine/drivers/block/MAKEDEV-IDE45 linux/drivers/block/MAKEDEV-IDE45 --- linux-2.1.121-pristine/drivers/block/MAKEDEV-IDE45 Wed Dec 31 18:00:00 1969 +++ linux/drivers/block/MAKEDEV-IDE45 Mon Sep 14 10:49:39 1998 @@ -0,0 +1,99 @@ +#!/bin/sh +# +# Andre Hedrick <hedrick@astro.dyer.vanderbilt.edu> +# +# The song goes, "I did it the hard way..........." +# + +if [ ! -f /dev/hdi ]; then \ + echo "Making IDE4 Primary Devices hdi's"; \ + mknod /dev/hdi b 56 0; \ + mknod /dev/hdi1 b 56 1; \ + mknod /dev/hdi2 b 56 2; \ + mknod /dev/hdi3 b 56 3; \ + mknod /dev/hdi4 b 56 4; \ + mknod /dev/hdi5 b 56 5; \ + mknod /dev/hdi6 b 56 6; \ + mknod /dev/hdi7 b 56 7; \ + mknod /dev/hdi8 b 56 8; \ + mknod /dev/hdi9 b 56 9; \ + mknod /dev/hdi10 b 56 10; \ + mknod /dev/hdi11 b 56 11; \ + mknod /dev/hdi12 b 56 12; \ + mknod /dev/hdi13 b 56 13; \ + mknod /dev/hdi14 b 56 14; \ + mknod /dev/hdi15 b 56 15; \ + mknod /dev/hdi16 b 56 16; \ + chown root.disk /dev/hdi*; \ + chmod 660 /dev/hdi*; \ +fi + +if [ ! -f /dev/hdj ]; then \ + echo "Making IDE4 Secondary Devices hdj's"; \ + mknod /dev/hdj b 56 64; \ + mknod /dev/hdj1 b 56 65; \ + mknod /dev/hdj2 b 56 66; \ + mknod /dev/hdj3 b 56 67; \ + mknod /dev/hdj4 b 56 68; \ + mknod /dev/hdj5 b 56 69; \ + mknod /dev/hdj6 b 56 70; \ + mknod /dev/hdj7 b 56 71; \ + mknod /dev/hdj8 b 56 72; \ + mknod /dev/hdj9 b 56 73; \ + mknod /dev/hdj10 b 56 74; \ + mknod /dev/hdj11 b 56 75; \ + mknod /dev/hdj12 b 56 76; \ + mknod /dev/hdj13 b 56 77; \ + mknod /dev/hdj14 b 56 78; \ + mknod /dev/hdj15 b 56 79; \ + mknod /dev/hdj16 b 56 80; \ + chown root.disk /dev/hdj*; \ + chmod 660 /dev/hdj*; \ +fi + +if [ ! -f /dev/hdk ]; then \ + echo "Making IDE5 Primary Devices hdk's"; \ + mknod /dev/hdk b 57 0; \ + mknod /dev/hdk1 b 57 1; \ + mknod /dev/hdk2 b 57 2; \ + mknod /dev/hdk3 b 57 3; \ + mknod /dev/hdk4 b 57 4; \ + mknod /dev/hdk5 b 57 5; \ + mknod /dev/hdk6 b 57 6; \ + mknod /dev/hdk7 b 57 7; \ + mknod /dev/hdk8 b 57 8; \ + mknod /dev/hdk9 b 57 9; \ + mknod /dev/hdk10 b 57 10; \ + mknod /dev/hdk11 b 57 11; \ + mknod /dev/hdk12 b 57 12; \ + mknod /dev/hdk13 b 57 13; \ + mknod /dev/hdk14 b 57 14; \ + mknod /dev/hdk15 b 57 15; \ + mknod /dev/hdk16 b 57 16; \ + chown root.disk /dev/hdk*; \ + chmod 660 /dev/hdk*; \ +fi + +if [ ! -f /dev/hdl ]; then \ + echo "Making IDE5 Secondary Devices hdl's"; \ + mknod /dev/hdl b 57 64; \ + mknod /dev/hdl1 b 57 65; \ + mknod /dev/hdl2 b 57 66; \ + mknod /dev/hdl3 b 57 67; \ + mknod /dev/hdl4 b 57 68; \ + mknod /dev/hdl5 b 57 69; \ + mknod /dev/hdl6 b 57 70; \ + mknod /dev/hdl7 b 57 71; \ + mknod /dev/hdl8 b 57 72; \ + mknod /dev/hdl9 b 57 73; \ + mknod /dev/hdl10 b 57 74; \ + mknod /dev/hdl11 b 57 75; \ + mknod /dev/hdl12 b 57 76; \ + mknod /dev/hdl13 b 57 77; \ + mknod /dev/hdl14 b 57 78; \ + mknod /dev/hdl15 b 57 79; \ + mknod /dev/hdl16 b 57 80; \ + chown root.disk /dev/hdl*; \ + chmod 660 /dev/hdl*; \ +fi + diff -urN linux-2.1.121-pristine/drivers/block/Makefile linux/drivers/block/Makefile --- linux-2.1.121-pristine/drivers/block/Makefile Thu Aug 27 13:03:56 1998 +++ linux/drivers/block/Makefile Mon Sep 14 11:34:26 1998 @@ -154,6 +154,10 @@ IDE_OBJS += ns87415.o endif +ifeq ($(CONFIG_BLK_DEV_VIA82C586),y) +IDE_OBJS += via82c586.o +endif + ifeq ($(CONFIG_BLK_DEV_CMD646),y) IDE_OBJS += cmd646.o endif diff -urN linux-2.1.121-pristine/drivers/block/genhd.c linux/drivers/block/genhd.c --- linux-2.1.121-pristine/drivers/block/genhd.c Tue Aug 25 16:12:07 1998 +++ linux/drivers/block/genhd.c Mon Sep 14 10:49:39 1998 @@ -16,6 +16,8 @@ * More flexible handling of extended partitions - aeb, 950831 * * Check partition table on IDE disks for common CHS translations + * + * Added needed MAJORS for new pairs, {hdi,hdj}, {hdk,hdl} */ #include <linux/config.h> @@ -77,6 +79,10 @@ * This requires special handling here. */ switch (hd->major) { + case IDE5_MAJOR: + unit += 2; + case IDE4_MAJOR: + unit += 2; case IDE3_MAJOR: unit += 2; case IDE2_MAJOR: @@ -420,9 +426,10 @@ && (q->sector & 63) == 1 && (q->end_sector & 63) == 63) { unsigned int heads = q->end_head + 1; - if (heads == 32 || heads == 64 || - heads == 128 || heads == 255 || - heads == 240) { + if (heads == 15 || heads == 16 || + heads == 32 || heads == 64 || + heads == 128 || heads == 240 || + heads == 255) { (void) ide_xlate_1024(dev, heads, " [PTBL]"); break; } diff -urN linux-2.1.121-pristine/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c --- linux-2.1.121-pristine/drivers/block/ide-cd.c Wed Jul 29 14:37:05 1998 +++ linux/drivers/block/ide-cd.c Mon Sep 14 11:49:52 1998 @@ -1,4 +1,4 @@ -#define VERBOSE_IDE_CD_ERRORS 1 +#define VERBOSE_IDE_CD_ERRORS 1 /* * linux/drivers/block/ide-cd.c * Copyright (C) 1994, 1995, 1996 scott snyder <snyder@fnald0.fnal.gov> @@ -218,9 +218,12 @@ * since the .pdf version doesn't seem to work... * -- Updated the TODO list to something more current. * + * 4.15 Aug 25, 1998 -- Updated ide-cd.h to respect mechine endianess, + * patch thanks to "Eddie C. Dost" <ecd@skynet.be> + * *************************************************************************/ -#define IDECD_VERSION "4.14" +#define IDECD_VERSION "4.15" #include <linux/module.h> #include <linux/types.h> diff -urN linux-2.1.121-pristine/drivers/block/ide-cd.h linux/drivers/block/ide-cd.h --- linux-2.1.121-pristine/drivers/block/ide-cd.h Wed Jul 29 14:37:05 1998 +++ linux/drivers/block/ide-cd.h Mon Sep 14 10:49:39 1998 @@ -6,6 +6,8 @@ * Copyright (C) 1996 Erik Andersen */ +#include <asm/byteorder.h> + /* Turn this on to have the driver print out the meanings of the ATAPI error codes. This will use up additional kernel-space memory, though. */ @@ -148,13 +150,29 @@ struct atapi_request_sense { +#if defined(__BIG_ENDIAN_BITFIELD) + unsigned char valid : 1; + unsigned char error_code : 7; +#elif defined(__LITTLE_ENDIAN_BITFIELD) unsigned char error_code : 7; unsigned char valid : 1; +#else +#error "Please fix <asm/byteorder.h>" +#endif byte reserved1; +#if defined(__BIG_ENDIAN_BITFIELD) + unsigned char reserved3 : 2; + unsigned char ili : 1; + unsigned char reserved2 : 1; + unsigned char sense_key : 4; +#elif defined(__LITTLE_ENDIAN_BITFIELD) unsigned char sense_key : 4; unsigned char reserved2 : 1; unsigned char ili : 1; unsigned char reserved3 : 2; +#else +#error "Please fix <asm/byteorder.h>" +#endif byte info[4]; byte sense_len; byte command_info[4]; @@ -190,8 +208,15 @@ struct atapi_toc_entry { byte reserved1; - unsigned control : 4; - unsigned adr : 4; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 adr : 4; + __u8 control : 4; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 control : 4; + __u8 adr : 4; +#else +#error "Please fix <asm/byteorder.h>" +#endif byte track; byte reserved2; union { @@ -218,8 +243,15 @@ u_short acdsc_length; u_char acdsc_format; +#if defined(__BIG_ENDIAN_BITFIELD) + u_char acdsc_ctrl: 4; + u_char acdsc_adr: 4; +#elif defined(__LITTLE_ENDIAN_BITFIELD) u_char acdsc_adr: 4; u_char acdsc_ctrl: 4; +#else +#error "Please fix <asm/byteorder.h>" +#endif u_char acdsc_trk; u_char acdsc_ind; union { @@ -243,79 +275,182 @@ struct atapi_capabilities_page { - unsigned page_code : 6; - unsigned reserved1 : 1; - unsigned parameters_saveable : 1; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 parameters_saveable : 1; + __u8 reserved1 : 1; + __u8 page_code : 6; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 page_code : 6; + __u8 reserved1 : 1; + __u8 parameters_saveable : 1; +#else +#error "Please fix <asm/byteorder.h>" +#endif byte page_length; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 reserved2 : 5; + /* Drive supports reading CD-R discs with addressing method 2 */ + __u8 method2 : 1; /* reserved in 1.2 */ + /* Drive can read from CD-R/W (CD-E) discs (orange book, part III) */ + __u8 cd_rw_read : 1; /* reserved in 1.2 */ /* Drive supports read from CD-R discs (orange book, part II) */ - unsigned cd_r_read : 1; /* reserved in 1.2 */ - /* Drive supports read from CD-R/W (CD-E) discs (orange book, part III) */ - unsigned cd_rw_read : 1; /* reserved in 1.2 */ + __u8 cd_r_read : 1; /* reserved in 1.2 */ +#elif defined(__LITTLE_ENDIAN_BITFIELD) + /* Drive supports read from CD-R discs (orange book, part II) */ + __u8 cd_r_read : 1; /* reserved in 1.2 */ + /* Drive can read from CD-R/W (CD-E) discs (orange book, part III) */ + __u8 cd_rw_read : 1; /* reserved in 1.2 */ /* Drive supports reading CD-R discs with addressing method 2 */ - unsigned method2 : 1; /* reserved in 1.2 */ - unsigned reserved2 : 5; + __u8 method2 : 1; /* reserved in 1.2 */ + __u8 reserved2 : 5; +#else +#error "Please fix <asm/byteorder.h>" +#endif +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 reserved3 : 6; + /* Drive can write to CD-R/W (CD-E) discs (orange book, part III) */ + __u8 cd_rw_write : 1; /* reserved in 1.2 */ /* Drive supports write to CD-R discs (orange book, part II) */ - unsigned cd_r_write : 1; /* reserved in 1.2 */ - /* Drive supports write to CD-R/W (CD-E) discs (orange book, part III) */ - unsigned cd_rw_write : 1; /* reserved in 1.2 */ - unsigned reserved3 : 6; + __u8 cd_r_write : 1; /* reserved in 1.2 */ +#elif defined(__LITTLE_ENDIAN_BITFIELD) + + /* Drive can write to CD-R discs (orange book, part II) */ + __u8 cd_r_write : 1; /* reserved in 1.2 */ + /* Drive can write to CD-R/W (CD-E) discs (orange book, part III) */ + __u8 cd_rw_write : 1; /* reserved in 1.2 */ + __u8 reserved3 : 6; +#else +#error "Please fix <asm/byteorder.h>" +#endif +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 reserved4 : 1; + /* Drive can read multisession discs. */ + __u8 multisession : 1; + /* Drive can read mode 2, form 2 data. */ + __u8 mode2_form2 : 1; + /* Drive can read mode 2, form 1 (XA) data. */ + __u8 mode2_form1 : 1; + /* Drive supports digital output on port 2. */ + __u8 digport2 : 1; + /* Drive supports digital output on port 1. */ + __u8 digport1 : 1; + /* Drive can deliver a composite audio/video data stream. */ + __u8 composite : 1; + /* Drive supports audio play operations. */ + __u8 audio_play : 1; +#elif defined(__LITTLE_ENDIAN_BITFIELD) /* Drive supports audio play operations. */ - unsigned audio_play : 1; + __u8 audio_play : 1; /* Drive can deliver a composite audio/video data stream. */ - unsigned composite : 1; + __u8 composite : 1; /* Drive supports digital output on port 1. */ - unsigned digport1 : 1; + __u8 digport1 : 1; /* Drive supports digital output on port 2. */ - unsigned digport2 : 1; + __u8 digport2 : 1; /* Drive can read mode 2, form 1 (XA) data. */ - unsigned mode2_form1 : 1; + __u8 mode2_form1 : 1; /* Drive can read mode 2, form 2 data. */ - unsigned mode2_form2 : 1; + __u8 mode2_form2 : 1; /* Drive can read multisession discs. */ - unsigned multisession : 1; - unsigned reserved4 : 1; + __u8 multisession : 1; + __u8 reserved4 : 1; +#else +#error "Please fix <asm/byteorder.h>" +#endif +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 reserved5 : 1; + /* Drive can return Media Catalog Number (UPC) info. */ + __u8 upc : 1; + /* Drive can return International Standard Recording Code info. */ + __u8 isrc : 1; + /* Drive supports C2 error pointers. */ + __u8 c2_pointers : 1; + /* R-W data will be returned deinterleaved and error corrected. */ + __u8 rw_corr : 1; + /* Subchannel reads can return combined R-W information. */ + __u8 rw_supported : 1; + /* Drive can continue a read cdda operation from a loss of streaming.*/ + __u8 cdda_accurate : 1; + /* Drive can read Red Book audio data. */ + __u8 cdda : 1; +#elif defined(__LITTLE_ENDIAN_BITFIELD) /* Drive can read Red Book audio data. */ - unsigned cdda : 1; + __u8 cdda : 1; /* Drive can continue a read cdda operation from a loss of streaming.*/ - unsigned cdda_accurate : 1; + __u8 cdda_accurate : 1; /* Subchannel reads can return combined R-W information. */ - unsigned rw_supported : 1; + __u8 rw_supported : 1; /* R-W data will be returned deinterleaved and error corrected. */ - unsigned rw_corr : 1; + __u8 rw_corr : 1; /* Drive supports C2 error pointers. */ - unsigned c2_pointers : 1; + __u8 c2_pointers : 1; /* Drive can return International Standard Recording Code info. */ - unsigned isrc : 1; + __u8 isrc : 1; /* Drive can return Media Catalog Number (UPC) info. */ - unsigned upc : 1; - unsigned reserved5 : 1; + __u8 upc : 1; + __u8 reserved5 : 1; +#else +#error "Please fix <asm/byteorder.h>" +#endif +#if defined(__BIG_ENDIAN_BITFIELD) + /* Drive mechanism types. */ + mechtype_t mechtype : 3; + __u8 reserved6 : 1; + /* Drive can eject a disc or changer cartridge. */ + __u8 eject : 1; + /* State of prevent/allow jumper. */ + __u8 prevent_jumper : 1; + /* Present state of door lock. */ + __u8 lock_state : 1; /* Drive can lock the door. */ - unsigned lock : 1; + __u8 lock : 1; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + + /* Drive can lock the door. */ + __u8 lock : 1; /* Present state of door lock. */ - unsigned lock_state : 1; + __u8 lock_state : 1; /* State of prevent/allow jumper. */ - unsigned prevent_jumper : 1; + __u8 prevent_jumper : 1; /* Drive can eject a disc or changer cartridge. */ - unsigned eject : 1; - unsigned reserved6 : 1; + __u8 eject : 1; + __u8 reserved6 : 1; /* Drive mechanism types. */ mechtype_t mechtype : 3; +#else +#error "Please fix <asm/byteorder.h>" +#endif + +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 reserved7 : 4; + /* Drive supports software slot selection. */ + __u8 sss : 1; /* reserved in 1.2 */ + /* Changer can report exact contents of slots. */ + __u8 disc_present : 1; /* reserved in 1.2 */ + /* Audio for each channel can be muted independently. */ + __u8 separate_mute : 1; + /* Audio level for each channel can be controlled independently. */ + __u8 separate_volume : 1; +#elif defined(__LITTLE_ENDIAN_BITFIELD) /* Audio level for each channel can be controlled independently. */ - unsigned separate_volume : 1; + __u8 separate_volume : 1; /* Audio for each channel can be muted independently. */ - unsigned separate_mute : 1; + __u8 separate_mute : 1; /* Changer can report exact contents of slots. */ - unsigned disc_present : 1; /* reserved in 1.2 */ + __u8 disc_present : 1; /* reserved in 1.2 */ /* Drive supports software slot selection. */ - unsigned sss : 1; /* reserved in 1.2 */ - unsigned reserved7 : 4; + __u8 sss : 1; /* reserved in 1.2 */ + __u8 reserved7 : 4; +#else +#error "Please fix <asm/byteorder.h>" +#endif /* Note: the following four fields are returned in big-endian form. */ /* Maximum speed (in kB/s). */ @@ -333,23 +468,46 @@ struct atapi_mechstat_header { - unsigned curslot : 5; - unsigned changer_state : 2; - unsigned fault : 1; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 fault : 1; + __u8 changer_state : 2; + __u8 curslot : 5; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 curslot : 5; + __u8 changer_state : 2; + __u8 fault : 1; +#else +#error "Please fix <asm/byteorder.h>" +#endif - unsigned reserved1 : 5; - unsigned mech_state : 3; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 mech_state : 3; + __u8 reserved1 : 5; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 reserved1 : 5; + __u8 mech_state : 3; +#else +#error "Please fix <asm/byteorder.h>" +#endif byte curlba[3]; byte nslots; - unsigned short slot_tablelen; + __u8 short slot_tablelen; }; struct atapi_slot { - unsigned change : 1; - unsigned reserved1 : 6; - unsigned disc_present : 1; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 disc_present : 1; + __u8 reserved1 : 6; + __u8 change : 1; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 change : 1; + __u8 reserved1 : 6; + __u8 disc_present : 1; +#else +#error "Please fix <asm/byteorder.h>" +#endif byte reserved2[3]; }; diff -urN linux-2.1.121-pristine/drivers/block/ide-disk.c linux/drivers/block/ide-disk.c --- linux-2.1.121-pristine/drivers/block/ide-disk.c Mon May 18 14:50:26 1998 +++ linux/drivers/block/ide-disk.c Mon Sep 14 11:50:29 1998 @@ -19,6 +19,7 @@ * Version 1.05 add capacity support for ATA3 >= 8GB * Version 1.06 get boot-up messages to show full cyl count * Version 1.07 disable door-locking if it fails + * Version 1.07a fixed mult_count enables */ #define IDEDISK_VERSION "1.07" @@ -724,20 +725,24 @@ drive->name, id->model, idedisk_capacity(drive)/2048L, id->buf_size/2, drive->bios_cyl, drive->bios_head, drive->bios_sect); if (drive->using_dma) { - if ((id->field_valid & 4) && (id->dma_ultra & (id->dma_ultra >> 8) & 7)) - printk(", UDMA"); - else + if ((id->field_valid & 4) && + (id->dma_ultra & (id->dma_ultra >> 8) & 7)) { + printk(", UDMA"); /* UDMA BIOS-enabled! */ + } else if (id->field_valid & 4) { + printk(", (U)DMA"); /* Can be BIOS-enabled! */ + } else { printk(", DMA"); + } } printk("\n"); drive->mult_count = 0; if (id->max_multsect) { - drive->mult_req = INITIAL_MULT_COUNT; - if (drive->mult_req > id->max_multsect) - drive->mult_req = id->max_multsect; - if (drive->mult_req || ((id->multsect_valid & 1) && id->multsect)) - drive->special.b.set_multmode = 1; + id->multsect = ((id->max_multsect/2) > 1) ? id->max_multsect : 0; + id->multsect_valid = id->multsect ? 1 : 0; + drive->mult_req = id->multsect_valid ? id->max_multsect : INITIAL_MULT_COUNT; + drive->special.b.set_multmode = drive->mult_req ? 1 : 0; } + drive->no_io_32bit = id->dword_io ? 1 : 0; } int idedisk_init (void) diff -urN linux-2.1.121-pristine/drivers/block/ide-dma.c linux/drivers/block/ide-dma.c --- linux-2.1.121-pristine/drivers/block/ide-dma.c Thu Jul 30 22:06:52 1998 +++ linux/drivers/block/ide-dma.c Mon Sep 14 10:49:39 1998 @@ -62,6 +62,13 @@ * for supplying a Promise UDMA board & WD UDMA drive for this work! * * And, yes, Intel Zappa boards really *do* use both PIIX IDE ports. + * + * ACARD ATP850UF Chipset "Modified SCSI Class" with other names + * AEC6210 U/UF + * SIIG's UltraIDE Pro CN-2449 + * TTI HPT343 Chipset "Modified SCSI Class" but reports as an + * unknown storage device. + * NEW check_drive_lists(ide_drive_t *drive, int good_bad) */ #include <linux/config.h> #include <linux/types.h> @@ -85,9 +92,19 @@ const char *good_dma_drives[] = {"Micropolis 2112A", "CONNER CTMA 4000", "ST34342A", /* for Sun Ultra */ + "WDC AC2340F", /* DMA mode1 */ + "WDC AC2340H", /* DMA mode1 */ NULL}; /* + * bad_dma_drives() lists the model names (from "hdparm -i") + * of drives which supposedly support (U)DMA but which are + * known to corrupt data with this interface under Linux. + */ +const char *bad_dma_drives[] = {"WDC AC22100H", + NULL}; + +/* * Our Physical Region Descriptor (PRD) table should be large enough * to handle the biggest I/O request we are likely to see. Since requests * can have no more than 256 sectors, and since the typical blocksize is @@ -204,27 +221,57 @@ return count; } -static int config_drive_for_dma (ide_drive_t *drive) +/* + * For both Blacklisted and Whitelisted drives. + * This is setup to be called as an extern for future support + * to other special driver code. + */ +int check_drive_lists (ide_drive_t *drive, int good_bad) { const char **list; struct hd_driveid *id = drive->id; + + if (good_bad) { + /* Consult the list of known "good" drives */ + list = good_dma_drives; + while (*list) { + if (!strcmp(*list++,id->model)) + return 1; + } + } else { + /* Consult the list of known "bad" drives */ + list = bad_dma_drives; + while (*list) { + if (!strcmp(*list++,id->model)) { + printk("%s: (U)DMA capability is broken for %s\n", + drive->name, id->model); + return 1; + } + } + } + return 0; +} + +static int config_drive_for_dma (ide_drive_t *drive) +{ + struct hd_driveid *id = drive->id; ide_hwif_t *hwif = HWIF(drive); if (id && (id->capability & 1) && hwif->autodma) { + /* Consult the list of known "bad" drives */ + if (check_drive_lists(drive, BAD_DMA_DRIVE)) + return hwif->dmaproc(ide_dma_off, drive); /* Enable DMA on any drive that has UltraDMA (mode 0/1/2) enabled */ if (id->field_valid & 4) /* UltraDMA */ if ((id->dma_ultra & (id->dma_ultra >> 8) & 7)) return hwif->dmaproc(ide_dma_on, drive); /* Enable DMA on any drive that has mode2 DMA (multi or single) enabled */ if (id->field_valid & 2) /* regular DMA */ - if ((id->dma_mword & 0x404) == 0x404 || (id->dma_1word & 0x404) == 0x404) + if ((id->dma_mword & 0x404) == 0x404 || (id->dma_1word & 0x404) == 0x404) return hwif->dmaproc(ide_dma_on, drive); /* Consult the list of known "good" drives */ - list = good_dma_drives; - while (*list) { - if (!strcmp(*list++,id->model)) - return hwif->dmaproc(ide_dma_on, drive); - } + if (check_drive_lists(drive, GOOD_DMA_DRIVE)) + return hwif->dmaproc(ide_dma_on, drive); } return hwif->dmaproc(ide_dma_off_quietly, drive); } @@ -354,7 +401,7 @@ } } if (dma_base) { - if (extra) /* PDC20246 */ + if (extra) /* PDC20246 & HPT343 */ request_region(dma_base+16, extra, name); dma_base += hwif->channel ? 8 : 0; if (inb(dma_base+2) & 0x80) { diff -urN linux-2.1.121-pristine/drivers/block/ide-floppy.c linux/drivers/block/ide-floppy.c --- linux-2.1.121-pristine/drivers/block/ide-floppy.c Sun Jul 26 13:46:46 1998 +++ linux/drivers/block/ide-floppy.c Mon Sep 14 11:53:12 1998 @@ -121,10 +121,19 @@ * Removable Block Access Capabilities Page */ typedef struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned page_code :6; /* Page code - Should be 0x1b */ unsigned reserved1_6 :1; /* Reserved */ unsigned ps :1; /* Should be 0 */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned ps :1; /* Should be 0 */ + unsigned reserved1_6 :1; /* Reserved */ + unsigned page_code :6; /* Page code - Should be 0x1b */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif u8 page_length; /* Page Length - Should be 0xa */ +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned reserved2 :6; unsigned srfp :1; /* Supports reporting progress of format */ unsigned sflp :1; /* System floppy type device */ @@ -132,6 +141,17 @@ unsigned reserved3 :3; unsigned sml :1; /* Single / Multiple lun supported */ unsigned ncd :1; /* Non cd optical device */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned sflp :1; /* System floppy type device */ + unsigned srfp :1; /* Supports reporting progress of format */ + unsigned reserved2 :6; + unsigned ncd :1; /* Non cd optical device */ + unsigned sml :1; /* Single / Multiple lun supported */ + unsigned reserved3 :3; + unsigned tlun :3; /* Total logical units supported by the device */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif u8 reserved[8]; } idefloppy_capabilities_page_t; @@ -139,9 +159,17 @@ * Flexible disk page. */ typedef struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned page_code :6; /* Page code - Should be 0x5 */ unsigned reserved1_6 :1; /* Reserved */ unsigned ps :1; /* The device is capable of saving the page */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned ps :1; /* The device is capable of saving the page */ + unsigned reserved1_6 :1; /* Reserved */ + unsigned page_code :6; /* Page code - Should be 0x5 */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif u8 page_length; /* Page Length - Should be 0x1e */ u16 transfer_rate; /* In kilobits per second */ u8 heads, sectors; /* Number of heads, Number of sectors per track */ @@ -164,8 +192,15 @@ typedef struct { u32 blocks; /* Number of blocks */ +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned dc :2; /* Descriptor Code */ unsigned reserved :6; +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned reserved :6; + unsigned dc :2; /* Descriptor Code */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif u8 length_msb; /* Block Length (MSB)*/ u16 length; /* Block Length */ } idefloppy_capacity_descriptor_t; @@ -271,6 +306,7 @@ typedef union { unsigned all :8; struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned check :1; /* Error occurred */ unsigned idx :1; /* Reserved */ unsigned corr :1; /* Correctable error occurred */ @@ -279,6 +315,18 @@ unsigned reserved5 :1; /* Reserved */ unsigned drdy :1; /* Ignored for ATAPI commands (ready to accept ATA command) */ unsigned bsy :1; /* The device has access to the command block */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned bsy :1; /* The device has access to the command block */ + unsigned drdy :1; /* Ignored for ATAPI commands (ready to accept ATA command) */ + unsigned reserved5 :1; /* Reserved */ + unsigned dsc :1; /* Media access command finished */ + unsigned drq :1; /* Data is request by the device */ + unsigned corr :1; /* Correctable error occurred */ + unsigned idx :1; /* Reserved */ + unsigned check :1; /* Error occurred */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif } b; } idefloppy_status_reg_t; @@ -288,11 +336,21 @@ typedef union { unsigned all :8; struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned ili :1; /* Illegal Length Indication */ unsigned eom :1; /* End Of Media Detected */ unsigned abrt :1; /* Aborted command - As defined by ATA */ unsigned mcr :1; /* Media Change Requested - As defined by ATA */ unsigned sense_key :4; /* Sense key of the last failed packet command */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned sense_key :4; /* Sense key of the last failed packet command */ + unsigned mcr :1; /* Media Change Requested - As defined by ATA */ + unsigned abrt :1; /* Aborted command - As defined by ATA */ + unsigned eom :1; /* End Of Media Detected */ + unsigned ili :1; /* Illegal Length Indication */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif } b; } idefloppy_error_reg_t; @@ -302,10 +360,19 @@ typedef union { unsigned all :8; struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned dma :1; /* Using DMA or PIO */ unsigned reserved321 :3; /* Reserved */ unsigned reserved654 :3; /* Reserved (Tag Type) */ unsigned reserved7 :1; /* Reserved */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned reserved7 :1; /* Reserved */ + unsigned reserved654 :3; /* Reserved (Tag Type) */ + unsigned reserved321 :3; /* Reserved */ + unsigned dma :1; /* Using DMA or PIO */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif } b; } idefloppy_feature_reg_t; @@ -315,8 +382,15 @@ typedef union { unsigned all :16; struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned low :8; /* LSB */ unsigned high :8; /* MSB */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned high :8; /* MSB */ + unsigned low :8; /* LSB */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif } b; } idefloppy_bcount_reg_t; @@ -326,9 +400,17 @@ typedef union { unsigned all :8; struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned cod :1; /* Information transferred is command (1) or data (0) */ unsigned io :1; /* The device requests us to read (1) or write (0) */ unsigned reserved :6; /* Reserved */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned reserved :6; /* Reserved */ + unsigned io :1; /* The device requests us to read (1) or write (0) */ + unsigned cod :1; /* Information transferred is command (1) or data (0) */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif } b; } idefloppy_ireason_reg_t; @@ -338,12 +420,23 @@ typedef union { unsigned all :8; struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned sam_lun :3; /* Logical unit number */ unsigned reserved3 :1; /* Reserved */ unsigned drv :1; /* The responding drive will be drive 0 (0) or drive 1 (1) */ unsigned one5 :1; /* Should be set to 1 */ unsigned reserved6 :1; /* Reserved */ unsigned one7 :1; /* Should be set to 1 */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned one7 :1; /* Should be set to 1 */ + unsigned reserved6 :1; /* Reserved */ + unsigned one5 :1; /* Should be set to 1 */ + unsigned drv :1; /* The responding drive will be drive 0 (0) or drive 1 (1) */ + unsigned reserved3 :1; /* Reserved */ + unsigned sam_lun :3; /* Logical unit number */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif } b; } idefloppy_drivesel_reg_t; @@ -353,11 +446,21 @@ typedef union { unsigned all :8; struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned zero0 :1; /* Should be set to zero */ unsigned nien :1; /* Device interrupt is disabled (1) or enabled (0) */ unsigned srst :1; /* ATA software reset. ATAPI devices should use the new ATAPI srst. */ unsigned one3 :1; /* Should be set to 1 */ unsigned reserved4567 :4; /* Reserved */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned reserved4567 :4; /* Reserved */ + unsigned one3 :1; /* Should be set to 1 */ + unsigned srst :1; /* ATA software reset. ATAPI devices should use the new ATAPI srst. */ + unsigned nien :1; /* Device interrupt is disabled (1) or enabled (0) */ + unsigned zero0 :1; /* Should be set to zero */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif } b; } idefloppy_control_reg_t; @@ -366,6 +469,7 @@ * the ATAPI IDENTIFY DEVICE command. */ struct idefloppy_id_gcw { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned packet_size :2; /* Packet Size */ unsigned reserved234 :3; /* Reserved */ unsigned drq_type :2; /* Command packet DRQ type */ @@ -373,12 +477,24 @@ unsigned device_type :5; /* Device type */ unsigned reserved13 :1; /* Reserved */ unsigned protocol :2; /* Protocol type */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned protocol :2; /* Protocol type */ + unsigned reserved13 :1; /* Reserved */ + unsigned device_type :5; /* Device type */ + unsigned removable :1; /* Removable media */ + unsigned drq_type :2; /* Command packet DRQ type */ + unsigned reserved234 :3; /* Reserved */ + unsigned packet_size :2; /* Packet Size */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif }; /* * INQUIRY packet command - Data Format */ typedef struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned device_type :5; /* Peripheral Device Type */ unsigned reserved0_765 :3; /* Peripheral Qualifier - Reserved */ unsigned reserved1_6t0 :7; /* Reserved */ @@ -390,6 +506,21 @@ unsigned reserved3_45 :2; /* Reserved */ unsigned reserved3_6 :1; /* TrmIOP - Reserved */ unsigned reserved3_7 :1; /* AENC - Reserved */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned reserved0_765 :3; /* Peripheral Qualifier - Reserved */ + unsigned device_type :5; /* Peripheral Device Type */ + unsigned rmb :1; /* Removable Medium Bit */ + unsigned reserved1_6t0 :7; /* Reserved */ + unsigned iso_version :2; /* ISO Version */ + unsigned ecma_version :3; /* ECMA Version */ + unsigned ansi_version :3; /* ANSI Version */ + unsigned reserved3_7 :1; /* AENC - Reserved */ + unsigned reserved3_6 :1; /* TrmIOP - Reserved */ + unsigned reserved3_45 :2; /* Reserved */ + unsigned response_format :4; /* Response Data Format */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif u8 additional_length; /* Additional Length (total_length-4) */ u8 rsv5, rsv6, rsv7; /* Reserved */ u8 vendor_id[8]; /* Vendor Identification */ @@ -404,6 +535,7 @@ * REQUEST SENSE packet command result - Data Format. */ typedef struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned error_code :7; /* Current error (0x70) */ unsigned valid :1; /* The information field conforms to SFF-8070i */ u8 reserved1 :8; /* Reserved */ @@ -411,6 +543,17 @@ unsigned reserved2_4 :1; /* Reserved */ unsigned ili :1; /* Incorrect Length Indicator */ unsigned reserved2_67 :2; +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned valid :1; /* The information field conforms to SFF-8070i */ + unsigned error_code :7; /* Current error (0x70) */ + u8 reserved1 :8; /* Reserved */ + unsigned reserved2_67 :2; + unsigned ili :1; /* Incorrect Length Indicator */ + unsigned reserved2_4 :1; /* Reserved */ + unsigned sense_key :4; /* Sense Key */ +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif u32 information __attribute__ ((packed)); u8 asl; /* Additional sense length (n-7) */ u32 command_specific; /* Additional command specific information */ @@ -433,8 +576,15 @@ typedef struct { u16 mode_data_length; /* Length of the following data transfer */ u8 medium_type; /* Medium Type */ +#if defined(__LITTLE_ENDIAN_BITFIELD) unsigned reserved3 :7; unsigned wp :1; /* Write protect */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned wp :1; /* Write protect */ + unsigned reserved3 :7; +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif u8 reserved[4]; } idefloppy_mode_parameter_header_t; @@ -1371,7 +1521,8 @@ if (gcw.drq_type == 1) set_bit (IDEFLOPPY_DRQ_INTERRUPT, &floppy->flags); if (strcmp(drive->id->model, "IOMEGA ZIP 100 ATAPI") == 0 && - strcmp(drive->id->fw_rev, "21.D") == 0) { + ((strcmp(drive->id->fw_rev, "21.D") == 0) || + (strcmp(drive->id->fw_rev, "23.D") == 0))) { for (i = 0; i < 1 << PARTN_BITS; i++) max_sectors[major][minor + i] = 64; } diff -urN linux-2.1.121-pristine/drivers/block/ide-pci.c linux/drivers/block/ide-pci.c --- linux-2.1.121-pristine/drivers/block/ide-pci.c Tue Aug 4 18:56:37 1998 +++ linux/drivers/block/ide-pci.c Mon Sep 14 13:20:26 1998 @@ -42,8 +42,11 @@ #define DEVID_NS87410 ((ide_pci_devid_t){PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410}) #define DEVID_NS87415 ((ide_pci_devid_t){PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415}) #define DEVID_HT6565 ((ide_pci_devid_t){PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_6565}) -#define DEVID_AEC6210 ((ide_pci_devid_t){0x1191, 0x0005}) +#define DEVID_AEC6210 ((ide_pci_devid_t){PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF}) +#define DEVID_AEC6620 ((ide_pci_devid_t){PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP8400}) #define DEVID_W82C105 ((ide_pci_devid_t){PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105}) +#define DEVID_UM8886BF ((ide_pci_devid_t){PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF}) +#define DEVID_HPT343 ((ide_pci_devid_t){PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT343}) #define IDE_IGNORE ((void *)-1) @@ -93,6 +96,13 @@ #define INIT_RZ1000 IDE_IGNORE #endif +#ifdef CONFIG_BLK_DEV_VIA82C586 +extern void ide_init_via82c586(ide_hwif_t *); +#define INIT_VIA82C586 &ide_init_via82c586 +#else +#define INIT_VIA82C586 NULL +#endif + typedef struct ide_pci_enablebit_s { byte reg; /* byte pci reg holding the enable-bit */ byte mask; /* mask to isolate the enable-bit */ @@ -104,35 +114,102 @@ const char *name; void (*init_hwif)(ide_hwif_t *hwif); ide_pci_enablebit_t enablebits[2]; + byte bootable; + unsigned int extra; } ide_pci_device_t; static ide_pci_device_t ide_pci_chipsets[] __initdata = { - {DEVID_PIIXa, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}} }, - {DEVID_PIIXb, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}} }, - {DEVID_PIIX3, "PIIX3", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}} }, - {DEVID_PIIX4, "PIIX4", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}} }, - {DEVID_VP_IDE, "VP_IDE", NULL, {{0x40,0x02,0x02}, {0x40,0x01,0x01}} }, - {DEVID_PDC20246,"PDC20246", NULL, {{0x50,0x02,0x02}, {0x50,0x04,0x04}} }, - {DEVID_RZ1000, "RZ1000", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }, - {DEVID_RZ1001, "RZ1001", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }, - {DEVID_CMD640, "CMD640", IDE_IGNORE, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }, - {DEVID_NS87410, "NS87410", NULL, {{0x43,0x08,0x08}, {0x47,0x08,0x08}} }, - {DEVID_SIS5513, "SIS5513", NULL, {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}} }, - {DEVID_CMD646, "CMD646", INIT_CMD646, {{0x00,0x00,0x00}, {0x51,0x80,0x80}} }, - {DEVID_HT6565, "HT6565", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }, - {DEVID_OPTI621, "OPTI621", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}} }, - {DEVID_OPTI621X,"OPTI621X", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}} }, - {DEVID_TRM290, "TRM290", INIT_TRM290, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }, - {DEVID_NS87415, "NS87415", INIT_NS87415, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }, - {DEVID_AEC6210, "AEC6210", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }, - {DEVID_W82C105, "W82C105", INIT_W82C105, {{0x40,0x01,0x01}, {0x40,0x10,0x10}} }, - {IDE_PCI_DEVID_NULL, "PCI_IDE", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}} }}; + {DEVID_PIIXa, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, + {DEVID_PIIXb, "PIIX", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, + {DEVID_PIIX3, "PIIX3", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, + {DEVID_PIIX4, "PIIX4", NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 0x01, 0 }, + {DEVID_VP_IDE, "VP_IDE", INIT_VIA82C586, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, 0x01, 0 }, + {DEVID_PDC20246,"PDC20246", NULL, {{0x50,0x02,0x02}, {0x50,0x04,0x04}}, 0x01, 16 }, + {DEVID_RZ1000, "RZ1000", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_RZ1001, "RZ1001", INIT_RZ1000, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_CMD640, "CMD640", IDE_IGNORE, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_NS87410, "NS87410", NULL, {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, 0x01, 0 }, + {DEVID_SIS5513, "SIS5513", NULL, {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 0x01, 0 }, + {DEVID_CMD646, "CMD646", INIT_CMD646, {{0x00,0x00,0x00}, {0x51,0x80,0x80}}, 0x01, 0 }, + {DEVID_HT6565, "HT6565", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_OPTI621, "OPTI621", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 0x01, 0 }, + {DEVID_OPTI621X,"OPTI621X", INIT_OPTI621, {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 0x01, 0 }, + {DEVID_TRM290, "TRM290", INIT_TRM290, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_NS87415, "NS87415", INIT_NS87415, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_AEC6210, "AEC6210", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_AEC6620, "AEC6620", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_W82C105, "W82C105", INIT_W82C105, {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, 0x01, 0 }, + {DEVID_UM8886BF,"UM8886BF", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }, + {DEVID_HPT343, "HPT343", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x00, 16 }, + {IDE_PCI_DEVID_NULL, "PCI_IDE", NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 0x01, 0 }}; + +/* + * This allows offboard ide-pci cards the enable a BIOS, verify interrupt + * settings of split-mirror pci-config space, place chipset into init-mode, + * and/or preserve an interrupt if the card is not native ide support. + */ +__initfunc(static unsigned int ide_special_settings (struct pci_dev *dev, const char *name)) +{ + unsigned int addressbios = 0, base = 0; + int reg = 0; + + pci_read_config_dword(dev, PCI_ROM_ADDRESS, &addressbios); + + switch(dev->device) { + case PCI_DEVICE_ID_ARTOP_ATP8400: + printk("%s: Something may need to be added for this card.\n", name); + printk("%s: Report results to hedrick@astro.dyer.vanderbilt.edu\n", name); + printk("%s: vid 0x%04x did 0x%04x\n", name, dev->vendor, dev->device); + for (reg = 0; reg < 6; reg++) { + base = dev->base_address[reg]; + if (!base) + continue; + if (base & PCI_BASE_ADDRESS_SPACE_IO) { + printk(" I/O at 0x%lx [0x%lx].\n", + base & PCI_BASE_ADDRESS_IO_MASK, + dev->base_address[reg]); + } + } + if (addressbios) { + printk(" Expansion ROM at %08lx%s\n", + addressbios & PCI_ROM_ADDRESS_MASK, + (addressbios & PCI_ROM_ADDRESS_ENABLE) ? "" : " [disabled]"); + } + return dev->irq; + case PCI_DEVICE_ID_ARTOP_ATP850UF: + case PCI_DEVICE_ID_PROMISE_20246: + pci_write_config_byte(dev, PCI_ROM_ADDRESS, PCI_ROM_ADDRESS_ENABLE); + printk("%s: ROM enabled ", name); + + if (!addressbios) { + printk("but no address\n"); + } else { + printk("at 0x%08x\n", addressbios); + } + + if ((dev->class >> 8) == PCI_CLASS_STORAGE_RAID) { + unsigned char irq1 = 0, irq2 = 0; + + pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq1); + pci_read_config_byte(dev, (PCI_INTERRUPT_LINE)|0x80, &irq2); /* 0xbc */ + if (irq1 != irq2) { + printk("%s: IRQ1 %d IRQ2 %d\n", + name, irq1, irq2); + pci_write_config_byte(dev, (PCI_INTERRUPT_LINE)|0x80, irq1); /* 0xbc */ + } + } + return dev->irq; + default: + break; + } + return 0; +} /* * Match a PCI IDE port against an entry in ide_hwifs[], * based on io_base port if possible. */ -__initfunc(static ide_hwif_t *ide_match_hwif (unsigned long io_base, const char *name)) +__initfunc(static ide_hwif_t *ide_match_hwif (unsigned long io_base, byte bootable, const char *name)) { int h; ide_hwif_t *hwif; @@ -168,11 +245,22 @@ * Give preference to claiming other slots before claiming ide0/ide1, * just in case there's another interface yet-to-be-scanned * which uses ports 1f0/170 (the ide0/ide1 defaults). + * + * Unless there is a bootable card that does not use the standard + * ports 1f0/170 (the ide0/ide1 defaults). The (bootable) flag. */ - for (h = 2; h < MAX_HWIFS; ++h) { - hwif = ide_hwifs + h; - if (hwif->chipset == ide_unknown) - return hwif; /* pick an unused entry */ + if (bootable) { + for (h = 0; h < MAX_HWIFS; ++h) { + hwif = &ide_hwifs[h]; + if (hwif->chipset == ide_unknown) + return hwif; /* pick an unused entry */ + } + } else { + for (h = 2; h < MAX_HWIFS; ++h) { + hwif = ide_hwifs + h; + if (hwif->chipset == ide_unknown) + return hwif; /* pick an unused entry */ + } } for (h = 0; h < 2; ++h) { hwif = ide_hwifs + h; @@ -263,7 +351,7 @@ pciirq = dev->irq; if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) { printk("%s: not 100%% native mode: will probe irqs later\n", d->name); - pciirq = 0; + pciirq = ide_special_settings(dev, d->name); } else if (tried_config) { printk("%s: will probe irqs later\n", d->name); pciirq = 0; @@ -298,7 +386,7 @@ ctl = port ? 0x374 : 0x3f4; /* use default value */ if (!base) base = port ? 0x170 : 0x1f0; /* use default value */ - if ((hwif = ide_match_hwif(base, d->name)) == NULL) + if ((hwif = ide_match_hwif(base, d->bootable, d->name)) == NULL) continue; /* no room in ide_hwifs[] */ if (hwif->io_ports[IDE_DATA_OFFSET] != base) { ide_init_hwif_ports(hwif->io_ports, base, NULL); @@ -314,6 +402,10 @@ if (mate) { hwif->mate = mate; mate->mate = hwif; + if (IDE_PCI_DEVID_EQ(d->devid, DEVID_AEC6210)) { + hwif->serialized = 1; + mate->serialized = 1; + } } #ifdef CONFIG_BLK_DEV_IDEDMA if (IDE_PCI_DEVID_EQ(d->devid, DEVID_SIS5513)) @@ -321,9 +413,10 @@ if (autodma) hwif->autodma = 1; if (IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20246) || + IDE_PCI_DEVID_EQ(d->devid, DEVID_AEC6210) || + IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT343) || ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 0x80))) { - unsigned int extra = (!mate && IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20246)) ? 16 : 0; - unsigned long dma_base = ide_get_or_set_dma_base(hwif, extra, d->name); + unsigned long dma_base = ide_get_or_set_dma_base(hwif, (!mate && d->extra) ? d->extra : 0, d->name); if (dma_base && !(pcicmd & PCI_COMMAND_MASTER)) { /* * Set up BM-DMA capability (PnP BIOS should have done this) diff -urN linux-2.1.121-pristine/drivers/block/ide-probe.c linux/drivers/block/ide-probe.c --- linux-2.1.121-pristine/drivers/block/ide-probe.c Tue Sep 8 12:39:27 1998 +++ linux/drivers/block/ide-probe.c Mon Sep 14 13:26:58 1998 @@ -273,6 +273,18 @@ { if ((rc = try_to_identify(drive,cmd))) /* send cmd and wait */ rc = try_to_identify(drive,cmd); /* failed: try again */ + if (rc == 1 && cmd == WIN_PIDENTIFY && drive->autotune != 2) { + unsigned long timeout; + printk("%s: no response (status = 0x%02x), resetting drive\n", drive->name, GET_STAT()); + delay_50ms(); + OUT_BYTE (drive->select.all, IDE_SELECT_REG); + delay_50ms(); + OUT_BYTE(WIN_SRST, IDE_COMMAND_REG); + timeout = jiffies; + while ((GET_STAT() & BUSY_STAT) && jiffies < timeout + WAIT_WORSTCASE) + delay_50ms(); + rc = try_to_identify(drive, cmd); + } if (rc == 1) printk("%s: no response (status = 0x%02x)\n", drive->name, GET_STAT()); (void) GET_STAT(); /* ensure drive irq is clear */ diff -urN linux-2.1.121-pristine/drivers/block/ide.c linux/drivers/block/ide.c --- linux-2.1.121-pristine/drivers/block/ide.c Sun Aug 30 13:27:35 1998 +++ linux/drivers/block/ide.c Mon Sep 14 13:41:23 1998 @@ -1104,6 +1104,10 @@ if (sleep) { if (0 < (signed long)(jiffies + WAIT_MIN_SLEEP - sleep)) sleep = jiffies + WAIT_MIN_SLEEP; +#if 1 + if (hwgroup->timer.next || hwgroup->timer.prev) + printk("ide_set_handler: timer already active\n"); +#endif mod_timer(&hwgroup->timer, sleep); } else { /* Ugly, but how can we sleep for the lock otherwise? perhaps from tq_scheduler? */ @@ -1253,7 +1257,7 @@ } hwgroup->busy = 1; /* should already be "1" */ hwgroup->handler = NULL; - del_timer(&hwgroup->timer); + del_timer(&hwgroup->timer); /* Is this needed?? */ if (hwgroup->poll_timeout != 0) { /* polling in progress? */ spin_unlock_irqrestore(&hwgroup->spinlock, flags); handler(drive); @@ -1265,6 +1269,10 @@ if (drive->waiting_for_dma) { (void) hwgroup->hwif->dmaproc(ide_dma_end, drive); printk("%s: timeout waiting for DMA\n", drive->name); + /* + * need something here for HX PIIX3 UDMA and HPT343.......AMH + * irq timeout: status=0x58 { DriveReady SeekComplete DataRequest } + */ } spin_unlock_irqrestore(&hwgroup->spinlock, flags); ide_error(drive, "irq timeout", GET_STAT()); diff -urN linux-2.1.121-pristine/drivers/block/ide.h linux/drivers/block/ide.h --- linux-2.1.121-pristine/drivers/block/ide.h Wed Sep 9 15:26:01 1998 +++ linux/drivers/block/ide.h Mon Sep 14 11:47:09 1998 @@ -729,8 +729,11 @@ void ide_scan_pcibus (void) __init; #endif #ifdef CONFIG_BLK_DEV_IDEDMA +#define BAD_DMA_DRIVE 0 +#define GOOD_DMA_DRIVE 1 int ide_build_dmatable (ide_drive_t *drive); void ide_dma_intr (ide_drive_t *drive); +int check_drive_lists (ide_drive_t *drive, int good_bad); int ide_dmaproc (ide_dma_action_t func, ide_drive_t *drive); void ide_setup_dma (ide_hwif_t *hwif, unsigned long dmabase, unsigned int num_ports) __init; unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif, int extra, const char *name) __init; diff -urN linux-2.1.121-pristine/drivers/block/via82c586.c linux/drivers/block/via82c586.c --- linux-2.1.121-pristine/drivers/block/via82c586.c Wed Dec 31 18:00:00 1969 +++ linux/drivers/block/via82c586.c Mon Sep 14 10:49:40 1998 @@ -0,0 +1,86 @@ +/* + * linux/drivers/block/via82C586.c Version 0.01 Aug 16, 1998 + * + * Copyright (C) 1998 Michel Aubry + * Copyright (C) 1998 Andre Hedrick + * + * The VIA MVP-3 is reported OK with UDMA. + * + * VIA chips also have a single FIFO, with the same 64 bytes deep buffer (16 levels + * of 4 bytes each). + * However, VIA chips can have the buffer split either 8:8 levels, 16:0 levels or + * 0:16 levels between both channels. One could think of using this feature, as even + * if no level of FIFO is given to a given channel, one can always reach ATAPI drives + * through it, or, if one channel is unused, configuration defaults to an even split + * FIFO levels. + */ + +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/timer.h> +#include <linux/mm.h> +#include <linux/ioport.h> +#include <linux/interrupt.h> +#include <linux/blkdev.h> +#include <linux/hdreg.h> +#include <linux/pci.h> +#include <linux/delay.h> +#include <asm/io.h> +#include "ide.h" + +/* + * Set VIA Chipset Timings for (U)DMA modes enabled. + * + * VIA Apollo chipset has complete support for + * setting up the timing parameters. + */ +static void set_via_timings (ide_hwif_t *hwif) +{ + struct pci_dev *dev = hwif->pci_dev; + byte post = hwif->channel ? 0xc0 : 0x30; + byte flush = hwif->channel ? 0xa0 : 0x50; + byte via_config = 0; + int rc = 0, errors = 0; + + printk("%s: VIA Bus-Master ", hwif->name); + + if (!hwif->dma_base) { + printk(" ERROR, NO DMA_BASE\n"); + return; + } + + /* setting IDE read prefetch buffer and IDE post write buffer. + * (This feature allows prefetched reads and post writes). + */ + if ((rc = pci_read_config_byte(dev, 0x41, &via_config))) { + errors++; + goto via_error; + } + if ((rc = pci_write_config_byte(dev, 0x41, via_config | post))) { + errors++; + goto via_error; + } + + /* setting Channel read and End-of-sector FIFO flush. + * (This feature ensures that FIFO flush is enabled: + * - for read DMA when interrupt asserts the given channel. + * - at the end of each sector for the given channel.) + */ + if ((rc = pci_read_config_byte(dev, 0x46, &via_config))) { + errors++; + goto via_error; + } + if ((rc = pci_write_config_byte(dev, 0x46, via_config | flush))) { + errors++; + goto via_error; + } + +via_error: + printk("(U)DMA Timing Config %s\n", errors ? "ERROR" : "Success"); +} + +void ide_init_via82c586 (ide_hwif_t *hwif) +{ + set_via_timings(hwif); +} + diff -urN linux-2.1.121-pristine/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c --- linux-2.1.121-pristine/drivers/cdrom/cdrom.c Tue Sep 8 12:39:27 1998 +++ linux/drivers/cdrom/cdrom.c Mon Sep 14 10:49:40 1998 @@ -67,7 +67,7 @@ 2.12 Jan 24, 1998 -- Erik Andersen <andersee@debian.org> -- Fixed a bug in the IOCTL_IN and IOCTL_OUT macros. It turns out that - copy_*_user does not return EFAULT on error, but instead return the number + copy_*_user does not return EFAULT on error, but instead returns the number of bytes not copied. I was returning whatever non-zero stuff came back from the copy_*_user functions directly, which would result in strange errors. @@ -80,10 +80,16 @@ -- Fixed it so that the /proc entry now also shows up when cdrom is compiled into the kernel. Before it only worked when loaded as a module. + 2.14 August 17, 1998 -- Erik Andersen <andersee@debian.org> + -- Fixed a bug in cdrom_media_changed and handling of reporting that + the media had changed for devices that _don't_ implement media_changed. + Thanks to Grant R. Guenther <grant@torque.net> for spotting this bug. + -- Made a few things more pedanticly correct. + -------------------------------------------------------------------------*/ -#define REVISION "Revision: 2.13" -#define VERSION "Id: cdrom.c 2.13 1998/07/17 erik" +#define REVISION "Revision: 2.14" +#define VERSION "Id: cdrom.c 2.14 1998/08/17 erik" /* I use an error-log mask to give fine grain control over the type of messages dumped to the system logs. The available masks include: */ @@ -163,15 +169,6 @@ static void sanitize_format(union cdrom_addr *addr, u_char * curr, u_char requested); static void cdrom_sysctl_register(void); -typedef struct { - int data; - int audio; - int cdi; - int xa; - long error; -} tracktype; - -static void cdrom_count_tracks(struct cdrom_device_info *cdi,tracktype* tracks); static struct cdrom_device_info *topCdromPtr = NULL; struct file_operations cdrom_fops = @@ -312,6 +309,9 @@ ret = open_for_data(cdi); if (!ret) cdi->use_count++; cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n", cdi->name, cdi->use_count); + /* Do this on open. Don't wait for mount, because they might + not be mounting, but opening with O_NONBLOCK */ + check_disk_change(dev); return ret; } @@ -497,7 +497,10 @@ !(fp && fp->f_flags & O_NONBLOCK); cdo->release(cdi); if (cdi->use_count == 0) { /* last process that closes dev*/ + struct super_block *sb; sync_dev(dev); + sb = get_super(dev); + if (sb) invalidate_inodes(sb); invalidate_buffers(dev); if (opened_for_data && cdi->options & CDO_AUTO_EJECT && @@ -519,6 +522,8 @@ unsigned int mask = (1 << (queue & 1)); int ret = !!(cdi->mc_flags & mask); + if (!(cdi->ops->capability & ~cdi->mask & CDC_MEDIA_CHANGED)) + return ret; /* changed since last call? */ if (cdi->ops->media_changed(cdi, CDSL_CURRENT)) { cdi->mc_flags = 0x3; /* set bit on both queues */ @@ -532,14 +537,18 @@ int cdrom_media_changed(kdev_t dev) { struct cdrom_device_info *cdi = cdrom_find_device (dev); + /* This talks to the VFS, which doesn't like errors - just 1 or 0. + * Returning "0" is always safe (media hasn't been changed). Do that + * if the low-level cdrom driver dosn't support media changed. */ if (cdi == NULL) - return -ENODEV; + return 0; if (cdi->ops->media_changed == NULL) - return -ENOSYS; - return media_changed(cdi, 0); + return 0; + if (!(cdi->ops->capability & ~cdi->mask & CDC_MEDIA_CHANGED)) + return 0; + return (media_changed(cdi, 0)); } -static void cdrom_count_tracks(struct cdrom_device_info *cdi, tracktype* tracks) { struct cdrom_tochdr header; @@ -950,6 +959,7 @@ return cdo->dev_ioctl(cdi, cmd, arg); } +EXPORT_SYMBOL(cdrom_count_tracks); EXPORT_SYMBOL(register_cdrom); EXPORT_SYMBOL(unregister_cdrom); EXPORT_SYMBOL(cdrom_fops); diff -urN linux-2.1.121-pristine/drivers/pci/oldproc.c linux/drivers/pci/oldproc.c --- linux-2.1.121-pristine/drivers/pci/oldproc.c Mon Aug 24 17:12:32 1998 +++ linux/drivers/pci/oldproc.c Mon Sep 14 10:49:40 1998 @@ -255,6 +255,7 @@ DEVICE( WINBOND, WINBOND_82C105, "SL82C105"), DEVICE( WINBOND, WINBOND_83C553, "W83C553"), DEVICE( DATABOOK, DATABOOK_87144, "DB87144"), + DEVICE( PLX, PLX_9050, "PCI9050 I2O"), DEVICE( PLX, PLX_9080, "PCI9080 I2O"), DEVICE( MADGE, MADGE_MK2, "Smart 16/4 BM Mk2 Ringnode"), DEVICE( MADGE, MADGE_C155S, "Collage 155 Server"), @@ -314,6 +315,7 @@ DEVICE( TRUEVISION, TRUEVISION_T1000,"TARGA 1000"), DEVICE( INIT, INIT_320P, "320 P"), DEVICE( INIT, INIT_360P, "360 P"), + DEVICE( TTI, TTI_HPT343, "HPT343"), DEVICE( VIA, VIA_82C505, "VT 82C505"), DEVICE( VIA, VIA_82C561, "VT 82C561"), DEVICE( VIA, VIA_82C586_1, "VT 82C586 Apollo IDE"), @@ -389,6 +391,7 @@ DEVICE( TOSHIBA, TOSHIBA_TOPIC95,"ToPIC95"), DEVICE( TOSHIBA, TOSHIBA_TOPIC97,"ToPIC97"), DEVICE( RICOH, RICOH_RL5C466, "RL5C466"), + DEVICE( ARTOP, ARTOP_ATP8400, "ATP8400"), DEVICE( ARTOP, ARTOP_ATP850UF, "ATP850UF"), DEVICE( ZEITNET, ZEITNET_1221, "1221"), DEVICE( ZEITNET, ZEITNET_1225, "1225"), @@ -722,6 +725,7 @@ case PCI_VENDOR_ID_REALTEK: return "Realtek"; case PCI_VENDOR_ID_TRUEVISION: return "Truevision"; case PCI_VENDOR_ID_INIT: return "Initio Corp"; + case PCI_VENDOR_ID_TTI: return "Triones Technologies, Inc."; case PCI_VENDOR_ID_VIA: return "VIA Technologies"; case PCI_VENDOR_ID_VORTEX: return "VORTEX"; case PCI_VENDOR_ID_EF: return "Efficient Networks"; diff -urN linux-2.1.121-pristine/include/linux/cdrom.h linux/include/linux/cdrom.h --- linux-2.1.121-pristine/include/linux/cdrom.h Sat Jun 13 15:05:22 1998 +++ linux/include/linux/cdrom.h Mon Sep 14 10:49:41 1998 @@ -415,6 +415,14 @@ extern int register_cdrom(struct cdrom_device_info *cdi); extern int unregister_cdrom(struct cdrom_device_info *cdi); +typedef struct { + int data; + int audio; + int cdi; + int xa; + long error; +} tracktype; +extern void cdrom_count_tracks(struct cdrom_device_info *cdi,tracktype* tracks); #endif /* End of kernel only stuff */ #endif /* _LINUX_CDROM_H */ diff -urN linux-2.1.121-pristine/include/linux/hdreg.h linux/include/linux/hdreg.h --- linux-2.1.121-pristine/include/linux/hdreg.h Wed Sep 9 11:07:08 1998 +++ linux/include/linux/hdreg.h Mon Sep 14 10:49:41 1998 @@ -42,6 +42,7 @@ #define WIN_RESTORE 0x10 #define WIN_READ 0x20 #define WIN_WRITE 0x30 +#define WIN_WRITE_VERIFY 0x3C #define WIN_VERIFY 0x40 #define WIN_FORMAT 0x50 #define WIN_INIT 0x60 @@ -62,6 +63,9 @@ #define WIN_READDMA 0xc8 /* read sectors using DMA transfers */ #define WIN_WRITEDMA 0xca /* write sectors using DMA transfers */ +#define WIN_READ_BUFFER 0xE4 /* force read only 1 sector */ +#define WIN_WRITE_BUFFER 0xE8 /* force write only 1 sector */ + #define WIN_SMART 0xb0 /* self-monitoring and reporting */ /* Additional drive command codes used by ATAPI devices. */ @@ -85,6 +89,7 @@ #define MARK_ERR 0x01 /* Bad address mark */ #define TRK0_ERR 0x02 /* couldn't find track 0 */ #define ABRT_ERR 0x04 /* Command aborted */ +#define MCR_ERR 0x08 /* media change request */ #define ID_ERR 0x10 /* ID field not found */ #define ECC_ERR 0x40 /* Uncorrectable ECC error */ #define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */ diff -urN linux-2.1.121-pristine/include/linux/pci.h linux/include/linux/pci.h --- linux-2.1.121-pristine/include/linux/pci.h Wed Sep 9 11:07:08 1998 +++ linux/include/linux/pci.h Mon Sep 14 10:49:41 1998 @@ -601,6 +601,7 @@ #define PCI_DEVICE_ID_DATABOOK_87144 0xb106 #define PCI_VENDOR_ID_PLX 0x10b5 +#define PCI_DEVICE_ID_PLX_9050 0x9050 #define PCI_DEVICE_ID_PLX_9060 0x9060 #define PCI_DEVICE_ID_PLX_9060ES 0x906E #define PCI_DEVICE_ID_PLX_9060SD 0x906D @@ -703,6 +704,9 @@ #define PCI_DEVICE_ID_INIT_320P 0x9100 #define PCI_DEVICE_ID_INIT_360P 0x9500 +#define PCI_VENDOR_ID_TTI 0x1103 +#define PCI_DEVICE_ID_TTI_HPT343 0x0003 + #define PCI_VENDOR_ID_VIA 0x1106 #define PCI_DEVICE_ID_VIA_82C505 0x0505 #define PCI_DEVICE_ID_VIA_82C561 0x0561 @@ -812,6 +816,7 @@ #define PCI_DEVICE_ID_RICOH_RL5C466 0x0466 #define PCI_VENDOR_ID_ARTOP 0x1191 +#define PCI_DEVICE_ID_ARTOP_ATP8400 0x0004 #define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005 #define PCI_VENDOR_ID_ZEITNET 0x1193 diff -urN linux-2.1.121-pristine/init/main.c linux/init/main.c --- linux-2.1.121-pristine/init/main.c Wed Sep 9 10:56:59 1998 +++ linux/init/main.c Mon Sep 14 10:49:41 1998 @@ -388,6 +388,10 @@ { "hdf", 0x2140 }, { "hdg", 0x2200 }, { "hdh", 0x2240 }, + { "hdi", 0x3800 }, + { "hdj", 0x3840 }, + { "hdk", 0x3900 }, + { "hdl", 0x3940 }, #endif #ifdef CONFIG_BLK_DEV_SD { "sda", 0x0800 }, | |