]>
Commit | Line | Data |
---|---|---|
5e76cbd2 KT |
1 | diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/pci/oldproc.c linux.21p2/drivers/pci/oldproc.c |
2 | --- linux.vanilla/drivers/pci/oldproc.c Sat Dec 29 16:57:22 2001 | |
3 | +++ linux.21p2/drivers/pci/oldproc.c Tue Jan 1 22:40:32 2002 | |
4 | @@ -344,11 +344,11 @@ | |
5 | DEVICE( VIA, VIA_82C585, "VT 82C585 Apollo VP1/VPX"), | |
6 | DEVICE( VIA, VIA_82C586_0, "VT 82C586 Apollo ISA"), | |
7 | DEVICE( VIA, VIA_82C595, "VT 82C595 Apollo VP2"), | |
8 | - DEVICE( VIA, VIA_82C596_0, "VT 82C596 Apollo Pro"), | |
9 | + DEVICE( VIA, VIA_82C596, "VT 82C596 Apollo Pro"), | |
10 | DEVICE( VIA, VIA_82C597_0, "VT 82C597 Apollo VP3"), | |
11 | DEVICE( VIA, VIA_82C598_0, "VT 82C598 Apollo MVP3"), | |
12 | DEVICE( VIA, VIA_82C926, "VT 82C926 Amazon"), | |
13 | - DEVICE( VIA, VIA_82C416, "VT 82C416MV"), | |
14 | + DEVICE( VIA, VIA_82C576_1, "VT 82C416MV"), | |
15 | DEVICE( VIA, VIA_82C595_97, "VT 82C595 Apollo VP2/97"), | |
16 | DEVICE( VIA, VIA_82C586_2, "VT 82C586 Apollo USB"), | |
17 | DEVICE( VIA, VIA_82C586_3, "VT 82C586B Apollo ACPI"), | |
18 | diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/pci/quirks.c linux.21p2/drivers/pci/quirks.c | |
19 | --- linux.vanilla/drivers/pci/quirks.c Sun Mar 25 17:31:36 2001 | |
20 | +++ linux.21p2/drivers/pci/quirks.c Tue Jan 1 22:39:14 2002 | |
21 | @@ -144,6 +144,96 @@ | |
22 | } | |
23 | } | |
24 | ||
25 | +/* | |
26 | + * VIA Apollo KT133 needs PCI latency patch | |
27 | + * Made according to a windows driver based patch by George E. Breese | |
28 | + * see PCI Latency Adjust on http://www.viahardware.com/download/viatweak.shtm | |
29 | + * Also see http://home.tiscalinet.de/au-ja/review-kt133a-1-en.html for | |
30 | + * the info on which Mr Breese based his work. | |
31 | + * | |
32 | + * Updated based on further information from the site and also on | |
33 | + * information provided by VIA | |
34 | + */ | |
35 | + | |
36 | +__initfunc(static void quirk_vialatency(struct pci_dev *dev, int arg)) | |
37 | +{ | |
38 | + struct pci_dev *p; | |
39 | + u8 rev; | |
40 | + u8 busarb; | |
41 | + /* Ok we have a potential problem chipset here. Now see if we have | |
42 | + a buggy southbridge */ | |
43 | + | |
44 | + p=pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, NULL); | |
45 | + if(p!=NULL) | |
46 | + { | |
47 | + pci_read_config_byte(p, PCI_CLASS_REVISION, &rev); | |
48 | + /* 0x40 - 0x4f == 686B, 0x10 - 0x2f == 686A; thanks Dan Hollis */ | |
49 | + /* Check for buggy part revisions */ | |
50 | + if (rev < 0x40 || rev > 0x42) | |
51 | + return; | |
52 | + } | |
53 | + else | |
54 | + { | |
55 | + p = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); | |
56 | + if(p==NULL) /* No problem parts */ | |
57 | + return; | |
58 | + pci_read_config_byte(p, PCI_CLASS_REVISION, &rev); | |
59 | + /* Check for buggy part revisions */ | |
60 | + if (rev < 0x10 || rev > 0x12) | |
61 | + return; | |
62 | + } | |
63 | + | |
64 | + /* | |
65 | + * Ok we have the problem. Now set the PCI master grant to | |
66 | + * occur every master grant. The apparent bug is that under high | |
67 | + * PCI load (quite common in Linux of course) you can get data | |
68 | + * loss when the CPU is held off the bus for 3 bus master requests | |
69 | + * This happens to include the IDE controllers.... | |
70 | + * | |
71 | + * VIA only apply this fix when an SB Live! is present but under | |
72 | + * both Linux and Windows this isnt enough, and we have seen | |
73 | + * corruption without SB Live! but with things like 3 UDMA IDE | |
74 | + * controllers. So we ignore that bit of the VIA recommendation.. | |
75 | + */ | |
76 | + | |
77 | + pci_read_config_byte(dev, 0x76, &busarb); | |
78 | + /* Set bit 4 and bi 5 of byte 76 to 0x01 | |
79 | + "Master priority rotation on every PCI master grant */ | |
80 | + busarb &= ~(1<<5); | |
81 | + busarb |= (1<<4); | |
82 | + pci_write_config_byte(dev, 0x76, busarb); | |
83 | + printk(KERN_INFO "Applying VIA southbridge workaround.\n"); | |
84 | +} | |
85 | + | |
86 | +/* | |
87 | + * Fix some problems with 'movntq' copies on Athlons. We need to ensure the | |
88 | + * non functional memory stuff wasn't enabled by the BIOS (and thus fix | |
89 | + * crashes when we use 100% memory bandwidth) | |
90 | + * | |
91 | + * VIA 8363 chipset: | |
92 | + * VIA 8363,8622,8361 Northbridges: | |
93 | + * - bits 5, 6, 7 at offset 0x55 need to be turned off | |
94 | + * VIA 8367 (KT266x) Northbridges: | |
95 | + * - bits 5, 6, 7 at offset 0x95 need to be turned off | |
96 | + */ | |
97 | + | |
98 | +__initfunc(static void pci_fixup_via_athlon_bug(struct pci_dev *d, int arg)) | |
99 | +{ | |
100 | + u8 v; | |
101 | + int where = 0x55; | |
102 | + | |
103 | + if (d->device == PCI_DEVICE_ID_VIA_8367_0) { | |
104 | + where = 0x95; /* the memory write queue timer register is | |
105 | + different for the kt266x's: 0x95 not 0x55 */ | |
106 | + } | |
107 | + pci_read_config_byte(d, where, &v); | |
108 | + if (v & 0xe0) { | |
109 | + printk("Trying to stomp on Athlon bug...\n"); | |
110 | + v &= 0x1f; /* clear bits 5, 6, 7 */ | |
111 | + pci_write_config_byte(d, where, v); | |
112 | + } | |
113 | +} | |
114 | + | |
115 | ||
116 | typedef void (*quirk_handler)(struct pci_dev *, int); | |
117 | ||
118 | @@ -162,6 +252,7 @@ | |
119 | #endif | |
120 | { quirk_passive_release,"Passive release enable" }, | |
121 | { quirk_isa_dma_hangs, "Work around ISA DMA hangs" }, | |
122 | + { pci_fixup_via_athlon_bug, "Athlon/VIA fixup" }, | |
123 | }; | |
124 | ||
125 | ||
126 | @@ -201,7 +292,14 @@ | |
127 | * This is the 82C586 variants. | |
128 | */ | |
129 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_isa_dma_hangs, 0x00 }, | |
130 | - { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_0, quirk_isa_dma_hangs, 0x00 }, | |
131 | + { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, quirk_isa_dma_hangs, 0x00 }, | |
132 | + { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_athlon_bug, 0x00 }, | |
133 | + { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_athlon_bug, 0x00 }, | |
134 | + { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_athlon_bug, 0x00 }, | |
135 | + { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_athlon_bug, 0x00 }, | |
136 | + { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency, 0x00 }, | |
137 | + { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8371_1, quirk_vialatency, 0x00 }, | |
138 | + { PCI_VENDOR_ID_VIA, 0x3112 /* Not out yet ? */, quirk_vialatency, 0x00 }, | |
139 | }; | |
140 | ||
141 | __initfunc(void pci_quirks_init(void)) | |
35ee715e KT |
142 | diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/pci.h linux.21p2/include/linux/pci.h |
143 | --- linux.vanilla/include/linux/pci.h Sat Dec 29 16:57:24 2001 | |
144 | +++ linux.21p2/include/linux/pci.h Tue Jan 1 22:42:06 2002 | |
145 | @@ -830,7 +830,9 @@ | |
146 | #define PCI_DEVICE_ID_TTI_HPT343 0x0003 | |
147 | ||
148 | #define PCI_VENDOR_ID_VIA 0x1106 | |
149 | -#define PCI_DEVICE_ID_VIA_8371_0 0x0391 | |
150 | +#define PCI_DEVICE_ID_VIA_8363_0 0x0305 | |
151 | +#define PCI_DEVICE_ID_VIA_8371_0 0x0391 | |
152 | +#define PCI_DEVICE_ID_VIA_8501_0 0x0501 | |
153 | #define PCI_DEVICE_ID_VIA_82C505 0x0505 | |
154 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | |
155 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 | |
156 | @@ -838,18 +840,47 @@ | |
157 | #define PCI_DEVICE_ID_VIA_82C585 0x0585 | |
158 | #define PCI_DEVICE_ID_VIA_82C586_0 0x0586 | |
159 | #define PCI_DEVICE_ID_VIA_82C595 0x0595 | |
160 | -#define PCI_DEVICE_ID_VIA_82C596_0 0x0596 | |
161 | +#define PCI_DEVICE_ID_VIA_82C596 0x0596 | |
162 | #define PCI_DEVICE_ID_VIA_82C597_0 0x0597 | |
163 | -#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 | |
164 | +#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 | |
165 | +#define PCI_DEVICE_ID_VIA_8601_0 0x0601 | |
166 | +#define PCI_DEVICE_ID_VIA_8605_0 0x0605 | |
167 | +#define PCI_DEVICE_ID_VIA_82C680 0x0680 | |
168 | +#define PCI_DEVICE_ID_VIA_82C686 0x0686 | |
169 | +#define PCI_DEVICE_ID_VIA_82C691 0x0691 | |
170 | +#define PCI_DEVICE_ID_VIA_82C693 0x0693 | |
171 | +#define PCI_DEVICE_ID_VIA_82C693_1 0x0698 | |
172 | #define PCI_DEVICE_ID_VIA_82C926 0x0926 | |
173 | -#define PCI_DEVICE_ID_VIA_82C416 0x1571 | |
174 | +#define PCI_DEVICE_ID_VIA_82C576_1 0x1571 | |
175 | #define PCI_DEVICE_ID_VIA_82C595_97 0x1595 | |
176 | #define PCI_DEVICE_ID_VIA_82C586_2 0x3038 | |
177 | #define PCI_DEVICE_ID_VIA_82C586_3 0x3040 | |
178 | +#define PCI_DEVICE_ID_VIA_6305 0x3044 | |
179 | +#define PCI_DEVICE_ID_VIA_82C596_3 0x3050 | |
180 | +#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051 | |
181 | +#define PCI_DEVICE_ID_VIA_82C686_4 0x3057 | |
182 | #define PCI_DEVICE_ID_VIA_82C686_5 0x3058 | |
183 | +#define PCI_DEVICE_ID_VIA_8233_5 0x3059 | |
184 | +#define PCI_DEVICE_ID_VIA_8233_7 0x3065 | |
185 | +#define PCI_DEVICE_ID_VIA_82C686_6 0x3068 | |
186 | +#define PCI_DEVICE_ID_VIA_8233_0 0x3074 | |
187 | +#define PCI_DEVICE_ID_VIA_8233C_0 0x3109 | |
188 | +#define PCI_DEVICE_ID_VIA_8633_0 0x3091 | |
189 | +#define PCI_DEVICE_ID_VIA_8367_0 0x3099 | |
190 | +#define PCI_DEVICE_ID_VIA_8622 0x3102 | |
191 | +#define PCI_DEVICE_ID_VIA_8361 0x3112 | |
192 | #define PCI_DEVICE_ID_VIA_86C100A 0x6100 | |
193 | +#define PCI_DEVICE_ID_VIA_8231 0x8231 | |
194 | +#define PCI_DEVICE_ID_VIA_8231_4 0x8235 | |
195 | +#define PCI_DEVICE_ID_VIA_8365_1 0x8305 | |
196 | +#define PCI_DEVICE_ID_VIA_8371_1 0x8391 | |
197 | +#define PCI_DEVICE_ID_VIA_8501_1 0x8501 | |
198 | #define PCI_DEVICE_ID_VIA_82C597_1 0x8597 | |
199 | -#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 | |
200 | +#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 | |
201 | +#define PCI_DEVICE_ID_VIA_8601_1 0x8601 | |
202 | +#define PCI_DEVICE_ID_VIA_8505_1 0X8605 | |
203 | +#define PCI_DEVICE_ID_VIA_8633_1 0xB091 | |
204 | +#define PCI_DEVICE_ID_VIA_8367_1 0xB099 | |
205 | ||
206 | #define PCI_VENDOR_ID_SMC2 0x1113 | |
207 | #define PCI_DEVICE_ID_SMC2_1211TX 0x1211 | |
208 | @@ -1070,6 +1101,7 @@ | |
209 | #define PCI_DEVICE_ID_AVM_A1 0x0a00 | |
210 | #define PCI_DEVICE_ID_AVM_B1 0x0700 | |
211 | #define PCI_DEVICE_ID_AVM_C4 0x0800 | |
212 | +#define PCI_DEVICE_ID_AVM_C2 0x1100 | |
213 | #define PCI_DEVICE_ID_AVM_T1 0x1200 | |
214 | ||
215 | #define PCI_VENDOR_ID_DIPIX 0x1246 |