]> git.pld-linux.org Git - packages/kernel.git/blame - ide.2.2.21_update_to_2.2.22.patch
- obsolete
[packages/kernel.git] / ide.2.2.21_update_to_2.2.22.patch
CommitLineData
788bc9c4
KT
1diff -urN linux.ide.orig/drivers/ide/Config.in linux.ide/drivers/ide/Config.in
2--- linux.ide.orig/drivers/ide/Config.in Sun Sep 29 15:53:53 2002
3+++ linux.ide/drivers/ide/Config.in Sun Sep 29 15:54:43 2002
4@@ -65,13 +65,13 @@
5 dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3
6 dep_bool ' AMD Viper support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI
7 dep_mbool ' AMD Viper ATA-66 Override (WIP)' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX $CONFIG_IDEDMA_PCI_WIP
8- dep_bool ' CMD64X chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI
9+ dep_bool ' CMD64X and CMD680 chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI
10 dep_bool ' CMD680 chipset tuning support' CONFIG_BLK_DEV_CMD680 $CONFIG_BLK_DEV_CMD64X
11 dep_bool ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI
12 dep_bool ' Cyrix CS5530 MediaGX chipset support' CONFIG_BLK_DEV_CS5530 $CONFIG_BLK_DEV_IDEDMA_PCI
13 dep_bool ' HPT34X chipset support' CONFIG_BLK_DEV_HPT34X $CONFIG_BLK_DEV_IDEDMA_PCI
14 dep_mbool ' HPT34X AUTODMA support (WIP)' CONFIG_HPT34X_AUTODMA $CONFIG_BLK_DEV_HPT34X $CONFIG_IDEDMA_PCI_WIP
15- dep_bool ' HPT366 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI
16+ dep_bool ' HPT366/368/370 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI
17 if [ "$CONFIG_X86" = "y" -o "$CONFIG_IA64" = "y" ]; then
18 dep_mbool ' Intel PIIXn chipsets support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI
19 dep_mbool ' PIIXn Tuning support' CONFIG_PIIX_TUNING $CONFIG_BLK_DEV_PIIX $CONFIG_IDEDMA_PCI_AUTO
20@@ -141,7 +141,8 @@
21 EXT_DIRECT CONFIG_IDE_EXT_DIRECT" 8xx_PCCARD
22 fi
23
24- bool ' Other IDE chipset support' CONFIG_IDE_CHIPSETS
25+ # no isa -> no vlb
26+ dep_bool ' Other IDE chipset support' CONFIG_IDE_CHIPSETS $CONFIG_ISA
27 if [ "$CONFIG_IDE_CHIPSETS" = "y" ]; then
28 comment 'Note: most of these also require special kernel boot parameters'
29 bool ' Generic 4 drives/port support' CONFIG_BLK_DEV_4DRIVES
30diff -urN linux.ide.orig/drivers/ide/hpt366.c linux.ide/drivers/ide/hpt366.c
31--- linux.ide.orig/drivers/ide/hpt366.c Sun Sep 29 15:53:53 2002
32+++ linux.ide/drivers/ide/hpt366.c Sun Sep 29 15:59:45 2002
33@@ -790,7 +790,7 @@
34 dma_func = ide_dma_off_quietly;
35 no_dma_set:
36
37- config_chipset_for_pio(drive);
38+/* config_chipset_for_pio(drive); */
39 }
40 return HWIF(drive)->dmaproc(dma_func, drive);
41 }
42diff -urN linux.ide.orig/drivers/ide/ide-cd.c linux.ide/drivers/ide/ide-cd.c
43--- linux.ide.orig/drivers/ide/ide-cd.c Sun Sep 29 15:53:53 2002
44+++ linux.ide/drivers/ide/ide-cd.c Sun Sep 29 15:54:43 2002
45@@ -2197,6 +2197,8 @@
46 layer. the packet must be complete, as we do not
47 touch it at all. */
48 memset(&pc, 0, sizeof(pc));
49+ if (cgc->sense)
50+ memset(cgc->sense, 0, sizeof(struct request_sense));
51 memcpy(pc.c, cgc->cmd, CDROM_PACKET_SIZE);
52 pc.buffer = cgc->buffer;
53 pc.buflen = cgc->buflen;
54@@ -2541,8 +2543,8 @@
55 devinfo->dev = MKDEV (HWIF(drive)->major, minor);
56 devinfo->ops = &ide_cdrom_dops;
57 devinfo->mask = 0;
58- *(int *)&devinfo->speed = CDROM_STATE_FLAGS (drive)->current_speed;
59- *(int *)&devinfo->capacity = nslots;
60+ devinfo->speed = CDROM_STATE_FLAGS (drive)->current_speed;
61+ devinfo->capacity = nslots;
62 devinfo->handle = (void *) drive;
63 strcpy(devinfo->name, drive->name);
64
65diff -urN linux.ide.orig/drivers/ide/ide-features.c linux.ide/drivers/ide/ide-features.c
66--- linux.ide.orig/drivers/ide/ide-features.c Sun Sep 29 15:53:53 2002
67+++ linux.ide/drivers/ide/ide-features.c Sun Sep 29 15:54:43 2002
68@@ -239,17 +239,24 @@
69 return 0;
70 }
71
72+#ifdef CONFIG_BLK_DEV_IDEDMA
73 /*
74 * All hosts that use the 80c ribbon mus use!
75 */
76 byte eighty_ninty_three (ide_drive_t *drive)
77 {
78+#ifdef CONFIG_BLK_DEV_IDEPCI
79+ if (HWIF(drive)->pci_devid.vid==0x105a)
80+ return(HWIF(drive)->udma_four);
81+#endif
82+ /* PDC202XX: that's because some HDD will return wrong info */
83 return ((byte) ((HWIF(drive)->udma_four) &&
84 #ifndef CONFIG_IDEDMA_IVB
85 (drive->id->hw_config & 0x4000) &&
86 #endif /* CONFIG_IDEDMA_IVB */
87 (drive->id->hw_config & 0x6000)) ? 1 : 0);
88 }
89+#endif // CONFIG_BLK_DEV_IDEDMA
90
91 /*
92 * Similar to ide_wait_stat(), except it never calls ide_error internally.
93@@ -370,6 +377,8 @@
94 EXPORT_SYMBOL(ide_driveid_update);
95 EXPORT_SYMBOL(ide_ata66_check);
96 EXPORT_SYMBOL(set_transfer);
97+#ifdef CONFIG_BLK_DEV_IDEDMA
98 EXPORT_SYMBOL(eighty_ninty_three);
99+#endif // CONFIG_BLK_DEV_IDEDMA
100 EXPORT_SYMBOL(ide_config_drive_speed);
101
102diff -urN linux.ide.orig/drivers/ide/ide-pci.c linux.ide/drivers/ide/ide-pci.c
103--- linux.ide.orig/drivers/ide/ide-pci.c Sun Sep 29 15:53:53 2002
104+++ linux.ide/drivers/ide/ide-pci.c Sun Sep 29 15:54:43 2002
105@@ -408,7 +408,7 @@
106 {DEVID_VIA_IDE, "VIA_IDE", NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 },
107 {DEVID_MR_IDE, "VP_IDE", PCI_VIA82CXXX, ATA66_VIA82CXXX,INIT_VIA82CXXX, DMA_VIA82CXXX, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, ON_BOARD, 0 },
108 {DEVID_VP_IDE, "VP_IDE", PCI_VIA82CXXX, ATA66_VIA82CXXX,INIT_VIA82CXXX, DMA_VIA82CXXX, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, ON_BOARD, 0 },
109-#ifdef CONFIG_PDC202XX_FORCE
110+#ifndef CONFIG_PDC202XX_FORCE
111 {DEVID_PDC20246,"PDC20246", PCI_PDC202XX, NULL, INIT_PDC202XX, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 16 },
112 {DEVID_PDC20262,"PDC20262", PCI_PDC202XX, ATA66_PDC202XX, INIT_PDC202XX, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 48 },
113 {DEVID_PDC20265,"PDC20265", PCI_PDC202XX, ATA66_PDC202XX, INIT_PDC202XX, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 48 },
114@@ -674,25 +674,18 @@
115 */
116 pciirq = dev->irq;
117
118- if (dev->class >> 8 == PCI_CLASS_STORAGE_RAID)
119- {
120- /* By rights we want to ignore these, but the Promise Fastrak
121- people have some strange ideas about proprietary so we have
122- to act otherwise on those. The supertrak however we need
123- to skip */
124- if (IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20265))
125- {
126- printk(KERN_INFO "ide: Found promise 20265 in RAID mode.\n");
127- if(dev->bus->self && dev->bus->self->vendor == PCI_VENDOR_ID_INTEL &&
128- dev->bus->self->device == PCI_DEVICE_ID_INTEL_I960)
129- {
130- printk(KERN_INFO "ide: Skipping Promise PDC20265 attached to I2O RAID controller.\n");
131- return;
132- }
133+#ifdef CONFIG_PDC202XX_FORCE
134+ if (dev->class >> 8 == PCI_CLASS_STORAGE_RAID) {
135+ /*
136+ * By rights we want to ignore Promise FastTrak and SuperTrak
137+ * series here, those use own driver.
138+ */
139+ if (dev->vendor == PCI_VENDOR_ID_PROMISE) {
140+ printk(KERN_INFO "ide: Skipping Promise RAID controller.\n");
141+ return;
142 }
143- /* Its attached to something else, just a random bridge.
144- Suspect a fastrak and fall through */
145 }
146+#endif /* CONFIG_PDC202XX_FORCE */
147 if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
148 printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
149 /*
150@@ -887,9 +880,9 @@
151 dev2 = findev;
152 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
153 pci_read_config_byte(dev2, PCI_INTERRUPT_LINE, &irq2);
154- if (irq != irq2) {
155+ if (irq != irq2) {
156 dev2->irq = dev->irq;
157- pci_write_config_byte(dev2, PCI_INTERRUPT_LINE, irq);
158+ pci_write_config_byte(dev2, PCI_INTERRUPT_LINE, irq);
159 }
160
161 }
162diff -urN linux.ide.orig/drivers/ide/ide-probe.c-1.07 linux.ide/drivers/ide/ide-probe.c-1.07
163--- linux.ide.orig/drivers/ide/ide-probe.c-1.07 Sun Sep 29 15:53:54 2002
164+++ linux.ide/drivers/ide/ide-probe.c-1.07 Sun Sep 29 15:54:43 2002
165@@ -761,6 +761,7 @@
166 gd = kmalloc (sizeof(struct gendisk), GFP_KERNEL);
167 if (!gd)
168 goto err_kmalloc_gd;
169+ memset (gd, 0, sizeof(struct gendisk));
170 gd->sizes = kmalloc (minors * sizeof(int), GFP_KERNEL);
171 if (!gd->sizes)
172 goto err_kmalloc_gd_sizes;
173diff -urN linux.ide.orig/drivers/ide/sis5513.c linux.ide/drivers/ide/sis5513.c
174--- linux.ide.orig/drivers/ide/sis5513.c Sun Sep 29 15:53:54 2002
175+++ linux.ide/drivers/ide/sis5513.c Sun Sep 29 15:54:43 2002
176@@ -172,13 +172,13 @@
177 unsigned char chipset_family;
178 unsigned char flags;
179 } SiSHostChipInfo[] = {
180- { "SiS750", PCI_DEVICE_ID_SI_750, ATA_100, SIS5513_LATENCY },
181- { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100, SIS5513_LATENCY },
182+// { "SiS750", PCI_DEVICE_ID_SI_750, ATA_100, SIS5513_LATENCY },
183+// { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100, SIS5513_LATENCY },
184 { "SiS740", PCI_DEVICE_ID_SI_740, ATA_100, SIS5513_LATENCY },
185 { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100, SIS5513_LATENCY },
186 { "SiS730", PCI_DEVICE_ID_SI_730, ATA_100a, SIS5513_LATENCY },
187- { "SiS650", PCI_DEVICE_ID_SI_650, ATA_100, SIS5513_LATENCY },
188- { "SiS645", PCI_DEVICE_ID_SI_645, ATA_100, SIS5513_LATENCY },
189+// { "SiS650", PCI_DEVICE_ID_SI_650, ATA_100, SIS5513_LATENCY },
190+// { "SiS645", PCI_DEVICE_ID_SI_645, ATA_100, SIS5513_LATENCY },
191 { "SiS635", PCI_DEVICE_ID_SI_635, ATA_100, SIS5513_LATENCY },
192 { "SiS640", PCI_DEVICE_ID_SI_640, ATA_66, SIS5513_LATENCY },
193 { "SiS630", PCI_DEVICE_ID_SI_630, ATA_66, SIS5513_LATENCY },
194diff -urN linux.ide.orig/drivers/ide/via82cxxx.c linux.ide/drivers/ide/via82cxxx.c
195--- linux.ide.orig/drivers/ide/via82cxxx.c Sun Sep 29 15:53:54 2002
196+++ linux.ide/drivers/ide/via82cxxx.c Sun Sep 29 16:58:35 2002
197@@ -1,62 +1,24 @@
198 /*
199- * $Id$
200+ * Version 3.35
201 * Backported to 2.2.21rc3 2002/05/20 by Krzysztof Oledzki
202 *
203- * Copyright (c) 2000-2001 Vojtech Pavlik
204+ * VIA IDE driver for Linux. Supports southbridges:
205+ *
206+ * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b,
207+ * vt82c686, vt82c686a, vt82c686b, vt8231, vt8233, vt8233c, vt8233a,
208+ * vt8235
209+ *
210+ * Copyright (c) 2000-2002 Vojtech Pavlik
211 *
212 * Based on the work of:
213 * Michel Aubry
214 * Jeff Garzik
215 * Andre Hedrick
216 */
217-
218 /*
219- * VIA IDE driver for Linux. Supports
220- *
221- * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b,
222- * vt82c686, vt82c686a, vt82c686b, vt8231, vt8233, vt8233c, vt8233a
223- *
224- * southbridges, which can be found in
225- *
226- * VIA Apollo Master, VP, VP2, VP2/97, VP3, VPX, VPX/97, MVP3, MVP4, P6, Pro,
227- * ProII, ProPlus, Pro133, Pro133+, Pro133A, Pro133A Dual, Pro133T, Pro133Z,
228- * PLE133, PLE133T, Pro266, Pro266T, ProP4X266, PM601, PM133, PN133, PL133T,
229- * PX266, PM266, KX133, KT133, KT133A, KT133E, KLE133, KT266, KX266, KM133,
230- * KM133A, KL133, KN133, KM266
231- * PC-Chips VXPro, VXPro+, VXTwo, TXPro-III, TXPro-AGP, AGPPro, ViaGra, BXToo,
232- * BXTel, BXpert
233- * AMD 640, 640 AGP, 750 IronGate, 760, 760MP
234- * ETEQ 6618, 6628, 6629, 6638
235- * Micron Samurai
236- *
237- * chipsets. Supports
238- *
239- * PIO 0-5, MWDMA 0-2, SWDMA 0-2 and UDMA 0-6
240- *
241- * (this includes UDMA33, 66, 100 and 133) modes. UDMA66 and higher modes are
242- * autoenabled only in case the BIOS has detected a 80 wire cable. To ignore
243- * the BIOS data and assume the cable is present, use 'ide0=ata66' or
244- * 'ide1=ata66' on the kernel command line.
245- */
246-
247-/*
248- * This program is free software; you can redistribute it and/or modify
249- * it under the terms of the GNU General Public License as published by
250- * the Free Software Foundation; either version 2 of the License, or
251- * (at your option) any later version.
252- *
253- * This program is distributed in the hope that it will be useful,
254- * but WITHOUT ANY WARRANTY; without even the implied warranty of
255- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
256- * GNU General Public License for more details.
257- *
258- * You should have received a copy of the GNU General Public License
259- * along with this program; if not, write to the Free Software
260- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
261- *
262- * Should you need to contact me, the author, you can do so either by
263- * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
264- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
265+ * Tis program is free software; you can redistribute it and/or modify it
266+ * under the terms of the GNU General Public License version 2 as published by
267+ * the Free Software Foundation.nclude <linux/kernel.h>
268 */
269
270 #include <linux/config.h>
271@@ -108,20 +70,20 @@
272 } via_isa_bridges[] = {
273 #ifdef FUTURE_BRIDGES
274 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 },
275- { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 },
276 #endif
277+ { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 },
278 { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 },
279 { "vt8233c", PCI_DEVICE_ID_VIA_8233C_0, 0x00, 0x2f, VIA_UDMA_100 },
280 { "vt8233", PCI_DEVICE_ID_VIA_8233_0, 0x00, 0x2f, VIA_UDMA_100 },
281 { "vt8231", PCI_DEVICE_ID_VIA_8231, 0x00, 0x2f, VIA_UDMA_100 },
282- { "vt82c686b", PCI_DEVICE_ID_VIA_82C686, 0x40, 0x4f, VIA_UDMA_100 },
283+// { "vt82c686b", PCI_DEVICE_ID_VIA_82C686, 0x40, 0x4f, VIA_UDMA_100 },
284 { "vt82c686a", PCI_DEVICE_ID_VIA_82C686, 0x10, 0x2f, VIA_UDMA_66 },
285 { "vt82c686", PCI_DEVICE_ID_VIA_82C686, 0x00, 0x0f, VIA_UDMA_33 | VIA_BAD_CLK66 },
286 { "vt82c596b", PCI_DEVICE_ID_VIA_82C596, 0x10, 0x2f, VIA_UDMA_66 },
287 { "vt82c596a", PCI_DEVICE_ID_VIA_82C596, 0x00, 0x0f, VIA_UDMA_33 | VIA_BAD_CLK66 },
288- { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x47, 0x4f, VIA_UDMA_33 | VIA_SET_FIFO },
289- { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x40, 0x46, VIA_UDMA_33 | VIA_SET_FIFO | VIA_BAD_PREQ },
290- { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x30, 0x3f, VIA_UDMA_33 | VIA_SET_FIFO },
291+// { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x47, 0x4f, VIA_UDMA_33 | VIA_SET_FIFO },
292+// { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x40, 0x46, VIA_UDMA_33 | VIA_SET_FIFO | VIA_BAD_PREQ },
293+// { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x30, 0x3f, VIA_UDMA_33 | VIA_SET_FIFO },
294 { "vt82c586a", PCI_DEVICE_ID_VIA_82C586_0, 0x20, 0x2f, VIA_UDMA_33 | VIA_SET_FIFO },
295 { "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO },
296 { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK },
297@@ -166,7 +128,7 @@
298
299 via_print("----------VIA BusMastering IDE Configuration----------------");
300
301- via_print("Driver Version: 3.34");
302+ via_print("Driver Version: 3.35");
303 via_print("South Bridge: VIA %s", via_config->name);
304
305 pci_read_config_byte(isa_dev, PCI_REVISION_ID, &t);
306@@ -417,7 +379,7 @@
307 }
308
309 if (!via_config->id) {
310- printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, contact Vojtech Pavlik <vojtech@ucw.cz>\n");
311+ printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n");
312 return -ENODEV;
313 }
314
315diff -urN linux.ide.orig/include/linux/pci.h linux.ide/include/linux/pci.h
316--- linux.ide.orig/include/linux/pci.h Sun Sep 29 15:53:56 2002
317+++ linux.ide/include/linux/pci.h Sun Sep 29 16:04:18 2002
318@@ -942,6 +942,7 @@
319 #define PCI_DEVICE_ID_VIA_8622 0x3102
320 #define PCI_DEVICE_ID_VIA_8361 0x3112
321 #define PCI_DEVICE_ID_VIA_8233A 0x3147
322+#define PCI_DEVICE_ID_VIA_8235 0x3177
323 #define PCI_DEVICE_ID_VIA_86C100A 0x6100
324 #define PCI_DEVICE_ID_VIA_8231 0x8231
325 #define PCI_DEVICE_ID_VIA_8231_4 0x8235
This page took 0.207153 seconds and 4 git commands to generate.