diff -urN linux.ide.orig/drivers/ide/Config.in linux.ide/drivers/ide/Config.in --- linux.ide.orig/drivers/ide/Config.in Sun Sep 29 15:53:53 2002 +++ linux.ide/drivers/ide/Config.in Sun Sep 29 15:54:43 2002 @@ -65,13 +65,13 @@ dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3 dep_bool ' AMD Viper support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_mbool ' AMD Viper ATA-66 Override (WIP)' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX $CONFIG_IDEDMA_PCI_WIP - dep_bool ' CMD64X chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI + dep_bool ' CMD64X and CMD680 chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' CMD680 chipset tuning support' CONFIG_BLK_DEV_CMD680 $CONFIG_BLK_DEV_CMD64X dep_bool ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' Cyrix CS5530 MediaGX chipset support' CONFIG_BLK_DEV_CS5530 $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' HPT34X chipset support' CONFIG_BLK_DEV_HPT34X $CONFIG_BLK_DEV_IDEDMA_PCI dep_mbool ' HPT34X AUTODMA support (WIP)' CONFIG_HPT34X_AUTODMA $CONFIG_BLK_DEV_HPT34X $CONFIG_IDEDMA_PCI_WIP - dep_bool ' HPT366 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI + dep_bool ' HPT366/368/370 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI if [ "$CONFIG_X86" = "y" -o "$CONFIG_IA64" = "y" ]; then dep_mbool ' Intel PIIXn chipsets support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI dep_mbool ' PIIXn Tuning support' CONFIG_PIIX_TUNING $CONFIG_BLK_DEV_PIIX $CONFIG_IDEDMA_PCI_AUTO @@ -141,7 +141,8 @@ EXT_DIRECT CONFIG_IDE_EXT_DIRECT" 8xx_PCCARD fi - bool ' Other IDE chipset support' CONFIG_IDE_CHIPSETS + # no isa -> no vlb + dep_bool ' Other IDE chipset support' CONFIG_IDE_CHIPSETS $CONFIG_ISA if [ "$CONFIG_IDE_CHIPSETS" = "y" ]; then comment 'Note: most of these also require special kernel boot parameters' bool ' Generic 4 drives/port support' CONFIG_BLK_DEV_4DRIVES diff -urN linux.ide.orig/drivers/ide/hpt366.c linux.ide/drivers/ide/hpt366.c --- linux.ide.orig/drivers/ide/hpt366.c Sun Sep 29 15:53:53 2002 +++ linux.ide/drivers/ide/hpt366.c Sun Sep 29 15:59:45 2002 @@ -790,7 +790,7 @@ dma_func = ide_dma_off_quietly; no_dma_set: - config_chipset_for_pio(drive); +/* config_chipset_for_pio(drive); */ } return HWIF(drive)->dmaproc(dma_func, drive); } diff -urN linux.ide.orig/drivers/ide/ide-cd.c linux.ide/drivers/ide/ide-cd.c --- linux.ide.orig/drivers/ide/ide-cd.c Sun Sep 29 15:53:53 2002 +++ linux.ide/drivers/ide/ide-cd.c Sun Sep 29 15:54:43 2002 @@ -2197,6 +2197,8 @@ layer. the packet must be complete, as we do not touch it at all. */ memset(&pc, 0, sizeof(pc)); + if (cgc->sense) + memset(cgc->sense, 0, sizeof(struct request_sense)); memcpy(pc.c, cgc->cmd, CDROM_PACKET_SIZE); pc.buffer = cgc->buffer; pc.buflen = cgc->buflen; @@ -2541,8 +2543,8 @@ devinfo->dev = MKDEV (HWIF(drive)->major, minor); devinfo->ops = &ide_cdrom_dops; devinfo->mask = 0; - *(int *)&devinfo->speed = CDROM_STATE_FLAGS (drive)->current_speed; - *(int *)&devinfo->capacity = nslots; + devinfo->speed = CDROM_STATE_FLAGS (drive)->current_speed; + devinfo->capacity = nslots; devinfo->handle = (void *) drive; strcpy(devinfo->name, drive->name); diff -urN linux.ide.orig/drivers/ide/ide-features.c linux.ide/drivers/ide/ide-features.c --- linux.ide.orig/drivers/ide/ide-features.c Sun Sep 29 15:53:53 2002 +++ linux.ide/drivers/ide/ide-features.c Sun Sep 29 15:54:43 2002 @@ -239,17 +239,24 @@ return 0; } +#ifdef CONFIG_BLK_DEV_IDEDMA /* * All hosts that use the 80c ribbon mus use! */ byte eighty_ninty_three (ide_drive_t *drive) { +#ifdef CONFIG_BLK_DEV_IDEPCI + if (HWIF(drive)->pci_devid.vid==0x105a) + return(HWIF(drive)->udma_four); +#endif + /* PDC202XX: that's because some HDD will return wrong info */ return ((byte) ((HWIF(drive)->udma_four) && #ifndef CONFIG_IDEDMA_IVB (drive->id->hw_config & 0x4000) && #endif /* CONFIG_IDEDMA_IVB */ (drive->id->hw_config & 0x6000)) ? 1 : 0); } +#endif // CONFIG_BLK_DEV_IDEDMA /* * Similar to ide_wait_stat(), except it never calls ide_error internally. @@ -370,6 +377,8 @@ EXPORT_SYMBOL(ide_driveid_update); EXPORT_SYMBOL(ide_ata66_check); EXPORT_SYMBOL(set_transfer); +#ifdef CONFIG_BLK_DEV_IDEDMA EXPORT_SYMBOL(eighty_ninty_three); +#endif // CONFIG_BLK_DEV_IDEDMA EXPORT_SYMBOL(ide_config_drive_speed); diff -urN linux.ide.orig/drivers/ide/ide-pci.c linux.ide/drivers/ide/ide-pci.c --- linux.ide.orig/drivers/ide/ide-pci.c Sun Sep 29 15:53:53 2002 +++ linux.ide/drivers/ide/ide-pci.c Sun Sep 29 15:54:43 2002 @@ -408,7 +408,7 @@ {DEVID_VIA_IDE, "VIA_IDE", NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }, {DEVID_MR_IDE, "VP_IDE", PCI_VIA82CXXX, ATA66_VIA82CXXX,INIT_VIA82CXXX, DMA_VIA82CXXX, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, ON_BOARD, 0 }, {DEVID_VP_IDE, "VP_IDE", PCI_VIA82CXXX, ATA66_VIA82CXXX,INIT_VIA82CXXX, DMA_VIA82CXXX, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, ON_BOARD, 0 }, -#ifdef CONFIG_PDC202XX_FORCE +#ifndef CONFIG_PDC202XX_FORCE {DEVID_PDC20246,"PDC20246", PCI_PDC202XX, NULL, INIT_PDC202XX, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 16 }, {DEVID_PDC20262,"PDC20262", PCI_PDC202XX, ATA66_PDC202XX, INIT_PDC202XX, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 48 }, {DEVID_PDC20265,"PDC20265", PCI_PDC202XX, ATA66_PDC202XX, INIT_PDC202XX, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 48 }, @@ -674,25 +674,18 @@ */ pciirq = dev->irq; - if (dev->class >> 8 == PCI_CLASS_STORAGE_RAID) - { - /* By rights we want to ignore these, but the Promise Fastrak - people have some strange ideas about proprietary so we have - to act otherwise on those. The supertrak however we need - to skip */ - if (IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20265)) - { - printk(KERN_INFO "ide: Found promise 20265 in RAID mode.\n"); - if(dev->bus->self && dev->bus->self->vendor == PCI_VENDOR_ID_INTEL && - dev->bus->self->device == PCI_DEVICE_ID_INTEL_I960) - { - printk(KERN_INFO "ide: Skipping Promise PDC20265 attached to I2O RAID controller.\n"); - return; - } +#ifdef CONFIG_PDC202XX_FORCE + if (dev->class >> 8 == PCI_CLASS_STORAGE_RAID) { + /* + * By rights we want to ignore Promise FastTrak and SuperTrak + * series here, those use own driver. + */ + if (dev->vendor == PCI_VENDOR_ID_PROMISE) { + printk(KERN_INFO "ide: Skipping Promise RAID controller.\n"); + return; } - /* Its attached to something else, just a random bridge. - Suspect a fastrak and fall through */ } +#endif /* CONFIG_PDC202XX_FORCE */ if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) { printk("%s: not 100%% native mode: will probe irqs later\n", d->name); /* @@ -887,9 +880,9 @@ dev2 = findev; pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); pci_read_config_byte(dev2, PCI_INTERRUPT_LINE, &irq2); - if (irq != irq2) { + if (irq != irq2) { dev2->irq = dev->irq; - pci_write_config_byte(dev2, PCI_INTERRUPT_LINE, irq); + pci_write_config_byte(dev2, PCI_INTERRUPT_LINE, irq); } } diff -urN linux.ide.orig/drivers/ide/ide-probe.c-1.07 linux.ide/drivers/ide/ide-probe.c-1.07 --- linux.ide.orig/drivers/ide/ide-probe.c-1.07 Sun Sep 29 15:53:54 2002 +++ linux.ide/drivers/ide/ide-probe.c-1.07 Sun Sep 29 15:54:43 2002 @@ -761,6 +761,7 @@ gd = kmalloc (sizeof(struct gendisk), GFP_KERNEL); if (!gd) goto err_kmalloc_gd; + memset (gd, 0, sizeof(struct gendisk)); gd->sizes = kmalloc (minors * sizeof(int), GFP_KERNEL); if (!gd->sizes) goto err_kmalloc_gd_sizes; diff -urN linux.ide.orig/drivers/ide/sis5513.c linux.ide/drivers/ide/sis5513.c --- linux.ide.orig/drivers/ide/sis5513.c Sun Sep 29 15:53:54 2002 +++ linux.ide/drivers/ide/sis5513.c Sun Sep 29 15:54:43 2002 @@ -172,13 +172,13 @@ unsigned char chipset_family; unsigned char flags; } SiSHostChipInfo[] = { - { "SiS750", PCI_DEVICE_ID_SI_750, ATA_100, SIS5513_LATENCY }, - { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100, SIS5513_LATENCY }, +// { "SiS750", PCI_DEVICE_ID_SI_750, ATA_100, SIS5513_LATENCY }, +// { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100, SIS5513_LATENCY }, { "SiS740", PCI_DEVICE_ID_SI_740, ATA_100, SIS5513_LATENCY }, { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100, SIS5513_LATENCY }, { "SiS730", PCI_DEVICE_ID_SI_730, ATA_100a, SIS5513_LATENCY }, - { "SiS650", PCI_DEVICE_ID_SI_650, ATA_100, SIS5513_LATENCY }, - { "SiS645", PCI_DEVICE_ID_SI_645, ATA_100, SIS5513_LATENCY }, +// { "SiS650", PCI_DEVICE_ID_SI_650, ATA_100, SIS5513_LATENCY }, +// { "SiS645", PCI_DEVICE_ID_SI_645, ATA_100, SIS5513_LATENCY }, { "SiS635", PCI_DEVICE_ID_SI_635, ATA_100, SIS5513_LATENCY }, { "SiS640", PCI_DEVICE_ID_SI_640, ATA_66, SIS5513_LATENCY }, { "SiS630", PCI_DEVICE_ID_SI_630, ATA_66, SIS5513_LATENCY }, diff -urN linux.ide.orig/drivers/ide/via82cxxx.c linux.ide/drivers/ide/via82cxxx.c --- linux.ide.orig/drivers/ide/via82cxxx.c Sun Sep 29 15:53:54 2002 +++ linux.ide/drivers/ide/via82cxxx.c Sun Sep 29 16:58:35 2002 @@ -1,62 +1,24 @@ /* - * $Id$ + * Version 3.35 * Backported to 2.2.21rc3 2002/05/20 by Krzysztof Oledzki * - * Copyright (c) 2000-2001 Vojtech Pavlik + * VIA IDE driver for Linux. Supports southbridges: + * + * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b, + * vt82c686, vt82c686a, vt82c686b, vt8231, vt8233, vt8233c, vt8233a, + * vt8235 + * + * Copyright (c) 2000-2002 Vojtech Pavlik * * Based on the work of: * Michel Aubry * Jeff Garzik * Andre Hedrick */ - /* - * VIA IDE driver for Linux. Supports - * - * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b, - * vt82c686, vt82c686a, vt82c686b, vt8231, vt8233, vt8233c, vt8233a - * - * southbridges, which can be found in - * - * VIA Apollo Master, VP, VP2, VP2/97, VP3, VPX, VPX/97, MVP3, MVP4, P6, Pro, - * ProII, ProPlus, Pro133, Pro133+, Pro133A, Pro133A Dual, Pro133T, Pro133Z, - * PLE133, PLE133T, Pro266, Pro266T, ProP4X266, PM601, PM133, PN133, PL133T, - * PX266, PM266, KX133, KT133, KT133A, KT133E, KLE133, KT266, KX266, KM133, - * KM133A, KL133, KN133, KM266 - * PC-Chips VXPro, VXPro+, VXTwo, TXPro-III, TXPro-AGP, AGPPro, ViaGra, BXToo, - * BXTel, BXpert - * AMD 640, 640 AGP, 750 IronGate, 760, 760MP - * ETEQ 6618, 6628, 6629, 6638 - * Micron Samurai - * - * chipsets. Supports - * - * PIO 0-5, MWDMA 0-2, SWDMA 0-2 and UDMA 0-6 - * - * (this includes UDMA33, 66, 100 and 133) modes. UDMA66 and higher modes are - * autoenabled only in case the BIOS has detected a 80 wire cable. To ignore - * the BIOS data and assume the cable is present, use 'ide0=ata66' or - * 'ide1=ata66' on the kernel command line. - */ - -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Should you need to contact me, the author, you can do so either by - * e-mail - mail your message to , or by paper mail: - * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic + * Tis program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation.nclude */ #include @@ -108,20 +70,20 @@ } via_isa_bridges[] = { #ifdef FUTURE_BRIDGES { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 }, - { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 }, #endif + { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 }, { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 }, { "vt8233c", PCI_DEVICE_ID_VIA_8233C_0, 0x00, 0x2f, VIA_UDMA_100 }, { "vt8233", PCI_DEVICE_ID_VIA_8233_0, 0x00, 0x2f, VIA_UDMA_100 }, { "vt8231", PCI_DEVICE_ID_VIA_8231, 0x00, 0x2f, VIA_UDMA_100 }, - { "vt82c686b", PCI_DEVICE_ID_VIA_82C686, 0x40, 0x4f, VIA_UDMA_100 }, +// { "vt82c686b", PCI_DEVICE_ID_VIA_82C686, 0x40, 0x4f, VIA_UDMA_100 }, { "vt82c686a", PCI_DEVICE_ID_VIA_82C686, 0x10, 0x2f, VIA_UDMA_66 }, { "vt82c686", PCI_DEVICE_ID_VIA_82C686, 0x00, 0x0f, VIA_UDMA_33 | VIA_BAD_CLK66 }, { "vt82c596b", PCI_DEVICE_ID_VIA_82C596, 0x10, 0x2f, VIA_UDMA_66 }, { "vt82c596a", PCI_DEVICE_ID_VIA_82C596, 0x00, 0x0f, VIA_UDMA_33 | VIA_BAD_CLK66 }, - { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x47, 0x4f, VIA_UDMA_33 | VIA_SET_FIFO }, - { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x40, 0x46, VIA_UDMA_33 | VIA_SET_FIFO | VIA_BAD_PREQ }, - { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x30, 0x3f, VIA_UDMA_33 | VIA_SET_FIFO }, +// { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x47, 0x4f, VIA_UDMA_33 | VIA_SET_FIFO }, +// { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x40, 0x46, VIA_UDMA_33 | VIA_SET_FIFO | VIA_BAD_PREQ }, +// { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x30, 0x3f, VIA_UDMA_33 | VIA_SET_FIFO }, { "vt82c586a", PCI_DEVICE_ID_VIA_82C586_0, 0x20, 0x2f, VIA_UDMA_33 | VIA_SET_FIFO }, { "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO }, { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK }, @@ -166,7 +128,7 @@ via_print("----------VIA BusMastering IDE Configuration----------------"); - via_print("Driver Version: 3.34"); + via_print("Driver Version: 3.35"); via_print("South Bridge: VIA %s", via_config->name); pci_read_config_byte(isa_dev, PCI_REVISION_ID, &t); @@ -417,7 +379,7 @@ } if (!via_config->id) { - printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, contact Vojtech Pavlik \n"); + printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); return -ENODEV; } diff -urN linux.ide.orig/include/linux/pci.h linux.ide/include/linux/pci.h --- linux.ide.orig/include/linux/pci.h Sun Sep 29 15:53:56 2002 +++ linux.ide/include/linux/pci.h Sun Sep 29 16:04:18 2002 @@ -942,6 +942,7 @@ #define PCI_DEVICE_ID_VIA_8622 0x3102 #define PCI_DEVICE_ID_VIA_8361 0x3112 #define PCI_DEVICE_ID_VIA_8233A 0x3147 +#define PCI_DEVICE_ID_VIA_8235 0x3177 #define PCI_DEVICE_ID_VIA_86C100A 0x6100 #define PCI_DEVICE_ID_VIA_8231 0x8231 #define PCI_DEVICE_ID_VIA_8231_4 0x8235