diff options
154 files changed, 1601 insertions, 841 deletions
diff --git a/Documentation/sound/alsa/Audiophile-Usb.txt b/Documentation/sound/alsa/Audiophile-Usb.txt index 4692c8e77dc1..b535c2a198f8 100644 --- a/Documentation/sound/alsa/Audiophile-Usb.txt +++ b/Documentation/sound/alsa/Audiophile-Usb.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | Guide to using M-Audio Audiophile USB with ALSA and Jack v1.2 | 1 | Guide to using M-Audio Audiophile USB with ALSA and Jack v1.3 |
2 | ======================================================== | 2 | ======================================================== |
3 | 3 | ||
4 | Thibault Le Meur <Thibault.LeMeur@supelec.fr> | 4 | Thibault Le Meur <Thibault.LeMeur@supelec.fr> |
@@ -22,16 +22,16 @@ The device has 4 audio interfaces, and 2 MIDI ports: | |||
22 | * Midi In (Mi) | 22 | * Midi In (Mi) |
23 | * Midi Out (Mo) | 23 | * Midi Out (Mo) |
24 | 24 | ||
25 | The internal DAC/ADC has the following caracteristics: | 25 | The internal DAC/ADC has the following characteristics: |
26 | * sample depth of 16 or 24 bits | 26 | * sample depth of 16 or 24 bits |
27 | * sample rate from 8kHz to 96kHz | 27 | * sample rate from 8kHz to 96kHz |
28 | * Two ports can't use different sample depths at the same time.Moreover, the | 28 | * Two ports can't use different sample depths at the same time. Moreover, the |
29 | Audiophile USB documentation gives the following Warning: "Please exit any | 29 | Audiophile USB documentation gives the following Warning: "Please exit any |
30 | audio application running before switching between bit depths" | 30 | audio application running before switching between bit depths" |
31 | 31 | ||
32 | Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be | 32 | Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be |
33 | activated at the same time depending on the audio mode selected: | 33 | activated at the same time depending on the audio mode selected: |
34 | * 16-bit/48kHz ==> 4 channels in/ 4 channels out | 34 | * 16-bit/48kHz ==> 4 channels in/4 channels out |
35 | - Ai+Ao+Di+Do | 35 | - Ai+Ao+Di+Do |
36 | * 24-bit/48kHz ==> 4 channels in/2 channels out, | 36 | * 24-bit/48kHz ==> 4 channels in/2 channels out, |
37 | or 2 channels in/4 channels out | 37 | or 2 channels in/4 channels out |
@@ -41,8 +41,8 @@ activated at the same time depending on the audio mode selected: | |||
41 | 41 | ||
42 | Important facts about the Digital interface: | 42 | Important facts about the Digital interface: |
43 | -------------------------------------------- | 43 | -------------------------------------------- |
44 | * The Do port additionnaly supports surround-encoded AC-3 and DTS passthrough, | 44 | * The Do port additionally supports surround-encoded AC-3 and DTS passthrough, |
45 | though I haven't tested it under linux | 45 | though I haven't tested it under Linux |
46 | - Note that in this setup only the Do interface can be enabled | 46 | - Note that in this setup only the Do interface can be enabled |
47 | * Apart from recording an audio digital stream, enabling the Di port is a way | 47 | * Apart from recording an audio digital stream, enabling the Di port is a way |
48 | to synchronize the device to an external sample clock | 48 | to synchronize the device to an external sample clock |
@@ -60,24 +60,23 @@ synchronization error (for instance sound played at an odd sample rate) | |||
60 | The Audiophile USB MIDI ports will be automatically supported once the | 60 | The Audiophile USB MIDI ports will be automatically supported once the |
61 | following modules have been loaded: | 61 | following modules have been loaded: |
62 | * snd-usb-audio | 62 | * snd-usb-audio |
63 | * snd-seq | ||
64 | * snd-seq-midi | 63 | * snd-seq-midi |
65 | 64 | ||
66 | No additionnal setting is required. | 65 | No additional setting is required. |
67 | 66 | ||
68 | 2.2 - Audio ports | 67 | 2.2 - Audio ports |
69 | ----------------- | 68 | ----------------- |
70 | 69 | ||
71 | Audio functions of the Audiophile USB device are handled by the snd-usb-audio | 70 | Audio functions of the Audiophile USB device are handled by the snd-usb-audio |
72 | module. This module can work in a default mode (without any device-specific | 71 | module. This module can work in a default mode (without any device-specific |
73 | parameter), or in an advanced mode with the device-specific parameter called | 72 | parameter), or in an "advanced" mode with the device-specific parameter called |
74 | "device_setup". | 73 | "device_setup". |
75 | 74 | ||
76 | 2.2.1 - Default Alsa driver mode | 75 | 2.2.1 - Default Alsa driver mode |
77 | 76 | ||
78 | The default behaviour of the snd-usb-audio driver is to parse the device | 77 | The default behavior of the snd-usb-audio driver is to parse the device |
79 | capabilities at startup and enable all functions inside the device (including | 78 | capabilities at startup and enable all functions inside the device (including |
80 | all ports at any sample rates and any sample depths supported). This approach | 79 | all ports at any supported sample rates and sample depths). This approach |
81 | has the advantage to let the driver easily switch from sample rates/depths | 80 | has the advantage to let the driver easily switch from sample rates/depths |
82 | automatically according to the need of the application claiming the device. | 81 | automatically according to the need of the application claiming the device. |
83 | 82 | ||
@@ -114,9 +113,9 @@ gain). | |||
114 | For people having this problem, the snd-usb-audio module has a new module | 113 | For people having this problem, the snd-usb-audio module has a new module |
115 | parameter called "device_setup". | 114 | parameter called "device_setup". |
116 | 115 | ||
117 | 2.2.2.1 - Initializing the working mode of the Audiohile USB | 116 | 2.2.2.1 - Initializing the working mode of the Audiophile USB |
118 | 117 | ||
119 | As far as the Audiohile USB device is concerned, this value let the user | 118 | As far as the Audiophile USB device is concerned, this value let the user |
120 | specify: | 119 | specify: |
121 | * the sample depth | 120 | * the sample depth |
122 | * the sample rate | 121 | * the sample rate |
@@ -174,20 +173,20 @@ The parameter can be given: | |||
174 | 173 | ||
175 | IMPORTANT NOTE WHEN SWITCHING CONFIGURATION: | 174 | IMPORTANT NOTE WHEN SWITCHING CONFIGURATION: |
176 | ------------------------------------------- | 175 | ------------------------------------------- |
177 | * You may need to _first_ intialize the module with the correct device_setup | 176 | * You may need to _first_ initialize the module with the correct device_setup |
178 | parameter and _only_after_ turn on the Audiophile USB device | 177 | parameter and _only_after_ turn on the Audiophile USB device |
179 | * This is especially true when switching the sample depth: | 178 | * This is especially true when switching the sample depth: |
180 | - first trun off the device | 179 | - first turn off the device |
181 | - de-register the snd-usb-audio module | 180 | - de-register the snd-usb-audio module (modprobe -r) |
182 | - change the device_setup parameter (by either manually reprobing the module | 181 | - change the device_setup parameter by changing the device_setup |
183 | or changing modprobe.conf) | 182 | option in /etc/modprobe.conf |
184 | - turn on the device | 183 | - turn on the device |
185 | 184 | ||
186 | 2.2.2.3 - Audiophile USB's device_setup structure | 185 | 2.2.2.3 - Audiophile USB's device_setup structure |
187 | 186 | ||
188 | If you want to understand the device_setup magic numbers for the Audiophile | 187 | If you want to understand the device_setup magic numbers for the Audiophile |
189 | USB, you need some very basic understanding of binary computation. However, | 188 | USB, you need some very basic understanding of binary computation. However, |
190 | this is not required to use the parameter and you may skip thi section. | 189 | this is not required to use the parameter and you may skip this section. |
191 | 190 | ||
192 | The device_setup is one byte long and its structure is the following: | 191 | The device_setup is one byte long and its structure is the following: |
193 | 192 | ||
@@ -231,11 +230,11 @@ Caution: | |||
231 | 230 | ||
232 | 2.2.3 - USB implementation details for this device | 231 | 2.2.3 - USB implementation details for this device |
233 | 232 | ||
234 | You may safely skip this section if you're not interrested in driver | 233 | You may safely skip this section if you're not interested in driver |
235 | development. | 234 | development. |
236 | 235 | ||
237 | This section describes some internals aspect of the device and summarize the | 236 | This section describes some internal aspects of the device and summarize the |
238 | data I got by usb-snooping the windows and linux drivers. | 237 | data I got by usb-snooping the windows and Linux drivers. |
239 | 238 | ||
240 | The M-Audio Audiophile USB has 7 USB Interfaces: | 239 | The M-Audio Audiophile USB has 7 USB Interfaces: |
241 | a "USB interface": | 240 | a "USB interface": |
@@ -277,9 +276,9 @@ Here is a short description of the AltSettings capabilities: | |||
277 | - 16-bit depth, 8-48kHz sample mode | 276 | - 16-bit depth, 8-48kHz sample mode |
278 | - Synch playback (Do), audio format type III IEC1937_AC-3 | 277 | - Synch playback (Do), audio format type III IEC1937_AC-3 |
279 | 278 | ||
280 | In order to ensure a correct intialization of the device, the driver | 279 | In order to ensure a correct initialization of the device, the driver |
281 | _must_know_ how the device will be used: | 280 | _must_know_ how the device will be used: |
282 | * if DTS is choosen, only Interface 2 with AltSet nb.6 must be | 281 | * if DTS is chosen, only Interface 2 with AltSet nb.6 must be |
283 | registered | 282 | registered |
284 | * if 96KHz only AltSets nb.1 of each interface must be selected | 283 | * if 96KHz only AltSets nb.1 of each interface must be selected |
285 | * if samples are using 24bits/48KHz then AltSet 2 must me used if | 284 | * if samples are using 24bits/48KHz then AltSet 2 must me used if |
@@ -290,7 +289,7 @@ _must_know_ how the device will be used: | |||
290 | is not connected | 289 | is not connected |
291 | 290 | ||
292 | When device_setup is given as a parameter to the snd-usb-audio module, the | 291 | When device_setup is given as a parameter to the snd-usb-audio module, the |
293 | parse_audio_enpoint function uses a quirk called | 292 | parse_audio_endpoints function uses a quirk called |
294 | "audiophile_skip_setting_quirk" in order to prevent AltSettings not | 293 | "audiophile_skip_setting_quirk" in order to prevent AltSettings not |
295 | corresponding to device_setup from being registered in the driver. | 294 | corresponding to device_setup from being registered in the driver. |
296 | 295 | ||
@@ -317,9 +316,8 @@ However you may see the following warning message: | |||
317 | using the "default" ALSA device. This is less efficient than it could be. | 316 | using the "default" ALSA device. This is less efficient than it could be. |
318 | Consider using a hardware device instead rather than using the plug layer." | 317 | Consider using a hardware device instead rather than using the plug layer." |
319 | 318 | ||
320 | |||
321 | 3.2 - Patching alsa to use direct pcm device | 319 | 3.2 - Patching alsa to use direct pcm device |
322 | ------------------------------------------- | 320 | -------------------------------------------- |
323 | A patch for Jack by Andreas Steinmetz adds support for Big Endian devices. | 321 | A patch for Jack by Andreas Steinmetz adds support for Big Endian devices. |
324 | However it has not been included in the CVS tree. | 322 | However it has not been included in the CVS tree. |
325 | 323 | ||
@@ -331,3 +329,32 @@ After having applied the patch you can run jackd with the following command | |||
331 | line: | 329 | line: |
332 | % jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 | 330 | % jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 |
333 | 331 | ||
332 | 3.2 - Getting 2 input and/or output interfaces in Jack | ||
333 | ------------------------------------------------------ | ||
334 | |||
335 | As you can see, starting the Jack server this way will only enable 1 stereo | ||
336 | input (Di or Ai) and 1 stereo output (Ao or Do). | ||
337 | |||
338 | This is due to the following restrictions: | ||
339 | * Jack can only open one capture device and one playback device at a time | ||
340 | * The Audiophile USB is seen as 2 (or three) Alsa devices: hw:1,0, hw:1,1 | ||
341 | (and optionally hw:1,2) | ||
342 | If you want to get Ai+Di and/or Ao+Do support with Jack, you would need to | ||
343 | combine the Alsa devices into one logical "complex" device. | ||
344 | |||
345 | If you want to give it a try, I recommend reading the information from | ||
346 | this page: http://www.sound-man.co.uk/linuxaudio/ice1712multi.html | ||
347 | It is related to another device (ice1712) but can be adapted to suit | ||
348 | the Audiophile USB. | ||
349 | |||
350 | Enabling multiple Audiophile USB interfaces for Jackd will certainly require: | ||
351 | * patching Jack with the previously mentioned "Big Endian" patch | ||
352 | * patching Jackd with the MMAP_COMPLEX patch (see the ice1712 page) | ||
353 | * patching the alsa-lib/src/pcm/pcm_multi.c file (see the ice1712 page) | ||
354 | * define a multi device (combination of hw:1,0 and hw:1,1) in your .asoundrc | ||
355 | file | ||
356 | * start jackd with this device | ||
357 | |||
358 | I had no success in testing this for now, but this may be due to my OS | ||
359 | configuration. If you have any success with this kind of setup, please | ||
360 | drop me an email. | ||
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 68eeebc17ff4..1faf76383bab 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -1172,7 +1172,7 @@ | |||
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | /* PCI IDs */ | 1174 | /* PCI IDs */ |
1175 | static struct pci_device_id snd_mychip_ids[] = { | 1175 | static struct pci_device_id snd_mychip_ids[] __devinitdata = { |
1176 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, | 1176 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, |
1177 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 1177 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
1178 | .... | 1178 | .... |
@@ -1565,7 +1565,7 @@ | |||
1565 | <informalexample> | 1565 | <informalexample> |
1566 | <programlisting> | 1566 | <programlisting> |
1567 | <![CDATA[ | 1567 | <![CDATA[ |
1568 | static struct pci_device_id snd_mychip_ids[] = { | 1568 | static struct pci_device_id snd_mychip_ids[] __devinitdata = { |
1569 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, | 1569 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, |
1570 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 1570 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
1571 | .... | 1571 | .... |
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 049a25583793..4c785a67d585 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -215,7 +215,7 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) | |||
215 | { | 215 | { |
216 | struct acpi_table_madt *madt = NULL; | 216 | struct acpi_table_madt *madt = NULL; |
217 | 217 | ||
218 | if (!phys_addr || !size || !cpu_has_apic) | 218 | if (!phys_addr || !size) |
219 | return -EINVAL; | 219 | return -EINVAL; |
220 | 220 | ||
221 | madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); | 221 | madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); |
@@ -1151,6 +1151,9 @@ int __init acpi_boot_init(void) | |||
1151 | 1151 | ||
1152 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); | 1152 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); |
1153 | 1153 | ||
1154 | if (!cpu_has_apic) | ||
1155 | return -ENODEV; | ||
1156 | |||
1154 | /* | 1157 | /* |
1155 | * set sci_int and PM timer address | 1158 | * set sci_int and PM timer address |
1156 | */ | 1159 | */ |
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 254cee9f0b7b..013b85df18c6 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -757,10 +757,6 @@ static int __init apic_set_verbosity(char *str) | |||
757 | apic_verbosity = APIC_DEBUG; | 757 | apic_verbosity = APIC_DEBUG; |
758 | else if (strcmp("verbose", str) == 0) | 758 | else if (strcmp("verbose", str) == 0) |
759 | apic_verbosity = APIC_VERBOSE; | 759 | apic_verbosity = APIC_VERBOSE; |
760 | else | ||
761 | printk(KERN_WARNING "APIC Verbosity level %s not recognised" | ||
762 | " use apic=verbose or apic=debug\n", str); | ||
763 | |||
764 | return 1; | 760 | return 1; |
765 | } | 761 | } |
766 | 762 | ||
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 80cb3b2d0997..d77e89ac0d54 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -970,8 +970,10 @@ efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg) | |||
970 | * not-overlapping, which is the case | 970 | * not-overlapping, which is the case |
971 | */ | 971 | */ |
972 | int __init | 972 | int __init |
973 | e820_all_mapped(unsigned long start, unsigned long end, unsigned type) | 973 | e820_all_mapped(unsigned long s, unsigned long e, unsigned type) |
974 | { | 974 | { |
975 | u64 start = s; | ||
976 | u64 end = e; | ||
975 | int i; | 977 | int i; |
976 | for (i = 0; i < e820.nr_map; i++) { | 978 | for (i = 0; i < e820.nr_map; i++) { |
977 | struct e820entry *ei = &e820.map[i]; | 979 | struct e820entry *ei = &e820.map[i]; |
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index 5e41ee29c8cf..f1187ddb0d0f 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -279,7 +279,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
279 | { | 279 | { |
280 | struct cpufreq_freqs *freq = data; | 280 | struct cpufreq_freqs *freq = data; |
281 | 281 | ||
282 | if (val != CPUFREQ_RESUMECHANGE) | 282 | if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE) |
283 | write_seqlock_irq(&xtime_lock); | 283 | write_seqlock_irq(&xtime_lock); |
284 | if (!ref_freq) { | 284 | if (!ref_freq) { |
285 | if (!freq->old){ | 285 | if (!freq->old){ |
@@ -312,7 +312,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
312 | } | 312 | } |
313 | 313 | ||
314 | end: | 314 | end: |
315 | if (val != CPUFREQ_RESUMECHANGE) | 315 | if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE) |
316 | write_sequnlock_irq(&xtime_lock); | 316 | write_sequnlock_irq(&xtime_lock); |
317 | 317 | ||
318 | return 0; | 318 | return 0; |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index ed737cacf92d..5bc2585c8036 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -322,13 +322,31 @@ static void register_nodes(void) | |||
322 | } | 322 | } |
323 | } | 323 | } |
324 | } | 324 | } |
325 | |||
326 | int sysfs_add_device_to_node(struct sys_device *dev, int nid) | ||
327 | { | ||
328 | struct node *node = &node_devices[nid]; | ||
329 | return sysfs_create_link(&node->sysdev.kobj, &dev->kobj, | ||
330 | kobject_name(&dev->kobj)); | ||
331 | } | ||
332 | |||
333 | void sysfs_remove_device_from_node(struct sys_device *dev, int nid) | ||
334 | { | ||
335 | struct node *node = &node_devices[nid]; | ||
336 | sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj)); | ||
337 | } | ||
338 | |||
325 | #else | 339 | #else |
326 | static void register_nodes(void) | 340 | static void register_nodes(void) |
327 | { | 341 | { |
328 | return; | 342 | return; |
329 | } | 343 | } |
344 | |||
330 | #endif | 345 | #endif |
331 | 346 | ||
347 | EXPORT_SYMBOL_GPL(sysfs_add_device_to_node); | ||
348 | EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node); | ||
349 | |||
332 | /* Only valid if CPU is present. */ | 350 | /* Only valid if CPU is present. */ |
333 | static ssize_t show_physical_id(struct sys_device *dev, char *buf) | 351 | static ssize_t show_physical_id(struct sys_device *dev, char *buf) |
334 | { | 352 | { |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 0a335f34974c..092355f37399 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -194,7 +194,7 @@ static int *of_get_associativity(struct device_node *dev) | |||
194 | /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa | 194 | /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa |
195 | * info is found. | 195 | * info is found. |
196 | */ | 196 | */ |
197 | static int of_node_to_nid(struct device_node *device) | 197 | static int of_node_to_nid_single(struct device_node *device) |
198 | { | 198 | { |
199 | int nid = -1; | 199 | int nid = -1; |
200 | unsigned int *tmp; | 200 | unsigned int *tmp; |
@@ -216,6 +216,28 @@ out: | |||
216 | return nid; | 216 | return nid; |
217 | } | 217 | } |
218 | 218 | ||
219 | /* Walk the device tree upwards, looking for an associativity id */ | ||
220 | int of_node_to_nid(struct device_node *device) | ||
221 | { | ||
222 | struct device_node *tmp; | ||
223 | int nid = -1; | ||
224 | |||
225 | of_node_get(device); | ||
226 | while (device) { | ||
227 | nid = of_node_to_nid_single(device); | ||
228 | if (nid != -1) | ||
229 | break; | ||
230 | |||
231 | tmp = device; | ||
232 | device = of_get_parent(tmp); | ||
233 | of_node_put(tmp); | ||
234 | } | ||
235 | of_node_put(device); | ||
236 | |||
237 | return nid; | ||
238 | } | ||
239 | EXPORT_SYMBOL_GPL(of_node_to_nid); | ||
240 | |||
219 | /* | 241 | /* |
220 | * In theory, the "ibm,associativity" property may contain multiple | 242 | * In theory, the "ibm,associativity" property may contain multiple |
221 | * associativity lists because a resource may be multiply connected | 243 | * associativity lists because a resource may be multiply connected |
@@ -300,7 +322,7 @@ static int __cpuinit numa_setup_cpu(unsigned long lcpu) | |||
300 | goto out; | 322 | goto out; |
301 | } | 323 | } |
302 | 324 | ||
303 | nid = of_node_to_nid(cpu); | 325 | nid = of_node_to_nid_single(cpu); |
304 | 326 | ||
305 | if (nid < 0 || !node_online(nid)) | 327 | if (nid < 0 || !node_online(nid)) |
306 | nid = any_online_node(NODE_MASK_ALL); | 328 | nid = any_online_node(NODE_MASK_ALL); |
@@ -393,7 +415,7 @@ static int __init parse_numa_properties(void) | |||
393 | 415 | ||
394 | cpu = find_cpu_node(i); | 416 | cpu = find_cpu_node(i); |
395 | BUG_ON(!cpu); | 417 | BUG_ON(!cpu); |
396 | nid = of_node_to_nid(cpu); | 418 | nid = of_node_to_nid_single(cpu); |
397 | of_node_put(cpu); | 419 | of_node_put(cpu); |
398 | 420 | ||
399 | /* | 421 | /* |
@@ -437,7 +459,7 @@ new_range: | |||
437 | * have associativity properties. If none, then | 459 | * have associativity properties. If none, then |
438 | * everything goes to default_nid. | 460 | * everything goes to default_nid. |
439 | */ | 461 | */ |
440 | nid = of_node_to_nid(memory); | 462 | nid = of_node_to_nid_single(memory); |
441 | if (nid < 0) | 463 | if (nid < 0) |
442 | nid = default_nid; | 464 | nid = default_nid; |
443 | node_set_online(nid); | 465 | node_set_online(nid); |
@@ -776,7 +798,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr) | |||
776 | ha_new_range: | 798 | ha_new_range: |
777 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); | 799 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); |
778 | size = read_n_cells(n_mem_size_cells, &memcell_buf); | 800 | size = read_n_cells(n_mem_size_cells, &memcell_buf); |
779 | nid = of_node_to_nid(memory); | 801 | nid = of_node_to_nid_single(memory); |
780 | 802 | ||
781 | /* Domains not present at boot default to 0 */ | 803 | /* Domains not present at boot default to 0 */ |
782 | if (nid < 0 || !node_online(nid)) | 804 | if (nid < 0 || !node_online(nid)) |
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index c2a3db8edb0c..6a02d51086c8 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig | |||
@@ -12,7 +12,8 @@ config SPU_FS | |||
12 | 12 | ||
13 | config SPUFS_MMAP | 13 | config SPUFS_MMAP |
14 | bool | 14 | bool |
15 | depends on SPU_FS && SPARSEMEM && !PPC_64K_PAGES | 15 | depends on SPU_FS && SPARSEMEM |
16 | select MEMORY_HOTPLUG | ||
16 | default y | 17 | default y |
17 | 18 | ||
18 | endmenu | 19 | endmenu |
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index dac5d0365fde..6574b22b3cf3 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
30 | #include <linux/root_dev.h> | 30 | #include <linux/root_dev.h> |
31 | #include <linux/console.h> | 31 | #include <linux/console.h> |
32 | #include <linux/mutex.h> | ||
33 | #include <linux/memory_hotplug.h> | ||
32 | 34 | ||
33 | #include <asm/mmu.h> | 35 | #include <asm/mmu.h> |
34 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
@@ -46,6 +48,7 @@ | |||
46 | #include <asm/cputable.h> | 48 | #include <asm/cputable.h> |
47 | #include <asm/ppc-pci.h> | 49 | #include <asm/ppc-pci.h> |
48 | #include <asm/irq.h> | 50 | #include <asm/irq.h> |
51 | #include <asm/spu.h> | ||
49 | 52 | ||
50 | #include "interrupt.h" | 53 | #include "interrupt.h" |
51 | #include "iommu.h" | 54 | #include "iommu.h" |
@@ -69,77 +72,6 @@ static void cell_show_cpuinfo(struct seq_file *m) | |||
69 | of_node_put(root); | 72 | of_node_put(root); |
70 | } | 73 | } |
71 | 74 | ||
72 | #ifdef CONFIG_SPARSEMEM | ||
73 | static int __init find_spu_node_id(struct device_node *spe) | ||
74 | { | ||
75 | unsigned int *id; | ||
76 | #ifdef CONFIG_NUMA | ||
77 | struct device_node *cpu; | ||
78 | cpu = spe->parent->parent; | ||
79 | id = (unsigned int *)get_property(cpu, "node-id", NULL); | ||
80 | #else | ||
81 | id = NULL; | ||
82 | #endif | ||
83 | return id ? *id : 0; | ||
84 | } | ||
85 | |||
86 | static void __init cell_spuprop_present(struct device_node *spe, | ||
87 | const char *prop, int early) | ||
88 | { | ||
89 | struct address_prop { | ||
90 | unsigned long address; | ||
91 | unsigned int len; | ||
92 | } __attribute__((packed)) *p; | ||
93 | int proplen; | ||
94 | |||
95 | unsigned long start_pfn, end_pfn, pfn; | ||
96 | int node_id; | ||
97 | |||
98 | p = (void*)get_property(spe, prop, &proplen); | ||
99 | WARN_ON(proplen != sizeof (*p)); | ||
100 | |||
101 | node_id = find_spu_node_id(spe); | ||
102 | |||
103 | start_pfn = p->address >> PAGE_SHIFT; | ||
104 | end_pfn = (p->address + p->len + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
105 | |||
106 | /* We need to call memory_present *before* the call to sparse_init, | ||
107 | but we can initialize the page structs only *after* that call. | ||
108 | Thus, we're being called twice. */ | ||
109 | if (early) | ||
110 | memory_present(node_id, start_pfn, end_pfn); | ||
111 | else { | ||
112 | /* As the pages backing SPU LS and I/O are outside the range | ||
113 | of regular memory, their page structs were not initialized | ||
114 | by free_area_init. Do it here instead. */ | ||
115 | for (pfn = start_pfn; pfn < end_pfn; pfn++) { | ||
116 | struct page *page = pfn_to_page(pfn); | ||
117 | set_page_links(page, ZONE_DMA, node_id, pfn); | ||
118 | init_page_count(page); | ||
119 | reset_page_mapcount(page); | ||
120 | SetPageReserved(page); | ||
121 | INIT_LIST_HEAD(&page->lru); | ||
122 | } | ||
123 | } | ||
124 | } | ||
125 | |||
126 | static void __init cell_spumem_init(int early) | ||
127 | { | ||
128 | struct device_node *node; | ||
129 | for (node = of_find_node_by_type(NULL, "spe"); | ||
130 | node; node = of_find_node_by_type(node, "spe")) { | ||
131 | cell_spuprop_present(node, "local-store", early); | ||
132 | cell_spuprop_present(node, "problem", early); | ||
133 | cell_spuprop_present(node, "priv1", early); | ||
134 | cell_spuprop_present(node, "priv2", early); | ||
135 | } | ||
136 | } | ||
137 | #else | ||
138 | static void __init cell_spumem_init(int early) | ||
139 | { | ||
140 | } | ||
141 | #endif | ||
142 | |||
143 | static void cell_progress(char *s, unsigned short hex) | 75 | static void cell_progress(char *s, unsigned short hex) |
144 | { | 76 | { |
145 | printk("*** %04x : %s\n", hex, s ? s : ""); | 77 | printk("*** %04x : %s\n", hex, s ? s : ""); |
@@ -172,8 +104,6 @@ static void __init cell_setup_arch(void) | |||
172 | #endif | 104 | #endif |
173 | 105 | ||
174 | mmio_nvram_init(); | 106 | mmio_nvram_init(); |
175 | |||
176 | cell_spumem_init(0); | ||
177 | } | 107 | } |
178 | 108 | ||
179 | /* | 109 | /* |
@@ -189,8 +119,6 @@ static void __init cell_init_early(void) | |||
189 | 119 | ||
190 | ppc64_interrupt_controller = IC_CELL_PIC; | 120 | ppc64_interrupt_controller = IC_CELL_PIC; |
191 | 121 | ||
192 | cell_spumem_init(1); | ||
193 | |||
194 | DBG(" <- cell_init_early()\n"); | 122 | DBG(" <- cell_init_early()\n"); |
195 | } | 123 | } |
196 | 124 | ||
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index ef47a6239d48..ad141fe8d52d 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -520,8 +520,50 @@ void spu_irq_setaffinity(struct spu *spu, int cpu) | |||
520 | } | 520 | } |
521 | EXPORT_SYMBOL_GPL(spu_irq_setaffinity); | 521 | EXPORT_SYMBOL_GPL(spu_irq_setaffinity); |
522 | 522 | ||
523 | static void __iomem * __init map_spe_prop(struct device_node *n, | 523 | static int __init find_spu_node_id(struct device_node *spe) |
524 | const char *name) | 524 | { |
525 | unsigned int *id; | ||
526 | struct device_node *cpu; | ||
527 | cpu = spe->parent->parent; | ||
528 | id = (unsigned int *)get_property(cpu, "node-id", NULL); | ||
529 | return id ? *id : 0; | ||
530 | } | ||
531 | |||
532 | static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe, | ||
533 | const char *prop) | ||
534 | { | ||
535 | static DEFINE_MUTEX(add_spumem_mutex); | ||
536 | |||
537 | struct address_prop { | ||
538 | unsigned long address; | ||
539 | unsigned int len; | ||
540 | } __attribute__((packed)) *p; | ||
541 | int proplen; | ||
542 | |||
543 | unsigned long start_pfn, nr_pages; | ||
544 | struct pglist_data *pgdata; | ||
545 | struct zone *zone; | ||
546 | int ret; | ||
547 | |||
548 | p = (void*)get_property(spe, prop, &proplen); | ||
549 | WARN_ON(proplen != sizeof (*p)); | ||
550 | |||
551 | start_pfn = p->address >> PAGE_SHIFT; | ||
552 | nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
553 | |||
554 | pgdata = NODE_DATA(spu->nid); | ||
555 | zone = pgdata->node_zones; | ||
556 | |||
557 | /* XXX rethink locking here */ | ||
558 | mutex_lock(&add_spumem_mutex); | ||
559 | ret = __add_pages(zone, start_pfn, nr_pages); | ||
560 | mutex_unlock(&add_spumem_mutex); | ||
561 | |||
562 | return ret; | ||
563 | } | ||
564 | |||
565 | static void __iomem * __init map_spe_prop(struct spu *spu, | ||
566 | struct device_node *n, const char *name) | ||
525 | { | 567 | { |
526 | struct address_prop { | 568 | struct address_prop { |
527 | unsigned long address; | 569 | unsigned long address; |
@@ -530,6 +572,8 @@ static void __iomem * __init map_spe_prop(struct device_node *n, | |||
530 | 572 | ||
531 | void *p; | 573 | void *p; |
532 | int proplen; | 574 | int proplen; |
575 | void* ret = NULL; | ||
576 | int err = 0; | ||
533 | 577 | ||
534 | p = get_property(n, name, &proplen); | 578 | p = get_property(n, name, &proplen); |
535 | if (proplen != sizeof (struct address_prop)) | 579 | if (proplen != sizeof (struct address_prop)) |
@@ -537,7 +581,14 @@ static void __iomem * __init map_spe_prop(struct device_node *n, | |||
537 | 581 | ||
538 | prop = p; | 582 | prop = p; |
539 | 583 | ||
540 | return ioremap(prop->address, prop->len); | 584 | err = cell_spuprop_present(spu, n, name); |
585 | if (err && (err != -EEXIST)) | ||
586 | goto out; | ||
587 | |||
588 | ret = ioremap(prop->address, prop->len); | ||
589 | |||
590 | out: | ||
591 | return ret; | ||
541 | } | 592 | } |
542 | 593 | ||
543 | static void spu_unmap(struct spu *spu) | 594 | static void spu_unmap(struct spu *spu) |
@@ -548,44 +599,45 @@ static void spu_unmap(struct spu *spu) | |||
548 | iounmap((u8 __iomem *)spu->local_store); | 599 | iounmap((u8 __iomem *)spu->local_store); |
549 | } | 600 | } |
550 | 601 | ||
551 | static int __init spu_map_device(struct spu *spu, struct device_node *spe) | 602 | static int __init spu_map_device(struct spu *spu, struct device_node *node) |
552 | { | 603 | { |
553 | char *prop; | 604 | char *prop; |
554 | int ret; | 605 | int ret; |
555 | 606 | ||
556 | ret = -ENODEV; | 607 | ret = -ENODEV; |
557 | prop = get_property(spe, "isrc", NULL); | 608 | prop = get_property(node, "isrc", NULL); |
558 | if (!prop) | 609 | if (!prop) |
559 | goto out; | 610 | goto out; |
560 | spu->isrc = *(unsigned int *)prop; | 611 | spu->isrc = *(unsigned int *)prop; |
561 | 612 | ||
562 | spu->name = get_property(spe, "name", NULL); | 613 | spu->name = get_property(node, "name", NULL); |
563 | if (!spu->name) | 614 | if (!spu->name) |
564 | goto out; | 615 | goto out; |
565 | 616 | ||
566 | prop = get_property(spe, "local-store", NULL); | 617 | prop = get_property(node, "local-store", NULL); |
567 | if (!prop) | 618 | if (!prop) |
568 | goto out; | 619 | goto out; |
569 | spu->local_store_phys = *(unsigned long *)prop; | 620 | spu->local_store_phys = *(unsigned long *)prop; |
570 | 621 | ||
571 | /* we use local store as ram, not io memory */ | 622 | /* we use local store as ram, not io memory */ |
572 | spu->local_store = (void __force *)map_spe_prop(spe, "local-store"); | 623 | spu->local_store = (void __force *) |
624 | map_spe_prop(spu, node, "local-store"); | ||
573 | if (!spu->local_store) | 625 | if (!spu->local_store) |
574 | goto out; | 626 | goto out; |
575 | 627 | ||
576 | prop = get_property(spe, "problem", NULL); | 628 | prop = get_property(node, "problem", NULL); |
577 | if (!prop) | 629 | if (!prop) |
578 | goto out_unmap; | 630 | goto out_unmap; |
579 | spu->problem_phys = *(unsigned long *)prop; | 631 | spu->problem_phys = *(unsigned long *)prop; |
580 | 632 | ||
581 | spu->problem= map_spe_prop(spe, "problem"); | 633 | spu->problem= map_spe_prop(spu, node, "problem"); |
582 | if (!spu->problem) | 634 | if (!spu->problem) |
583 | goto out_unmap; | 635 | goto out_unmap; |
584 | 636 | ||
585 | spu->priv1= map_spe_prop(spe, "priv1"); | 637 | spu->priv1= map_spe_prop(spu, node, "priv1"); |
586 | /* priv1 is not available on a hypervisor */ | 638 | /* priv1 is not available on a hypervisor */ |
587 | 639 | ||
588 | spu->priv2= map_spe_prop(spe, "priv2"); | 640 | spu->priv2= map_spe_prop(spu, node, "priv2"); |
589 | if (!spu->priv2) | 641 | if (!spu->priv2) |
590 | goto out_unmap; | 642 | goto out_unmap; |
591 | ret = 0; | 643 | ret = 0; |
@@ -597,17 +649,6 @@ out: | |||
597 | return ret; | 649 | return ret; |
598 | } | 650 | } |
599 | 651 | ||
600 | static int __init find_spu_node_id(struct device_node *spe) | ||
601 | { | ||
602 | unsigned int *id; | ||
603 | struct device_node *cpu; | ||
604 | |||
605 | cpu = spe->parent->parent; | ||
606 | id = (unsigned int *)get_property(cpu, "node-id", NULL); | ||
607 | |||
608 | return id ? *id : 0; | ||
609 | } | ||
610 | |||
611 | static int __init create_spu(struct device_node *spe) | 652 | static int __init create_spu(struct device_node *spe) |
612 | { | 653 | { |
613 | struct spu *spu; | 654 | struct spu *spu; |
@@ -624,6 +665,10 @@ static int __init create_spu(struct device_node *spe) | |||
624 | goto out_free; | 665 | goto out_free; |
625 | 666 | ||
626 | spu->node = find_spu_node_id(spe); | 667 | spu->node = find_spu_node_id(spe); |
668 | spu->nid = of_node_to_nid(spe); | ||
669 | if (spu->nid == -1) | ||
670 | spu->nid = 0; | ||
671 | |||
627 | spu->stop_code = 0; | 672 | spu->stop_code = 0; |
628 | spu->slb_replace = 0; | 673 | spu->slb_replace = 0; |
629 | spu->mm = NULL; | 674 | spu->mm = NULL; |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index ae1927e48cfb..d48cfc726b68 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -358,8 +358,9 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
358 | } else { | 358 | } else { |
359 | regs->gprs[14] = (unsigned long) | 359 | regs->gprs[14] = (unsigned long) |
360 | frame->retcode | PSW_ADDR_AMODE; | 360 | frame->retcode | PSW_ADDR_AMODE; |
361 | err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn, | 361 | if (__put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn, |
362 | (u16 __user *)(frame->retcode)); | 362 | (u16 __user *)(frame->retcode))) |
363 | goto give_sigsegv; | ||
363 | } | 364 | } |
364 | 365 | ||
365 | /* Set up backchain. */ | 366 | /* Set up backchain. */ |
diff --git a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c index a079cf42505e..3f10fc921b00 100644 --- a/arch/sparc64/mm/tlb.c +++ b/arch/sparc64/mm/tlb.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/percpu.h> | 8 | #include <linux/percpu.h> |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/swap.h> | 10 | #include <linux/swap.h> |
11 | #include <linux/preempt.h> | ||
11 | 12 | ||
12 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
13 | #include <asm/pgalloc.h> | 14 | #include <asm/pgalloc.h> |
@@ -24,6 +25,8 @@ void flush_tlb_pending(void) | |||
24 | { | 25 | { |
25 | struct mmu_gather *mp = &__get_cpu_var(mmu_gathers); | 26 | struct mmu_gather *mp = &__get_cpu_var(mmu_gathers); |
26 | 27 | ||
28 | preempt_disable(); | ||
29 | |||
27 | if (mp->tlb_nr) { | 30 | if (mp->tlb_nr) { |
28 | flush_tsb_user(mp); | 31 | flush_tsb_user(mp); |
29 | 32 | ||
@@ -38,6 +41,8 @@ void flush_tlb_pending(void) | |||
38 | } | 41 | } |
39 | mp->tlb_nr = 0; | 42 | mp->tlb_nr = 0; |
40 | } | 43 | } |
44 | |||
45 | preempt_enable(); | ||
41 | } | 46 | } |
42 | 47 | ||
43 | void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig) | 48 | void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig) |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 05fbb20636cb..76e85bbaea55 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -57,20 +57,6 @@ config STATIC_LINK | |||
57 | chroot, and you disable CONFIG_MODE_TT, you probably want to say Y | 57 | chroot, and you disable CONFIG_MODE_TT, you probably want to say Y |
58 | here. | 58 | here. |
59 | 59 | ||
60 | config HOST_2G_2G | ||
61 | bool "2G/2G host address space split" | ||
62 | default n | ||
63 | depends on MODE_TT | ||
64 | help | ||
65 | This is needed when the host on which you run has a 2G/2G memory | ||
66 | split, instead of the customary 3G/1G. | ||
67 | |||
68 | Note that to enable such a host | ||
69 | configuration, which makes sense only in some cases, you need special | ||
70 | host patches. | ||
71 | |||
72 | So, if you do not know what to do here, say 'N'. | ||
73 | |||
74 | config KERNEL_HALF_GIGS | 60 | config KERNEL_HALF_GIGS |
75 | int "Kernel address space size (in .5G units)" | 61 | int "Kernel address space size (in .5G units)" |
76 | default "1" | 62 | default "1" |
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386 index 85e6a55b3b59..f6eb72d117b9 100644 --- a/arch/um/Kconfig.i386 +++ b/arch/um/Kconfig.i386 | |||
@@ -16,6 +16,19 @@ config SEMAPHORE_SLEEPERS | |||
16 | bool | 16 | bool |
17 | default y | 17 | default y |
18 | 18 | ||
19 | config HOST_2G_2G | ||
20 | bool "2G/2G host address space split" | ||
21 | default n | ||
22 | help | ||
23 | This is needed when the host on which you run has a 2G/2G memory | ||
24 | split, instead of the customary 3G/1G. | ||
25 | |||
26 | Note that to enable such a host | ||
27 | configuration, which makes sense only in some cases, you need special | ||
28 | host patches. | ||
29 | |||
30 | So, if you do not know what to do here, say 'N'. | ||
31 | |||
19 | config TOP_ADDR | 32 | config TOP_ADDR |
20 | hex | 33 | hex |
21 | default 0xc0000000 if !HOST_2G_2G | 34 | default 0xc0000000 if !HOST_2G_2G |
@@ -35,11 +48,13 @@ config 3_LEVEL_PGTABLES | |||
35 | 48 | ||
36 | config STUB_CODE | 49 | config STUB_CODE |
37 | hex | 50 | hex |
38 | default 0xbfffe000 | 51 | default 0xbfffe000 if !HOST_2G_2G |
52 | default 0x7fffe000 if HOST_2G_2G | ||
39 | 53 | ||
40 | config STUB_DATA | 54 | config STUB_DATA |
41 | hex | 55 | hex |
42 | default 0xbffff000 | 56 | default 0xbffff000 if !HOST_2G_2G |
57 | default 0x7ffff000 if HOST_2G_2G | ||
43 | 58 | ||
44 | config STUB_START | 59 | config STUB_START |
45 | hex | 60 | hex |
diff --git a/arch/um/Makefile b/arch/um/Makefile index a508e7a02891..f6ad832faf13 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -96,7 +96,8 @@ PHONY += linux | |||
96 | all: linux | 96 | all: linux |
97 | 97 | ||
98 | linux: vmlinux | 98 | linux: vmlinux |
99 | ln -f $< $@ | 99 | @echo ' LINK $@' |
100 | $(Q)ln -f $< $@ | ||
100 | 101 | ||
101 | define archhelp | 102 | define archhelp |
102 | echo '* linux - Binary kernel image (./linux) - for backward' | 103 | echo '* linux - Binary kernel image (./linux) - for backward' |
@@ -117,6 +118,10 @@ prepare: $(ARCH_DIR)/include/kern_constants.h | |||
117 | LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static | 118 | LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static |
118 | LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib | 119 | LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib |
119 | 120 | ||
121 | CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \ | ||
122 | $(call cc-option, -fno-stack-protector,) \ | ||
123 | $(call cc-option, -fno-stack-protector-all,) | ||
124 | |||
120 | CPP_MODE-$(CONFIG_MODE_TT) := -DMODE_TT | 125 | CPP_MODE-$(CONFIG_MODE_TT) := -DMODE_TT |
121 | CONFIG_KERNEL_STACK_ORDER ?= 2 | 126 | CONFIG_KERNEL_STACK_ORDER ?= 2 |
122 | STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) | 127 | STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) |
@@ -203,8 +208,8 @@ endef | |||
203 | $(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h | 208 | $(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h |
204 | $(call filechk,umlconfig) | 209 | $(call filechk,umlconfig) |
205 | 210 | ||
206 | $(ARCH_DIR)/user-offsets.s: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.c | 211 | $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE |
207 | $(CC) $(USER_CFLAGS) -S -o $@ $< | 212 | $(Q)$(MAKE) $(build)=$(ARCH_DIR)/sys-$(SUBARCH) $@ |
208 | 213 | ||
209 | define filechk_gen-asm-offsets | 214 | define filechk_gen-asm-offsets |
210 | (set -e; \ | 215 | (set -e; \ |
@@ -219,13 +224,11 @@ define filechk_gen-asm-offsets | |||
219 | echo ""; ) | 224 | echo ""; ) |
220 | endef | 225 | endef |
221 | 226 | ||
222 | $(ARCH_DIR)/include/user_constants.h: $(ARCH_DIR)/user-offsets.s | 227 | $(ARCH_DIR)/include/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s |
223 | $(call filechk,gen-asm-offsets) | 228 | $(call filechk,gen-asm-offsets) |
224 | 229 | ||
225 | CLEAN_FILES += $(ARCH_DIR)/user-offsets.s | ||
226 | |||
227 | $(ARCH_DIR)/include/kern_constants.h: $(objtree)/$(ARCH_DIR)/include | 230 | $(ARCH_DIR)/include/kern_constants.h: $(objtree)/$(ARCH_DIR)/include |
228 | @echo ' SYMLINK $@' | 231 | @echo ' SYMLINK $@' |
229 | $(Q) ln -sf ../../../include/asm-um/asm-offsets.h $@ | 232 | $(Q)ln -sf ../../../include/asm-um/asm-offsets.h $@ |
230 | 233 | ||
231 | export SUBARCH USER_CFLAGS OS | 234 | export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS |
diff --git a/arch/um/defconfig b/arch/um/defconfig index 80d30d19d750..402a74dc5026 100644 --- a/arch/um/defconfig +++ b/arch/um/defconfig | |||
@@ -1,14 +1,13 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc6-mm1 | 3 | # Linux kernel version: 2.6.17-rc3 |
4 | # Tue Jun 14 18:22:21 2005 | 4 | # Fri Apr 28 09:31:20 2006 |
5 | # | 5 | # |
6 | CONFIG_GENERIC_HARDIRQS=y | 6 | CONFIG_GENERIC_HARDIRQS=y |
7 | CONFIG_UML=y | 7 | CONFIG_UML=y |
8 | CONFIG_MMU=y | 8 | CONFIG_MMU=y |
9 | CONFIG_UID16=y | ||
10 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
11 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
10 | CONFIG_IRQ_RELEASE_METHOD=y | ||
12 | 11 | ||
13 | # | 12 | # |
14 | # UML-specific options | 13 | # UML-specific options |
@@ -16,8 +15,50 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
16 | # CONFIG_MODE_TT is not set | 15 | # CONFIG_MODE_TT is not set |
17 | # CONFIG_STATIC_LINK is not set | 16 | # CONFIG_STATIC_LINK is not set |
18 | CONFIG_MODE_SKAS=y | 17 | CONFIG_MODE_SKAS=y |
18 | |||
19 | # | ||
20 | # Host processor type and features | ||
21 | # | ||
22 | # CONFIG_M386 is not set | ||
23 | # CONFIG_M486 is not set | ||
24 | # CONFIG_M586 is not set | ||
25 | # CONFIG_M586TSC is not set | ||
26 | # CONFIG_M586MMX is not set | ||
27 | CONFIG_M686=y | ||
28 | # CONFIG_MPENTIUMII is not set | ||
29 | # CONFIG_MPENTIUMIII is not set | ||
30 | # CONFIG_MPENTIUMM is not set | ||
31 | # CONFIG_MPENTIUM4 is not set | ||
32 | # CONFIG_MK6 is not set | ||
33 | # CONFIG_MK7 is not set | ||
34 | # CONFIG_MK8 is not set | ||
35 | # CONFIG_MCRUSOE is not set | ||
36 | # CONFIG_MEFFICEON is not set | ||
37 | # CONFIG_MWINCHIPC6 is not set | ||
38 | # CONFIG_MWINCHIP2 is not set | ||
39 | # CONFIG_MWINCHIP3D is not set | ||
40 | # CONFIG_MGEODEGX1 is not set | ||
41 | # CONFIG_MGEODE_LX is not set | ||
42 | # CONFIG_MCYRIXIII is not set | ||
43 | # CONFIG_MVIAC3_2 is not set | ||
44 | # CONFIG_X86_GENERIC is not set | ||
45 | CONFIG_X86_CMPXCHG=y | ||
46 | CONFIG_X86_XADD=y | ||
47 | CONFIG_X86_L1_CACHE_SHIFT=5 | ||
48 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
49 | CONFIG_X86_PPRO_FENCE=y | ||
50 | CONFIG_X86_WP_WORKS_OK=y | ||
51 | CONFIG_X86_INVLPG=y | ||
52 | CONFIG_X86_BSWAP=y | ||
53 | CONFIG_X86_POPAD_OK=y | ||
54 | CONFIG_X86_CMPXCHG64=y | ||
55 | CONFIG_X86_GOOD_APIC=y | ||
56 | CONFIG_X86_USE_PPRO_CHECKSUM=y | ||
57 | CONFIG_X86_TSC=y | ||
19 | CONFIG_UML_X86=y | 58 | CONFIG_UML_X86=y |
20 | # CONFIG_64BIT is not set | 59 | # CONFIG_64BIT is not set |
60 | CONFIG_SEMAPHORE_SLEEPERS=y | ||
61 | # CONFIG_HOST_2G_2G is not set | ||
21 | CONFIG_TOP_ADDR=0xc0000000 | 62 | CONFIG_TOP_ADDR=0xc0000000 |
22 | # CONFIG_3_LEVEL_PGTABLES is not set | 63 | # CONFIG_3_LEVEL_PGTABLES is not set |
23 | CONFIG_STUB_CODE=0xbfffe000 | 64 | CONFIG_STUB_CODE=0xbfffe000 |
@@ -25,22 +66,24 @@ CONFIG_STUB_DATA=0xbffff000 | |||
25 | CONFIG_STUB_START=0xbfffe000 | 66 | CONFIG_STUB_START=0xbfffe000 |
26 | CONFIG_ARCH_HAS_SC_SIGNALS=y | 67 | CONFIG_ARCH_HAS_SC_SIGNALS=y |
27 | CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y | 68 | CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y |
69 | CONFIG_GENERIC_HWEIGHT=y | ||
28 | CONFIG_SELECT_MEMORY_MODEL=y | 70 | CONFIG_SELECT_MEMORY_MODEL=y |
29 | CONFIG_FLATMEM_MANUAL=y | 71 | CONFIG_FLATMEM_MANUAL=y |
30 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 72 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
31 | # CONFIG_SPARSEMEM_MANUAL is not set | 73 | # CONFIG_SPARSEMEM_MANUAL is not set |
32 | CONFIG_FLATMEM=y | 74 | CONFIG_FLATMEM=y |
33 | CONFIG_FLAT_NODE_MEM_MAP=y | 75 | CONFIG_FLAT_NODE_MEM_MAP=y |
76 | # CONFIG_SPARSEMEM_STATIC is not set | ||
77 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
34 | CONFIG_LD_SCRIPT_DYN=y | 78 | CONFIG_LD_SCRIPT_DYN=y |
35 | CONFIG_NET=y | 79 | CONFIG_NET=y |
36 | CONFIG_BINFMT_ELF=y | 80 | CONFIG_BINFMT_ELF=y |
37 | CONFIG_BINFMT_MISC=m | 81 | CONFIG_BINFMT_MISC=m |
38 | # CONFIG_HOSTFS is not set | 82 | # CONFIG_HOSTFS is not set |
83 | # CONFIG_HPPFS is not set | ||
39 | CONFIG_MCONSOLE=y | 84 | CONFIG_MCONSOLE=y |
40 | # CONFIG_MAGIC_SYSRQ is not set | 85 | # CONFIG_MAGIC_SYSRQ is not set |
41 | # CONFIG_HOST_2G_2G is not set | ||
42 | CONFIG_NEST_LEVEL=0 | 86 | CONFIG_NEST_LEVEL=0 |
43 | CONFIG_KERNEL_HALF_GIGS=1 | ||
44 | # CONFIG_HIGHMEM is not set | 87 | # CONFIG_HIGHMEM is not set |
45 | CONFIG_KERNEL_STACK_ORDER=2 | 88 | CONFIG_KERNEL_STACK_ORDER=2 |
46 | CONFIG_UML_REAL_TIME_CLOCK=y | 89 | CONFIG_UML_REAL_TIME_CLOCK=y |
@@ -49,7 +92,6 @@ CONFIG_UML_REAL_TIME_CLOCK=y | |||
49 | # Code maturity level options | 92 | # Code maturity level options |
50 | # | 93 | # |
51 | CONFIG_EXPERIMENTAL=y | 94 | CONFIG_EXPERIMENTAL=y |
52 | CONFIG_CLEAN_COMPILE=y | ||
53 | CONFIG_BROKEN_ON_SMP=y | 95 | CONFIG_BROKEN_ON_SMP=y |
54 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 96 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
55 | 97 | ||
@@ -57,6 +99,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
57 | # General setup | 99 | # General setup |
58 | # | 100 | # |
59 | CONFIG_LOCALVERSION="" | 101 | CONFIG_LOCALVERSION="" |
102 | CONFIG_LOCALVERSION_AUTO=y | ||
60 | CONFIG_SWAP=y | 103 | CONFIG_SWAP=y |
61 | CONFIG_SYSVIPC=y | 104 | CONFIG_SYSVIPC=y |
62 | CONFIG_POSIX_MQUEUE=y | 105 | CONFIG_POSIX_MQUEUE=y |
@@ -64,26 +107,28 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
64 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 107 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
65 | CONFIG_SYSCTL=y | 108 | CONFIG_SYSCTL=y |
66 | # CONFIG_AUDIT is not set | 109 | # CONFIG_AUDIT is not set |
67 | # CONFIG_HOTPLUG is not set | ||
68 | CONFIG_KOBJECT_UEVENT=y | ||
69 | CONFIG_IKCONFIG=y | 110 | CONFIG_IKCONFIG=y |
70 | CONFIG_IKCONFIG_PROC=y | 111 | CONFIG_IKCONFIG_PROC=y |
112 | # CONFIG_RELAY is not set | ||
113 | CONFIG_INITRAMFS_SOURCE="" | ||
114 | CONFIG_UID16=y | ||
115 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
71 | # CONFIG_EMBEDDED is not set | 116 | # CONFIG_EMBEDDED is not set |
72 | CONFIG_KALLSYMS=y | 117 | CONFIG_KALLSYMS=y |
73 | # CONFIG_KALLSYMS_ALL is not set | 118 | # CONFIG_KALLSYMS_ALL is not set |
74 | CONFIG_KALLSYMS_EXTRA_PASS=y | 119 | CONFIG_KALLSYMS_EXTRA_PASS=y |
120 | CONFIG_HOTPLUG=y | ||
75 | CONFIG_PRINTK=y | 121 | CONFIG_PRINTK=y |
76 | CONFIG_BUG=y | 122 | CONFIG_BUG=y |
123 | CONFIG_ELF_CORE=y | ||
77 | CONFIG_BASE_FULL=y | 124 | CONFIG_BASE_FULL=y |
78 | CONFIG_FUTEX=y | 125 | CONFIG_FUTEX=y |
79 | CONFIG_EPOLL=y | 126 | CONFIG_EPOLL=y |
80 | CONFIG_SHMEM=y | 127 | CONFIG_SHMEM=y |
81 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 128 | CONFIG_SLAB=y |
82 | CONFIG_CC_ALIGN_LABELS=0 | ||
83 | CONFIG_CC_ALIGN_LOOPS=0 | ||
84 | CONFIG_CC_ALIGN_JUMPS=0 | ||
85 | # CONFIG_TINY_SHMEM is not set | 129 | # CONFIG_TINY_SHMEM is not set |
86 | CONFIG_BASE_SMALL=0 | 130 | CONFIG_BASE_SMALL=0 |
131 | # CONFIG_SLOB is not set | ||
87 | 132 | ||
88 | # | 133 | # |
89 | # Loadable module support | 134 | # Loadable module support |
@@ -91,18 +136,43 @@ CONFIG_BASE_SMALL=0 | |||
91 | CONFIG_MODULES=y | 136 | CONFIG_MODULES=y |
92 | CONFIG_MODULE_UNLOAD=y | 137 | CONFIG_MODULE_UNLOAD=y |
93 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 138 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
94 | CONFIG_OBSOLETE_MODPARM=y | ||
95 | # CONFIG_MODVERSIONS is not set | 139 | # CONFIG_MODVERSIONS is not set |
96 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 140 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
97 | CONFIG_KMOD=y | 141 | CONFIG_KMOD=y |
98 | 142 | ||
99 | # | 143 | # |
100 | # Generic Driver Options | 144 | # Block layer |
101 | # | 145 | # |
102 | CONFIG_STANDALONE=y | 146 | # CONFIG_LBD is not set |
103 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 147 | # CONFIG_BLK_DEV_IO_TRACE is not set |
104 | # CONFIG_FW_LOADER is not set | 148 | # CONFIG_LSF is not set |
105 | # CONFIG_DEBUG_DRIVER is not set | 149 | |
150 | # | ||
151 | # IO Schedulers | ||
152 | # | ||
153 | CONFIG_IOSCHED_NOOP=y | ||
154 | CONFIG_IOSCHED_AS=y | ||
155 | CONFIG_IOSCHED_DEADLINE=y | ||
156 | CONFIG_IOSCHED_CFQ=y | ||
157 | CONFIG_DEFAULT_AS=y | ||
158 | # CONFIG_DEFAULT_DEADLINE is not set | ||
159 | # CONFIG_DEFAULT_CFQ is not set | ||
160 | # CONFIG_DEFAULT_NOOP is not set | ||
161 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
162 | |||
163 | # | ||
164 | # Block devices | ||
165 | # | ||
166 | CONFIG_BLK_DEV_UBD=y | ||
167 | # CONFIG_BLK_DEV_UBD_SYNC is not set | ||
168 | CONFIG_BLK_DEV_COW_COMMON=y | ||
169 | # CONFIG_MMAPPER is not set | ||
170 | CONFIG_BLK_DEV_LOOP=m | ||
171 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
172 | CONFIG_BLK_DEV_NBD=m | ||
173 | # CONFIG_BLK_DEV_RAM is not set | ||
174 | # CONFIG_BLK_DEV_INITRD is not set | ||
175 | # CONFIG_ATA_OVER_ETH is not set | ||
106 | 176 | ||
107 | # | 177 | # |
108 | # Character Devices | 178 | # Character Devices |
@@ -127,50 +197,23 @@ CONFIG_UML_SOUND=m | |||
127 | CONFIG_SOUND=m | 197 | CONFIG_SOUND=m |
128 | CONFIG_HOSTAUDIO=m | 198 | CONFIG_HOSTAUDIO=m |
129 | CONFIG_UML_RANDOM=y | 199 | CONFIG_UML_RANDOM=y |
130 | # CONFIG_MMAPPER is not set | ||
131 | |||
132 | # | ||
133 | # Block devices | ||
134 | # | ||
135 | CONFIG_BLK_DEV_UBD=y | ||
136 | CONFIG_BLK_DEV_UBD_SYNC=y | ||
137 | CONFIG_BLK_DEV_COW_COMMON=y | ||
138 | CONFIG_BLK_DEV_LOOP=m | ||
139 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
140 | CONFIG_BLK_DEV_NBD=m | ||
141 | # CONFIG_BLK_DEV_RAM is not set | ||
142 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
143 | CONFIG_INITRAMFS_SOURCE="" | ||
144 | # CONFIG_LBD is not set | ||
145 | |||
146 | # | ||
147 | # IO Schedulers | ||
148 | # | ||
149 | CONFIG_IOSCHED_NOOP=y | ||
150 | CONFIG_IOSCHED_AS=y | ||
151 | CONFIG_IOSCHED_DEADLINE=y | ||
152 | CONFIG_IOSCHED_CFQ=y | ||
153 | # CONFIG_ATA_OVER_ETH is not set | ||
154 | CONFIG_NETDEVICES=y | ||
155 | 200 | ||
156 | # | 201 | # |
157 | # UML Network Devices | 202 | # Generic Driver Options |
158 | # | 203 | # |
159 | CONFIG_UML_NET=y | 204 | CONFIG_STANDALONE=y |
160 | CONFIG_UML_NET_ETHERTAP=y | 205 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
161 | CONFIG_UML_NET_TUNTAP=y | 206 | # CONFIG_FW_LOADER is not set |
162 | CONFIG_UML_NET_SLIP=y | 207 | # CONFIG_DEBUG_DRIVER is not set |
163 | CONFIG_UML_NET_DAEMON=y | ||
164 | CONFIG_UML_NET_MCAST=y | ||
165 | CONFIG_UML_NET_SLIRP=y | ||
166 | 208 | ||
167 | # | 209 | # |
168 | # Networking support | 210 | # Networking |
169 | # | 211 | # |
170 | 212 | ||
171 | # | 213 | # |
172 | # Networking options | 214 | # Networking options |
173 | # | 215 | # |
216 | # CONFIG_NETDEBUG is not set | ||
174 | CONFIG_PACKET=y | 217 | CONFIG_PACKET=y |
175 | CONFIG_PACKET_MMAP=y | 218 | CONFIG_PACKET_MMAP=y |
176 | CONFIG_UNIX=y | 219 | CONFIG_UNIX=y |
@@ -178,6 +221,7 @@ CONFIG_UNIX=y | |||
178 | CONFIG_INET=y | 221 | CONFIG_INET=y |
179 | # CONFIG_IP_MULTICAST is not set | 222 | # CONFIG_IP_MULTICAST is not set |
180 | # CONFIG_IP_ADVANCED_ROUTER is not set | 223 | # CONFIG_IP_ADVANCED_ROUTER is not set |
224 | CONFIG_IP_FIB_HASH=y | ||
181 | # CONFIG_IP_PNP is not set | 225 | # CONFIG_IP_PNP is not set |
182 | # CONFIG_NET_IPIP is not set | 226 | # CONFIG_NET_IPIP is not set |
183 | # CONFIG_NET_IPGRE is not set | 227 | # CONFIG_NET_IPGRE is not set |
@@ -186,27 +230,31 @@ CONFIG_INET=y | |||
186 | # CONFIG_INET_AH is not set | 230 | # CONFIG_INET_AH is not set |
187 | # CONFIG_INET_ESP is not set | 231 | # CONFIG_INET_ESP is not set |
188 | # CONFIG_INET_IPCOMP is not set | 232 | # CONFIG_INET_IPCOMP is not set |
233 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
189 | # CONFIG_INET_TUNNEL is not set | 234 | # CONFIG_INET_TUNNEL is not set |
190 | CONFIG_IP_TCPDIAG=y | 235 | CONFIG_INET_DIAG=y |
191 | # CONFIG_IP_TCPDIAG_IPV6 is not set | 236 | CONFIG_INET_TCP_DIAG=y |
192 | 237 | # CONFIG_TCP_CONG_ADVANCED is not set | |
193 | # | ||
194 | # TCP congestion control | ||
195 | # | ||
196 | CONFIG_TCP_CONG_BIC=y | 238 | CONFIG_TCP_CONG_BIC=y |
197 | CONFIG_TCP_CONG_WESTWOOD=y | ||
198 | CONFIG_TCP_CONG_HTCP=y | ||
199 | # CONFIG_TCP_CONG_HSTCP is not set | ||
200 | # CONFIG_TCP_CONG_HYBLA is not set | ||
201 | # CONFIG_TCP_CONG_VEGAS is not set | ||
202 | # CONFIG_TCP_CONG_SCALABLE is not set | ||
203 | # CONFIG_IPV6 is not set | 239 | # CONFIG_IPV6 is not set |
240 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
241 | # CONFIG_INET6_TUNNEL is not set | ||
204 | # CONFIG_NETFILTER is not set | 242 | # CONFIG_NETFILTER is not set |
205 | 243 | ||
206 | # | 244 | # |
245 | # DCCP Configuration (EXPERIMENTAL) | ||
246 | # | ||
247 | # CONFIG_IP_DCCP is not set | ||
248 | |||
249 | # | ||
207 | # SCTP Configuration (EXPERIMENTAL) | 250 | # SCTP Configuration (EXPERIMENTAL) |
208 | # | 251 | # |
209 | # CONFIG_IP_SCTP is not set | 252 | # CONFIG_IP_SCTP is not set |
253 | |||
254 | # | ||
255 | # TIPC Configuration (EXPERIMENTAL) | ||
256 | # | ||
257 | # CONFIG_TIPC is not set | ||
210 | # CONFIG_ATM is not set | 258 | # CONFIG_ATM is not set |
211 | # CONFIG_BRIDGE is not set | 259 | # CONFIG_BRIDGE is not set |
212 | # CONFIG_VLAN_8021Q is not set | 260 | # CONFIG_VLAN_8021Q is not set |
@@ -224,27 +272,47 @@ CONFIG_TCP_CONG_HTCP=y | |||
224 | # QoS and/or fair queueing | 272 | # QoS and/or fair queueing |
225 | # | 273 | # |
226 | # CONFIG_NET_SCHED is not set | 274 | # CONFIG_NET_SCHED is not set |
227 | # CONFIG_NET_CLS_ROUTE is not set | ||
228 | 275 | ||
229 | # | 276 | # |
230 | # Network testing | 277 | # Network testing |
231 | # | 278 | # |
232 | # CONFIG_NET_PKTGEN is not set | 279 | # CONFIG_NET_PKTGEN is not set |
233 | # CONFIG_KGDBOE is not set | ||
234 | # CONFIG_NETPOLL is not set | ||
235 | # CONFIG_NETPOLL_RX is not set | ||
236 | # CONFIG_NETPOLL_TRAP is not set | ||
237 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
238 | # CONFIG_HAMRADIO is not set | 280 | # CONFIG_HAMRADIO is not set |
239 | # CONFIG_IRDA is not set | 281 | # CONFIG_IRDA is not set |
240 | # CONFIG_BT is not set | 282 | # CONFIG_BT is not set |
241 | # CONFIG_IEEE80211 is not set | 283 | # CONFIG_IEEE80211 is not set |
284 | |||
285 | # | ||
286 | # UML Network Devices | ||
287 | # | ||
288 | CONFIG_UML_NET=y | ||
289 | CONFIG_UML_NET_ETHERTAP=y | ||
290 | CONFIG_UML_NET_TUNTAP=y | ||
291 | CONFIG_UML_NET_SLIP=y | ||
292 | CONFIG_UML_NET_DAEMON=y | ||
293 | CONFIG_UML_NET_MCAST=y | ||
294 | # CONFIG_UML_NET_PCAP is not set | ||
295 | CONFIG_UML_NET_SLIRP=y | ||
296 | |||
297 | # | ||
298 | # Network device support | ||
299 | # | ||
300 | CONFIG_NETDEVICES=y | ||
242 | CONFIG_DUMMY=m | 301 | CONFIG_DUMMY=m |
243 | # CONFIG_BONDING is not set | 302 | # CONFIG_BONDING is not set |
244 | # CONFIG_EQUALIZER is not set | 303 | # CONFIG_EQUALIZER is not set |
245 | CONFIG_TUN=m | 304 | CONFIG_TUN=m |
246 | 305 | ||
247 | # | 306 | # |
307 | # PHY device support | ||
308 | # | ||
309 | |||
310 | # | ||
311 | # Wireless LAN (non-hamradio) | ||
312 | # | ||
313 | # CONFIG_NET_RADIO is not set | ||
314 | |||
315 | # | ||
248 | # Wan interfaces | 316 | # Wan interfaces |
249 | # | 317 | # |
250 | # CONFIG_WAN is not set | 318 | # CONFIG_WAN is not set |
@@ -263,6 +331,13 @@ CONFIG_SLIP=m | |||
263 | # CONFIG_SLIP_MODE_SLIP6 is not set | 331 | # CONFIG_SLIP_MODE_SLIP6 is not set |
264 | # CONFIG_SHAPER is not set | 332 | # CONFIG_SHAPER is not set |
265 | # CONFIG_NETCONSOLE is not set | 333 | # CONFIG_NETCONSOLE is not set |
334 | # CONFIG_NETPOLL is not set | ||
335 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
336 | |||
337 | # | ||
338 | # Connector - unified userspace <-> kernelspace linker | ||
339 | # | ||
340 | # CONFIG_CONNECTOR is not set | ||
266 | 341 | ||
267 | # | 342 | # |
268 | # File systems | 343 | # File systems |
@@ -274,17 +349,14 @@ CONFIG_EXT3_FS=y | |||
274 | # CONFIG_EXT3_FS_XATTR is not set | 349 | # CONFIG_EXT3_FS_XATTR is not set |
275 | CONFIG_JBD=y | 350 | CONFIG_JBD=y |
276 | # CONFIG_JBD_DEBUG is not set | 351 | # CONFIG_JBD_DEBUG is not set |
277 | # CONFIG_REISER4_FS is not set | ||
278 | CONFIG_REISERFS_FS=y | 352 | CONFIG_REISERFS_FS=y |
279 | # CONFIG_REISERFS_CHECK is not set | 353 | # CONFIG_REISERFS_CHECK is not set |
280 | # CONFIG_REISERFS_PROC_INFO is not set | 354 | # CONFIG_REISERFS_PROC_INFO is not set |
281 | # CONFIG_REISERFS_FS_XATTR is not set | 355 | # CONFIG_REISERFS_FS_XATTR is not set |
282 | # CONFIG_JFS_FS is not set | 356 | # CONFIG_JFS_FS is not set |
283 | 357 | # CONFIG_FS_POSIX_ACL is not set | |
284 | # | ||
285 | # XFS support | ||
286 | # | ||
287 | # CONFIG_XFS_FS is not set | 358 | # CONFIG_XFS_FS is not set |
359 | # CONFIG_OCFS2_FS is not set | ||
288 | # CONFIG_MINIX_FS is not set | 360 | # CONFIG_MINIX_FS is not set |
289 | # CONFIG_ROMFS_FS is not set | 361 | # CONFIG_ROMFS_FS is not set |
290 | CONFIG_INOTIFY=y | 362 | CONFIG_INOTIFY=y |
@@ -295,11 +367,6 @@ CONFIG_QUOTACTL=y | |||
295 | CONFIG_DNOTIFY=y | 367 | CONFIG_DNOTIFY=y |
296 | CONFIG_AUTOFS_FS=m | 368 | CONFIG_AUTOFS_FS=m |
297 | CONFIG_AUTOFS4_FS=m | 369 | CONFIG_AUTOFS4_FS=m |
298 | |||
299 | # | ||
300 | # Caches | ||
301 | # | ||
302 | # CONFIG_FSCACHE is not set | ||
303 | # CONFIG_FUSE_FS is not set | 370 | # CONFIG_FUSE_FS is not set |
304 | 371 | ||
305 | # | 372 | # |
@@ -323,14 +390,10 @@ CONFIG_JOLIET=y | |||
323 | CONFIG_PROC_FS=y | 390 | CONFIG_PROC_FS=y |
324 | CONFIG_PROC_KCORE=y | 391 | CONFIG_PROC_KCORE=y |
325 | CONFIG_SYSFS=y | 392 | CONFIG_SYSFS=y |
326 | # CONFIG_DEVFS_FS is not set | ||
327 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
328 | CONFIG_TMPFS=y | 393 | CONFIG_TMPFS=y |
329 | # CONFIG_TMPFS_XATTR is not set | ||
330 | # CONFIG_HUGETLB_PAGE is not set | 394 | # CONFIG_HUGETLB_PAGE is not set |
331 | CONFIG_RAMFS=y | 395 | CONFIG_RAMFS=y |
332 | # CONFIG_CONFIGFS_FS is not set | 396 | # CONFIG_CONFIGFS_FS is not set |
333 | # CONFIG_RELAYFS_FS is not set | ||
334 | 397 | ||
335 | # | 398 | # |
336 | # Miscellaneous filesystems | 399 | # Miscellaneous filesystems |
@@ -430,6 +493,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
430 | # Library routines | 493 | # Library routines |
431 | # | 494 | # |
432 | # CONFIG_CRC_CCITT is not set | 495 | # CONFIG_CRC_CCITT is not set |
496 | # CONFIG_CRC16 is not set | ||
433 | CONFIG_CRC32=m | 497 | CONFIG_CRC32=m |
434 | # CONFIG_LIBCRC32C is not set | 498 | # CONFIG_LIBCRC32C is not set |
435 | 499 | ||
@@ -448,12 +512,18 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
448 | CONFIG_DETECT_SOFTLOCKUP=y | 512 | CONFIG_DETECT_SOFTLOCKUP=y |
449 | # CONFIG_SCHEDSTATS is not set | 513 | # CONFIG_SCHEDSTATS is not set |
450 | CONFIG_DEBUG_SLAB=y | 514 | CONFIG_DEBUG_SLAB=y |
515 | # CONFIG_DEBUG_SLAB_LEAK is not set | ||
516 | # CONFIG_DEBUG_MUTEXES is not set | ||
451 | # CONFIG_DEBUG_SPINLOCK is not set | 517 | # CONFIG_DEBUG_SPINLOCK is not set |
452 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 518 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
453 | # CONFIG_DEBUG_KOBJECT is not set | 519 | # CONFIG_DEBUG_KOBJECT is not set |
454 | CONFIG_DEBUG_INFO=y | 520 | CONFIG_DEBUG_INFO=y |
455 | # CONFIG_DEBUG_FS is not set | 521 | # CONFIG_DEBUG_FS is not set |
522 | # CONFIG_DEBUG_VM is not set | ||
456 | CONFIG_FRAME_POINTER=y | 523 | CONFIG_FRAME_POINTER=y |
524 | # CONFIG_UNWIND_INFO is not set | ||
525 | CONFIG_FORCED_INLINING=y | ||
526 | # CONFIG_RCU_TORTURE_TEST is not set | ||
457 | # CONFIG_GPROF is not set | 527 | # CONFIG_GPROF is not set |
458 | # CONFIG_GCOV is not set | 528 | # CONFIG_GCOV is not set |
459 | # CONFIG_SYSCALL_DEBUG is not set | 529 | # CONFIG_SYSCALL_DEBUG is not set |
diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c index 6ab852bfcd3a..0ec4052db9c5 100644 --- a/arch/um/drivers/cow_user.c +++ b/arch/um/drivers/cow_user.c | |||
@@ -100,7 +100,7 @@ struct cow_header_v3_broken { | |||
100 | __u32 alignment; | 100 | __u32 alignment; |
101 | __u32 cow_format; | 101 | __u32 cow_format; |
102 | char backing_file[PATH_LEN_V3]; | 102 | char backing_file[PATH_LEN_V3]; |
103 | } __attribute__((packed)); | 103 | }; |
104 | 104 | ||
105 | /* COW format definitions - for now, we have only the usual COW bitmap */ | 105 | /* COW format definitions - for now, we have only the usual COW bitmap */ |
106 | #define COW_BITMAP 0 | 106 | #define COW_BITMAP 0 |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index c39ea3abeda4..2ffda012385e 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -89,16 +89,18 @@ void sigio_handler(int sig, union uml_pt_regs *regs) | |||
89 | struct irq_fd *irq_fd; | 89 | struct irq_fd *irq_fd; |
90 | int n; | 90 | int n; |
91 | 91 | ||
92 | if(smp_sigio_handler()) return; | 92 | if (smp_sigio_handler()) |
93 | while(1){ | 93 | return; |
94 | |||
95 | while (1) { | ||
94 | n = os_waiting_for_events(active_fds); | 96 | n = os_waiting_for_events(active_fds); |
95 | if (n <= 0) { | 97 | if (n <= 0) { |
96 | if(n == -EINTR) continue; | 98 | if(n == -EINTR) continue; |
97 | else break; | 99 | else break; |
98 | } | 100 | } |
99 | 101 | ||
100 | for(irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next){ | 102 | for (irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next) { |
101 | if(irq_fd->current_events != 0){ | 103 | if (irq_fd->current_events != 0) { |
102 | irq_fd->current_events = 0; | 104 | irq_fd->current_events = 0; |
103 | do_IRQ(irq_fd->irq, regs); | 105 | do_IRQ(irq_fd->irq, regs); |
104 | } | 106 | } |
@@ -110,19 +112,17 @@ void sigio_handler(int sig, union uml_pt_regs *regs) | |||
110 | 112 | ||
111 | static void maybe_sigio_broken(int fd, int type) | 113 | static void maybe_sigio_broken(int fd, int type) |
112 | { | 114 | { |
113 | if(os_isatty(fd)){ | 115 | if (os_isatty(fd)) { |
114 | if((type == IRQ_WRITE) && !pty_output_sigio){ | 116 | if ((type == IRQ_WRITE) && !pty_output_sigio) { |
115 | write_sigio_workaround(); | 117 | write_sigio_workaround(); |
116 | add_sigio_fd(fd, 0); | 118 | add_sigio_fd(fd, 0); |
117 | } | 119 | } else if ((type == IRQ_READ) && !pty_close_sigio) { |
118 | else if((type == IRQ_READ) && !pty_close_sigio){ | ||
119 | write_sigio_workaround(); | 120 | write_sigio_workaround(); |
120 | add_sigio_fd(fd, 1); | 121 | add_sigio_fd(fd, 1); |
121 | } | 122 | } |
122 | } | 123 | } |
123 | } | 124 | } |
124 | 125 | ||
125 | |||
126 | int activate_fd(int irq, int fd, int type, void *dev_id) | 126 | int activate_fd(int irq, int fd, int type, void *dev_id) |
127 | { | 127 | { |
128 | struct pollfd *tmp_pfd; | 128 | struct pollfd *tmp_pfd; |
@@ -132,16 +132,18 @@ int activate_fd(int irq, int fd, int type, void *dev_id) | |||
132 | 132 | ||
133 | pid = os_getpid(); | 133 | pid = os_getpid(); |
134 | err = os_set_fd_async(fd, pid); | 134 | err = os_set_fd_async(fd, pid); |
135 | if(err < 0) | 135 | if (err < 0) |
136 | goto out; | 136 | goto out; |
137 | 137 | ||
138 | new_fd = um_kmalloc(sizeof(*new_fd)); | 138 | new_fd = um_kmalloc(sizeof(*new_fd)); |
139 | err = -ENOMEM; | 139 | err = -ENOMEM; |
140 | if(new_fd == NULL) | 140 | if (new_fd == NULL) |
141 | goto out; | 141 | goto out; |
142 | 142 | ||
143 | if(type == IRQ_READ) events = UM_POLLIN | UM_POLLPRI; | 143 | if (type == IRQ_READ) |
144 | else events = UM_POLLOUT; | 144 | events = UM_POLLIN | UM_POLLPRI; |
145 | else | ||
146 | events = UM_POLLOUT; | ||
145 | *new_fd = ((struct irq_fd) { .next = NULL, | 147 | *new_fd = ((struct irq_fd) { .next = NULL, |
146 | .id = dev_id, | 148 | .id = dev_id, |
147 | .fd = fd, | 149 | .fd = fd, |
@@ -165,8 +167,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id) | |||
165 | * a semaphore. | 167 | * a semaphore. |
166 | */ | 168 | */ |
167 | flags = irq_lock(); | 169 | flags = irq_lock(); |
168 | for(irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next){ | 170 | for (irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next) { |
169 | if((irq_fd->fd == fd) && (irq_fd->type == type)){ | 171 | if ((irq_fd->fd == fd) && (irq_fd->type == type)) { |
170 | printk("Registering fd %d twice\n", fd); | 172 | printk("Registering fd %d twice\n", fd); |
171 | printk("Irqs : %d, %d\n", irq_fd->irq, irq); | 173 | printk("Irqs : %d, %d\n", irq_fd->irq, irq); |
172 | printk("Ids : 0x%p, 0x%p\n", irq_fd->id, dev_id); | 174 | printk("Ids : 0x%p, 0x%p\n", irq_fd->id, dev_id); |
@@ -175,13 +177,13 @@ int activate_fd(int irq, int fd, int type, void *dev_id) | |||
175 | } | 177 | } |
176 | 178 | ||
177 | /*-------------*/ | 179 | /*-------------*/ |
178 | if(type == IRQ_WRITE) | 180 | if (type == IRQ_WRITE) |
179 | fd = -1; | 181 | fd = -1; |
180 | 182 | ||
181 | tmp_pfd = NULL; | 183 | tmp_pfd = NULL; |
182 | n = 0; | 184 | n = 0; |
183 | 185 | ||
184 | while(1){ | 186 | while (1) { |
185 | n = os_create_pollfd(fd, events, tmp_pfd, n); | 187 | n = os_create_pollfd(fd, events, tmp_pfd, n); |
186 | if (n == 0) | 188 | if (n == 0) |
187 | break; | 189 | break; |
@@ -198,10 +200,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id) | |||
198 | * then we free the buffer tmp_fds and try again. | 200 | * then we free the buffer tmp_fds and try again. |
199 | */ | 201 | */ |
200 | irq_unlock(flags); | 202 | irq_unlock(flags); |
201 | if (tmp_pfd != NULL) { | 203 | kfree(tmp_pfd); |
202 | kfree(tmp_pfd); | 204 | tmp_pfd = NULL; |
203 | tmp_pfd = NULL; | ||
204 | } | ||
205 | 205 | ||
206 | tmp_pfd = um_kmalloc(n); | 206 | tmp_pfd = um_kmalloc(n); |
207 | if (tmp_pfd == NULL) | 207 | if (tmp_pfd == NULL) |
@@ -249,7 +249,7 @@ static int same_irq_and_dev(struct irq_fd *irq, void *d) | |||
249 | { | 249 | { |
250 | struct irq_and_dev *data = d; | 250 | struct irq_and_dev *data = d; |
251 | 251 | ||
252 | return((irq->irq == data->irq) && (irq->id == data->dev)); | 252 | return ((irq->irq == data->irq) && (irq->id == data->dev)); |
253 | } | 253 | } |
254 | 254 | ||
255 | void free_irq_by_irq_and_dev(unsigned int irq, void *dev) | 255 | void free_irq_by_irq_and_dev(unsigned int irq, void *dev) |
@@ -262,7 +262,7 @@ void free_irq_by_irq_and_dev(unsigned int irq, void *dev) | |||
262 | 262 | ||
263 | static int same_fd(struct irq_fd *irq, void *fd) | 263 | static int same_fd(struct irq_fd *irq, void *fd) |
264 | { | 264 | { |
265 | return(irq->fd == *((int *) fd)); | 265 | return (irq->fd == *((int *)fd)); |
266 | } | 266 | } |
267 | 267 | ||
268 | void free_irq_by_fd(int fd) | 268 | void free_irq_by_fd(int fd) |
@@ -276,16 +276,17 @@ static struct irq_fd *find_irq_by_fd(int fd, int irqnum, int *index_out) | |||
276 | int i = 0; | 276 | int i = 0; |
277 | int fdi; | 277 | int fdi; |
278 | 278 | ||
279 | for(irq=active_fds; irq != NULL; irq = irq->next){ | 279 | for (irq = active_fds; irq != NULL; irq = irq->next) { |
280 | if((irq->fd == fd) && (irq->irq == irqnum)) break; | 280 | if ((irq->fd == fd) && (irq->irq == irqnum)) |
281 | break; | ||
281 | i++; | 282 | i++; |
282 | } | 283 | } |
283 | if(irq == NULL){ | 284 | if (irq == NULL) { |
284 | printk("find_irq_by_fd doesn't have descriptor %d\n", fd); | 285 | printk("find_irq_by_fd doesn't have descriptor %d\n", fd); |
285 | goto out; | 286 | goto out; |
286 | } | 287 | } |
287 | fdi = os_get_pollfd(i); | 288 | fdi = os_get_pollfd(i); |
288 | if((fdi != -1) && (fdi != fd)){ | 289 | if ((fdi != -1) && (fdi != fd)) { |
289 | printk("find_irq_by_fd - mismatch between active_fds and " | 290 | printk("find_irq_by_fd - mismatch between active_fds and " |
290 | "pollfds, fd %d vs %d, need %d\n", irq->fd, | 291 | "pollfds, fd %d vs %d, need %d\n", irq->fd, |
291 | fdi, fd); | 292 | fdi, fd); |
@@ -294,7 +295,7 @@ static struct irq_fd *find_irq_by_fd(int fd, int irqnum, int *index_out) | |||
294 | } | 295 | } |
295 | *index_out = i; | 296 | *index_out = i; |
296 | out: | 297 | out: |
297 | return(irq); | 298 | return irq; |
298 | } | 299 | } |
299 | 300 | ||
300 | void reactivate_fd(int fd, int irqnum) | 301 | void reactivate_fd(int fd, int irqnum) |
@@ -305,7 +306,7 @@ void reactivate_fd(int fd, int irqnum) | |||
305 | 306 | ||
306 | flags = irq_lock(); | 307 | flags = irq_lock(); |
307 | irq = find_irq_by_fd(fd, irqnum, &i); | 308 | irq = find_irq_by_fd(fd, irqnum, &i); |
308 | if(irq == NULL){ | 309 | if (irq == NULL) { |
309 | irq_unlock(flags); | 310 | irq_unlock(flags); |
310 | return; | 311 | return; |
311 | } | 312 | } |
@@ -326,7 +327,7 @@ void deactivate_fd(int fd, int irqnum) | |||
326 | 327 | ||
327 | flags = irq_lock(); | 328 | flags = irq_lock(); |
328 | irq = find_irq_by_fd(fd, irqnum, &i); | 329 | irq = find_irq_by_fd(fd, irqnum, &i); |
329 | if(irq == NULL) | 330 | if (irq == NULL) |
330 | goto out; | 331 | goto out; |
331 | os_set_pollfd(i, -1); | 332 | os_set_pollfd(i, -1); |
332 | out: | 333 | out: |
@@ -338,15 +339,15 @@ int deactivate_all_fds(void) | |||
338 | struct irq_fd *irq; | 339 | struct irq_fd *irq; |
339 | int err; | 340 | int err; |
340 | 341 | ||
341 | for(irq=active_fds;irq != NULL;irq = irq->next){ | 342 | for (irq = active_fds; irq != NULL; irq = irq->next) { |
342 | err = os_clear_fd_async(irq->fd); | 343 | err = os_clear_fd_async(irq->fd); |
343 | if(err) | 344 | if (err) |
344 | return(err); | 345 | return err; |
345 | } | 346 | } |
346 | /* If there is a signal already queued, after unblocking ignore it */ | 347 | /* If there is a signal already queued, after unblocking ignore it */ |
347 | os_set_ioignore(); | 348 | os_set_ioignore(); |
348 | 349 | ||
349 | return(0); | 350 | return 0; |
350 | } | 351 | } |
351 | 352 | ||
352 | void forward_interrupts(int pid) | 353 | void forward_interrupts(int pid) |
@@ -356,9 +357,9 @@ void forward_interrupts(int pid) | |||
356 | int err; | 357 | int err; |
357 | 358 | ||
358 | flags = irq_lock(); | 359 | flags = irq_lock(); |
359 | for(irq=active_fds;irq != NULL;irq = irq->next){ | 360 | for (irq = active_fds; irq != NULL; irq = irq->next) { |
360 | err = os_set_owner(irq->fd, pid); | 361 | err = os_set_owner(irq->fd, pid); |
361 | if(err < 0){ | 362 | if (err < 0) { |
362 | /* XXX Just remove the irq rather than | 363 | /* XXX Just remove the irq rather than |
363 | * print out an infinite stream of these | 364 | * print out an infinite stream of these |
364 | */ | 365 | */ |
@@ -379,7 +380,7 @@ void forward_interrupts(int pid) | |||
379 | unsigned int do_IRQ(int irq, union uml_pt_regs *regs) | 380 | unsigned int do_IRQ(int irq, union uml_pt_regs *regs) |
380 | { | 381 | { |
381 | irq_enter(); | 382 | irq_enter(); |
382 | __do_IRQ(irq, (struct pt_regs *) regs); | 383 | __do_IRQ(irq, (struct pt_regs *)regs); |
383 | irq_exit(); | 384 | irq_exit(); |
384 | return 1; | 385 | return 1; |
385 | } | 386 | } |
@@ -392,12 +393,12 @@ int um_request_irq(unsigned int irq, int fd, int type, | |||
392 | int err; | 393 | int err; |
393 | 394 | ||
394 | err = request_irq(irq, handler, irqflags, devname, dev_id); | 395 | err = request_irq(irq, handler, irqflags, devname, dev_id); |
395 | if(err) | 396 | if (err) |
396 | return(err); | 397 | return err; |
397 | 398 | ||
398 | if(fd != -1) | 399 | if (fd != -1) |
399 | err = activate_fd(irq, fd, type, dev_id); | 400 | err = activate_fd(irq, fd, type, dev_id); |
400 | return(err); | 401 | return err; |
401 | } | 402 | } |
402 | EXPORT_SYMBOL(um_request_irq); | 403 | EXPORT_SYMBOL(um_request_irq); |
403 | EXPORT_SYMBOL(reactivate_fd); | 404 | EXPORT_SYMBOL(reactivate_fd); |
@@ -409,7 +410,7 @@ unsigned long irq_lock(void) | |||
409 | unsigned long flags; | 410 | unsigned long flags; |
410 | 411 | ||
411 | spin_lock_irqsave(&irq_spinlock, flags); | 412 | spin_lock_irqsave(&irq_spinlock, flags); |
412 | return(flags); | 413 | return flags; |
413 | } | 414 | } |
414 | 415 | ||
415 | void irq_unlock(unsigned long flags) | 416 | void irq_unlock(unsigned long flags) |
@@ -452,7 +453,7 @@ void __init init_IRQ(void) | |||
452 | irq_desc[TIMER_IRQ].depth = 1; | 453 | irq_desc[TIMER_IRQ].depth = 1; |
453 | irq_desc[TIMER_IRQ].handler = &SIGVTALRM_irq_type; | 454 | irq_desc[TIMER_IRQ].handler = &SIGVTALRM_irq_type; |
454 | enable_irq(TIMER_IRQ); | 455 | enable_irq(TIMER_IRQ); |
455 | for(i=1;i<NR_IRQS;i++){ | 456 | for (i = 1; i < NR_IRQS; i++) { |
456 | irq_desc[i].status = IRQ_DISABLED; | 457 | irq_desc[i].status = IRQ_DISABLED; |
457 | irq_desc[i].action = NULL; | 458 | irq_desc[i].action = NULL; |
458 | irq_desc[i].depth = 1; | 459 | irq_desc[i].depth = 1; |
@@ -467,7 +468,7 @@ int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, | |||
467 | int fds[2], err; | 468 | int fds[2], err; |
468 | 469 | ||
469 | err = os_pipe(fds, 1, 1); | 470 | err = os_pipe(fds, 1, 1); |
470 | if(err){ | 471 | if (err) { |
471 | printk("init_aio_irq - os_pipe failed, err = %d\n", -err); | 472 | printk("init_aio_irq - os_pipe failed, err = %d\n", -err); |
472 | goto out; | 473 | goto out; |
473 | } | 474 | } |
@@ -475,7 +476,7 @@ int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, | |||
475 | err = um_request_irq(irq, fds[0], IRQ_READ, handler, | 476 | err = um_request_irq(irq, fds[0], IRQ_READ, handler, |
476 | SA_INTERRUPT | SA_SAMPLE_RANDOM, name, | 477 | SA_INTERRUPT | SA_SAMPLE_RANDOM, name, |
477 | (void *) (long) fds[0]); | 478 | (void *) (long) fds[0]); |
478 | if(err){ | 479 | if (err) { |
479 | printk("init_aio_irq - : um_request_irq failed, err = %d\n", | 480 | printk("init_aio_irq - : um_request_irq failed, err = %d\n", |
480 | err); | 481 | err); |
481 | goto out_close; | 482 | goto out_close; |
@@ -488,5 +489,5 @@ int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, | |||
488 | os_close_file(fds[0]); | 489 | os_close_file(fds[0]); |
489 | os_close_file(fds[1]); | 490 | os_close_file(fds[1]); |
490 | out: | 491 | out: |
491 | return(err); | 492 | return err; |
492 | } | 493 | } |
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 0500800df1c1..fc0f0b085ca7 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -407,6 +407,8 @@ unsigned long find_iomem(char *driver, unsigned long *len_out) | |||
407 | *len_out = region->size; | 407 | *len_out = region->size; |
408 | return(region->virt); | 408 | return(region->virt); |
409 | } | 409 | } |
410 | |||
411 | region = region->next; | ||
410 | } | 412 | } |
411 | 413 | ||
412 | return(0); | 414 | return(0); |
diff --git a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile index 57181a920d48..ea3a8e409a6e 100644 --- a/arch/um/kernel/skas/Makefile +++ b/arch/um/kernel/skas/Makefile | |||
@@ -6,9 +6,11 @@ | |||
6 | obj-y := clone.o exec_kern.o mem.o mmu.o process_kern.o \ | 6 | obj-y := clone.o exec_kern.o mem.o mmu.o process_kern.o \ |
7 | syscall.o tlb.o uaccess.o | 7 | syscall.o tlb.o uaccess.o |
8 | 8 | ||
9 | USER_OBJS := clone.o | 9 | # clone.o is in the stub, so it can't be built with profiling |
10 | # GCC hardened also auto-enables -fpic, but we need %ebx so it can't work -> | ||
11 | # disable it | ||
10 | 12 | ||
11 | include arch/um/scripts/Makefile.rules | 13 | CFLAGS_clone.o := $(CFLAGS_NO_HARDENING) |
14 | UNPROFILE_OBJS := clone.o | ||
12 | 15 | ||
13 | # clone.o is in the stub, so it can't be built with profiling | 16 | include arch/um/scripts/Makefile.rules |
14 | $(obj)/clone.o : c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) | ||
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index 3bd10deea280..09251338d99e 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c | |||
@@ -171,7 +171,7 @@ int os_sigio_async(int master, int slave) | |||
171 | 171 | ||
172 | flags = fcntl(master, F_GETFL); | 172 | flags = fcntl(master, F_GETFL); |
173 | if(flags < 0) | 173 | if(flags < 0) |
174 | return errno; | 174 | return -errno; |
175 | 175 | ||
176 | if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || | 176 | if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || |
177 | (fcntl(master, F_SETOWN, os_getpid()) < 0)) | 177 | (fcntl(master, F_SETOWN, os_getpid()) < 0)) |
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c index e599be423da1..3788d4568d33 100644 --- a/arch/um/os-Linux/irq.c +++ b/arch/um/os-Linux/irq.c | |||
@@ -29,21 +29,21 @@ int os_waiting_for_events(struct irq_fd *active_fds) | |||
29 | int i, n, err; | 29 | int i, n, err; |
30 | 30 | ||
31 | n = poll(pollfds, pollfds_num, 0); | 31 | n = poll(pollfds, pollfds_num, 0); |
32 | if(n < 0){ | 32 | if (n < 0) { |
33 | err = -errno; | 33 | err = -errno; |
34 | if(errno != EINTR) | 34 | if (errno != EINTR) |
35 | printk("sigio_handler: os_waiting_for_events:" | 35 | printk("sigio_handler: os_waiting_for_events:" |
36 | " poll returned %d, errno = %d\n", n, errno); | 36 | " poll returned %d, errno = %d\n", n, errno); |
37 | return err; | 37 | return err; |
38 | } | 38 | } |
39 | 39 | ||
40 | if(n == 0) | 40 | if (n == 0) |
41 | return 0; | 41 | return 0; |
42 | 42 | ||
43 | irq_fd = active_fds; | 43 | irq_fd = active_fds; |
44 | 44 | ||
45 | for(i = 0; i < pollfds_num; i++){ | 45 | for (i = 0; i < pollfds_num; i++) { |
46 | if(pollfds[i].revents != 0){ | 46 | if (pollfds[i].revents != 0) { |
47 | irq_fd->current_events = pollfds[i].revents; | 47 | irq_fd->current_events = pollfds[i].revents; |
48 | pollfds[i].fd = -1; | 48 | pollfds[i].fd = -1; |
49 | } | 49 | } |
@@ -54,7 +54,7 @@ int os_waiting_for_events(struct irq_fd *active_fds) | |||
54 | 54 | ||
55 | int os_isatty(int fd) | 55 | int os_isatty(int fd) |
56 | { | 56 | { |
57 | return(isatty(fd)); | 57 | return isatty(fd); |
58 | } | 58 | } |
59 | 59 | ||
60 | int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) | 60 | int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) |
@@ -65,7 +65,7 @@ int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) | |||
65 | return((pollfds_size + 1) * sizeof(pollfds[0])); | 65 | return((pollfds_size + 1) * sizeof(pollfds[0])); |
66 | } | 66 | } |
67 | 67 | ||
68 | if(pollfds != NULL){ | 68 | if (pollfds != NULL) { |
69 | memcpy(tmp_pfd, pollfds, | 69 | memcpy(tmp_pfd, pollfds, |
70 | sizeof(pollfds[0]) * pollfds_size); | 70 | sizeof(pollfds[0]) * pollfds_size); |
71 | /* remove old pollfds */ | 71 | /* remove old pollfds */ |
@@ -73,18 +73,15 @@ int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) | |||
73 | } | 73 | } |
74 | pollfds = tmp_pfd; | 74 | pollfds = tmp_pfd; |
75 | pollfds_size++; | 75 | pollfds_size++; |
76 | } else { | 76 | } else |
77 | /* remove not used tmp_pfd */ | 77 | kfree(tmp_pfd); /* remove not used tmp_pfd */ |
78 | if (tmp_pfd != NULL) | ||
79 | kfree(tmp_pfd); | ||
80 | } | ||
81 | 78 | ||
82 | pollfds[pollfds_num] = ((struct pollfd) { .fd = fd, | 79 | pollfds[pollfds_num] = ((struct pollfd) { .fd = fd, |
83 | .events = events, | 80 | .events = events, |
84 | .revents = 0 }); | 81 | .revents = 0 }); |
85 | pollfds_num++; | 82 | pollfds_num++; |
86 | 83 | ||
87 | return(0); | 84 | return 0; |
88 | } | 85 | } |
89 | 86 | ||
90 | void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, | 87 | void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, |
@@ -94,11 +91,11 @@ void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, | |||
94 | int i = 0; | 91 | int i = 0; |
95 | 92 | ||
96 | prev = &active_fds; | 93 | prev = &active_fds; |
97 | while(*prev != NULL){ | 94 | while (*prev != NULL) { |
98 | if((*test)(*prev, arg)){ | 95 | if ((*test)(*prev, arg)) { |
99 | struct irq_fd *old_fd = *prev; | 96 | struct irq_fd *old_fd = *prev; |
100 | if((pollfds[i].fd != -1) && | 97 | if ((pollfds[i].fd != -1) && |
101 | (pollfds[i].fd != (*prev)->fd)){ | 98 | (pollfds[i].fd != (*prev)->fd)) { |
102 | printk("os_free_irq_by_cb - mismatch between " | 99 | printk("os_free_irq_by_cb - mismatch between " |
103 | "active_fds and pollfds, fd %d vs %d\n", | 100 | "active_fds and pollfds, fd %d vs %d\n", |
104 | (*prev)->fd, pollfds[i].fd); | 101 | (*prev)->fd, pollfds[i].fd); |
@@ -110,7 +107,6 @@ void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, | |||
110 | /* This moves the *whole* array after pollfds[i] | 107 | /* This moves the *whole* array after pollfds[i] |
111 | * (though it doesn't spot as such)! | 108 | * (though it doesn't spot as such)! |
112 | */ | 109 | */ |
113 | |||
114 | memmove(&pollfds[i], &pollfds[i + 1], | 110 | memmove(&pollfds[i], &pollfds[i + 1], |
115 | (pollfds_num - i) * sizeof(pollfds[0])); | 111 | (pollfds_num - i) * sizeof(pollfds[0])); |
116 | if(*last_irq_ptr2 == &old_fd->next) | 112 | if(*last_irq_ptr2 == &old_fd->next) |
@@ -129,10 +125,9 @@ void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, | |||
129 | return; | 125 | return; |
130 | } | 126 | } |
131 | 127 | ||
132 | |||
133 | int os_get_pollfd(int i) | 128 | int os_get_pollfd(int i) |
134 | { | 129 | { |
135 | return(pollfds[i].fd); | 130 | return pollfds[i].fd; |
136 | } | 131 | } |
137 | 132 | ||
138 | void os_set_pollfd(int i, int fd) | 133 | void os_set_pollfd(int i, int fd) |
@@ -151,8 +146,10 @@ void init_irq_signals(int on_sigstack) | |||
151 | int flags; | 146 | int flags; |
152 | 147 | ||
153 | flags = on_sigstack ? SA_ONSTACK : 0; | 148 | flags = on_sigstack ? SA_ONSTACK : 0; |
154 | if(timer_irq_inited) h = (__sighandler_t) alarm_handler; | 149 | if (timer_irq_inited) |
155 | else h = boot_timer_handler; | 150 | h = (__sighandler_t)alarm_handler; |
151 | else | ||
152 | h = boot_timer_handler; | ||
156 | 153 | ||
157 | set_handler(SIGVTALRM, h, flags | SA_RESTART, | 154 | set_handler(SIGVTALRM, h, flags | SA_RESTART, |
158 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); | 155 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); |
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c index 2878e89a674f..3a0ac38e978b 100644 --- a/arch/um/os-Linux/main.c +++ b/arch/um/os-Linux/main.c | |||
@@ -74,6 +74,34 @@ static void last_ditch_exit(int sig) | |||
74 | exit(1); | 74 | exit(1); |
75 | } | 75 | } |
76 | 76 | ||
77 | #define UML_LIB_PATH ":/usr/lib/uml" | ||
78 | |||
79 | static void setup_env_path(void) | ||
80 | { | ||
81 | char *new_path = NULL; | ||
82 | char *old_path = NULL; | ||
83 | int path_len = 0; | ||
84 | |||
85 | old_path = getenv("PATH"); | ||
86 | /* if no PATH variable is set or it has an empty value | ||
87 | * just use the default + /usr/lib/uml | ||
88 | */ | ||
89 | if (!old_path || (path_len = strlen(old_path)) == 0) { | ||
90 | putenv("PATH=:/bin:/usr/bin/" UML_LIB_PATH); | ||
91 | return; | ||
92 | } | ||
93 | |||
94 | /* append /usr/lib/uml to the existing path */ | ||
95 | path_len += strlen("PATH=" UML_LIB_PATH) + 1; | ||
96 | new_path = malloc(path_len); | ||
97 | if (!new_path) { | ||
98 | perror("coudn't malloc to set a new PATH"); | ||
99 | return; | ||
100 | } | ||
101 | snprintf(new_path, path_len, "PATH=%s" UML_LIB_PATH, old_path); | ||
102 | putenv(new_path); | ||
103 | } | ||
104 | |||
77 | extern int uml_exitcode; | 105 | extern int uml_exitcode; |
78 | 106 | ||
79 | extern void scan_elf_aux( char **envp); | 107 | extern void scan_elf_aux( char **envp); |
@@ -114,6 +142,8 @@ int main(int argc, char **argv, char **envp) | |||
114 | 142 | ||
115 | set_stklim(); | 143 | set_stklim(); |
116 | 144 | ||
145 | setup_env_path(); | ||
146 | |||
117 | new_argv = malloc((argc + 1) * sizeof(char *)); | 147 | new_argv = malloc((argc + 1) * sizeof(char *)); |
118 | if(new_argv == NULL){ | 148 | if(new_argv == NULL){ |
119 | perror("Mallocing argv"); | 149 | perror("Mallocing argv"); |
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 3505f44f8a25..233be2f4f8cb 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -206,29 +206,36 @@ int os_drop_memory(void *addr, int length) | |||
206 | int can_drop_memory(void) | 206 | int can_drop_memory(void) |
207 | { | 207 | { |
208 | void *addr; | 208 | void *addr; |
209 | int fd; | 209 | int fd, ok = 0; |
210 | 210 | ||
211 | printk("Checking host MADV_REMOVE support..."); | 211 | printk("Checking host MADV_REMOVE support..."); |
212 | fd = create_mem_file(UM_KERN_PAGE_SIZE); | 212 | fd = create_mem_file(UM_KERN_PAGE_SIZE); |
213 | if(fd < 0){ | 213 | if(fd < 0){ |
214 | printk("Creating test memory file failed, err = %d\n", -fd); | 214 | printk("Creating test memory file failed, err = %d\n", -fd); |
215 | return 0; | 215 | goto out; |
216 | } | 216 | } |
217 | 217 | ||
218 | addr = mmap64(NULL, UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE, | 218 | addr = mmap64(NULL, UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE, |
219 | MAP_SHARED, fd, 0); | 219 | MAP_SHARED, fd, 0); |
220 | if(addr == MAP_FAILED){ | 220 | if(addr == MAP_FAILED){ |
221 | printk("Mapping test memory file failed, err = %d\n", -errno); | 221 | printk("Mapping test memory file failed, err = %d\n", -errno); |
222 | return 0; | 222 | goto out_close; |
223 | } | 223 | } |
224 | 224 | ||
225 | if(madvise(addr, UM_KERN_PAGE_SIZE, MADV_REMOVE) != 0){ | 225 | if(madvise(addr, UM_KERN_PAGE_SIZE, MADV_REMOVE) != 0){ |
226 | printk("MADV_REMOVE failed, err = %d\n", -errno); | 226 | printk("MADV_REMOVE failed, err = %d\n", -errno); |
227 | return 0; | 227 | goto out_unmap; |
228 | } | 228 | } |
229 | 229 | ||
230 | printk("OK\n"); | 230 | printk("OK\n"); |
231 | return 1; | 231 | ok = 1; |
232 | |||
233 | out_unmap: | ||
234 | munmap(addr, UM_KERN_PAGE_SIZE); | ||
235 | out_close: | ||
236 | close(fd); | ||
237 | out: | ||
238 | return ok; | ||
232 | } | 239 | } |
233 | 240 | ||
234 | void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) | 241 | void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 0776bc18ca85..bd89c6b99d5d 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -344,12 +344,12 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
344 | err = ptrace_setregs(pid, regs); | 344 | err = ptrace_setregs(pid, regs); |
345 | if(err < 0) | 345 | if(err < 0) |
346 | panic("copy_context_skas0 : PTRACE_SETREGS failed, " | 346 | panic("copy_context_skas0 : PTRACE_SETREGS failed, " |
347 | "pid = %d, errno = %d\n", pid, errno); | 347 | "pid = %d, errno = %d\n", pid, -err); |
348 | 348 | ||
349 | err = ptrace_setfpregs(pid, fp_regs); | 349 | err = ptrace_setfpregs(pid, fp_regs); |
350 | if(err < 0) | 350 | if(err < 0) |
351 | panic("copy_context_skas0 : PTRACE_SETFPREGS failed, " | 351 | panic("copy_context_skas0 : PTRACE_SETFPREGS failed, " |
352 | "pid = %d, errno = %d\n", pid, errno); | 352 | "pid = %d, errno = %d\n", pid, -err); |
353 | 353 | ||
354 | /* set a well known return code for detection of child write failure */ | 354 | /* set a well known return code for detection of child write failure */ |
355 | child_data->err = 12345678; | 355 | child_data->err = 12345678; |
@@ -362,7 +362,7 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
362 | pid = data->err; | 362 | pid = data->err; |
363 | if(pid < 0) | 363 | if(pid < 0) |
364 | panic("copy_context_skas0 - stub-parent reports error %d\n", | 364 | panic("copy_context_skas0 - stub-parent reports error %d\n", |
365 | pid); | 365 | -pid); |
366 | 366 | ||
367 | /* Wait, until child has finished too: read child's result from | 367 | /* Wait, until child has finished too: read child's result from |
368 | * child's stack and check it. | 368 | * child's stack and check it. |
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index 7a6f6b99ceff..516f66dd87e3 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c | |||
@@ -104,7 +104,7 @@ void init_registers(int pid) | |||
104 | err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); | 104 | err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); |
105 | if(err) | 105 | if(err) |
106 | panic("check_ptrace : PTRACE_GETREGS failed, errno = %d", | 106 | panic("check_ptrace : PTRACE_GETREGS failed, errno = %d", |
107 | err); | 107 | errno); |
108 | 108 | ||
109 | errno = 0; | 109 | errno = 0; |
110 | err = ptrace(PTRACE_GETFPXREGS, pid, 0, exec_fpx_regs); | 110 | err = ptrace(PTRACE_GETFPXREGS, pid, 0, exec_fpx_regs); |
@@ -119,7 +119,7 @@ void init_registers(int pid) | |||
119 | err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs); | 119 | err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs); |
120 | if(err) | 120 | if(err) |
121 | panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d", | 121 | panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d", |
122 | err); | 122 | errno); |
123 | } | 123 | } |
124 | 124 | ||
125 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) | 125 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) |
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c index 001941fa1a1e..becd898d9398 100644 --- a/arch/um/os-Linux/sys-x86_64/registers.c +++ b/arch/um/os-Linux/sys-x86_64/registers.c | |||
@@ -62,12 +62,12 @@ void init_registers(int pid) | |||
62 | err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); | 62 | err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); |
63 | if(err) | 63 | if(err) |
64 | panic("check_ptrace : PTRACE_GETREGS failed, errno = %d", | 64 | panic("check_ptrace : PTRACE_GETREGS failed, errno = %d", |
65 | err); | 65 | errno); |
66 | 66 | ||
67 | err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs); | 67 | err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs); |
68 | if(err) | 68 | if(err) |
69 | panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d", | 69 | panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d", |
70 | err); | 70 | errno); |
71 | } | 71 | } |
72 | 72 | ||
73 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) | 73 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) |
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index 34bfc1bb9e38..362db059fe30 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c | |||
@@ -178,14 +178,14 @@ static void __init create_pid_file(void) | |||
178 | fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0644); | 178 | fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0644); |
179 | if(fd < 0){ | 179 | if(fd < 0){ |
180 | printk("Open of machine pid file \"%s\" failed: %s\n", | 180 | printk("Open of machine pid file \"%s\" failed: %s\n", |
181 | file, strerror(-fd)); | 181 | file, strerror(errno)); |
182 | return; | 182 | return; |
183 | } | 183 | } |
184 | 184 | ||
185 | snprintf(pid, sizeof(pid), "%d\n", getpid()); | 185 | snprintf(pid, sizeof(pid), "%d\n", getpid()); |
186 | n = write(fd, pid, strlen(pid)); | 186 | n = write(fd, pid, strlen(pid)); |
187 | if(n != strlen(pid)) | 187 | if(n != strlen(pid)) |
188 | printk("Write of pid file failed - err = %d\n", -n); | 188 | printk("Write of pid file failed - err = %d\n", errno); |
189 | 189 | ||
190 | close(fd); | 190 | close(fd); |
191 | } | 191 | } |
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index 2598158e1f53..3f33165ada68 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c | |||
@@ -96,6 +96,13 @@ EXPORT_SYMBOL_PROTO(getuid); | |||
96 | EXPORT_SYMBOL_PROTO(fsync); | 96 | EXPORT_SYMBOL_PROTO(fsync); |
97 | EXPORT_SYMBOL_PROTO(fdatasync); | 97 | EXPORT_SYMBOL_PROTO(fdatasync); |
98 | 98 | ||
99 | /* Export symbols used by GCC for the stack protector. */ | ||
100 | extern void __stack_smash_handler(void *) __attribute__((weak)); | ||
101 | EXPORT_SYMBOL(__stack_smash_handler); | ||
102 | |||
103 | extern long __guard __attribute__((weak)); | ||
104 | EXPORT_SYMBOL(__guard); | ||
105 | |||
99 | /* | 106 | /* |
100 | * Overrides for Emacs so that we follow Linus's tabbing style. | 107 | * Overrides for Emacs so that we follow Linus's tabbing style. |
101 | * Emacs will notice this stuff at the end of the file and automatically | 108 | * Emacs will notice this stuff at the end of the file and automatically |
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 5e7a9c310aa5..1347dc6d5218 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -7,11 +7,19 @@ USER_SINGLE_OBJS := \ | |||
7 | USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) | 7 | USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) |
8 | USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | 8 | USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) |
9 | 9 | ||
10 | $(USER_OBJS) $(USER_OBJS:.o=.i) $(USER_OBJS:.o=.s) $(USER_OBJS:.o=.lst): \ | 10 | $(USER_OBJS:.o=.%): \ |
11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(notdir $@)) | 11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(*F).o) |
12 | $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ | 12 | $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ |
13 | -Dunix -D__unix__ -D__$(SUBARCH)__ | 13 | -Dunix -D__unix__ -D__$(SUBARCH)__ |
14 | 14 | ||
15 | # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of | ||
16 | # using it directly. | ||
17 | UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file)) | ||
18 | |||
19 | $(UNPROFILE_OBJS:.o=.%): \ | ||
20 | c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(*F).o) | ||
21 | $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ | ||
22 | -Dunix -D__unix__ -D__$(SUBARCH)__ | ||
15 | 23 | ||
16 | # The stubs and unmap.o can't try to call mcount or update basic block data | 24 | # The stubs and unmap.o can't try to call mcount or update basic block data |
17 | define unprofile | 25 | define unprofile |
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 98b20b7bba4f..374d61a19439 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -8,11 +8,16 @@ subarch-obj-y = lib/bitops.o kernel/semaphore.o | |||
8 | subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o | 8 | subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o |
9 | subarch-obj-$(CONFIG_MODULES) += kernel/module.o | 9 | subarch-obj-$(CONFIG_MODULES) += kernel/module.o |
10 | 10 | ||
11 | USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o stub_segv.o | 11 | USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o |
12 | 12 | ||
13 | include arch/um/scripts/Makefile.rules | 13 | USER_OBJS += user-offsets.s |
14 | extra-y += user-offsets.s | ||
14 | 15 | ||
15 | extra-$(CONFIG_MODE_TT) += unmap.o | 16 | extra-$(CONFIG_MODE_TT) += unmap.o |
16 | 17 | ||
17 | $(obj)/stub_segv.o $(obj)/unmap.o: \ | 18 | UNPROFILE_OBJS := stub_segv.o |
18 | _c_flags = $(call unprofile,$(CFLAGS)) | 19 | CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) |
20 | |||
21 | include arch/um/scripts/Makefile.rules | ||
22 | |||
23 | $(obj)/unmap.%: _c_flags = $(call unprofile,$(CFLAGS)) | ||
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index b5fc22babddf..c19794d435d6 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -16,11 +16,16 @@ subarch-obj-$(CONFIG_MODULES) += kernel/module.o | |||
16 | 16 | ||
17 | ldt-y = ../sys-i386/ldt.o | 17 | ldt-y = ../sys-i386/ldt.o |
18 | 18 | ||
19 | USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o | 19 | USER_OBJS := ptrace_user.o sigcontext.o |
20 | 20 | ||
21 | include arch/um/scripts/Makefile.rules | 21 | USER_OBJS += user-offsets.s |
22 | extra-y += user-offsets.s | ||
22 | 23 | ||
23 | extra-$(CONFIG_MODE_TT) += unmap.o | 24 | extra-$(CONFIG_MODE_TT) += unmap.o |
24 | 25 | ||
25 | $(obj)/stub_segv.o $(obj)/unmap.o: \ | 26 | UNPROFILE_OBJS := stub_segv.o |
26 | _c_flags = $(call unprofile,$(CFLAGS)) | 27 | CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) |
28 | |||
29 | include arch/um/scripts/Makefile.rules | ||
30 | |||
31 | $(obj)/unmap.%: _c_flags = $(call unprofile,$(CFLAGS)) | ||
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index 57fc37e0fb9c..5a92fed2d1d5 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -695,4 +695,5 @@ ia32_sys_call_table: | |||
695 | .quad sys_splice | 695 | .quad sys_splice |
696 | .quad sys_sync_file_range | 696 | .quad sys_sync_file_range |
697 | .quad sys_tee | 697 | .quad sys_tee |
698 | .quad compat_sys_vmsplice | ||
698 | ia32_syscall_end: | 699 | ia32_syscall_end: |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 759070c82751..ebc3c33b1c6c 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -1426,3 +1426,22 @@ struct seq_operations cpuinfo_op = { | |||
1426 | .show = show_cpuinfo, | 1426 | .show = show_cpuinfo, |
1427 | }; | 1427 | }; |
1428 | 1428 | ||
1429 | #ifdef CONFIG_INPUT_PCSPKR | ||
1430 | #include <linux/platform_device.h> | ||
1431 | static __init int add_pcspkr(void) | ||
1432 | { | ||
1433 | struct platform_device *pd; | ||
1434 | int ret; | ||
1435 | |||
1436 | pd = platform_device_alloc("pcspkr", -1); | ||
1437 | if (!pd) | ||
1438 | return -ENOMEM; | ||
1439 | |||
1440 | ret = platform_device_add(pd); | ||
1441 | if (ret) | ||
1442 | platform_device_put(pd); | ||
1443 | |||
1444 | return ret; | ||
1445 | } | ||
1446 | device_initcall(add_pcspkr); | ||
1447 | #endif | ||
diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c index d3a2bc36129b..588fca542a98 100644 --- a/drivers/char/genrtc.c +++ b/drivers/char/genrtc.c | |||
@@ -200,13 +200,13 @@ static ssize_t gen_rtc_read(struct file *file, char __user *buf, | |||
200 | /* first test allows optimizer to nuke this case for 32-bit machines */ | 200 | /* first test allows optimizer to nuke this case for 32-bit machines */ |
201 | if (sizeof (int) != sizeof (long) && count == sizeof (unsigned int)) { | 201 | if (sizeof (int) != sizeof (long) && count == sizeof (unsigned int)) { |
202 | unsigned int uidata = data; | 202 | unsigned int uidata = data; |
203 | retval = put_user(uidata, (unsigned long __user *)buf); | 203 | retval = put_user(uidata, (unsigned int __user *)buf) ?: |
204 | sizeof(unsigned int); | ||
204 | } | 205 | } |
205 | else { | 206 | else { |
206 | retval = put_user(data, (unsigned long __user *)buf); | 207 | retval = put_user(data, (unsigned long __user *)buf) ?: |
208 | sizeof(unsigned long); | ||
207 | } | 209 | } |
208 | if (!retval) | ||
209 | retval = sizeof(unsigned long); | ||
210 | out: | 210 | out: |
211 | current->state = TASK_RUNNING; | 211 | current->state = TASK_RUNNING; |
212 | remove_wait_queue(&gen_rtc_wait, &wait); | 212 | remove_wait_queue(&gen_rtc_wait, &wait); |
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 935670a3cd98..5755b7e5f187 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -860,9 +860,32 @@ static void k_slock(struct vc_data *vc, unsigned char value, char up_flag, struc | |||
860 | } | 860 | } |
861 | 861 | ||
862 | /* by default, 300ms interval for combination release */ | 862 | /* by default, 300ms interval for combination release */ |
863 | static long brl_timeout = 300; | 863 | static unsigned brl_timeout = 300; |
864 | MODULE_PARM_DESC(brl_timeout, "Braille keys release delay in ms (0 for combination on first release, < 0 for dead characters)"); | 864 | MODULE_PARM_DESC(brl_timeout, "Braille keys release delay in ms (0 for commit on first key release)"); |
865 | module_param(brl_timeout, long, 0644); | 865 | module_param(brl_timeout, uint, 0644); |
866 | |||
867 | static unsigned brl_nbchords = 1; | ||
868 | MODULE_PARM_DESC(brl_nbchords, "Number of chords that produce a braille pattern (0 for dead chords)"); | ||
869 | module_param(brl_nbchords, uint, 0644); | ||
870 | |||
871 | static void k_brlcommit(struct vc_data *vc, unsigned int pattern, char up_flag, struct pt_regs *regs) | ||
872 | { | ||
873 | static unsigned long chords; | ||
874 | static unsigned committed; | ||
875 | |||
876 | if (!brl_nbchords) | ||
877 | k_deadunicode(vc, BRL_UC_ROW | pattern, up_flag, regs); | ||
878 | else { | ||
879 | committed |= pattern; | ||
880 | chords++; | ||
881 | if (chords == brl_nbchords) { | ||
882 | k_unicode(vc, BRL_UC_ROW | committed, up_flag, regs); | ||
883 | chords = 0; | ||
884 | committed = 0; | ||
885 | } | ||
886 | } | ||
887 | } | ||
888 | |||
866 | static void k_brl(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) | 889 | static void k_brl(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) |
867 | { | 890 | { |
868 | static unsigned pressed,committing; | 891 | static unsigned pressed,committing; |
@@ -882,11 +905,6 @@ static void k_brl(struct vc_data *vc, unsigned char value, char up_flag, struct | |||
882 | if (value > 8) | 905 | if (value > 8) |
883 | return; | 906 | return; |
884 | 907 | ||
885 | if (brl_timeout < 0) { | ||
886 | k_deadunicode(vc, BRL_UC_ROW | (1 << (value - 1)), up_flag, regs); | ||
887 | return; | ||
888 | } | ||
889 | |||
890 | if (up_flag) { | 908 | if (up_flag) { |
891 | if (brl_timeout) { | 909 | if (brl_timeout) { |
892 | if (!committing || | 910 | if (!committing || |
@@ -897,13 +915,13 @@ static void k_brl(struct vc_data *vc, unsigned char value, char up_flag, struct | |||
897 | pressed &= ~(1 << (value - 1)); | 915 | pressed &= ~(1 << (value - 1)); |
898 | if (!pressed) { | 916 | if (!pressed) { |
899 | if (committing) { | 917 | if (committing) { |
900 | k_unicode(vc, BRL_UC_ROW | committing, 0, regs); | 918 | k_brlcommit(vc, committing, 0, regs); |
901 | committing = 0; | 919 | committing = 0; |
902 | } | 920 | } |
903 | } | 921 | } |
904 | } else { | 922 | } else { |
905 | if (committing) { | 923 | if (committing) { |
906 | k_unicode(vc, BRL_UC_ROW | committing, 0, regs); | 924 | k_brlcommit(vc, committing, 0, regs); |
907 | committing = 0; | 925 | committing = 0; |
908 | } | 926 | } |
909 | pressed &= ~(1 << (value - 1)); | 927 | pressed &= ~(1 << (value - 1)); |
diff --git a/drivers/infiniband/hw/ipath/ipath_debug.h b/drivers/infiniband/hw/ipath/ipath_debug.h index 593e28969c69..46762387f5f8 100644 --- a/drivers/infiniband/hw/ipath/ipath_debug.h +++ b/drivers/infiniband/hw/ipath/ipath_debug.h | |||
@@ -60,11 +60,11 @@ | |||
60 | #define __IPATH_KERNEL_SEND 0x2000 /* use kernel mode send */ | 60 | #define __IPATH_KERNEL_SEND 0x2000 /* use kernel mode send */ |
61 | #define __IPATH_EPKTDBG 0x4000 /* print ethernet packet data */ | 61 | #define __IPATH_EPKTDBG 0x4000 /* print ethernet packet data */ |
62 | #define __IPATH_SMADBG 0x8000 /* sma packet debug */ | 62 | #define __IPATH_SMADBG 0x8000 /* sma packet debug */ |
63 | #define __IPATH_IPATHDBG 0x10000 /* Ethernet (IPATH) general debug on */ | 63 | #define __IPATH_IPATHDBG 0x10000 /* Ethernet (IPATH) gen debug */ |
64 | #define __IPATH_IPATHWARN 0x20000 /* Ethernet (IPATH) warnings on */ | 64 | #define __IPATH_IPATHWARN 0x20000 /* Ethernet (IPATH) warnings */ |
65 | #define __IPATH_IPATHERR 0x40000 /* Ethernet (IPATH) errors on */ | 65 | #define __IPATH_IPATHERR 0x40000 /* Ethernet (IPATH) errors */ |
66 | #define __IPATH_IPATHPD 0x80000 /* Ethernet (IPATH) packet dump on */ | 66 | #define __IPATH_IPATHPD 0x80000 /* Ethernet (IPATH) packet dump */ |
67 | #define __IPATH_IPATHTABLE 0x100000 /* Ethernet (IPATH) table dump on */ | 67 | #define __IPATH_IPATHTABLE 0x100000 /* Ethernet (IPATH) table dump */ |
68 | 68 | ||
69 | #else /* _IPATH_DEBUGGING */ | 69 | #else /* _IPATH_DEBUGGING */ |
70 | 70 | ||
@@ -79,11 +79,12 @@ | |||
79 | #define __IPATH_TRSAMPLE 0x0 /* generate trace buffer sample entries */ | 79 | #define __IPATH_TRSAMPLE 0x0 /* generate trace buffer sample entries */ |
80 | #define __IPATH_VERBDBG 0x0 /* very verbose debug */ | 80 | #define __IPATH_VERBDBG 0x0 /* very verbose debug */ |
81 | #define __IPATH_PKTDBG 0x0 /* print packet data */ | 81 | #define __IPATH_PKTDBG 0x0 /* print packet data */ |
82 | #define __IPATH_PROCDBG 0x0 /* print process startup (init)/exit messages */ | 82 | #define __IPATH_PROCDBG 0x0 /* process startup (init)/exit messages */ |
83 | /* print mmap/nopage stuff, not using VDBG any more */ | 83 | /* print mmap/nopage stuff, not using VDBG any more */ |
84 | #define __IPATH_MMDBG 0x0 | 84 | #define __IPATH_MMDBG 0x0 |
85 | #define __IPATH_EPKTDBG 0x0 /* print ethernet packet data */ | 85 | #define __IPATH_EPKTDBG 0x0 /* print ethernet packet data */ |
86 | #define __IPATH_SMADBG 0x0 /* print process startup (init)/exit messages */#define __IPATH_IPATHDBG 0x0 /* Ethernet (IPATH) table dump on */ | 86 | #define __IPATH_SMADBG 0x0 /* process startup (init)/exit messages */ |
87 | #define __IPATH_IPATHDBG 0x0 /* Ethernet (IPATH) table dump on */ | ||
87 | #define __IPATH_IPATHWARN 0x0 /* Ethernet (IPATH) warnings on */ | 88 | #define __IPATH_IPATHWARN 0x0 /* Ethernet (IPATH) warnings on */ |
88 | #define __IPATH_IPATHERR 0x0 /* Ethernet (IPATH) errors on */ | 89 | #define __IPATH_IPATHERR 0x0 /* Ethernet (IPATH) errors on */ |
89 | #define __IPATH_IPATHPD 0x0 /* Ethernet (IPATH) packet dump on */ | 90 | #define __IPATH_IPATHPD 0x0 /* Ethernet (IPATH) packet dump on */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c index 7d3fb6996b41..28ddceb260e8 100644 --- a/drivers/infiniband/hw/ipath/ipath_diag.c +++ b/drivers/infiniband/hw/ipath/ipath_diag.c | |||
@@ -277,13 +277,14 @@ static int ipath_diag_open(struct inode *in, struct file *fp) | |||
277 | 277 | ||
278 | bail: | 278 | bail: |
279 | spin_unlock_irqrestore(&ipath_devs_lock, flags); | 279 | spin_unlock_irqrestore(&ipath_devs_lock, flags); |
280 | mutex_unlock(&ipath_mutex); | ||
281 | 280 | ||
282 | /* Only expose a way to reset the device if we | 281 | /* Only expose a way to reset the device if we |
283 | make it into diag mode. */ | 282 | make it into diag mode. */ |
284 | if (ret == 0) | 283 | if (ret == 0) |
285 | ipath_expose_reset(&dd->pcidev->dev); | 284 | ipath_expose_reset(&dd->pcidev->dev); |
286 | 285 | ||
286 | mutex_unlock(&ipath_mutex); | ||
287 | |||
287 | return ret; | 288 | return ret; |
288 | } | 289 | } |
289 | 290 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index e7617c3982ea..398add4d4cb1 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -418,9 +418,19 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
418 | 418 | ||
419 | ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK); | 419 | ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK); |
420 | if (ret) { | 420 | if (ret) { |
421 | dev_info(&pdev->dev, "pci_set_dma_mask unit %u " | 421 | /* |
422 | "fails: %d\n", dd->ipath_unit, ret); | 422 | * if the 64 bit setup fails, try 32 bit. Some systems |
423 | goto bail_regions; | 423 | * do not setup 64 bit maps on systems with 2GB or less |
424 | * memory installed. | ||
425 | */ | ||
426 | ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | ||
427 | if (ret) { | ||
428 | dev_info(&pdev->dev, "pci_set_dma_mask unit %u " | ||
429 | "fails: %d\n", dd->ipath_unit, ret); | ||
430 | goto bail_regions; | ||
431 | } | ||
432 | else | ||
433 | ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); | ||
424 | } | 434 | } |
425 | 435 | ||
426 | pci_set_master(pdev); | 436 | pci_set_master(pdev); |
@@ -1949,7 +1959,7 @@ int ipath_reset_device(int unit) | |||
1949 | } | 1959 | } |
1950 | 1960 | ||
1951 | if (dd->ipath_pd) | 1961 | if (dd->ipath_pd) |
1952 | for (i = 1; i < dd->ipath_portcnt; i++) { | 1962 | for (i = 1; i < dd->ipath_cfgports; i++) { |
1953 | if (dd->ipath_pd[i] && dd->ipath_pd[i]->port_cnt) { | 1963 | if (dd->ipath_pd[i] && dd->ipath_pd[i]->port_cnt) { |
1954 | ipath_dbg("unit %u port %d is in use " | 1964 | ipath_dbg("unit %u port %d is in use " |
1955 | "(PID %u cmd %s), can't reset\n", | 1965 | "(PID %u cmd %s), can't reset\n", |
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index 2823ff9c0c62..16f640e1c16e 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c | |||
@@ -53,13 +53,19 @@ MODULE_PARM_DESC(cfgports, "Set max number of ports to use"); | |||
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Number of buffers reserved for driver (layered drivers and SMA | 55 | * Number of buffers reserved for driver (layered drivers and SMA |
56 | * send). Reserved at end of buffer list. | 56 | * send). Reserved at end of buffer list. Initialized based on |
57 | * number of PIO buffers if not set via module interface. | ||
58 | * The problem with this is that it's global, but we'll use different | ||
59 | * numbers for different chip types. So the default value is not | ||
60 | * very useful. I've redefined it for the 1.3 release so that it's | ||
61 | * zero unless set by the user to something else, in which case we | ||
62 | * try to respect it. | ||
57 | */ | 63 | */ |
58 | static ushort ipath_kpiobufs = 32; | 64 | static ushort ipath_kpiobufs; |
59 | 65 | ||
60 | static int ipath_set_kpiobufs(const char *val, struct kernel_param *kp); | 66 | static int ipath_set_kpiobufs(const char *val, struct kernel_param *kp); |
61 | 67 | ||
62 | module_param_call(kpiobufs, ipath_set_kpiobufs, param_get_uint, | 68 | module_param_call(kpiobufs, ipath_set_kpiobufs, param_get_ushort, |
63 | &ipath_kpiobufs, S_IWUSR | S_IRUGO); | 69 | &ipath_kpiobufs, S_IWUSR | S_IRUGO); |
64 | MODULE_PARM_DESC(kpiobufs, "Set number of PIO buffers for driver"); | 70 | MODULE_PARM_DESC(kpiobufs, "Set number of PIO buffers for driver"); |
65 | 71 | ||
@@ -531,8 +537,11 @@ static int init_housekeeping(struct ipath_devdata *dd, | |||
531 | * Don't clear ipath_flags as 8bit mode was set before | 537 | * Don't clear ipath_flags as 8bit mode was set before |
532 | * entering this func. However, we do set the linkstate to | 538 | * entering this func. However, we do set the linkstate to |
533 | * unknown, so we can watch for a transition. | 539 | * unknown, so we can watch for a transition. |
540 | * PRESENT is set because we want register reads to work, | ||
541 | * and the kernel infrastructure saw it in config space; | ||
542 | * We clear it if we have failures. | ||
534 | */ | 543 | */ |
535 | dd->ipath_flags |= IPATH_LINKUNK; | 544 | dd->ipath_flags |= IPATH_LINKUNK | IPATH_PRESENT; |
536 | dd->ipath_flags &= ~(IPATH_LINKACTIVE | IPATH_LINKARMED | | 545 | dd->ipath_flags &= ~(IPATH_LINKACTIVE | IPATH_LINKARMED | |
537 | IPATH_LINKDOWN | IPATH_LINKINIT); | 546 | IPATH_LINKDOWN | IPATH_LINKINIT); |
538 | 547 | ||
@@ -560,6 +569,7 @@ static int init_housekeeping(struct ipath_devdata *dd, | |||
560 | || (dd->ipath_uregbase & 0xffffffff) == 0xffffffff) { | 569 | || (dd->ipath_uregbase & 0xffffffff) == 0xffffffff) { |
561 | ipath_dev_err(dd, "Register read failures from chip, " | 570 | ipath_dev_err(dd, "Register read failures from chip, " |
562 | "giving up initialization\n"); | 571 | "giving up initialization\n"); |
572 | dd->ipath_flags &= ~IPATH_PRESENT; | ||
563 | ret = -ENODEV; | 573 | ret = -ENODEV; |
564 | goto done; | 574 | goto done; |
565 | } | 575 | } |
@@ -682,16 +692,14 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
682 | */ | 692 | */ |
683 | dd->ipath_pioavregs = ALIGN(val, sizeof(u64) * BITS_PER_BYTE / 2) | 693 | dd->ipath_pioavregs = ALIGN(val, sizeof(u64) * BITS_PER_BYTE / 2) |
684 | / (sizeof(u64) * BITS_PER_BYTE / 2); | 694 | / (sizeof(u64) * BITS_PER_BYTE / 2); |
685 | if (!ipath_kpiobufs) /* have to have at least 1, for SMA */ | 695 | if (ipath_kpiobufs == 0) { |
686 | kpiobufs = ipath_kpiobufs = 1; | 696 | /* not set by user, or set explictly to default */ |
687 | else if ((dd->ipath_piobcnt2k + dd->ipath_piobcnt4k) < | 697 | if ((dd->ipath_piobcnt2k + dd->ipath_piobcnt4k) > 128) |
688 | (dd->ipath_cfgports * IPATH_MIN_USER_PORT_BUFCNT)) { | 698 | kpiobufs = 32; |
689 | dev_info(&dd->pcidev->dev, "Too few PIO buffers (%u) " | 699 | else |
690 | "for %u ports to have %u each!\n", | 700 | kpiobufs = 16; |
691 | dd->ipath_piobcnt2k + dd->ipath_piobcnt4k, | 701 | } |
692 | dd->ipath_cfgports, IPATH_MIN_USER_PORT_BUFCNT); | 702 | else |
693 | kpiobufs = 1; /* reserve just the minimum for SMA/ether */ | ||
694 | } else | ||
695 | kpiobufs = ipath_kpiobufs; | 703 | kpiobufs = ipath_kpiobufs; |
696 | 704 | ||
697 | if (kpiobufs > | 705 | if (kpiobufs > |
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index 0bcb428041f3..3e72a1fe3d73 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c | |||
@@ -665,14 +665,14 @@ static void handle_layer_pioavail(struct ipath_devdata *dd) | |||
665 | 665 | ||
666 | ret = __ipath_layer_intr(dd, IPATH_LAYER_INT_SEND_CONTINUE); | 666 | ret = __ipath_layer_intr(dd, IPATH_LAYER_INT_SEND_CONTINUE); |
667 | if (ret > 0) | 667 | if (ret > 0) |
668 | goto clear; | 668 | goto set; |
669 | 669 | ||
670 | ret = __ipath_verbs_piobufavail(dd); | 670 | ret = __ipath_verbs_piobufavail(dd); |
671 | if (ret > 0) | 671 | if (ret > 0) |
672 | goto clear; | 672 | goto set; |
673 | 673 | ||
674 | return; | 674 | return; |
675 | clear: | 675 | set: |
676 | set_bit(IPATH_S_PIOINTBUFAVAIL, &dd->ipath_sendctrl); | 676 | set_bit(IPATH_S_PIOINTBUFAVAIL, &dd->ipath_sendctrl); |
677 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | 677 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, |
678 | dd->ipath_sendctrl); | 678 | dd->ipath_sendctrl); |
@@ -719,11 +719,24 @@ static void handle_rcv(struct ipath_devdata *dd, u32 istat) | |||
719 | irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) | 719 | irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) |
720 | { | 720 | { |
721 | struct ipath_devdata *dd = data; | 721 | struct ipath_devdata *dd = data; |
722 | u32 istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus); | 722 | u32 istat; |
723 | ipath_err_t estat = 0; | 723 | ipath_err_t estat = 0; |
724 | static unsigned unexpected = 0; | 724 | static unsigned unexpected = 0; |
725 | irqreturn_t ret; | 725 | irqreturn_t ret; |
726 | 726 | ||
727 | if(!(dd->ipath_flags & IPATH_PRESENT)) { | ||
728 | /* this is mostly so we don't try to touch the chip while | ||
729 | * it is being reset */ | ||
730 | /* | ||
731 | * This return value is perhaps odd, but we do not want the | ||
732 | * interrupt core code to remove our interrupt handler | ||
733 | * because we don't appear to be handling an interrupt | ||
734 | * during a chip reset. | ||
735 | */ | ||
736 | return IRQ_HANDLED; | ||
737 | } | ||
738 | |||
739 | istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus); | ||
727 | if (unlikely(!istat)) { | 740 | if (unlikely(!istat)) { |
728 | ipath_stats.sps_nullintr++; | 741 | ipath_stats.sps_nullintr++; |
729 | ret = IRQ_NONE; /* not our interrupt, or already handled */ | 742 | ret = IRQ_NONE; /* not our interrupt, or already handled */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 0ce5f19c9d62..e6507f8115bc 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -731,7 +731,7 @@ u64 ipath_read_kreg64_port(const struct ipath_devdata *, ipath_kreg, | |||
731 | static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd, | 731 | static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd, |
732 | ipath_ureg regno, int port) | 732 | ipath_ureg regno, int port) |
733 | { | 733 | { |
734 | if (!dd->ipath_kregbase) | 734 | if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT)) |
735 | return 0; | 735 | return 0; |
736 | 736 | ||
737 | return readl(regno + (u64 __iomem *) | 737 | return readl(regno + (u64 __iomem *) |
@@ -762,7 +762,7 @@ static inline void ipath_write_ureg(const struct ipath_devdata *dd, | |||
762 | static inline u32 ipath_read_kreg32(const struct ipath_devdata *dd, | 762 | static inline u32 ipath_read_kreg32(const struct ipath_devdata *dd, |
763 | ipath_kreg regno) | 763 | ipath_kreg regno) |
764 | { | 764 | { |
765 | if (!dd->ipath_kregbase) | 765 | if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT)) |
766 | return -1; | 766 | return -1; |
767 | return readl((u32 __iomem *) & dd->ipath_kregbase[regno]); | 767 | return readl((u32 __iomem *) & dd->ipath_kregbase[regno]); |
768 | } | 768 | } |
@@ -770,7 +770,7 @@ static inline u32 ipath_read_kreg32(const struct ipath_devdata *dd, | |||
770 | static inline u64 ipath_read_kreg64(const struct ipath_devdata *dd, | 770 | static inline u64 ipath_read_kreg64(const struct ipath_devdata *dd, |
771 | ipath_kreg regno) | 771 | ipath_kreg regno) |
772 | { | 772 | { |
773 | if (!dd->ipath_kregbase) | 773 | if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT)) |
774 | return -1; | 774 | return -1; |
775 | 775 | ||
776 | return readq(&dd->ipath_kregbase[regno]); | 776 | return readq(&dd->ipath_kregbase[regno]); |
@@ -786,7 +786,7 @@ static inline void ipath_write_kreg(const struct ipath_devdata *dd, | |||
786 | static inline u64 ipath_read_creg(const struct ipath_devdata *dd, | 786 | static inline u64 ipath_read_creg(const struct ipath_devdata *dd, |
787 | ipath_sreg regno) | 787 | ipath_sreg regno) |
788 | { | 788 | { |
789 | if (!dd->ipath_kregbase) | 789 | if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT)) |
790 | return 0; | 790 | return 0; |
791 | 791 | ||
792 | return readq(regno + (u64 __iomem *) | 792 | return readq(regno + (u64 __iomem *) |
@@ -797,7 +797,7 @@ static inline u64 ipath_read_creg(const struct ipath_devdata *dd, | |||
797 | static inline u32 ipath_read_creg32(const struct ipath_devdata *dd, | 797 | static inline u32 ipath_read_creg32(const struct ipath_devdata *dd, |
798 | ipath_sreg regno) | 798 | ipath_sreg regno) |
799 | { | 799 | { |
800 | if (!dd->ipath_kregbase) | 800 | if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT)) |
801 | return 0; | 801 | return 0; |
802 | return readl(regno + (u64 __iomem *) | 802 | return readl(regno + (u64 __iomem *) |
803 | (dd->ipath_cregbase + | 803 | (dd->ipath_cregbase + |
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.c b/drivers/infiniband/hw/ipath/ipath_layer.c index 69ed1100701a..9cb5258ffed9 100644 --- a/drivers/infiniband/hw/ipath/ipath_layer.c +++ b/drivers/infiniband/hw/ipath/ipath_layer.c | |||
@@ -46,13 +46,15 @@ | |||
46 | /* Acquire before ipath_devs_lock. */ | 46 | /* Acquire before ipath_devs_lock. */ |
47 | static DEFINE_MUTEX(ipath_layer_mutex); | 47 | static DEFINE_MUTEX(ipath_layer_mutex); |
48 | 48 | ||
49 | static int ipath_verbs_registered; | ||
50 | |||
49 | u16 ipath_layer_rcv_opcode; | 51 | u16 ipath_layer_rcv_opcode; |
52 | |||
50 | static int (*layer_intr)(void *, u32); | 53 | static int (*layer_intr)(void *, u32); |
51 | static int (*layer_rcv)(void *, void *, struct sk_buff *); | 54 | static int (*layer_rcv)(void *, void *, struct sk_buff *); |
52 | static int (*layer_rcv_lid)(void *, void *); | 55 | static int (*layer_rcv_lid)(void *, void *); |
53 | static int (*verbs_piobufavail)(void *); | 56 | static int (*verbs_piobufavail)(void *); |
54 | static void (*verbs_rcv)(void *, void *, void *, u32); | 57 | static void (*verbs_rcv)(void *, void *, void *, u32); |
55 | static int ipath_verbs_registered; | ||
56 | 58 | ||
57 | static void *(*layer_add_one)(int, struct ipath_devdata *); | 59 | static void *(*layer_add_one)(int, struct ipath_devdata *); |
58 | static void (*layer_remove_one)(void *); | 60 | static void (*layer_remove_one)(void *); |
@@ -586,6 +588,8 @@ void ipath_verbs_unregister(void) | |||
586 | verbs_rcv = NULL; | 588 | verbs_rcv = NULL; |
587 | verbs_timer_cb = NULL; | 589 | verbs_timer_cb = NULL; |
588 | 590 | ||
591 | ipath_verbs_registered = 0; | ||
592 | |||
589 | mutex_unlock(&ipath_layer_mutex); | 593 | mutex_unlock(&ipath_layer_mutex); |
590 | } | 594 | } |
591 | 595 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_pe800.c b/drivers/infiniband/hw/ipath/ipath_pe800.c index e1dc4f757062..6318067ab5ec 100644 --- a/drivers/infiniband/hw/ipath/ipath_pe800.c +++ b/drivers/infiniband/hw/ipath/ipath_pe800.c | |||
@@ -972,6 +972,8 @@ static int ipath_setup_pe_reset(struct ipath_devdata *dd) | |||
972 | /* Use ERROR so it shows up in logs, etc. */ | 972 | /* Use ERROR so it shows up in logs, etc. */ |
973 | ipath_dev_err(dd, "Resetting PE-800 unit %u\n", | 973 | ipath_dev_err(dd, "Resetting PE-800 unit %u\n", |
974 | dd->ipath_unit); | 974 | dd->ipath_unit); |
975 | /* keep chip from being accessed in a few places */ | ||
976 | dd->ipath_flags &= ~(IPATH_INITTED|IPATH_PRESENT); | ||
975 | val = dd->ipath_control | INFINIPATH_C_RESET; | 977 | val = dd->ipath_control | INFINIPATH_C_RESET; |
976 | ipath_write_kreg(dd, dd->ipath_kregs->kr_control, val); | 978 | ipath_write_kreg(dd, dd->ipath_kregs->kr_control, val); |
977 | mb(); | 979 | mb(); |
@@ -997,6 +999,8 @@ static int ipath_setup_pe_reset(struct ipath_devdata *dd) | |||
997 | if ((r = pci_enable_device(dd->pcidev))) | 999 | if ((r = pci_enable_device(dd->pcidev))) |
998 | ipath_dev_err(dd, "pci_enable_device failed after " | 1000 | ipath_dev_err(dd, "pci_enable_device failed after " |
999 | "reset: %d\n", r); | 1001 | "reset: %d\n", r); |
1002 | /* whether it worked or not, mark as present, again */ | ||
1003 | dd->ipath_flags |= IPATH_PRESENT; | ||
1000 | val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_revision); | 1004 | val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_revision); |
1001 | if (val == dd->ipath_revision) { | 1005 | if (val == dd->ipath_revision) { |
1002 | ipath_cdbg(VERBOSE, "Got matching revision " | 1006 | ipath_cdbg(VERBOSE, "Got matching revision " |
diff --git a/drivers/infiniband/hw/ipath/ipath_registers.h b/drivers/infiniband/hw/ipath/ipath_registers.h index 1e59750c5f63..402126eb79c9 100644 --- a/drivers/infiniband/hw/ipath/ipath_registers.h +++ b/drivers/infiniband/hw/ipath/ipath_registers.h | |||
@@ -34,8 +34,9 @@ | |||
34 | #define _IPATH_REGISTERS_H | 34 | #define _IPATH_REGISTERS_H |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * This file should only be included by kernel source, and by the diags. | 37 | * This file should only be included by kernel source, and by the diags. It |
38 | * It defines the registers, and their contents, for the InfiniPath HT-400 chip | 38 | * defines the registers, and their contents, for the InfiniPath HT-400 |
39 | * chip. | ||
39 | */ | 40 | */ |
40 | 41 | ||
41 | /* | 42 | /* |
@@ -156,8 +157,10 @@ | |||
156 | #define INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT 8 | 157 | #define INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT 8 |
157 | #define INFINIPATH_IBCC_LINKINITCMD_MASK 0x3ULL | 158 | #define INFINIPATH_IBCC_LINKINITCMD_MASK 0x3ULL |
158 | #define INFINIPATH_IBCC_LINKINITCMD_DISABLE 1 | 159 | #define INFINIPATH_IBCC_LINKINITCMD_DISABLE 1 |
159 | #define INFINIPATH_IBCC_LINKINITCMD_POLL 2 /* cycle through TS1/TS2 till OK */ | 160 | /* cycle through TS1/TS2 till OK */ |
160 | #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3 /* wait for TS1, then go on */ | 161 | #define INFINIPATH_IBCC_LINKINITCMD_POLL 2 |
162 | /* wait for TS1, then go on */ | ||
163 | #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3 | ||
161 | #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16 | 164 | #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16 |
162 | #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL | 165 | #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL |
163 | #define INFINIPATH_IBCC_LINKCMD_INIT 1 /* move to 0x11 */ | 166 | #define INFINIPATH_IBCC_LINKCMD_INIT 1 /* move to 0x11 */ |
@@ -182,7 +185,8 @@ | |||
182 | #define INFINIPATH_IBCS_LINKSTATE_SHIFT 4 | 185 | #define INFINIPATH_IBCS_LINKSTATE_SHIFT 4 |
183 | #define INFINIPATH_IBCS_TXREADY 0x40000000 | 186 | #define INFINIPATH_IBCS_TXREADY 0x40000000 |
184 | #define INFINIPATH_IBCS_TXCREDITOK 0x80000000 | 187 | #define INFINIPATH_IBCS_TXCREDITOK 0x80000000 |
185 | /* link training states (shift by INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) */ | 188 | /* link training states (shift by |
189 | INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) */ | ||
186 | #define INFINIPATH_IBCS_LT_STATE_DISABLED 0x00 | 190 | #define INFINIPATH_IBCS_LT_STATE_DISABLED 0x00 |
187 | #define INFINIPATH_IBCS_LT_STATE_LINKUP 0x01 | 191 | #define INFINIPATH_IBCS_LT_STATE_LINKUP 0x01 |
188 | #define INFINIPATH_IBCS_LT_STATE_POLLACTIVE 0x02 | 192 | #define INFINIPATH_IBCS_LT_STATE_POLLACTIVE 0x02 |
@@ -267,10 +271,12 @@ | |||
267 | /* kr_serdesconfig0 bits */ | 271 | /* kr_serdesconfig0 bits */ |
268 | #define INFINIPATH_SERDC0_RESET_MASK 0xfULL /* overal reset bits */ | 272 | #define INFINIPATH_SERDC0_RESET_MASK 0xfULL /* overal reset bits */ |
269 | #define INFINIPATH_SERDC0_RESET_PLL 0x10000000ULL /* pll reset */ | 273 | #define INFINIPATH_SERDC0_RESET_PLL 0x10000000ULL /* pll reset */ |
270 | #define INFINIPATH_SERDC0_TXIDLE 0xF000ULL /* tx idle enables (per lane) */ | 274 | /* tx idle enables (per lane) */ |
271 | #define INFINIPATH_SERDC0_RXDETECT_EN 0xF0000ULL /* rx detect enables (per lane) */ | 275 | #define INFINIPATH_SERDC0_TXIDLE 0xF000ULL |
272 | #define INFINIPATH_SERDC0_L1PWR_DN 0xF0ULL /* L1 Power down; use with RXDETECT, | 276 | /* rx detect enables (per lane) */ |
273 | Otherwise not used on IB side */ | 277 | #define INFINIPATH_SERDC0_RXDETECT_EN 0xF0000ULL |
278 | /* L1 Power down; use with RXDETECT, Otherwise not used on IB side */ | ||
279 | #define INFINIPATH_SERDC0_L1PWR_DN 0xF0ULL | ||
274 | 280 | ||
275 | /* kr_xgxsconfig bits */ | 281 | /* kr_xgxsconfig bits */ |
276 | #define INFINIPATH_XGXS_RESET 0x7ULL | 282 | #define INFINIPATH_XGXS_RESET 0x7ULL |
@@ -390,12 +396,13 @@ struct ipath_kregs { | |||
390 | ipath_kreg kr_txintmemsize; | 396 | ipath_kreg kr_txintmemsize; |
391 | ipath_kreg kr_xgxsconfig; | 397 | ipath_kreg kr_xgxsconfig; |
392 | ipath_kreg kr_ibpllcfg; | 398 | ipath_kreg kr_ibpllcfg; |
393 | /* use these two (and the following N ports) only with ipath_k*_kreg64_port(); | 399 | /* use these two (and the following N ports) only with |
394 | * not *kreg64() */ | 400 | * ipath_k*_kreg64_port(); not *kreg64() */ |
395 | ipath_kreg kr_rcvhdraddr; | 401 | ipath_kreg kr_rcvhdraddr; |
396 | ipath_kreg kr_rcvhdrtailaddr; | 402 | ipath_kreg kr_rcvhdrtailaddr; |
397 | 403 | ||
398 | /* remaining registers are not present on all types of infinipath chips */ | 404 | /* remaining registers are not present on all types of infinipath |
405 | chips */ | ||
399 | ipath_kreg kr_rcvpktledcnt; | 406 | ipath_kreg kr_rcvpktledcnt; |
400 | ipath_kreg kr_pcierbuftestreg0; | 407 | ipath_kreg kr_pcierbuftestreg0; |
401 | ipath_kreg kr_pcierbuftestreg1; | 408 | ipath_kreg kr_pcierbuftestreg1; |
diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c index f232e77b78ee..eb81424b3c5b 100644 --- a/drivers/infiniband/hw/ipath/ipath_ruc.c +++ b/drivers/infiniband/hw/ipath/ipath_ruc.c | |||
@@ -531,19 +531,12 @@ int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
531 | } | 531 | } |
532 | wqe->wr.num_sge = j; | 532 | wqe->wr.num_sge = j; |
533 | qp->s_head = next; | 533 | qp->s_head = next; |
534 | /* | ||
535 | * Wake up the send tasklet if the QP is not waiting | ||
536 | * for an RNR timeout. | ||
537 | */ | ||
538 | next = qp->s_rnr_timeout; | ||
539 | spin_unlock_irqrestore(&qp->s_lock, flags); | 534 | spin_unlock_irqrestore(&qp->s_lock, flags); |
540 | 535 | ||
541 | if (next == 0) { | 536 | if (qp->ibqp.qp_type == IB_QPT_UC) |
542 | if (qp->ibqp.qp_type == IB_QPT_UC) | 537 | ipath_do_uc_send((unsigned long) qp); |
543 | ipath_do_uc_send((unsigned long) qp); | 538 | else |
544 | else | 539 | ipath_do_rc_send((unsigned long) qp); |
545 | ipath_do_rc_send((unsigned long) qp); | ||
546 | } | ||
547 | 540 | ||
548 | ret = 0; | 541 | ret = 0; |
549 | 542 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c index 32acd8048b49..f323791cc495 100644 --- a/drivers/infiniband/hw/ipath/ipath_sysfs.c +++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c | |||
@@ -711,10 +711,22 @@ static struct attribute_group dev_attr_group = { | |||
711 | * enters diag mode. A device reset is quite likely to crash the | 711 | * enters diag mode. A device reset is quite likely to crash the |
712 | * machine entirely, so we don't want to normally make it | 712 | * machine entirely, so we don't want to normally make it |
713 | * available. | 713 | * available. |
714 | * | ||
715 | * Called with ipath_mutex held. | ||
714 | */ | 716 | */ |
715 | int ipath_expose_reset(struct device *dev) | 717 | int ipath_expose_reset(struct device *dev) |
716 | { | 718 | { |
717 | return device_create_file(dev, &dev_attr_reset); | 719 | static int exposed; |
720 | int ret; | ||
721 | |||
722 | if (!exposed) { | ||
723 | ret = device_create_file(dev, &dev_attr_reset); | ||
724 | exposed = 1; | ||
725 | } | ||
726 | else | ||
727 | ret = 0; | ||
728 | |||
729 | return ret; | ||
718 | } | 730 | } |
719 | 731 | ||
720 | int ipath_driver_create_group(struct device_driver *drv) | 732 | int ipath_driver_create_group(struct device_driver *drv) |
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c index 01cfb30ee160..e606daf83210 100644 --- a/drivers/infiniband/hw/ipath/ipath_ud.c +++ b/drivers/infiniband/hw/ipath/ipath_ud.c | |||
@@ -46,8 +46,10 @@ | |||
46 | * This is called from ipath_post_ud_send() to forward a WQE addressed | 46 | * This is called from ipath_post_ud_send() to forward a WQE addressed |
47 | * to the same HCA. | 47 | * to the same HCA. |
48 | */ | 48 | */ |
49 | static void ipath_ud_loopback(struct ipath_qp *sqp, struct ipath_sge_state *ss, | 49 | static void ipath_ud_loopback(struct ipath_qp *sqp, |
50 | u32 length, struct ib_send_wr *wr, struct ib_wc *wc) | 50 | struct ipath_sge_state *ss, |
51 | u32 length, struct ib_send_wr *wr, | ||
52 | struct ib_wc *wc) | ||
51 | { | 53 | { |
52 | struct ipath_ibdev *dev = to_idev(sqp->ibqp.device); | 54 | struct ipath_ibdev *dev = to_idev(sqp->ibqp.device); |
53 | struct ipath_qp *qp; | 55 | struct ipath_qp *qp; |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 8d2558a01f35..cb9e387c301f 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -449,7 +449,6 @@ static void ipath_ib_timer(void *arg) | |||
449 | { | 449 | { |
450 | struct ipath_ibdev *dev = (struct ipath_ibdev *) arg; | 450 | struct ipath_ibdev *dev = (struct ipath_ibdev *) arg; |
451 | struct ipath_qp *resend = NULL; | 451 | struct ipath_qp *resend = NULL; |
452 | struct ipath_qp *rnr = NULL; | ||
453 | struct list_head *last; | 452 | struct list_head *last; |
454 | struct ipath_qp *qp; | 453 | struct ipath_qp *qp; |
455 | unsigned long flags; | 454 | unsigned long flags; |
@@ -465,32 +464,18 @@ static void ipath_ib_timer(void *arg) | |||
465 | last = &dev->pending[dev->pending_index]; | 464 | last = &dev->pending[dev->pending_index]; |
466 | while (!list_empty(last)) { | 465 | while (!list_empty(last)) { |
467 | qp = list_entry(last->next, struct ipath_qp, timerwait); | 466 | qp = list_entry(last->next, struct ipath_qp, timerwait); |
468 | if (last->next == LIST_POISON1 || | 467 | list_del(&qp->timerwait); |
469 | last->next != &qp->timerwait || | 468 | qp->timer_next = resend; |
470 | qp->timerwait.prev != last) { | 469 | resend = qp; |
471 | INIT_LIST_HEAD(last); | 470 | atomic_inc(&qp->refcount); |
472 | } else { | ||
473 | list_del(&qp->timerwait); | ||
474 | qp->timerwait.prev = (struct list_head *) resend; | ||
475 | resend = qp; | ||
476 | atomic_inc(&qp->refcount); | ||
477 | } | ||
478 | } | 471 | } |
479 | last = &dev->rnrwait; | 472 | last = &dev->rnrwait; |
480 | if (!list_empty(last)) { | 473 | if (!list_empty(last)) { |
481 | qp = list_entry(last->next, struct ipath_qp, timerwait); | 474 | qp = list_entry(last->next, struct ipath_qp, timerwait); |
482 | if (--qp->s_rnr_timeout == 0) { | 475 | if (--qp->s_rnr_timeout == 0) { |
483 | do { | 476 | do { |
484 | if (last->next == LIST_POISON1 || | ||
485 | last->next != &qp->timerwait || | ||
486 | qp->timerwait.prev != last) { | ||
487 | INIT_LIST_HEAD(last); | ||
488 | break; | ||
489 | } | ||
490 | list_del(&qp->timerwait); | 477 | list_del(&qp->timerwait); |
491 | qp->timerwait.prev = | 478 | tasklet_hi_schedule(&qp->s_task); |
492 | (struct list_head *) rnr; | ||
493 | rnr = qp; | ||
494 | if (list_empty(last)) | 479 | if (list_empty(last)) |
495 | break; | 480 | break; |
496 | qp = list_entry(last->next, struct ipath_qp, | 481 | qp = list_entry(last->next, struct ipath_qp, |
@@ -530,8 +515,7 @@ static void ipath_ib_timer(void *arg) | |||
530 | spin_unlock_irqrestore(&dev->pending_lock, flags); | 515 | spin_unlock_irqrestore(&dev->pending_lock, flags); |
531 | 516 | ||
532 | /* XXX What if timer fires again while this is running? */ | 517 | /* XXX What if timer fires again while this is running? */ |
533 | for (qp = resend; qp != NULL; | 518 | for (qp = resend; qp != NULL; qp = qp->timer_next) { |
534 | qp = (struct ipath_qp *) qp->timerwait.prev) { | ||
535 | struct ib_wc wc; | 519 | struct ib_wc wc; |
536 | 520 | ||
537 | spin_lock_irqsave(&qp->s_lock, flags); | 521 | spin_lock_irqsave(&qp->s_lock, flags); |
@@ -545,9 +529,6 @@ static void ipath_ib_timer(void *arg) | |||
545 | if (atomic_dec_and_test(&qp->refcount)) | 529 | if (atomic_dec_and_test(&qp->refcount)) |
546 | wake_up(&qp->wait); | 530 | wake_up(&qp->wait); |
547 | } | 531 | } |
548 | for (qp = rnr; qp != NULL; | ||
549 | qp = (struct ipath_qp *) qp->timerwait.prev) | ||
550 | tasklet_hi_schedule(&qp->s_task); | ||
551 | } | 532 | } |
552 | 533 | ||
553 | /** | 534 | /** |
@@ -556,9 +537,9 @@ static void ipath_ib_timer(void *arg) | |||
556 | * | 537 | * |
557 | * This is called from ipath_intr() at interrupt level when a PIO buffer is | 538 | * This is called from ipath_intr() at interrupt level when a PIO buffer is |
558 | * available after ipath_verbs_send() returned an error that no buffers were | 539 | * available after ipath_verbs_send() returned an error that no buffers were |
559 | * available. Return 0 if we consumed all the PIO buffers and we still have | 540 | * available. Return 1 if we consumed all the PIO buffers and we still have |
560 | * QPs waiting for buffers (for now, just do a tasklet_hi_schedule and | 541 | * QPs waiting for buffers (for now, just do a tasklet_hi_schedule and |
561 | * return one). | 542 | * return zero). |
562 | */ | 543 | */ |
563 | static int ipath_ib_piobufavail(void *arg) | 544 | static int ipath_ib_piobufavail(void *arg) |
564 | { | 545 | { |
@@ -579,7 +560,7 @@ static int ipath_ib_piobufavail(void *arg) | |||
579 | spin_unlock_irqrestore(&dev->pending_lock, flags); | 560 | spin_unlock_irqrestore(&dev->pending_lock, flags); |
580 | 561 | ||
581 | bail: | 562 | bail: |
582 | return 1; | 563 | return 0; |
583 | } | 564 | } |
584 | 565 | ||
585 | static int ipath_query_device(struct ib_device *ibdev, | 566 | static int ipath_query_device(struct ib_device *ibdev, |
@@ -1159,7 +1140,7 @@ static ssize_t show_stats(struct class_device *cdev, char *buf) | |||
1159 | 1140 | ||
1160 | len = sprintf(buf, | 1141 | len = sprintf(buf, |
1161 | "RC resends %d\n" | 1142 | "RC resends %d\n" |
1162 | "RC QACKs %d\n" | 1143 | "RC no QACK %d\n" |
1163 | "RC ACKs %d\n" | 1144 | "RC ACKs %d\n" |
1164 | "RC SEQ NAKs %d\n" | 1145 | "RC SEQ NAKs %d\n" |
1165 | "RC RDMA seq %d\n" | 1146 | "RC RDMA seq %d\n" |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h index fcafbc7c9e71..4f8d59300e9b 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.h +++ b/drivers/infiniband/hw/ipath/ipath_verbs.h | |||
@@ -282,7 +282,8 @@ struct ipath_srq { | |||
282 | */ | 282 | */ |
283 | struct ipath_qp { | 283 | struct ipath_qp { |
284 | struct ib_qp ibqp; | 284 | struct ib_qp ibqp; |
285 | struct ipath_qp *next; /* link list for QPN hash table */ | 285 | struct ipath_qp *next; /* link list for QPN hash table */ |
286 | struct ipath_qp *timer_next; /* link list for ipath_ib_timer() */ | ||
286 | struct list_head piowait; /* link for wait PIO buf */ | 287 | struct list_head piowait; /* link for wait PIO buf */ |
287 | struct list_head timerwait; /* link for waiting for timeouts */ | 288 | struct list_head timerwait; /* link for waiting for timeouts */ |
288 | struct ib_ah_attr remote_ah_attr; | 289 | struct ib_ah_attr remote_ah_attr; |
diff --git a/drivers/infiniband/hw/ipath/ips_common.h b/drivers/infiniband/hw/ipath/ips_common.h index 410a764dfcef..ab7cbbbfd03a 100644 --- a/drivers/infiniband/hw/ipath/ips_common.h +++ b/drivers/infiniband/hw/ipath/ips_common.h | |||
@@ -95,7 +95,7 @@ struct ether_header { | |||
95 | __u8 seq_num; | 95 | __u8 seq_num; |
96 | __le32 len; | 96 | __le32 len; |
97 | /* MUST be of word size due to PIO write requirements */ | 97 | /* MUST be of word size due to PIO write requirements */ |
98 | __u32 csum; | 98 | __le32 csum; |
99 | __le16 csum_offset; | 99 | __le16 csum_offset; |
100 | __le16 flags; | 100 | __le16 flags; |
101 | __u16 first_2_bytes; | 101 | __u16 first_2_bytes; |
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 565a24b1756f..a2eae8a30167 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -306,7 +306,7 @@ static int mthca_query_gid(struct ib_device *ibdev, u8 port, | |||
306 | goto out; | 306 | goto out; |
307 | } | 307 | } |
308 | 308 | ||
309 | memcpy(gid->raw + 8, out_mad->data + (index % 8) * 16, 8); | 309 | memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); |
310 | 310 | ||
311 | out: | 311 | out: |
312 | kfree(in_mad); | 312 | kfree(in_mad); |
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index a34e3d91d9ed..ba325f16d077 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -403,6 +403,27 @@ static long evdev_ioctl_handler(struct file *file, unsigned int cmd, | |||
403 | case EVIOCGID: | 403 | case EVIOCGID: |
404 | if (copy_to_user(p, &dev->id, sizeof(struct input_id))) | 404 | if (copy_to_user(p, &dev->id, sizeof(struct input_id))) |
405 | return -EFAULT; | 405 | return -EFAULT; |
406 | return 0; | ||
407 | |||
408 | case EVIOCGREP: | ||
409 | if (!test_bit(EV_REP, dev->evbit)) | ||
410 | return -ENOSYS; | ||
411 | if (put_user(dev->rep[REP_DELAY], ip)) | ||
412 | return -EFAULT; | ||
413 | if (put_user(dev->rep[REP_PERIOD], ip + 1)) | ||
414 | return -EFAULT; | ||
415 | return 0; | ||
416 | |||
417 | case EVIOCSREP: | ||
418 | if (!test_bit(EV_REP, dev->evbit)) | ||
419 | return -ENOSYS; | ||
420 | if (get_user(u, ip)) | ||
421 | return -EFAULT; | ||
422 | if (get_user(v, ip + 1)) | ||
423 | return -EFAULT; | ||
424 | |||
425 | input_event(dev, EV_REP, REP_DELAY, u); | ||
426 | input_event(dev, EV_REP, REP_PERIOD, v); | ||
406 | 427 | ||
407 | return 0; | 428 | return 0; |
408 | 429 | ||
diff --git a/drivers/input/input.c b/drivers/input/input.c index a935abeffffc..3038c268917d 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -155,6 +155,9 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in | |||
155 | if (code > SND_MAX || !test_bit(code, dev->sndbit)) | 155 | if (code > SND_MAX || !test_bit(code, dev->sndbit)) |
156 | return; | 156 | return; |
157 | 157 | ||
158 | if (!!test_bit(code, dev->snd) != !!value) | ||
159 | change_bit(code, dev->snd); | ||
160 | |||
158 | if (dev->event) dev->event(dev, type, code, value); | 161 | if (dev->event) dev->event(dev, type, code, value); |
159 | 162 | ||
160 | break; | 163 | break; |
@@ -286,19 +289,19 @@ static struct input_device_id *input_match_device(struct input_device_id *id, st | |||
286 | for (; id->flags || id->driver_info; id++) { | 289 | for (; id->flags || id->driver_info; id++) { |
287 | 290 | ||
288 | if (id->flags & INPUT_DEVICE_ID_MATCH_BUS) | 291 | if (id->flags & INPUT_DEVICE_ID_MATCH_BUS) |
289 | if (id->id.bustype != dev->id.bustype) | 292 | if (id->bustype != dev->id.bustype) |
290 | continue; | 293 | continue; |
291 | 294 | ||
292 | if (id->flags & INPUT_DEVICE_ID_MATCH_VENDOR) | 295 | if (id->flags & INPUT_DEVICE_ID_MATCH_VENDOR) |
293 | if (id->id.vendor != dev->id.vendor) | 296 | if (id->vendor != dev->id.vendor) |
294 | continue; | 297 | continue; |
295 | 298 | ||
296 | if (id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT) | 299 | if (id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT) |
297 | if (id->id.product != dev->id.product) | 300 | if (id->product != dev->id.product) |
298 | continue; | 301 | continue; |
299 | 302 | ||
300 | if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION) | 303 | if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION) |
301 | if (id->id.version != dev->id.version) | 304 | if (id->version != dev->id.version) |
302 | continue; | 305 | continue; |
303 | 306 | ||
304 | MATCH_BIT(evbit, EV_MAX); | 307 | MATCH_BIT(evbit, EV_MAX); |
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index bc61cf8cfc65..1d238a9d52d6 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -53,8 +53,8 @@ static unsigned char spitzkbd_keycode[NR_SCANCODES] = { | |||
53 | KEY_LEFTCTRL, KEY_1, KEY_3, KEY_5, KEY_6, KEY_7, KEY_9, KEY_0, KEY_BACKSPACE, SPITZ_KEY_EXOK, SPITZ_KEY_EXCANCEL, 0, 0, 0, 0, 0, /* 1-16 */ | 53 | KEY_LEFTCTRL, KEY_1, KEY_3, KEY_5, KEY_6, KEY_7, KEY_9, KEY_0, KEY_BACKSPACE, SPITZ_KEY_EXOK, SPITZ_KEY_EXCANCEL, 0, 0, 0, 0, 0, /* 1-16 */ |
54 | 0, KEY_2, KEY_4, KEY_R, KEY_Y, KEY_8, KEY_I, KEY_O, KEY_P, SPITZ_KEY_EXJOGDOWN, SPITZ_KEY_EXJOGUP, 0, 0, 0, 0, 0, /* 17-32 */ | 54 | 0, KEY_2, KEY_4, KEY_R, KEY_Y, KEY_8, KEY_I, KEY_O, KEY_P, SPITZ_KEY_EXJOGDOWN, SPITZ_KEY_EXJOGUP, 0, 0, 0, 0, 0, /* 17-32 */ |
55 | KEY_TAB, KEY_Q, KEY_E, KEY_T, KEY_G, KEY_U, KEY_J, KEY_K, 0, 0, 0, 0, 0, 0, 0, 0, /* 33-48 */ | 55 | KEY_TAB, KEY_Q, KEY_E, KEY_T, KEY_G, KEY_U, KEY_J, KEY_K, 0, 0, 0, 0, 0, 0, 0, 0, /* 33-48 */ |
56 | SPITZ_KEY_CALENDER, KEY_W, KEY_S, KEY_F, KEY_V, KEY_H, KEY_M, KEY_L, 0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, 0, /* 49-64 */ | 56 | SPITZ_KEY_ADDRESS, KEY_W, KEY_S, KEY_F, KEY_V, KEY_H, KEY_M, KEY_L, 0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, 0, /* 49-64 */ |
57 | SPITZ_KEY_ADDRESS, KEY_A, KEY_D, KEY_C, KEY_B, KEY_N, KEY_DOT, 0, KEY_ENTER, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 65-80 */ | 57 | SPITZ_KEY_CALENDER, KEY_A, KEY_D, KEY_C, KEY_B, KEY_N, KEY_DOT, 0, KEY_ENTER, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 65-80 */ |
58 | SPITZ_KEY_MAIL, KEY_Z, KEY_X, KEY_MINUS, KEY_SPACE, KEY_COMMA, 0, KEY_UP, 0, 0, SPITZ_KEY_FN, 0, 0, 0, 0, 0, /* 81-96 */ | 58 | SPITZ_KEY_MAIL, KEY_Z, KEY_X, KEY_MINUS, KEY_SPACE, KEY_COMMA, 0, KEY_UP, 0, 0, SPITZ_KEY_FN, 0, 0, 0, 0, 0, /* 81-96 */ |
59 | KEY_SYSRQ, SPITZ_KEY_JAP1, SPITZ_KEY_JAP2, SPITZ_KEY_CANCEL, SPITZ_KEY_OK, SPITZ_KEY_MENU, KEY_LEFT, KEY_DOWN, KEY_RIGHT, 0, 0, 0, 0, 0, 0, 0 /* 97-112 */ | 59 | KEY_SYSRQ, SPITZ_KEY_JAP1, SPITZ_KEY_JAP2, SPITZ_KEY_CANCEL, SPITZ_KEY_OK, SPITZ_KEY_MENU, KEY_LEFT, KEY_DOWN, KEY_RIGHT, 0, 0, 0, 0, 0, 0, 0 /* 97-112 */ |
60 | }; | 60 | }; |
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 4b415d9b0123..36cd2e07fce8 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -273,6 +273,18 @@ static struct key_entry keymap_fs_amilo_pro_v2000[] = { | |||
273 | { KE_END, 0 } | 273 | { KE_END, 0 } |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static struct key_entry keymap_fujitsu_n3510[] = { | ||
277 | { KE_KEY, 0x11, KEY_PROG1 }, | ||
278 | { KE_KEY, 0x12, KEY_PROG2 }, | ||
279 | { KE_KEY, 0x36, KEY_WWW }, | ||
280 | { KE_KEY, 0x31, KEY_MAIL }, | ||
281 | { KE_KEY, 0x71, KEY_STOPCD }, | ||
282 | { KE_KEY, 0x72, KEY_PLAYPAUSE }, | ||
283 | { KE_KEY, 0x74, KEY_REWIND }, | ||
284 | { KE_KEY, 0x78, KEY_FORWARD }, | ||
285 | { KE_END, 0 } | ||
286 | }; | ||
287 | |||
276 | static struct key_entry keymap_wistron_ms2141[] = { | 288 | static struct key_entry keymap_wistron_ms2141[] = { |
277 | { KE_KEY, 0x11, KEY_PROG1 }, | 289 | { KE_KEY, 0x11, KEY_PROG1 }, |
278 | { KE_KEY, 0x12, KEY_PROG2 }, | 290 | { KE_KEY, 0x12, KEY_PROG2 }, |
@@ -323,6 +335,24 @@ static struct dmi_system_id dmi_ids[] = { | |||
323 | }, | 335 | }, |
324 | { | 336 | { |
325 | .callback = dmi_matched, | 337 | .callback = dmi_matched, |
338 | .ident = "Fujitsu-Siemens Amilo M7400", | ||
339 | .matches = { | ||
340 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | ||
341 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO M "), | ||
342 | }, | ||
343 | .driver_data = keymap_fs_amilo_pro_v2000 | ||
344 | }, | ||
345 | { | ||
346 | .callback = dmi_matched, | ||
347 | .ident = "Fujitsu N3510", | ||
348 | .matches = { | ||
349 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | ||
350 | DMI_MATCH(DMI_PRODUCT_NAME, "N3510"), | ||
351 | }, | ||
352 | .driver_data = keymap_fujitsu_n3510 | ||
353 | }, | ||
354 | { | ||
355 | .callback = dmi_matched, | ||
326 | .ident = "Acer Aspire 1500", | 356 | .ident = "Acer Aspire 1500", |
327 | .matches = { | 357 | .matches = { |
328 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 358 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 32d70ed8f41d..136321a2cfdb 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -302,8 +302,10 @@ static irqreturn_t psmouse_interrupt(struct serio *serio, | |||
302 | * Check if this is a new device announcement (0xAA 0x00) | 302 | * Check if this is a new device announcement (0xAA 0x00) |
303 | */ | 303 | */ |
304 | if (unlikely(psmouse->packet[0] == PSMOUSE_RET_BAT && psmouse->pktcnt <= 2)) { | 304 | if (unlikely(psmouse->packet[0] == PSMOUSE_RET_BAT && psmouse->pktcnt <= 2)) { |
305 | if (psmouse->pktcnt == 1) | 305 | if (psmouse->pktcnt == 1) { |
306 | psmouse->last = jiffies; | ||
306 | goto out; | 307 | goto out; |
308 | } | ||
307 | 309 | ||
308 | if (psmouse->packet[1] == PSMOUSE_RET_ID) { | 310 | if (psmouse->packet[1] == PSMOUSE_RET_ID) { |
309 | __psmouse_set_state(psmouse, PSMOUSE_IGNORE); | 311 | __psmouse_set_state(psmouse, PSMOUSE_IGNORE); |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 46d1fec2cfd8..1494175ac6fe 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -2,6 +2,8 @@ | |||
2 | * ADS7846 based touchscreen and sensor driver | 2 | * ADS7846 based touchscreen and sensor driver |
3 | * | 3 | * |
4 | * Copyright (c) 2005 David Brownell | 4 | * Copyright (c) 2005 David Brownell |
5 | * Copyright (c) 2006 Nokia Corporation | ||
6 | * Various changes: Imre Deak <imre.deak@nokia.com> | ||
5 | * | 7 | * |
6 | * Using code from: | 8 | * Using code from: |
7 | * - corgi_ts.c | 9 | * - corgi_ts.c |
@@ -34,17 +36,25 @@ | |||
34 | 36 | ||
35 | 37 | ||
36 | /* | 38 | /* |
37 | * This code has been lightly tested on an ads7846. | 39 | * This code has been tested on an ads7846 / N770 device. |
38 | * Support for ads7843 and ads7845 has only been stubbed in. | 40 | * Support for ads7843 and ads7845 has only been stubbed in. |
39 | * | 41 | * |
40 | * Not yet done: investigate the values reported. Are x/y/pressure | 42 | * Not yet done: How accurate are the temperature and voltage |
41 | * event values sane enough for X11? How accurate are the temperature | 43 | * readings? (System-specific calibration should support |
42 | * and voltage readings? (System-specific calibration should support | ||
43 | * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.) | 44 | * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.) |
44 | * | 45 | * |
46 | * IRQ handling needs a workaround because of a shortcoming in handling | ||
47 | * edge triggered IRQs on some platforms like the OMAP1/2. These | ||
48 | * platforms don't handle the ARM lazy IRQ disabling properly, thus we | ||
49 | * have to maintain our own SW IRQ disabled status. This should be | ||
50 | * removed as soon as the affected platform's IRQ handling is fixed. | ||
51 | * | ||
45 | * app note sbaa036 talks in more detail about accurate sampling... | 52 | * app note sbaa036 talks in more detail about accurate sampling... |
46 | * that ought to help in situations like LCDs inducing noise (which | 53 | * that ought to help in situations like LCDs inducing noise (which |
47 | * can also be helped by using synch signals) and more generally. | 54 | * can also be helped by using synch signals) and more generally. |
55 | * This driver tries to utilize the measures described in the app | ||
56 | * note. The strength of filtering can be set in the board-* specific | ||
57 | * files. | ||
48 | */ | 58 | */ |
49 | 59 | ||
50 | #define TS_POLL_PERIOD msecs_to_jiffies(10) | 60 | #define TS_POLL_PERIOD msecs_to_jiffies(10) |
@@ -61,6 +71,7 @@ struct ts_event { | |||
61 | __be16 x; | 71 | __be16 x; |
62 | __be16 y; | 72 | __be16 y; |
63 | __be16 z1, z2; | 73 | __be16 z1, z2; |
74 | int ignore; | ||
64 | }; | 75 | }; |
65 | 76 | ||
66 | struct ads7846 { | 77 | struct ads7846 { |
@@ -71,12 +82,23 @@ struct ads7846 { | |||
71 | u16 model; | 82 | u16 model; |
72 | u16 vref_delay_usecs; | 83 | u16 vref_delay_usecs; |
73 | u16 x_plate_ohms; | 84 | u16 x_plate_ohms; |
85 | u16 pressure_max; | ||
74 | 86 | ||
75 | u8 read_x, read_y, read_z1, read_z2; | 87 | u8 read_x, read_y, read_z1, read_z2, pwrdown; |
88 | u16 dummy; /* for the pwrdown read */ | ||
76 | struct ts_event tc; | 89 | struct ts_event tc; |
77 | 90 | ||
78 | struct spi_transfer xfer[8]; | 91 | struct spi_transfer xfer[10]; |
79 | struct spi_message msg; | 92 | struct spi_message msg[5]; |
93 | struct spi_message *last_msg; | ||
94 | int msg_idx; | ||
95 | int read_cnt; | ||
96 | int read_rep; | ||
97 | int last_read; | ||
98 | |||
99 | u16 debounce_max; | ||
100 | u16 debounce_tol; | ||
101 | u16 debounce_rep; | ||
80 | 102 | ||
81 | spinlock_t lock; | 103 | spinlock_t lock; |
82 | struct timer_list timer; /* P: lock */ | 104 | struct timer_list timer; /* P: lock */ |
@@ -84,6 +106,9 @@ struct ads7846 { | |||
84 | unsigned pending:1; /* P: lock */ | 106 | unsigned pending:1; /* P: lock */ |
85 | // FIXME remove "irq_disabled" | 107 | // FIXME remove "irq_disabled" |
86 | unsigned irq_disabled:1; /* P: lock */ | 108 | unsigned irq_disabled:1; /* P: lock */ |
109 | unsigned disabled:1; | ||
110 | |||
111 | int (*get_pendown_state)(void); | ||
87 | }; | 112 | }; |
88 | 113 | ||
89 | /* leave chip selected when we're done, for quicker re-select? */ | 114 | /* leave chip selected when we're done, for quicker re-select? */ |
@@ -125,7 +150,9 @@ struct ads7846 { | |||
125 | #define READ_Y (READ_12BIT_DFR(y) | ADS_PD10_ADC_ON) | 150 | #define READ_Y (READ_12BIT_DFR(y) | ADS_PD10_ADC_ON) |
126 | #define READ_Z1 (READ_12BIT_DFR(z1) | ADS_PD10_ADC_ON) | 151 | #define READ_Z1 (READ_12BIT_DFR(z1) | ADS_PD10_ADC_ON) |
127 | #define READ_Z2 (READ_12BIT_DFR(z2) | ADS_PD10_ADC_ON) | 152 | #define READ_Z2 (READ_12BIT_DFR(z2) | ADS_PD10_ADC_ON) |
128 | #define READ_X (READ_12BIT_DFR(x) | ADS_PD10_PDOWN) /* LAST */ | 153 | |
154 | #define READ_X (READ_12BIT_DFR(x) | ADS_PD10_ADC_ON) | ||
155 | #define PWRDOWN (READ_12BIT_DFR(y) | ADS_PD10_PDOWN) /* LAST */ | ||
129 | 156 | ||
130 | /* single-ended samples need to first power up reference voltage; | 157 | /* single-ended samples need to first power up reference voltage; |
131 | * we leave both ADC and VREF powered | 158 | * we leave both ADC and VREF powered |
@@ -152,6 +179,15 @@ struct ser_req { | |||
152 | struct spi_transfer xfer[6]; | 179 | struct spi_transfer xfer[6]; |
153 | }; | 180 | }; |
154 | 181 | ||
182 | static void ads7846_enable(struct ads7846 *ts); | ||
183 | static void ads7846_disable(struct ads7846 *ts); | ||
184 | |||
185 | static int device_suspended(struct device *dev) | ||
186 | { | ||
187 | struct ads7846 *ts = dev_get_drvdata(dev); | ||
188 | return dev->power.power_state.event != PM_EVENT_ON || ts->disabled; | ||
189 | } | ||
190 | |||
155 | static int ads7846_read12_ser(struct device *dev, unsigned command) | 191 | static int ads7846_read12_ser(struct device *dev, unsigned command) |
156 | { | 192 | { |
157 | struct spi_device *spi = to_spi_device(dev); | 193 | struct spi_device *spi = to_spi_device(dev); |
@@ -164,7 +200,7 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
164 | if (!req) | 200 | if (!req) |
165 | return -ENOMEM; | 201 | return -ENOMEM; |
166 | 202 | ||
167 | INIT_LIST_HEAD(&req->msg.transfers); | 203 | spi_message_init(&req->msg); |
168 | 204 | ||
169 | /* activate reference, so it has time to settle; */ | 205 | /* activate reference, so it has time to settle; */ |
170 | req->ref_on = REF_ON; | 206 | req->ref_on = REF_ON; |
@@ -204,8 +240,10 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
204 | for (i = 0; i < 6; i++) | 240 | for (i = 0; i < 6; i++) |
205 | spi_message_add_tail(&req->xfer[i], &req->msg); | 241 | spi_message_add_tail(&req->xfer[i], &req->msg); |
206 | 242 | ||
243 | ts->irq_disabled = 1; | ||
207 | disable_irq(spi->irq); | 244 | disable_irq(spi->irq); |
208 | status = spi_sync(spi, &req->msg); | 245 | status = spi_sync(spi, &req->msg); |
246 | ts->irq_disabled = 0; | ||
209 | enable_irq(spi->irq); | 247 | enable_irq(spi->irq); |
210 | 248 | ||
211 | if (req->msg.status) | 249 | if (req->msg.status) |
@@ -233,6 +271,52 @@ SHOW(temp1) | |||
233 | SHOW(vaux) | 271 | SHOW(vaux) |
234 | SHOW(vbatt) | 272 | SHOW(vbatt) |
235 | 273 | ||
274 | static int is_pen_down(struct device *dev) | ||
275 | { | ||
276 | struct ads7846 *ts = dev_get_drvdata(dev); | ||
277 | |||
278 | return ts->pendown; | ||
279 | } | ||
280 | |||
281 | static ssize_t ads7846_pen_down_show(struct device *dev, | ||
282 | struct device_attribute *attr, char *buf) | ||
283 | { | ||
284 | return sprintf(buf, "%u\n", is_pen_down(dev)); | ||
285 | } | ||
286 | |||
287 | static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); | ||
288 | |||
289 | static ssize_t ads7846_disable_show(struct device *dev, | ||
290 | struct device_attribute *attr, char *buf) | ||
291 | { | ||
292 | struct ads7846 *ts = dev_get_drvdata(dev); | ||
293 | |||
294 | return sprintf(buf, "%u\n", ts->disabled); | ||
295 | } | ||
296 | |||
297 | static ssize_t ads7846_disable_store(struct device *dev, | ||
298 | struct device_attribute *attr, | ||
299 | const char *buf, size_t count) | ||
300 | { | ||
301 | struct ads7846 *ts = dev_get_drvdata(dev); | ||
302 | char *endp; | ||
303 | int i; | ||
304 | |||
305 | i = simple_strtoul(buf, &endp, 10); | ||
306 | spin_lock_irq(&ts->lock); | ||
307 | |||
308 | if (i) | ||
309 | ads7846_disable(ts); | ||
310 | else | ||
311 | ads7846_enable(ts); | ||
312 | |||
313 | spin_unlock_irq(&ts->lock); | ||
314 | |||
315 | return count; | ||
316 | } | ||
317 | |||
318 | static DEVICE_ATTR(disable, 0664, ads7846_disable_show, ads7846_disable_store); | ||
319 | |||
236 | /*--------------------------------------------------------------------------*/ | 320 | /*--------------------------------------------------------------------------*/ |
237 | 321 | ||
238 | /* | 322 | /* |
@@ -264,7 +348,7 @@ static void ads7846_rx(void *ads) | |||
264 | if (x == MAX_12BIT) | 348 | if (x == MAX_12BIT) |
265 | x = 0; | 349 | x = 0; |
266 | 350 | ||
267 | if (x && z1 && ts->spi->dev.power.power_state.event == PM_EVENT_ON) { | 351 | if (likely(x && z1 && !device_suspended(&ts->spi->dev))) { |
268 | /* compute touch pressure resistance using equation #2 */ | 352 | /* compute touch pressure resistance using equation #2 */ |
269 | Rt = z2; | 353 | Rt = z2; |
270 | Rt -= z1; | 354 | Rt -= z1; |
@@ -275,6 +359,14 @@ static void ads7846_rx(void *ads) | |||
275 | } else | 359 | } else |
276 | Rt = 0; | 360 | Rt = 0; |
277 | 361 | ||
362 | /* Sample found inconsistent by debouncing or pressure is beyond | ||
363 | * the maximum. Don't report it to user space, repeat at least | ||
364 | * once more the measurement */ | ||
365 | if (ts->tc.ignore || Rt > ts->pressure_max) { | ||
366 | mod_timer(&ts->timer, jiffies + TS_POLL_PERIOD); | ||
367 | return; | ||
368 | } | ||
369 | |||
278 | /* NOTE: "pendown" is inferred from pressure; we don't rely on | 370 | /* NOTE: "pendown" is inferred from pressure; we don't rely on |
279 | * being able to check nPENIRQ status, or "friendly" trigger modes | 371 | * being able to check nPENIRQ status, or "friendly" trigger modes |
280 | * (both-edges is much better than just-falling or low-level). | 372 | * (both-edges is much better than just-falling or low-level). |
@@ -296,11 +388,13 @@ static void ads7846_rx(void *ads) | |||
296 | if (Rt) { | 388 | if (Rt) { |
297 | input_report_abs(input_dev, ABS_X, x); | 389 | input_report_abs(input_dev, ABS_X, x); |
298 | input_report_abs(input_dev, ABS_Y, y); | 390 | input_report_abs(input_dev, ABS_Y, y); |
299 | input_report_abs(input_dev, ABS_PRESSURE, Rt); | ||
300 | sync = 1; | 391 | sync = 1; |
301 | } | 392 | } |
302 | if (sync) | 393 | |
394 | if (sync) { | ||
395 | input_report_abs(input_dev, ABS_PRESSURE, Rt); | ||
303 | input_sync(input_dev); | 396 | input_sync(input_dev); |
397 | } | ||
304 | 398 | ||
305 | #ifdef VERBOSE | 399 | #ifdef VERBOSE |
306 | if (Rt || ts->pendown) | 400 | if (Rt || ts->pendown) |
@@ -308,80 +402,138 @@ static void ads7846_rx(void *ads) | |||
308 | x, y, Rt, Rt ? "" : " UP"); | 402 | x, y, Rt, Rt ? "" : " UP"); |
309 | #endif | 403 | #endif |
310 | 404 | ||
311 | /* don't retrigger while we're suspended */ | ||
312 | spin_lock_irqsave(&ts->lock, flags); | 405 | spin_lock_irqsave(&ts->lock, flags); |
313 | 406 | ||
314 | ts->pendown = (Rt != 0); | 407 | ts->pendown = (Rt != 0); |
315 | ts->pending = 0; | 408 | mod_timer(&ts->timer, jiffies + TS_POLL_PERIOD); |
316 | 409 | ||
317 | if (ts->spi->dev.power.power_state.event == PM_EVENT_ON) { | 410 | spin_unlock_irqrestore(&ts->lock, flags); |
318 | if (ts->pendown) | 411 | } |
319 | mod_timer(&ts->timer, jiffies + TS_POLL_PERIOD); | 412 | |
320 | else if (ts->irq_disabled) { | 413 | static void ads7846_debounce(void *ads) |
321 | ts->irq_disabled = 0; | 414 | { |
322 | enable_irq(ts->spi->irq); | 415 | struct ads7846 *ts = ads; |
416 | struct spi_message *m; | ||
417 | struct spi_transfer *t; | ||
418 | int val; | ||
419 | int status; | ||
420 | |||
421 | m = &ts->msg[ts->msg_idx]; | ||
422 | t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list); | ||
423 | val = (*(u16 *)t->rx_buf) >> 3; | ||
424 | if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) { | ||
425 | /* Repeat it, if this was the first read or the read | ||
426 | * wasn't consistent enough. */ | ||
427 | if (ts->read_cnt < ts->debounce_max) { | ||
428 | ts->last_read = val; | ||
429 | ts->read_cnt++; | ||
430 | } else { | ||
431 | /* Maximum number of debouncing reached and still | ||
432 | * not enough number of consistent readings. Abort | ||
433 | * the whole sample, repeat it in the next sampling | ||
434 | * period. | ||
435 | */ | ||
436 | ts->tc.ignore = 1; | ||
437 | ts->read_cnt = 0; | ||
438 | /* Last message will contain ads7846_rx() as the | ||
439 | * completion function. | ||
440 | */ | ||
441 | m = ts->last_msg; | ||
323 | } | 442 | } |
443 | /* Start over collecting consistent readings. */ | ||
444 | ts->read_rep = 0; | ||
445 | } else { | ||
446 | if (++ts->read_rep > ts->debounce_rep) { | ||
447 | /* Got a good reading for this coordinate, | ||
448 | * go for the next one. */ | ||
449 | ts->tc.ignore = 0; | ||
450 | ts->msg_idx++; | ||
451 | ts->read_cnt = 0; | ||
452 | ts->read_rep = 0; | ||
453 | m++; | ||
454 | } else | ||
455 | /* Read more values that are consistent. */ | ||
456 | ts->read_cnt++; | ||
324 | } | 457 | } |
325 | 458 | status = spi_async(ts->spi, m); | |
326 | spin_unlock_irqrestore(&ts->lock, flags); | 459 | if (status) |
460 | dev_err(&ts->spi->dev, "spi_async --> %d\n", | ||
461 | status); | ||
327 | } | 462 | } |
328 | 463 | ||
329 | static void ads7846_timer(unsigned long handle) | 464 | static void ads7846_timer(unsigned long handle) |
330 | { | 465 | { |
331 | struct ads7846 *ts = (void *)handle; | 466 | struct ads7846 *ts = (void *)handle; |
332 | int status = 0; | 467 | int status = 0; |
333 | unsigned long flags; | 468 | |
469 | spin_lock_irq(&ts->lock); | ||
470 | |||
471 | if (unlikely(ts->msg_idx && !ts->pendown)) { | ||
472 | /* measurment cycle ended */ | ||
473 | if (!device_suspended(&ts->spi->dev)) { | ||
474 | ts->irq_disabled = 0; | ||
475 | enable_irq(ts->spi->irq); | ||
476 | } | ||
477 | ts->pending = 0; | ||
478 | ts->msg_idx = 0; | ||
479 | } else { | ||
480 | /* pen is still down, continue with the measurement */ | ||
481 | ts->msg_idx = 0; | ||
482 | status = spi_async(ts->spi, &ts->msg[0]); | ||
483 | if (status) | ||
484 | dev_err(&ts->spi->dev, "spi_async --> %d\n", status); | ||
485 | } | ||
486 | |||
487 | spin_unlock_irq(&ts->lock); | ||
488 | } | ||
489 | |||
490 | static irqreturn_t ads7846_irq(int irq, void *handle, struct pt_regs *regs) | ||
491 | { | ||
492 | struct ads7846 *ts = handle; | ||
493 | unsigned long flags; | ||
334 | 494 | ||
335 | spin_lock_irqsave(&ts->lock, flags); | 495 | spin_lock_irqsave(&ts->lock, flags); |
336 | if (!ts->pending) { | 496 | if (likely(ts->get_pendown_state())) { |
337 | ts->pending = 1; | ||
338 | if (!ts->irq_disabled) { | 497 | if (!ts->irq_disabled) { |
498 | /* REVISIT irq logic for many ARM chips has cloned a | ||
499 | * bug wherein disabling an irq in its handler won't | ||
500 | * work;(it's disabled lazily, and too late to work. | ||
501 | * until all their irq logic is fixed, we must shadow | ||
502 | * that state here. | ||
503 | */ | ||
339 | ts->irq_disabled = 1; | 504 | ts->irq_disabled = 1; |
340 | disable_irq(ts->spi->irq); | 505 | disable_irq(ts->spi->irq); |
506 | ts->pending = 1; | ||
507 | mod_timer(&ts->timer, jiffies); | ||
341 | } | 508 | } |
342 | status = spi_async(ts->spi, &ts->msg); | ||
343 | if (status) | ||
344 | dev_err(&ts->spi->dev, "spi_async --> %d\n", | ||
345 | status); | ||
346 | } | 509 | } |
347 | spin_unlock_irqrestore(&ts->lock, flags); | 510 | spin_unlock_irqrestore(&ts->lock, flags); |
348 | } | ||
349 | 511 | ||
350 | static irqreturn_t ads7846_irq(int irq, void *handle, struct pt_regs *regs) | ||
351 | { | ||
352 | ads7846_timer((unsigned long) handle); | ||
353 | return IRQ_HANDLED; | 512 | return IRQ_HANDLED; |
354 | } | 513 | } |
355 | 514 | ||
356 | /*--------------------------------------------------------------------------*/ | 515 | /*--------------------------------------------------------------------------*/ |
357 | 516 | ||
358 | static int | 517 | /* Must be called with ts->lock held */ |
359 | ads7846_suspend(struct spi_device *spi, pm_message_t message) | 518 | static void ads7846_disable(struct ads7846 *ts) |
360 | { | 519 | { |
361 | struct ads7846 *ts = dev_get_drvdata(&spi->dev); | 520 | if (ts->disabled) |
362 | unsigned long flags; | 521 | return; |
363 | 522 | ||
364 | spin_lock_irqsave(&ts->lock, flags); | 523 | ts->disabled = 1; |
365 | |||
366 | spi->dev.power.power_state = message; | ||
367 | 524 | ||
368 | /* are we waiting for IRQ, or polling? */ | 525 | /* are we waiting for IRQ, or polling? */ |
369 | if (!ts->pendown) { | 526 | if (!ts->pending) { |
370 | if (!ts->irq_disabled) { | 527 | ts->irq_disabled = 1; |
371 | ts->irq_disabled = 1; | 528 | disable_irq(ts->spi->irq); |
372 | disable_irq(ts->spi->irq); | ||
373 | } | ||
374 | } else { | 529 | } else { |
375 | /* polling; force a final SPI completion; | 530 | /* the timer will run at least once more, and |
376 | * that will clean things up neatly | 531 | * leave everything in a clean state, IRQ disabled |
377 | */ | 532 | */ |
378 | if (!ts->pending) | 533 | while (ts->pending) { |
379 | mod_timer(&ts->timer, jiffies); | 534 | spin_unlock_irq(&ts->lock); |
380 | 535 | msleep(1); | |
381 | while (ts->pendown || ts->pending) { | 536 | spin_lock_irq(&ts->lock); |
382 | spin_unlock_irqrestore(&ts->lock, flags); | ||
383 | udelay(10); | ||
384 | spin_lock_irqsave(&ts->lock, flags); | ||
385 | } | 537 | } |
386 | } | 538 | } |
387 | 539 | ||
@@ -389,17 +541,45 @@ ads7846_suspend(struct spi_device *spi, pm_message_t message) | |||
389 | * leave it that way after every request | 541 | * leave it that way after every request |
390 | */ | 542 | */ |
391 | 543 | ||
392 | spin_unlock_irqrestore(&ts->lock, flags); | 544 | } |
545 | |||
546 | /* Must be called with ts->lock held */ | ||
547 | static void ads7846_enable(struct ads7846 *ts) | ||
548 | { | ||
549 | if (!ts->disabled) | ||
550 | return; | ||
551 | |||
552 | ts->disabled = 0; | ||
553 | ts->irq_disabled = 0; | ||
554 | enable_irq(ts->spi->irq); | ||
555 | } | ||
556 | |||
557 | static int ads7846_suspend(struct spi_device *spi, pm_message_t message) | ||
558 | { | ||
559 | struct ads7846 *ts = dev_get_drvdata(&spi->dev); | ||
560 | |||
561 | spin_lock_irq(&ts->lock); | ||
562 | |||
563 | spi->dev.power.power_state = message; | ||
564 | ads7846_disable(ts); | ||
565 | |||
566 | spin_unlock_irq(&ts->lock); | ||
567 | |||
393 | return 0; | 568 | return 0; |
569 | |||
394 | } | 570 | } |
395 | 571 | ||
396 | static int ads7846_resume(struct spi_device *spi) | 572 | static int ads7846_resume(struct spi_device *spi) |
397 | { | 573 | { |
398 | struct ads7846 *ts = dev_get_drvdata(&spi->dev); | 574 | struct ads7846 *ts = dev_get_drvdata(&spi->dev); |
399 | 575 | ||
400 | ts->irq_disabled = 0; | 576 | spin_lock_irq(&ts->lock); |
401 | enable_irq(ts->spi->irq); | 577 | |
402 | spi->dev.power.power_state = PMSG_ON; | 578 | spi->dev.power.power_state = PMSG_ON; |
579 | ads7846_enable(ts); | ||
580 | |||
581 | spin_unlock_irq(&ts->lock); | ||
582 | |||
403 | return 0; | 583 | return 0; |
404 | } | 584 | } |
405 | 585 | ||
@@ -408,6 +588,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
408 | struct ads7846 *ts; | 588 | struct ads7846 *ts; |
409 | struct input_dev *input_dev; | 589 | struct input_dev *input_dev; |
410 | struct ads7846_platform_data *pdata = spi->dev.platform_data; | 590 | struct ads7846_platform_data *pdata = spi->dev.platform_data; |
591 | struct spi_message *m; | ||
411 | struct spi_transfer *x; | 592 | struct spi_transfer *x; |
412 | int err; | 593 | int err; |
413 | 594 | ||
@@ -428,6 +609,11 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
428 | return -EINVAL; | 609 | return -EINVAL; |
429 | } | 610 | } |
430 | 611 | ||
612 | if (pdata->get_pendown_state == NULL) { | ||
613 | dev_dbg(&spi->dev, "no get_pendown_state function?\n"); | ||
614 | return -EINVAL; | ||
615 | } | ||
616 | |||
431 | /* We'd set the wordsize to 12 bits ... except that some controllers | 617 | /* We'd set the wordsize to 12 bits ... except that some controllers |
432 | * will then treat the 8 bit command words as 12 bits (and drop the | 618 | * will then treat the 8 bit command words as 12 bits (and drop the |
433 | * four MSBs of the 12 bit result). Result: inputs must be shifted | 619 | * four MSBs of the 12 bit result). Result: inputs must be shifted |
@@ -451,9 +637,21 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
451 | ts->timer.data = (unsigned long) ts; | 637 | ts->timer.data = (unsigned long) ts; |
452 | ts->timer.function = ads7846_timer; | 638 | ts->timer.function = ads7846_timer; |
453 | 639 | ||
640 | spin_lock_init(&ts->lock); | ||
641 | |||
454 | ts->model = pdata->model ? : 7846; | 642 | ts->model = pdata->model ? : 7846; |
455 | ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100; | 643 | ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100; |
456 | ts->x_plate_ohms = pdata->x_plate_ohms ? : 400; | 644 | ts->x_plate_ohms = pdata->x_plate_ohms ? : 400; |
645 | ts->pressure_max = pdata->pressure_max ? : ~0; | ||
646 | if (pdata->debounce_max) { | ||
647 | ts->debounce_max = pdata->debounce_max; | ||
648 | ts->debounce_tol = pdata->debounce_tol; | ||
649 | ts->debounce_rep = pdata->debounce_rep; | ||
650 | if (ts->debounce_rep > ts->debounce_max + 1) | ||
651 | ts->debounce_rep = ts->debounce_max - 1; | ||
652 | } else | ||
653 | ts->debounce_tol = ~0; | ||
654 | ts->get_pendown_state = pdata->get_pendown_state; | ||
457 | 655 | ||
458 | snprintf(ts->phys, sizeof(ts->phys), "%s/input0", spi->dev.bus_id); | 656 | snprintf(ts->phys, sizeof(ts->phys), "%s/input0", spi->dev.bus_id); |
459 | 657 | ||
@@ -477,60 +675,100 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
477 | /* set up the transfers to read touchscreen state; this assumes we | 675 | /* set up the transfers to read touchscreen state; this assumes we |
478 | * use formula #2 for pressure, not #3. | 676 | * use formula #2 for pressure, not #3. |
479 | */ | 677 | */ |
480 | INIT_LIST_HEAD(&ts->msg.transfers); | 678 | m = &ts->msg[0]; |
481 | x = ts->xfer; | 679 | x = ts->xfer; |
482 | 680 | ||
681 | spi_message_init(m); | ||
682 | |||
483 | /* y- still on; turn on only y+ (and ADC) */ | 683 | /* y- still on; turn on only y+ (and ADC) */ |
484 | ts->read_y = READ_Y; | 684 | ts->read_y = READ_Y; |
485 | x->tx_buf = &ts->read_y; | 685 | x->tx_buf = &ts->read_y; |
486 | x->len = 1; | 686 | x->len = 1; |
487 | spi_message_add_tail(x, &ts->msg); | 687 | spi_message_add_tail(x, m); |
488 | 688 | ||
489 | x++; | 689 | x++; |
490 | x->rx_buf = &ts->tc.y; | 690 | x->rx_buf = &ts->tc.y; |
491 | x->len = 2; | 691 | x->len = 2; |
492 | spi_message_add_tail(x, &ts->msg); | 692 | spi_message_add_tail(x, m); |
693 | |||
694 | m->complete = ads7846_debounce; | ||
695 | m->context = ts; | ||
696 | |||
697 | m++; | ||
698 | spi_message_init(m); | ||
699 | |||
700 | /* turn y- off, x+ on, then leave in lowpower */ | ||
701 | x++; | ||
702 | ts->read_x = READ_X; | ||
703 | x->tx_buf = &ts->read_x; | ||
704 | x->len = 1; | ||
705 | spi_message_add_tail(x, m); | ||
706 | |||
707 | x++; | ||
708 | x->rx_buf = &ts->tc.x; | ||
709 | x->len = 2; | ||
710 | spi_message_add_tail(x, m); | ||
711 | |||
712 | m->complete = ads7846_debounce; | ||
713 | m->context = ts; | ||
493 | 714 | ||
494 | /* turn y+ off, x- on; we'll use formula #2 */ | 715 | /* turn y+ off, x- on; we'll use formula #2 */ |
495 | if (ts->model == 7846) { | 716 | if (ts->model == 7846) { |
717 | m++; | ||
718 | spi_message_init(m); | ||
719 | |||
496 | x++; | 720 | x++; |
497 | ts->read_z1 = READ_Z1; | 721 | ts->read_z1 = READ_Z1; |
498 | x->tx_buf = &ts->read_z1; | 722 | x->tx_buf = &ts->read_z1; |
499 | x->len = 1; | 723 | x->len = 1; |
500 | spi_message_add_tail(x, &ts->msg); | 724 | spi_message_add_tail(x, m); |
501 | 725 | ||
502 | x++; | 726 | x++; |
503 | x->rx_buf = &ts->tc.z1; | 727 | x->rx_buf = &ts->tc.z1; |
504 | x->len = 2; | 728 | x->len = 2; |
505 | spi_message_add_tail(x, &ts->msg); | 729 | spi_message_add_tail(x, m); |
730 | |||
731 | m->complete = ads7846_debounce; | ||
732 | m->context = ts; | ||
733 | |||
734 | m++; | ||
735 | spi_message_init(m); | ||
506 | 736 | ||
507 | x++; | 737 | x++; |
508 | ts->read_z2 = READ_Z2; | 738 | ts->read_z2 = READ_Z2; |
509 | x->tx_buf = &ts->read_z2; | 739 | x->tx_buf = &ts->read_z2; |
510 | x->len = 1; | 740 | x->len = 1; |
511 | spi_message_add_tail(x, &ts->msg); | 741 | spi_message_add_tail(x, m); |
512 | 742 | ||
513 | x++; | 743 | x++; |
514 | x->rx_buf = &ts->tc.z2; | 744 | x->rx_buf = &ts->tc.z2; |
515 | x->len = 2; | 745 | x->len = 2; |
516 | spi_message_add_tail(x, &ts->msg); | 746 | spi_message_add_tail(x, m); |
747 | |||
748 | m->complete = ads7846_debounce; | ||
749 | m->context = ts; | ||
517 | } | 750 | } |
518 | 751 | ||
519 | /* turn y- off, x+ on, then leave in lowpower */ | 752 | /* power down */ |
753 | m++; | ||
754 | spi_message_init(m); | ||
755 | |||
520 | x++; | 756 | x++; |
521 | ts->read_x = READ_X; | 757 | ts->pwrdown = PWRDOWN; |
522 | x->tx_buf = &ts->read_x; | 758 | x->tx_buf = &ts->pwrdown; |
523 | x->len = 1; | 759 | x->len = 1; |
524 | spi_message_add_tail(x, &ts->msg); | 760 | spi_message_add_tail(x, m); |
525 | 761 | ||
526 | x++; | 762 | x++; |
527 | x->rx_buf = &ts->tc.x; | 763 | x->rx_buf = &ts->dummy; |
528 | x->len = 2; | 764 | x->len = 2; |
529 | CS_CHANGE(*x); | 765 | CS_CHANGE(*x); |
530 | spi_message_add_tail(x, &ts->msg); | 766 | spi_message_add_tail(x, m); |
531 | 767 | ||
532 | ts->msg.complete = ads7846_rx; | 768 | m->complete = ads7846_rx; |
533 | ts->msg.context = ts; | 769 | m->context = ts; |
770 | |||
771 | ts->last_msg = m; | ||
534 | 772 | ||
535 | if (request_irq(spi->irq, ads7846_irq, | 773 | if (request_irq(spi->irq, ads7846_irq, |
536 | SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, | 774 | SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, |
@@ -559,13 +797,27 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
559 | device_create_file(&spi->dev, &dev_attr_vbatt); | 797 | device_create_file(&spi->dev, &dev_attr_vbatt); |
560 | device_create_file(&spi->dev, &dev_attr_vaux); | 798 | device_create_file(&spi->dev, &dev_attr_vaux); |
561 | 799 | ||
800 | device_create_file(&spi->dev, &dev_attr_pen_down); | ||
801 | |||
802 | device_create_file(&spi->dev, &dev_attr_disable); | ||
803 | |||
562 | err = input_register_device(input_dev); | 804 | err = input_register_device(input_dev); |
563 | if (err) | 805 | if (err) |
564 | goto err_free_irq; | 806 | goto err_remove_attr; |
565 | 807 | ||
566 | return 0; | 808 | return 0; |
567 | 809 | ||
568 | err_free_irq: | 810 | err_remove_attr: |
811 | device_remove_file(&spi->dev, &dev_attr_disable); | ||
812 | device_remove_file(&spi->dev, &dev_attr_pen_down); | ||
813 | if (ts->model == 7846) { | ||
814 | device_remove_file(&spi->dev, &dev_attr_temp1); | ||
815 | device_remove_file(&spi->dev, &dev_attr_temp0); | ||
816 | } | ||
817 | if (ts->model != 7845) | ||
818 | device_remove_file(&spi->dev, &dev_attr_vbatt); | ||
819 | device_remove_file(&spi->dev, &dev_attr_vaux); | ||
820 | |||
569 | free_irq(spi->irq, ts); | 821 | free_irq(spi->irq, ts); |
570 | err_free_mem: | 822 | err_free_mem: |
571 | input_free_device(input_dev); | 823 | input_free_device(input_dev); |
@@ -577,20 +829,24 @@ static int __devexit ads7846_remove(struct spi_device *spi) | |||
577 | { | 829 | { |
578 | struct ads7846 *ts = dev_get_drvdata(&spi->dev); | 830 | struct ads7846 *ts = dev_get_drvdata(&spi->dev); |
579 | 831 | ||
832 | input_unregister_device(ts->input); | ||
833 | |||
580 | ads7846_suspend(spi, PMSG_SUSPEND); | 834 | ads7846_suspend(spi, PMSG_SUSPEND); |
581 | free_irq(ts->spi->irq, ts); | ||
582 | if (ts->irq_disabled) | ||
583 | enable_irq(ts->spi->irq); | ||
584 | 835 | ||
836 | device_remove_file(&spi->dev, &dev_attr_disable); | ||
837 | device_remove_file(&spi->dev, &dev_attr_pen_down); | ||
585 | if (ts->model == 7846) { | 838 | if (ts->model == 7846) { |
586 | device_remove_file(&spi->dev, &dev_attr_temp0); | ||
587 | device_remove_file(&spi->dev, &dev_attr_temp1); | 839 | device_remove_file(&spi->dev, &dev_attr_temp1); |
840 | device_remove_file(&spi->dev, &dev_attr_temp0); | ||
588 | } | 841 | } |
589 | if (ts->model != 7845) | 842 | if (ts->model != 7845) |
590 | device_remove_file(&spi->dev, &dev_attr_vbatt); | 843 | device_remove_file(&spi->dev, &dev_attr_vbatt); |
591 | device_remove_file(&spi->dev, &dev_attr_vaux); | 844 | device_remove_file(&spi->dev, &dev_attr_vaux); |
592 | 845 | ||
593 | input_unregister_device(ts->input); | 846 | free_irq(ts->spi->irq, ts); |
847 | /* suspend left the IRQ disabled */ | ||
848 | enable_irq(ts->spi->irq); | ||
849 | |||
594 | kfree(ts); | 850 | kfree(ts); |
595 | 851 | ||
596 | dev_dbg(&spi->dev, "unregistered touchscreen\n"); | 852 | dev_dbg(&spi->dev, "unregistered touchscreen\n"); |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 6081941de1b3..4070eff6f0f8 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -315,10 +315,11 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
315 | if (r1_bio->bios[mirror] == bio) | 315 | if (r1_bio->bios[mirror] == bio) |
316 | break; | 316 | break; |
317 | 317 | ||
318 | if (error == -ENOTSUPP && test_bit(R1BIO_Barrier, &r1_bio->state)) { | 318 | if (error == -EOPNOTSUPP && test_bit(R1BIO_Barrier, &r1_bio->state)) { |
319 | set_bit(BarriersNotsupp, &conf->mirrors[mirror].rdev->flags); | 319 | set_bit(BarriersNotsupp, &conf->mirrors[mirror].rdev->flags); |
320 | set_bit(R1BIO_BarrierRetry, &r1_bio->state); | 320 | set_bit(R1BIO_BarrierRetry, &r1_bio->state); |
321 | r1_bio->mddev->barriers_work = 0; | 321 | r1_bio->mddev->barriers_work = 0; |
322 | /* Don't rdev_dec_pending in this branch - keep it for the retry */ | ||
322 | } else { | 323 | } else { |
323 | /* | 324 | /* |
324 | * this branch is our 'one mirror IO has finished' event handler: | 325 | * this branch is our 'one mirror IO has finished' event handler: |
@@ -365,6 +366,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
365 | } | 366 | } |
366 | } | 367 | } |
367 | } | 368 | } |
369 | rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev); | ||
368 | } | 370 | } |
369 | /* | 371 | /* |
370 | * | 372 | * |
@@ -374,11 +376,9 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
374 | if (atomic_dec_and_test(&r1_bio->remaining)) { | 376 | if (atomic_dec_and_test(&r1_bio->remaining)) { |
375 | if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) { | 377 | if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) { |
376 | reschedule_retry(r1_bio); | 378 | reschedule_retry(r1_bio); |
377 | /* Don't dec_pending yet, we want to hold | ||
378 | * the reference over the retry | ||
379 | */ | ||
380 | goto out; | 379 | goto out; |
381 | } | 380 | } |
381 | /* it really is the end of this request */ | ||
382 | if (test_bit(R1BIO_BehindIO, &r1_bio->state)) { | 382 | if (test_bit(R1BIO_BehindIO, &r1_bio->state)) { |
383 | /* free extra copy of the data pages */ | 383 | /* free extra copy of the data pages */ |
384 | int i = bio->bi_vcnt; | 384 | int i = bio->bi_vcnt; |
@@ -393,8 +393,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
393 | md_write_end(r1_bio->mddev); | 393 | md_write_end(r1_bio->mddev); |
394 | raid_end_bio_io(r1_bio); | 394 | raid_end_bio_io(r1_bio); |
395 | } | 395 | } |
396 | |||
397 | rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev); | ||
398 | out: | 396 | out: |
399 | if (to_put) | 397 | if (to_put) |
400 | bio_put(to_put); | 398 | bio_put(to_put); |
@@ -753,18 +751,24 @@ static int make_request(request_queue_t *q, struct bio * bio) | |||
753 | const int rw = bio_data_dir(bio); | 751 | const int rw = bio_data_dir(bio); |
754 | int do_barriers; | 752 | int do_barriers; |
755 | 753 | ||
756 | if (unlikely(!mddev->barriers_work && bio_barrier(bio))) { | ||
757 | bio_endio(bio, bio->bi_size, -EOPNOTSUPP); | ||
758 | return 0; | ||
759 | } | ||
760 | |||
761 | /* | 754 | /* |
762 | * Register the new request and wait if the reconstruction | 755 | * Register the new request and wait if the reconstruction |
763 | * thread has put up a bar for new requests. | 756 | * thread has put up a bar for new requests. |
764 | * Continue immediately if no resync is active currently. | 757 | * Continue immediately if no resync is active currently. |
758 | * We test barriers_work *after* md_write_start as md_write_start | ||
759 | * may cause the first superblock write, and that will check out | ||
760 | * if barriers work. | ||
765 | */ | 761 | */ |
762 | |||
766 | md_write_start(mddev, bio); /* wait on superblock update early */ | 763 | md_write_start(mddev, bio); /* wait on superblock update early */ |
767 | 764 | ||
765 | if (unlikely(!mddev->barriers_work && bio_barrier(bio))) { | ||
766 | if (rw == WRITE) | ||
767 | md_write_end(mddev); | ||
768 | bio_endio(bio, bio->bi_size, -EOPNOTSUPP); | ||
769 | return 0; | ||
770 | } | ||
771 | |||
768 | wait_barrier(conf); | 772 | wait_barrier(conf); |
769 | 773 | ||
770 | disk_stat_inc(mddev->gendisk, ios[rw]); | 774 | disk_stat_inc(mddev->gendisk, ios[rw]); |
@@ -1404,10 +1408,11 @@ static void raid1d(mddev_t *mddev) | |||
1404 | unplug = 1; | 1408 | unplug = 1; |
1405 | } else if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) { | 1409 | } else if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) { |
1406 | /* some requests in the r1bio were BIO_RW_BARRIER | 1410 | /* some requests in the r1bio were BIO_RW_BARRIER |
1407 | * requests which failed with -ENOTSUPP. Hohumm.. | 1411 | * requests which failed with -EOPNOTSUPP. Hohumm.. |
1408 | * Better resubmit without the barrier. | 1412 | * Better resubmit without the barrier. |
1409 | * We know which devices to resubmit for, because | 1413 | * We know which devices to resubmit for, because |
1410 | * all others have had their bios[] entry cleared. | 1414 | * all others have had their bios[] entry cleared. |
1415 | * We already have a nr_pending reference on these rdevs. | ||
1411 | */ | 1416 | */ |
1412 | int i; | 1417 | int i; |
1413 | clear_bit(R1BIO_BarrierRetry, &r1_bio->state); | 1418 | clear_bit(R1BIO_BarrierRetry, &r1_bio->state); |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 617012bc107a..1440935414e6 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -1407,43 +1407,54 @@ static void raid10d(mddev_t *mddev) | |||
1407 | if (s > (PAGE_SIZE>>9)) | 1407 | if (s > (PAGE_SIZE>>9)) |
1408 | s = PAGE_SIZE >> 9; | 1408 | s = PAGE_SIZE >> 9; |
1409 | 1409 | ||
1410 | rcu_read_lock(); | ||
1410 | do { | 1411 | do { |
1411 | int d = r10_bio->devs[sl].devnum; | 1412 | int d = r10_bio->devs[sl].devnum; |
1412 | rdev = conf->mirrors[d].rdev; | 1413 | rdev = rcu_dereference(conf->mirrors[d].rdev); |
1413 | if (rdev && | 1414 | if (rdev && |
1414 | test_bit(In_sync, &rdev->flags) && | 1415 | test_bit(In_sync, &rdev->flags)) { |
1415 | sync_page_io(rdev->bdev, | 1416 | atomic_inc(&rdev->nr_pending); |
1416 | r10_bio->devs[sl].addr + | 1417 | rcu_read_unlock(); |
1417 | sect + rdev->data_offset, | 1418 | success = sync_page_io(rdev->bdev, |
1418 | s<<9, | 1419 | r10_bio->devs[sl].addr + |
1419 | conf->tmppage, READ)) | 1420 | sect + rdev->data_offset, |
1420 | success = 1; | 1421 | s<<9, |
1421 | else { | 1422 | conf->tmppage, READ); |
1422 | sl++; | 1423 | rdev_dec_pending(rdev, mddev); |
1423 | if (sl == conf->copies) | 1424 | rcu_read_lock(); |
1424 | sl = 0; | 1425 | if (success) |
1426 | break; | ||
1425 | } | 1427 | } |
1428 | sl++; | ||
1429 | if (sl == conf->copies) | ||
1430 | sl = 0; | ||
1426 | } while (!success && sl != r10_bio->read_slot); | 1431 | } while (!success && sl != r10_bio->read_slot); |
1432 | rcu_read_unlock(); | ||
1427 | 1433 | ||
1428 | if (success) { | 1434 | if (success) { |
1429 | int start = sl; | 1435 | int start = sl; |
1430 | /* write it back and re-read */ | 1436 | /* write it back and re-read */ |
1437 | rcu_read_lock(); | ||
1431 | while (sl != r10_bio->read_slot) { | 1438 | while (sl != r10_bio->read_slot) { |
1432 | int d; | 1439 | int d; |
1433 | if (sl==0) | 1440 | if (sl==0) |
1434 | sl = conf->copies; | 1441 | sl = conf->copies; |
1435 | sl--; | 1442 | sl--; |
1436 | d = r10_bio->devs[sl].devnum; | 1443 | d = r10_bio->devs[sl].devnum; |
1437 | rdev = conf->mirrors[d].rdev; | 1444 | rdev = rcu_dereference(conf->mirrors[d].rdev); |
1438 | atomic_add(s, &rdev->corrected_errors); | ||
1439 | if (rdev && | 1445 | if (rdev && |
1440 | test_bit(In_sync, &rdev->flags)) { | 1446 | test_bit(In_sync, &rdev->flags)) { |
1447 | atomic_inc(&rdev->nr_pending); | ||
1448 | rcu_read_unlock(); | ||
1449 | atomic_add(s, &rdev->corrected_errors); | ||
1441 | if (sync_page_io(rdev->bdev, | 1450 | if (sync_page_io(rdev->bdev, |
1442 | r10_bio->devs[sl].addr + | 1451 | r10_bio->devs[sl].addr + |
1443 | sect + rdev->data_offset, | 1452 | sect + rdev->data_offset, |
1444 | s<<9, conf->tmppage, WRITE) == 0) | 1453 | s<<9, conf->tmppage, WRITE) == 0) |
1445 | /* Well, this device is dead */ | 1454 | /* Well, this device is dead */ |
1446 | md_error(mddev, rdev); | 1455 | md_error(mddev, rdev); |
1456 | rdev_dec_pending(rdev, mddev); | ||
1457 | rcu_read_lock(); | ||
1447 | } | 1458 | } |
1448 | } | 1459 | } |
1449 | sl = start; | 1460 | sl = start; |
@@ -1453,17 +1464,22 @@ static void raid10d(mddev_t *mddev) | |||
1453 | sl = conf->copies; | 1464 | sl = conf->copies; |
1454 | sl--; | 1465 | sl--; |
1455 | d = r10_bio->devs[sl].devnum; | 1466 | d = r10_bio->devs[sl].devnum; |
1456 | rdev = conf->mirrors[d].rdev; | 1467 | rdev = rcu_dereference(conf->mirrors[d].rdev); |
1457 | if (rdev && | 1468 | if (rdev && |
1458 | test_bit(In_sync, &rdev->flags)) { | 1469 | test_bit(In_sync, &rdev->flags)) { |
1470 | atomic_inc(&rdev->nr_pending); | ||
1471 | rcu_read_unlock(); | ||
1459 | if (sync_page_io(rdev->bdev, | 1472 | if (sync_page_io(rdev->bdev, |
1460 | r10_bio->devs[sl].addr + | 1473 | r10_bio->devs[sl].addr + |
1461 | sect + rdev->data_offset, | 1474 | sect + rdev->data_offset, |
1462 | s<<9, conf->tmppage, READ) == 0) | 1475 | s<<9, conf->tmppage, READ) == 0) |
1463 | /* Well, this device is dead */ | 1476 | /* Well, this device is dead */ |
1464 | md_error(mddev, rdev); | 1477 | md_error(mddev, rdev); |
1478 | rdev_dec_pending(rdev, mddev); | ||
1479 | rcu_read_lock(); | ||
1465 | } | 1480 | } |
1466 | } | 1481 | } |
1482 | rcu_read_unlock(); | ||
1467 | } else { | 1483 | } else { |
1468 | /* Cannot read from anywhere -- bye bye array */ | 1484 | /* Cannot read from anywhere -- bye bye array */ |
1469 | md_error(mddev, conf->mirrors[r10_bio->devs[r10_bio->read_slot].devnum].rdev); | 1485 | md_error(mddev, conf->mirrors[r10_bio->devs[r10_bio->read_slot].devnum].rdev); |
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index f9d87b86492c..320b3d9384ba 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c | |||
@@ -616,7 +616,7 @@ static struct snd_kcontrol_new snd_cx88_capture_volume = { | |||
616 | * Only boards with eeprom and byte 1 at eeprom=1 have it | 616 | * Only boards with eeprom and byte 1 at eeprom=1 have it |
617 | */ | 617 | */ |
618 | 618 | ||
619 | static struct pci_device_id cx88_audio_pci_tbl[] = { | 619 | static struct pci_device_id cx88_audio_pci_tbl[] __devinitdata = { |
620 | {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, | 620 | {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, |
621 | {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, | 621 | {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, |
622 | {0, } | 622 | {0, } |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 73e271e59c6a..beeb612be98f 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -69,8 +69,8 @@ | |||
69 | 69 | ||
70 | #define DRV_MODULE_NAME "tg3" | 70 | #define DRV_MODULE_NAME "tg3" |
71 | #define PFX DRV_MODULE_NAME ": " | 71 | #define PFX DRV_MODULE_NAME ": " |
72 | #define DRV_MODULE_VERSION "3.56" | 72 | #define DRV_MODULE_VERSION "3.57" |
73 | #define DRV_MODULE_RELDATE "Apr 1, 2006" | 73 | #define DRV_MODULE_RELDATE "Apr 28, 2006" |
74 | 74 | ||
75 | #define TG3_DEF_MAC_MODE 0 | 75 | #define TG3_DEF_MAC_MODE 0 |
76 | #define TG3_DEF_RX_MODE 0 | 76 | #define TG3_DEF_RX_MODE 0 |
@@ -974,6 +974,8 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp) | |||
974 | return err; | 974 | return err; |
975 | } | 975 | } |
976 | 976 | ||
977 | static void tg3_link_report(struct tg3 *); | ||
978 | |||
977 | /* This will reset the tigon3 PHY if there is no valid | 979 | /* This will reset the tigon3 PHY if there is no valid |
978 | * link unless the FORCE argument is non-zero. | 980 | * link unless the FORCE argument is non-zero. |
979 | */ | 981 | */ |
@@ -987,6 +989,11 @@ static int tg3_phy_reset(struct tg3 *tp) | |||
987 | if (err != 0) | 989 | if (err != 0) |
988 | return -EBUSY; | 990 | return -EBUSY; |
989 | 991 | ||
992 | if (netif_running(tp->dev) && netif_carrier_ok(tp->dev)) { | ||
993 | netif_carrier_off(tp->dev); | ||
994 | tg3_link_report(tp); | ||
995 | } | ||
996 | |||
990 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 || | 997 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 || |
991 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || | 998 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || |
992 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { | 999 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { |
@@ -1023,6 +1030,12 @@ out: | |||
1023 | tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x14e2); | 1030 | tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x14e2); |
1024 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); | 1031 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); |
1025 | } | 1032 | } |
1033 | else if (tp->tg3_flags2 & TG3_FLG2_PHY_JITTER_BUG) { | ||
1034 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); | ||
1035 | tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a); | ||
1036 | tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b); | ||
1037 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); | ||
1038 | } | ||
1026 | /* Set Extended packet length bit (bit 14) on all chips that */ | 1039 | /* Set Extended packet length bit (bit 14) on all chips that */ |
1027 | /* support jumbo frames */ | 1040 | /* support jumbo frames */ |
1028 | if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { | 1041 | if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { |
@@ -3531,7 +3544,7 @@ static irqreturn_t tg3_test_isr(int irq, void *dev_id, | |||
3531 | return IRQ_RETVAL(0); | 3544 | return IRQ_RETVAL(0); |
3532 | } | 3545 | } |
3533 | 3546 | ||
3534 | static int tg3_init_hw(struct tg3 *); | 3547 | static int tg3_init_hw(struct tg3 *, int); |
3535 | static int tg3_halt(struct tg3 *, int, int); | 3548 | static int tg3_halt(struct tg3 *, int, int); |
3536 | 3549 | ||
3537 | #ifdef CONFIG_NET_POLL_CONTROLLER | 3550 | #ifdef CONFIG_NET_POLL_CONTROLLER |
@@ -3567,7 +3580,7 @@ static void tg3_reset_task(void *_data) | |||
3567 | tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER; | 3580 | tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER; |
3568 | 3581 | ||
3569 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 0); | 3582 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 0); |
3570 | tg3_init_hw(tp); | 3583 | tg3_init_hw(tp, 1); |
3571 | 3584 | ||
3572 | tg3_netif_start(tp); | 3585 | tg3_netif_start(tp); |
3573 | 3586 | ||
@@ -4042,7 +4055,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu) | |||
4042 | 4055 | ||
4043 | tg3_set_mtu(dev, tp, new_mtu); | 4056 | tg3_set_mtu(dev, tp, new_mtu); |
4044 | 4057 | ||
4045 | tg3_init_hw(tp); | 4058 | tg3_init_hw(tp, 0); |
4046 | 4059 | ||
4047 | tg3_netif_start(tp); | 4060 | tg3_netif_start(tp); |
4048 | 4061 | ||
@@ -5719,9 +5732,23 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p) | |||
5719 | if (!netif_running(dev)) | 5732 | if (!netif_running(dev)) |
5720 | return 0; | 5733 | return 0; |
5721 | 5734 | ||
5722 | spin_lock_bh(&tp->lock); | 5735 | if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { |
5723 | __tg3_set_mac_addr(tp); | 5736 | /* Reset chip so that ASF can re-init any MAC addresses it |
5724 | spin_unlock_bh(&tp->lock); | 5737 | * needs. |
5738 | */ | ||
5739 | tg3_netif_stop(tp); | ||
5740 | tg3_full_lock(tp, 1); | ||
5741 | |||
5742 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | ||
5743 | tg3_init_hw(tp, 0); | ||
5744 | |||
5745 | tg3_netif_start(tp); | ||
5746 | tg3_full_unlock(tp); | ||
5747 | } else { | ||
5748 | spin_lock_bh(&tp->lock); | ||
5749 | __tg3_set_mac_addr(tp); | ||
5750 | spin_unlock_bh(&tp->lock); | ||
5751 | } | ||
5725 | 5752 | ||
5726 | return 0; | 5753 | return 0; |
5727 | } | 5754 | } |
@@ -5771,7 +5798,7 @@ static void __tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec) | |||
5771 | } | 5798 | } |
5772 | 5799 | ||
5773 | /* tp->lock is held. */ | 5800 | /* tp->lock is held. */ |
5774 | static int tg3_reset_hw(struct tg3 *tp) | 5801 | static int tg3_reset_hw(struct tg3 *tp, int reset_phy) |
5775 | { | 5802 | { |
5776 | u32 val, rdmac_mode; | 5803 | u32 val, rdmac_mode; |
5777 | int i, err, limit; | 5804 | int i, err, limit; |
@@ -5786,7 +5813,7 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
5786 | tg3_abort_hw(tp, 1); | 5813 | tg3_abort_hw(tp, 1); |
5787 | } | 5814 | } |
5788 | 5815 | ||
5789 | if (tp->tg3_flags2 & TG3_FLG2_MII_SERDES) | 5816 | if ((tp->tg3_flags2 & TG3_FLG2_MII_SERDES) && reset_phy) |
5790 | tg3_phy_reset(tp); | 5817 | tg3_phy_reset(tp); |
5791 | 5818 | ||
5792 | err = tg3_chip_reset(tp); | 5819 | err = tg3_chip_reset(tp); |
@@ -6327,7 +6354,7 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
6327 | tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl); | 6354 | tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl); |
6328 | } | 6355 | } |
6329 | 6356 | ||
6330 | err = tg3_setup_phy(tp, 1); | 6357 | err = tg3_setup_phy(tp, reset_phy); |
6331 | if (err) | 6358 | if (err) |
6332 | return err; | 6359 | return err; |
6333 | 6360 | ||
@@ -6400,7 +6427,7 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
6400 | /* Called at device open time to get the chip ready for | 6427 | /* Called at device open time to get the chip ready for |
6401 | * packet processing. Invoked with tp->lock held. | 6428 | * packet processing. Invoked with tp->lock held. |
6402 | */ | 6429 | */ |
6403 | static int tg3_init_hw(struct tg3 *tp) | 6430 | static int tg3_init_hw(struct tg3 *tp, int reset_phy) |
6404 | { | 6431 | { |
6405 | int err; | 6432 | int err; |
6406 | 6433 | ||
@@ -6413,7 +6440,7 @@ static int tg3_init_hw(struct tg3 *tp) | |||
6413 | 6440 | ||
6414 | tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); | 6441 | tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); |
6415 | 6442 | ||
6416 | err = tg3_reset_hw(tp); | 6443 | err = tg3_reset_hw(tp, reset_phy); |
6417 | 6444 | ||
6418 | out: | 6445 | out: |
6419 | return err; | 6446 | return err; |
@@ -6683,7 +6710,7 @@ static int tg3_test_msi(struct tg3 *tp) | |||
6683 | tg3_full_lock(tp, 1); | 6710 | tg3_full_lock(tp, 1); |
6684 | 6711 | ||
6685 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | 6712 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
6686 | err = tg3_init_hw(tp); | 6713 | err = tg3_init_hw(tp, 1); |
6687 | 6714 | ||
6688 | tg3_full_unlock(tp); | 6715 | tg3_full_unlock(tp); |
6689 | 6716 | ||
@@ -6748,7 +6775,7 @@ static int tg3_open(struct net_device *dev) | |||
6748 | 6775 | ||
6749 | tg3_full_lock(tp, 0); | 6776 | tg3_full_lock(tp, 0); |
6750 | 6777 | ||
6751 | err = tg3_init_hw(tp); | 6778 | err = tg3_init_hw(tp, 1); |
6752 | if (err) { | 6779 | if (err) { |
6753 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | 6780 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
6754 | tg3_free_rings(tp); | 6781 | tg3_free_rings(tp); |
@@ -7839,7 +7866,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e | |||
7839 | 7866 | ||
7840 | if (netif_running(dev)) { | 7867 | if (netif_running(dev)) { |
7841 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | 7868 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
7842 | tg3_init_hw(tp); | 7869 | tg3_init_hw(tp, 1); |
7843 | tg3_netif_start(tp); | 7870 | tg3_netif_start(tp); |
7844 | } | 7871 | } |
7845 | 7872 | ||
@@ -7884,7 +7911,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam | |||
7884 | 7911 | ||
7885 | if (netif_running(dev)) { | 7912 | if (netif_running(dev)) { |
7886 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | 7913 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
7887 | tg3_init_hw(tp); | 7914 | tg3_init_hw(tp, 1); |
7888 | tg3_netif_start(tp); | 7915 | tg3_netif_start(tp); |
7889 | } | 7916 | } |
7890 | 7917 | ||
@@ -8522,7 +8549,7 @@ static int tg3_test_loopback(struct tg3 *tp) | |||
8522 | if (!netif_running(tp->dev)) | 8549 | if (!netif_running(tp->dev)) |
8523 | return TG3_LOOPBACK_FAILED; | 8550 | return TG3_LOOPBACK_FAILED; |
8524 | 8551 | ||
8525 | tg3_reset_hw(tp); | 8552 | tg3_reset_hw(tp, 1); |
8526 | 8553 | ||
8527 | if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) | 8554 | if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) |
8528 | err |= TG3_MAC_LOOPBACK_FAILED; | 8555 | err |= TG3_MAC_LOOPBACK_FAILED; |
@@ -8596,7 +8623,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest, | |||
8596 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | 8623 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
8597 | if (netif_running(dev)) { | 8624 | if (netif_running(dev)) { |
8598 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; | 8625 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; |
8599 | tg3_init_hw(tp); | 8626 | tg3_init_hw(tp, 1); |
8600 | tg3_netif_start(tp); | 8627 | tg3_netif_start(tp); |
8601 | } | 8628 | } |
8602 | 8629 | ||
@@ -9377,7 +9404,7 @@ static int tg3_nvram_write_block_buffered(struct tg3 *tp, u32 offset, u32 len, | |||
9377 | 9404 | ||
9378 | if ((page_off == 0) || (i == 0)) | 9405 | if ((page_off == 0) || (i == 0)) |
9379 | nvram_cmd |= NVRAM_CMD_FIRST; | 9406 | nvram_cmd |= NVRAM_CMD_FIRST; |
9380 | else if (page_off == (tp->nvram_pagesize - 4)) | 9407 | if (page_off == (tp->nvram_pagesize - 4)) |
9381 | nvram_cmd |= NVRAM_CMD_LAST; | 9408 | nvram_cmd |= NVRAM_CMD_LAST; |
9382 | 9409 | ||
9383 | if (i == (len - 4)) | 9410 | if (i == (len - 4)) |
@@ -10353,10 +10380,13 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10353 | if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) | 10380 | if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) |
10354 | tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG; | 10381 | tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG; |
10355 | 10382 | ||
10356 | if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && | 10383 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { |
10357 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) && | 10384 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || |
10358 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787)) | 10385 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) |
10359 | tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; | 10386 | tp->tg3_flags2 |= TG3_FLG2_PHY_JITTER_BUG; |
10387 | else | ||
10388 | tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; | ||
10389 | } | ||
10360 | 10390 | ||
10361 | tp->coalesce_mode = 0; | 10391 | tp->coalesce_mode = 0; |
10362 | if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX && | 10392 | if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX && |
@@ -11569,7 +11599,7 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) | |||
11569 | tg3_full_lock(tp, 0); | 11599 | tg3_full_lock(tp, 0); |
11570 | 11600 | ||
11571 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; | 11601 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; |
11572 | tg3_init_hw(tp); | 11602 | tg3_init_hw(tp, 1); |
11573 | 11603 | ||
11574 | tp->timer.expires = jiffies + tp->timer_offset; | 11604 | tp->timer.expires = jiffies + tp->timer_offset; |
11575 | add_timer(&tp->timer); | 11605 | add_timer(&tp->timer); |
@@ -11603,7 +11633,7 @@ static int tg3_resume(struct pci_dev *pdev) | |||
11603 | tg3_full_lock(tp, 0); | 11633 | tg3_full_lock(tp, 0); |
11604 | 11634 | ||
11605 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; | 11635 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; |
11606 | tg3_init_hw(tp); | 11636 | tg3_init_hw(tp, 1); |
11607 | 11637 | ||
11608 | tp->timer.expires = jiffies + tp->timer_offset; | 11638 | tp->timer.expires = jiffies + tp->timer_offset; |
11609 | add_timer(&tp->timer); | 11639 | add_timer(&tp->timer); |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 8c8b987d1250..0e29b885d449 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2215,6 +2215,7 @@ struct tg3 { | |||
2215 | #define TG3_FLG2_HW_TSO_2 0x08000000 | 2215 | #define TG3_FLG2_HW_TSO_2 0x08000000 |
2216 | #define TG3_FLG2_HW_TSO (TG3_FLG2_HW_TSO_1 | TG3_FLG2_HW_TSO_2) | 2216 | #define TG3_FLG2_HW_TSO (TG3_FLG2_HW_TSO_1 | TG3_FLG2_HW_TSO_2) |
2217 | #define TG3_FLG2_1SHOT_MSI 0x10000000 | 2217 | #define TG3_FLG2_1SHOT_MSI 0x10000000 |
2218 | #define TG3_FLG2_PHY_JITTER_BUG 0x20000000 | ||
2218 | 2219 | ||
2219 | u32 split_mode_max_reqs; | 2220 | u32 split_mode_max_reqs; |
2220 | #define SPLIT_MODE_5704_MAX_REQ 3 | 2221 | #define SPLIT_MODE_5704_MAX_REQ 3 |
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index b1e3e6179e56..6c9ad92747fd 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -58,7 +58,7 @@ rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | |||
58 | unsigned long data; | 58 | unsigned long data; |
59 | ssize_t ret; | 59 | ssize_t ret; |
60 | 60 | ||
61 | if (count < sizeof(unsigned long)) | 61 | if (count != sizeof(unsigned int) && count < sizeof(unsigned long)) |
62 | return -EINVAL; | 62 | return -EINVAL; |
63 | 63 | ||
64 | add_wait_queue(&rtc->irq_queue, &wait); | 64 | add_wait_queue(&rtc->irq_queue, &wait); |
@@ -90,11 +90,16 @@ rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | |||
90 | if (ret == 0) { | 90 | if (ret == 0) { |
91 | /* Check for any data updates */ | 91 | /* Check for any data updates */ |
92 | if (rtc->ops->read_callback) | 92 | if (rtc->ops->read_callback) |
93 | data = rtc->ops->read_callback(rtc->class_dev.dev, data); | 93 | data = rtc->ops->read_callback(rtc->class_dev.dev, |
94 | 94 | data); | |
95 | ret = put_user(data, (unsigned long __user *)buf); | 95 | |
96 | if (ret == 0) | 96 | if (sizeof(int) != sizeof(long) && |
97 | ret = sizeof(unsigned long); | 97 | count == sizeof(unsigned int)) |
98 | ret = put_user(data, (unsigned int __user *)buf) ?: | ||
99 | sizeof(unsigned int); | ||
100 | else | ||
101 | ret = put_user(data, (unsigned long __user *)buf) ?: | ||
102 | sizeof(unsigned long); | ||
98 | } | 103 | } |
99 | return ret; | 104 | return ret; |
100 | } | 105 | } |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index b3c6e7907790..cb14642d97aa 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -8014,7 +8014,6 @@ static int (*qeth_old_arp_constructor) (struct neighbour *); | |||
8014 | 8014 | ||
8015 | static struct neigh_ops arp_direct_ops_template = { | 8015 | static struct neigh_ops arp_direct_ops_template = { |
8016 | .family = AF_INET, | 8016 | .family = AF_INET, |
8017 | .destructor = NULL, | ||
8018 | .solicit = NULL, | 8017 | .solicit = NULL, |
8019 | .error_report = NULL, | 8018 | .error_report = NULL, |
8020 | .output = dev_queue_xmit, | 8019 | .output = dev_queue_xmit, |
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c index 5ae14803091f..f99e55308b32 100644 --- a/drivers/s390/s390mach.c +++ b/drivers/s390/s390mach.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/workqueue.h> | 15 | #include <linux/workqueue.h> |
16 | #include <linux/time.h> | ||
16 | 17 | ||
17 | #include <asm/lowcore.h> | 18 | #include <asm/lowcore.h> |
18 | 19 | ||
@@ -363,7 +364,7 @@ s390_revalidate_registers(struct mci *mci) | |||
363 | } | 364 | } |
364 | 365 | ||
365 | #define MAX_IPD_COUNT 29 | 366 | #define MAX_IPD_COUNT 29 |
366 | #define MAX_IPD_TIME (5 * 60 * 100 * 1000) /* 5 minutes */ | 367 | #define MAX_IPD_TIME (5 * 60 * USEC_PER_SEC) /* 5 minutes */ |
367 | 368 | ||
368 | /* | 369 | /* |
369 | * machine check handler. | 370 | * machine check handler. |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index 0b49ff78efc1..501316b198e5 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
@@ -678,7 +678,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
678 | /* Track PCI-device specific data */ | 678 | /* Track PCI-device specific data */ |
679 | pci_set_drvdata(pdev, idd); | 679 | pci_set_drvdata(pdev, idd); |
680 | down_write(&ioc3_devices_rwsem); | 680 | down_write(&ioc3_devices_rwsem); |
681 | list_add(&idd->list, &ioc3_devices); | 681 | list_add_tail(&idd->list, &ioc3_devices); |
682 | idd->id = ioc3_counter++; | 682 | idd->id = ioc3_counter++; |
683 | up_write(&ioc3_devices_rwsem); | 683 | up_write(&ioc3_devices_rwsem); |
684 | 684 | ||
diff --git a/fs/compat.c b/fs/compat.c index 2e32bd340474..3f3e8f4d43d6 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1317,6 +1317,26 @@ out: | |||
1317 | return ret; | 1317 | return ret; |
1318 | } | 1318 | } |
1319 | 1319 | ||
1320 | asmlinkage long | ||
1321 | compat_sys_vmsplice(int fd, const struct compat_iovec __user *iov32, | ||
1322 | unsigned int nr_segs, unsigned int flags) | ||
1323 | { | ||
1324 | unsigned i; | ||
1325 | struct iovec *iov; | ||
1326 | if (nr_segs >= UIO_MAXIOV) | ||
1327 | return -EINVAL; | ||
1328 | iov = compat_alloc_user_space(nr_segs * sizeof(struct iovec)); | ||
1329 | for (i = 0; i < nr_segs; i++) { | ||
1330 | struct compat_iovec v; | ||
1331 | if (get_user(v.iov_base, &iov32[i].iov_base) || | ||
1332 | get_user(v.iov_len, &iov32[i].iov_len) || | ||
1333 | put_user(compat_ptr(v.iov_base), &iov[i].iov_base) || | ||
1334 | put_user(v.iov_len, &iov[i].iov_len)) | ||
1335 | return -EFAULT; | ||
1336 | } | ||
1337 | return sys_vmsplice(fd, iov, nr_segs, flags); | ||
1338 | } | ||
1339 | |||
1320 | /* | 1340 | /* |
1321 | * Exactly like fs/open.c:sys_open(), except that it doesn't set the | 1341 | * Exactly like fs/open.c:sys_open(), except that it doesn't set the |
1322 | * O_LARGEFILE flag. | 1342 | * O_LARGEFILE flag. |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index f431d8b0b651..7cfcff3ef027 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -117,6 +117,7 @@ struct spu { | |||
117 | struct list_head list; | 117 | struct list_head list; |
118 | struct list_head sched_list; | 118 | struct list_head sched_list; |
119 | int number; | 119 | int number; |
120 | int nid; | ||
120 | u32 isrc; | 121 | u32 isrc; |
121 | u32 node; | 122 | u32 node; |
122 | u64 flags; | 123 | u64 flags; |
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 1e19cd00af25..87362a05542b 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -4,6 +4,9 @@ | |||
4 | 4 | ||
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
6 | 6 | ||
7 | struct sys_device; | ||
8 | struct device_node; | ||
9 | |||
7 | #ifdef CONFIG_NUMA | 10 | #ifdef CONFIG_NUMA |
8 | 11 | ||
9 | #include <asm/mmzone.h> | 12 | #include <asm/mmzone.h> |
@@ -27,6 +30,8 @@ static inline int node_to_first_cpu(int node) | |||
27 | return first_cpu(tmp); | 30 | return first_cpu(tmp); |
28 | } | 31 | } |
29 | 32 | ||
33 | int of_node_to_nid(struct device_node *device); | ||
34 | |||
30 | #define pcibus_to_node(node) (-1) | 35 | #define pcibus_to_node(node) (-1) |
31 | #define pcibus_to_cpumask(bus) (cpu_online_map) | 36 | #define pcibus_to_cpumask(bus) (cpu_online_map) |
32 | 37 | ||
@@ -57,10 +62,29 @@ static inline int node_to_first_cpu(int node) | |||
57 | 62 | ||
58 | extern void __init dump_numa_cpu_topology(void); | 63 | extern void __init dump_numa_cpu_topology(void); |
59 | 64 | ||
65 | extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); | ||
66 | extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid); | ||
67 | |||
60 | #else | 68 | #else |
61 | 69 | ||
70 | static inline int of_node_to_nid(struct device_node *device) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | |||
62 | static inline void dump_numa_cpu_topology(void) {} | 75 | static inline void dump_numa_cpu_topology(void) {} |
63 | 76 | ||
77 | static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid) | ||
78 | { | ||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | static inline void sysfs_remove_device_from_node(struct sys_device *dev, | ||
83 | int nid) | ||
84 | { | ||
85 | } | ||
86 | |||
87 | |||
64 | #include <asm-generic/topology.h> | 88 | #include <asm-generic/topology.h> |
65 | 89 | ||
66 | #endif /* CONFIG_NUMA */ | 90 | #endif /* CONFIG_NUMA */ |
diff --git a/include/asm-sparc64/tlbflush.h b/include/asm-sparc64/tlbflush.h index 9ad5d9c51d42..e3a7c453b500 100644 --- a/include/asm-sparc64/tlbflush.h +++ b/include/asm-sparc64/tlbflush.h | |||
@@ -22,8 +22,6 @@ extern void flush_tlb_pending(void); | |||
22 | /* Local cpu only. */ | 22 | /* Local cpu only. */ |
23 | extern void __flush_tlb_all(void); | 23 | extern void __flush_tlb_all(void); |
24 | 24 | ||
25 | extern void __flush_tlb_page(unsigned long context, unsigned long page, unsigned long r); | ||
26 | |||
27 | extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end); | 25 | extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end); |
28 | 26 | ||
29 | #ifndef CONFIG_SMP | 27 | #ifndef CONFIG_SMP |
diff --git a/include/linux/input.h b/include/linux/input.h index b0e612dda0cf..50e338d2ffda 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/device.h> | ||
16 | #include <linux/mod_devicetable.h> | ||
17 | #else | 15 | #else |
18 | #include <sys/time.h> | 16 | #include <sys/time.h> |
19 | #include <sys/ioctl.h> | 17 | #include <sys/ioctl.h> |
@@ -58,6 +56,8 @@ struct input_absinfo { | |||
58 | 56 | ||
59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 57 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 58 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
59 | #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ | ||
60 | #define EVIOCSREP _IOW('E', 0x03, int[2]) /* set repeat settings */ | ||
61 | #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ | 61 | #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ |
62 | #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ | 62 | #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ |
63 | 63 | ||
@@ -577,15 +577,15 @@ struct input_absinfo { | |||
577 | * Switch events | 577 | * Switch events |
578 | */ | 578 | */ |
579 | 579 | ||
580 | #define SW_0 0x00 | 580 | #define SW_0 0x00 |
581 | #define SW_1 0x01 | 581 | #define SW_1 0x01 |
582 | #define SW_2 0x02 | 582 | #define SW_2 0x02 |
583 | #define SW_3 0x03 | 583 | #define SW_3 0x03 |
584 | #define SW_4 0x04 | 584 | #define SW_4 0x04 |
585 | #define SW_5 0x05 | 585 | #define SW_5 0x05 |
586 | #define SW_6 0x06 | 586 | #define SW_6 0x06 |
587 | #define SW_7 0x07 | 587 | #define SW_7 0x07 |
588 | #define SW_MAX 0x0f | 588 | #define SW_MAX 0x0f |
589 | 589 | ||
590 | /* | 590 | /* |
591 | * Misc events | 591 | * Misc events |
@@ -805,52 +805,16 @@ struct ff_effect { | |||
805 | 805 | ||
806 | #define FF_MAX 0x7f | 806 | #define FF_MAX 0x7f |
807 | 807 | ||
808 | struct input_device_id { | ||
809 | |||
810 | kernel_ulong_t flags; | ||
811 | |||
812 | struct input_id id; | ||
813 | |||
814 | kernel_ulong_t evbit[EV_MAX/BITS_PER_LONG+1]; | ||
815 | kernel_ulong_t keybit[KEY_MAX/BITS_PER_LONG+1]; | ||
816 | kernel_ulong_t relbit[REL_MAX/BITS_PER_LONG+1]; | ||
817 | kernel_ulong_t absbit[ABS_MAX/BITS_PER_LONG+1]; | ||
818 | kernel_ulong_t mscbit[MSC_MAX/BITS_PER_LONG+1]; | ||
819 | kernel_ulong_t ledbit[LED_MAX/BITS_PER_LONG+1]; | ||
820 | kernel_ulong_t sndbit[SND_MAX/BITS_PER_LONG+1]; | ||
821 | kernel_ulong_t ffbit[FF_MAX/BITS_PER_LONG+1]; | ||
822 | kernel_ulong_t swbit[SW_MAX/BITS_PER_LONG+1]; | ||
823 | |||
824 | kernel_ulong_t driver_info; | ||
825 | }; | ||
826 | |||
827 | /* | ||
828 | * Structure for hotplug & device<->driver matching. | ||
829 | */ | ||
830 | |||
831 | #define INPUT_DEVICE_ID_MATCH_BUS 1 | ||
832 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 | ||
833 | #define INPUT_DEVICE_ID_MATCH_PRODUCT 4 | ||
834 | #define INPUT_DEVICE_ID_MATCH_VERSION 8 | ||
835 | |||
836 | #define INPUT_DEVICE_ID_MATCH_EVBIT 0x010 | ||
837 | #define INPUT_DEVICE_ID_MATCH_KEYBIT 0x020 | ||
838 | #define INPUT_DEVICE_ID_MATCH_RELBIT 0x040 | ||
839 | #define INPUT_DEVICE_ID_MATCH_ABSBIT 0x080 | ||
840 | #define INPUT_DEVICE_ID_MATCH_MSCIT 0x100 | ||
841 | #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x200 | ||
842 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x400 | ||
843 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x800 | ||
844 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | ||
845 | |||
846 | #ifdef __KERNEL__ | 808 | #ifdef __KERNEL__ |
847 | 809 | ||
848 | /* | 810 | /* |
849 | * In-kernel definitions. | 811 | * In-kernel definitions. |
850 | */ | 812 | */ |
851 | 813 | ||
814 | #include <linux/device.h> | ||
852 | #include <linux/fs.h> | 815 | #include <linux/fs.h> |
853 | #include <linux/timer.h> | 816 | #include <linux/timer.h> |
817 | #include <linux/mod_devicetable.h> | ||
854 | 818 | ||
855 | #define NBITS(x) (((x)/BITS_PER_LONG)+1) | 819 | #define NBITS(x) (((x)/BITS_PER_LONG)+1) |
856 | #define BIT(x) (1UL<<((x)%BITS_PER_LONG)) | 820 | #define BIT(x) (1UL<<((x)%BITS_PER_LONG)) |
@@ -951,9 +915,49 @@ struct input_dev { | |||
951 | }; | 915 | }; |
952 | #define to_input_dev(d) container_of(d, struct input_dev, cdev) | 916 | #define to_input_dev(d) container_of(d, struct input_dev, cdev) |
953 | 917 | ||
954 | #define INPUT_DEVICE_ID_MATCH_DEVICE\ | 918 | /* |
919 | * Verify that we are in sync with input_device_id mod_devicetable.h #defines | ||
920 | */ | ||
921 | |||
922 | #if EV_MAX != INPUT_DEVICE_ID_EV_MAX | ||
923 | #error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match" | ||
924 | #endif | ||
925 | |||
926 | #if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX | ||
927 | #error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match" | ||
928 | #endif | ||
929 | |||
930 | #if REL_MAX != INPUT_DEVICE_ID_REL_MAX | ||
931 | #error "REL_MAX and INPUT_DEVICE_ID_REL_MAX do not match" | ||
932 | #endif | ||
933 | |||
934 | #if ABS_MAX != INPUT_DEVICE_ID_ABS_MAX | ||
935 | #error "ABS_MAX and INPUT_DEVICE_ID_ABS_MAX do not match" | ||
936 | #endif | ||
937 | |||
938 | #if MSC_MAX != INPUT_DEVICE_ID_MSC_MAX | ||
939 | #error "MSC_MAX and INPUT_DEVICE_ID_MSC_MAX do not match" | ||
940 | #endif | ||
941 | |||
942 | #if LED_MAX != INPUT_DEVICE_ID_LED_MAX | ||
943 | #error "LED_MAX and INPUT_DEVICE_ID_LED_MAX do not match" | ||
944 | #endif | ||
945 | |||
946 | #if SND_MAX != INPUT_DEVICE_ID_SND_MAX | ||
947 | #error "SND_MAX and INPUT_DEVICE_ID_SND_MAX do not match" | ||
948 | #endif | ||
949 | |||
950 | #if FF_MAX != INPUT_DEVICE_ID_FF_MAX | ||
951 | #error "FF_MAX and INPUT_DEVICE_ID_FF_MAX do not match" | ||
952 | #endif | ||
953 | |||
954 | #if SW_MAX != INPUT_DEVICE_ID_SW_MAX | ||
955 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" | ||
956 | #endif | ||
957 | |||
958 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ | ||
955 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) | 959 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) |
956 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION\ | 960 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ |
957 | (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) | 961 | (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) |
958 | 962 | ||
959 | struct input_handle; | 963 | struct input_handle; |
@@ -1016,7 +1020,8 @@ static inline void input_put_device(struct input_dev *dev) | |||
1016 | 1020 | ||
1017 | static inline void input_free_device(struct input_dev *dev) | 1021 | static inline void input_free_device(struct input_dev *dev) |
1018 | { | 1022 | { |
1019 | input_put_device(dev); | 1023 | if (dev) |
1024 | input_put_device(dev); | ||
1020 | } | 1025 | } |
1021 | 1026 | ||
1022 | int input_register_device(struct input_dev *); | 1027 | int input_register_device(struct input_dev *); |
diff --git a/include/linux/list.h b/include/linux/list.h index 67258b47e9ca..76f05718342c 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -619,7 +619,7 @@ static inline void hlist_del_rcu(struct hlist_node *n) | |||
619 | 619 | ||
620 | static inline void hlist_del_init(struct hlist_node *n) | 620 | static inline void hlist_del_init(struct hlist_node *n) |
621 | { | 621 | { |
622 | if (n->pprev) { | 622 | if (!hlist_unhashed(n)) { |
623 | __hlist_del(n); | 623 | __hlist_del(n); |
624 | INIT_HLIST_NODE(n); | 624 | INIT_HLIST_NODE(n); |
625 | } | 625 | } |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 7b08c11ec4cc..f6977708585c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -249,4 +249,52 @@ struct i2c_device_id { | |||
249 | __u16 id; | 249 | __u16 id; |
250 | }; | 250 | }; |
251 | 251 | ||
252 | /* Input */ | ||
253 | #define INPUT_DEVICE_ID_EV_MAX 0x1f | ||
254 | #define INPUT_DEVICE_ID_KEY_MAX 0x1ff | ||
255 | #define INPUT_DEVICE_ID_REL_MAX 0x0f | ||
256 | #define INPUT_DEVICE_ID_ABS_MAX 0x3f | ||
257 | #define INPUT_DEVICE_ID_MSC_MAX 0x07 | ||
258 | #define INPUT_DEVICE_ID_LED_MAX 0x0f | ||
259 | #define INPUT_DEVICE_ID_SND_MAX 0x07 | ||
260 | #define INPUT_DEVICE_ID_FF_MAX 0x7f | ||
261 | #define INPUT_DEVICE_ID_SW_MAX 0x0f | ||
262 | |||
263 | #define INPUT_DEVICE_ID_MATCH_BUS 1 | ||
264 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 | ||
265 | #define INPUT_DEVICE_ID_MATCH_PRODUCT 4 | ||
266 | #define INPUT_DEVICE_ID_MATCH_VERSION 8 | ||
267 | |||
268 | #define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010 | ||
269 | #define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020 | ||
270 | #define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040 | ||
271 | #define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080 | ||
272 | #define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100 | ||
273 | #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200 | ||
274 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 | ||
275 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 | ||
276 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | ||
277 | |||
278 | struct input_device_id { | ||
279 | |||
280 | kernel_ulong_t flags; | ||
281 | |||
282 | __u16 bustype; | ||
283 | __u16 vendor; | ||
284 | __u16 product; | ||
285 | __u16 version; | ||
286 | |||
287 | kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1]; | ||
288 | kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1]; | ||
289 | kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1]; | ||
290 | kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1]; | ||
291 | kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1]; | ||
292 | kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1]; | ||
293 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; | ||
294 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; | ||
295 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; | ||
296 | |||
297 | kernel_ulong_t driver_info; | ||
298 | }; | ||
299 | |||
252 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 300 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 72261e0f2ac1..adb3dafd33e9 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -14,5 +14,12 @@ struct ads7846_platform_data { | |||
14 | u16 x_min, x_max; | 14 | u16 x_min, x_max; |
15 | u16 y_min, y_max; | 15 | u16 y_min, y_max; |
16 | u16 pressure_min, pressure_max; | 16 | u16 pressure_min, pressure_max; |
17 | |||
18 | u16 debounce_max; /* max number of additional readings | ||
19 | * per sample */ | ||
20 | u16 debounce_tol; /* tolerance used for filtering */ | ||
21 | u16 debounce_rep; /* additional consecutive good readings | ||
22 | * required after the first two */ | ||
23 | int (*get_pendown_state)(void); | ||
17 | }; | 24 | }; |
18 | 25 | ||
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 1da294c47522..e837f98fdb50 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -150,7 +150,7 @@ static inline void inet_twsk_add_bind_node(struct inet_timewait_sock *tw, | |||
150 | 150 | ||
151 | static inline int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw) | 151 | static inline int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw) |
152 | { | 152 | { |
153 | return tw->tw_death_node.pprev != NULL; | 153 | return !hlist_unhashed(&tw->tw_death_node); |
154 | } | 154 | } |
155 | 155 | ||
156 | static inline void inet_twsk_dead_node_init(struct inet_timewait_sock *tw) | 156 | static inline void inet_twsk_dead_node_init(struct inet_timewait_sock *tw) |
diff --git a/include/net/sock.h b/include/net/sock.h index ff8b0dad7b0f..c9fad6fb629b 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -279,7 +279,7 @@ static inline int sk_unhashed(const struct sock *sk) | |||
279 | 279 | ||
280 | static inline int sk_hashed(const struct sock *sk) | 280 | static inline int sk_hashed(const struct sock *sk) |
281 | { | 281 | { |
282 | return sk->sk_node.pprev != NULL; | 282 | return !sk_unhashed(sk); |
283 | } | 283 | } |
284 | 284 | ||
285 | static __inline__ void sk_node_init(struct hlist_node *node) | 285 | static __inline__ void sk_node_init(struct hlist_node *node) |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index df70e7592ab5..373425895faa 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -374,12 +374,14 @@ struct snd_pcm_substream { | |||
374 | /* -- OSS things -- */ | 374 | /* -- OSS things -- */ |
375 | struct snd_pcm_oss_substream oss; | 375 | struct snd_pcm_oss_substream oss; |
376 | #endif | 376 | #endif |
377 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
377 | struct snd_info_entry *proc_root; | 378 | struct snd_info_entry *proc_root; |
378 | struct snd_info_entry *proc_info_entry; | 379 | struct snd_info_entry *proc_info_entry; |
379 | struct snd_info_entry *proc_hw_params_entry; | 380 | struct snd_info_entry *proc_hw_params_entry; |
380 | struct snd_info_entry *proc_sw_params_entry; | 381 | struct snd_info_entry *proc_sw_params_entry; |
381 | struct snd_info_entry *proc_status_entry; | 382 | struct snd_info_entry *proc_status_entry; |
382 | struct snd_info_entry *proc_prealloc_entry; | 383 | struct snd_info_entry *proc_prealloc_entry; |
384 | #endif | ||
383 | /* misc flags */ | 385 | /* misc flags */ |
384 | unsigned int no_mmap_ctrl: 1; | 386 | unsigned int no_mmap_ctrl: 1; |
385 | unsigned int hw_opened: 1; | 387 | unsigned int hw_opened: 1; |
@@ -400,12 +402,14 @@ struct snd_pcm_str { | |||
400 | struct snd_pcm_oss_stream oss; | 402 | struct snd_pcm_oss_stream oss; |
401 | #endif | 403 | #endif |
402 | struct snd_pcm_file *files; | 404 | struct snd_pcm_file *files; |
405 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
403 | struct snd_info_entry *proc_root; | 406 | struct snd_info_entry *proc_root; |
404 | struct snd_info_entry *proc_info_entry; | 407 | struct snd_info_entry *proc_info_entry; |
405 | #ifdef CONFIG_SND_DEBUG | 408 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
406 | unsigned int xrun_debug; /* 0 = disabled, 1 = verbose, 2 = stacktrace */ | 409 | unsigned int xrun_debug; /* 0 = disabled, 1 = verbose, 2 = stacktrace */ |
407 | struct snd_info_entry *proc_xrun_debug_entry; | 410 | struct snd_info_entry *proc_xrun_debug_entry; |
408 | #endif | 411 | #endif |
412 | #endif | ||
409 | }; | 413 | }; |
410 | 414 | ||
411 | struct snd_pcm { | 415 | struct snd_pcm { |
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index 39df2baca18a..c854647b6f3c 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h | |||
@@ -75,7 +75,9 @@ struct snd_pcm_oss_substream { | |||
75 | struct snd_pcm_oss_stream { | 75 | struct snd_pcm_oss_stream { |
76 | struct snd_pcm_oss_setup *setup_list; /* setup list */ | 76 | struct snd_pcm_oss_setup *setup_list; /* setup list */ |
77 | struct mutex setup_mutex; | 77 | struct mutex setup_mutex; |
78 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
78 | struct snd_info_entry *proc_entry; | 79 | struct snd_info_entry *proc_entry; |
80 | #endif | ||
79 | }; | 81 | }; |
80 | 82 | ||
81 | struct snd_pcm_oss { | 83 | struct snd_pcm_oss { |
diff --git a/init/main.c b/init/main.c index 4a2f0898dda1..f715b9b89753 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -582,7 +582,7 @@ static void __init do_initcalls(void) | |||
582 | 582 | ||
583 | result = (*call)(); | 583 | result = (*call)(); |
584 | 584 | ||
585 | if (result && (result != -ENODEV || initcall_debug)) { | 585 | if (result && result != -ENODEV && initcall_debug) { |
586 | sprintf(msgbuf, "error code %d", result); | 586 | sprintf(msgbuf, "error code %d", result); |
587 | msg = msgbuf; | 587 | msg = msgbuf; |
588 | } | 588 | } |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1fe76d963ac2..1ae2b2cc3a54 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -69,12 +69,16 @@ int __add_pages(struct zone *zone, unsigned long phys_start_pfn, | |||
69 | for (i = 0; i < nr_pages; i += PAGES_PER_SECTION) { | 69 | for (i = 0; i < nr_pages; i += PAGES_PER_SECTION) { |
70 | err = __add_section(zone, phys_start_pfn + i); | 70 | err = __add_section(zone, phys_start_pfn + i); |
71 | 71 | ||
72 | if (err) | 72 | /* We want to keep adding the rest of the |
73 | * sections if the first ones already exist | ||
74 | */ | ||
75 | if (err && (err != -EEXIST)) | ||
73 | break; | 76 | break; |
74 | } | 77 | } |
75 | 78 | ||
76 | return err; | 79 | return err; |
77 | } | 80 | } |
81 | EXPORT_SYMBOL_GPL(__add_pages); | ||
78 | 82 | ||
79 | static void grow_zone_span(struct zone *zone, | 83 | static void grow_zone_span(struct zone *zone, |
80 | unsigned long start_pfn, unsigned long end_pfn) | 84 | unsigned long start_pfn, unsigned long end_pfn) |
diff --git a/mm/migrate.c b/mm/migrate.c index d444229f2599..1c25040693d2 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -439,6 +439,17 @@ redo: | |||
439 | goto unlock_both; | 439 | goto unlock_both; |
440 | } | 440 | } |
441 | 441 | ||
442 | /* Make sure the dirty bit is up to date */ | ||
443 | if (try_to_unmap(page, 1) == SWAP_FAIL) { | ||
444 | rc = -EPERM; | ||
445 | goto unlock_both; | ||
446 | } | ||
447 | |||
448 | if (page_mapcount(page)) { | ||
449 | rc = -EAGAIN; | ||
450 | goto unlock_both; | ||
451 | } | ||
452 | |||
442 | /* | 453 | /* |
443 | * Default handling if a filesystem does not provide | 454 | * Default handling if a filesystem does not provide |
444 | * a migration function. We can only migrate clean | 455 | * a migration function. We can only migrate clean |
diff --git a/mm/sparse.c b/mm/sparse.c index 0a51f36ba3a1..d7c32de99ee8 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -32,7 +32,10 @@ static struct mem_section *sparse_index_alloc(int nid) | |||
32 | unsigned long array_size = SECTIONS_PER_ROOT * | 32 | unsigned long array_size = SECTIONS_PER_ROOT * |
33 | sizeof(struct mem_section); | 33 | sizeof(struct mem_section); |
34 | 34 | ||
35 | section = alloc_bootmem_node(NODE_DATA(nid), array_size); | 35 | if (system_state == SYSTEM_RUNNING) |
36 | section = kmalloc_node(array_size, GFP_KERNEL, nid); | ||
37 | else | ||
38 | section = alloc_bootmem_node(NODE_DATA(nid), array_size); | ||
36 | 39 | ||
37 | if (section) | 40 | if (section) |
38 | memset(section, 0, array_size); | 41 | memset(section, 0, array_size); |
@@ -281,9 +284,9 @@ int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, | |||
281 | 284 | ||
282 | ret = sparse_init_one_section(ms, section_nr, memmap); | 285 | ret = sparse_init_one_section(ms, section_nr, memmap); |
283 | 286 | ||
284 | if (ret <= 0) | ||
285 | __kfree_section_memmap(memmap, nr_pages); | ||
286 | out: | 287 | out: |
287 | pgdat_resize_unlock(pgdat, &flags); | 288 | pgdat_resize_unlock(pgdat, &flags); |
289 | if (ret <= 0) | ||
290 | __kfree_section_memmap(memmap, nr_pages); | ||
288 | return ret; | 291 | return ret; |
289 | } | 292 | } |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index dc206f1f914f..0a277453526b 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1257,7 +1257,7 @@ out_unregister_udp_proto: | |||
1257 | goto out; | 1257 | goto out; |
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | module_init(inet_init); | 1260 | fs_initcall(inet_init); |
1261 | 1261 | ||
1262 | /* ------------------------------------------------------------------------ */ | 1262 | /* ------------------------------------------------------------------------ */ |
1263 | 1263 | ||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index a28ae593b976..743016baa048 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -465,7 +465,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
465 | TCP_INC_STATS(TCP_MIB_OUTSEGS); | 465 | TCP_INC_STATS(TCP_MIB_OUTSEGS); |
466 | 466 | ||
467 | err = icsk->icsk_af_ops->queue_xmit(skb, 0); | 467 | err = icsk->icsk_af_ops->queue_xmit(skb, 0); |
468 | if (unlikely(err <= 0)) | 468 | if (likely(err <= 0)) |
469 | return err; | 469 | return err; |
470 | 470 | ||
471 | tcp_enter_cwr(sk); | 471 | tcp_enter_cwr(sk); |
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c index 32ad229b4fed..4ef8efaf6a67 100644 --- a/net/ipv4/xfrm4_output.c +++ b/net/ipv4/xfrm4_output.c | |||
@@ -62,7 +62,7 @@ static void xfrm4_encap(struct sk_buff *skb) | |||
62 | top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ? | 62 | top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ? |
63 | 0 : (iph->frag_off & htons(IP_DF)); | 63 | 0 : (iph->frag_off & htons(IP_DF)); |
64 | if (!top_iph->frag_off) | 64 | if (!top_iph->frag_off) |
65 | __ip_select_ident(top_iph, dst, 0); | 65 | __ip_select_ident(top_iph, dst->child, 0); |
66 | 66 | ||
67 | top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT); | 67 | top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT); |
68 | 68 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 79078747a646..0190e39096b9 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -317,7 +317,7 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif, | |||
317 | __FUNCTION__, head, head ? *head : NULL, oif); | 317 | __FUNCTION__, head, head ? *head : NULL, oif); |
318 | 318 | ||
319 | for (rt = rt0, metric = rt0->rt6i_metric; | 319 | for (rt = rt0, metric = rt0->rt6i_metric; |
320 | rt && rt->rt6i_metric == metric; | 320 | rt && rt->rt6i_metric == metric && (!last || rt != rt0); |
321 | rt = rt->u.next) { | 321 | rt = rt->u.next) { |
322 | int m; | 322 | int m; |
323 | 323 | ||
@@ -343,9 +343,12 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif, | |||
343 | (strict & RT6_SELECT_F_REACHABLE) && | 343 | (strict & RT6_SELECT_F_REACHABLE) && |
344 | last && last != rt0) { | 344 | last && last != rt0) { |
345 | /* no entries matched; do round-robin */ | 345 | /* no entries matched; do round-robin */ |
346 | static spinlock_t lock = SPIN_LOCK_UNLOCKED; | ||
347 | spin_lock(&lock); | ||
346 | *head = rt0->u.next; | 348 | *head = rt0->u.next; |
347 | rt0->u.next = last->u.next; | 349 | rt0->u.next = last->u.next; |
348 | last->u.next = rt0; | 350 | last->u.next = rt0; |
351 | spin_unlock(&lock); | ||
349 | } | 352 | } |
350 | 353 | ||
351 | RT6_TRACE("%s() => %p, score=%d\n", | 354 | RT6_TRACE("%s() => %p, score=%d\n", |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 2a233ffcf618..b8ea61f357e6 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -61,7 +61,6 @@ | |||
61 | #include <net/scm.h> | 61 | #include <net/scm.h> |
62 | #include <net/netlink.h> | 62 | #include <net/netlink.h> |
63 | 63 | ||
64 | #define Nprintk(a...) | ||
65 | #define NLGRPSZ(x) (ALIGN(x, sizeof(unsigned long) * 8) / 8) | 64 | #define NLGRPSZ(x) (ALIGN(x, sizeof(unsigned long) * 8) / 8) |
66 | 65 | ||
67 | struct netlink_sock { | 66 | struct netlink_sock { |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 7228d30512c7..5a4a4d0ae502 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -167,7 +167,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
167 | if (count == 0) { | 167 | if (count == 0) { |
168 | sch->qstats.drops++; | 168 | sch->qstats.drops++; |
169 | kfree_skb(skb); | 169 | kfree_skb(skb); |
170 | return NET_XMIT_DROP; | 170 | return NET_XMIT_BYPASS; |
171 | } | 171 | } |
172 | 172 | ||
173 | /* | 173 | /* |
diff --git a/net/x25/x25_timer.c b/net/x25/x25_timer.c index 0a92e1da3922..71ff3088f6fe 100644 --- a/net/x25/x25_timer.c +++ b/net/x25/x25_timer.c | |||
@@ -114,8 +114,9 @@ static void x25_heartbeat_expiry(unsigned long param) | |||
114 | if (sock_flag(sk, SOCK_DESTROY) || | 114 | if (sock_flag(sk, SOCK_DESTROY) || |
115 | (sk->sk_state == TCP_LISTEN && | 115 | (sk->sk_state == TCP_LISTEN && |
116 | sock_flag(sk, SOCK_DEAD))) { | 116 | sock_flag(sk, SOCK_DEAD))) { |
117 | bh_unlock_sock(sk); | ||
117 | x25_destroy_socket(sk); | 118 | x25_destroy_socket(sk); |
118 | goto unlock; | 119 | return; |
119 | } | 120 | } |
120 | break; | 121 | break; |
121 | 122 | ||
@@ -128,7 +129,6 @@ static void x25_heartbeat_expiry(unsigned long param) | |||
128 | } | 129 | } |
129 | restart_heartbeat: | 130 | restart_heartbeat: |
130 | x25_start_heartbeat(sk); | 131 | x25_start_heartbeat(sk); |
131 | unlock: | ||
132 | bh_unlock_sock(sk); | 132 | bh_unlock_sock(sk); |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index c3725fe2a8fb..b469c8b54613 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -57,12 +57,12 @@ int xfrm_register_type(struct xfrm_type *type, unsigned short family) | |||
57 | return -EAFNOSUPPORT; | 57 | return -EAFNOSUPPORT; |
58 | typemap = afinfo->type_map; | 58 | typemap = afinfo->type_map; |
59 | 59 | ||
60 | write_lock(&typemap->lock); | 60 | write_lock_bh(&typemap->lock); |
61 | if (likely(typemap->map[type->proto] == NULL)) | 61 | if (likely(typemap->map[type->proto] == NULL)) |
62 | typemap->map[type->proto] = type; | 62 | typemap->map[type->proto] = type; |
63 | else | 63 | else |
64 | err = -EEXIST; | 64 | err = -EEXIST; |
65 | write_unlock(&typemap->lock); | 65 | write_unlock_bh(&typemap->lock); |
66 | xfrm_policy_put_afinfo(afinfo); | 66 | xfrm_policy_put_afinfo(afinfo); |
67 | return err; | 67 | return err; |
68 | } | 68 | } |
@@ -78,12 +78,12 @@ int xfrm_unregister_type(struct xfrm_type *type, unsigned short family) | |||
78 | return -EAFNOSUPPORT; | 78 | return -EAFNOSUPPORT; |
79 | typemap = afinfo->type_map; | 79 | typemap = afinfo->type_map; |
80 | 80 | ||
81 | write_lock(&typemap->lock); | 81 | write_lock_bh(&typemap->lock); |
82 | if (unlikely(typemap->map[type->proto] != type)) | 82 | if (unlikely(typemap->map[type->proto] != type)) |
83 | err = -ENOENT; | 83 | err = -ENOENT; |
84 | else | 84 | else |
85 | typemap->map[type->proto] = NULL; | 85 | typemap->map[type->proto] = NULL; |
86 | write_unlock(&typemap->lock); | 86 | write_unlock_bh(&typemap->lock); |
87 | xfrm_policy_put_afinfo(afinfo); | 87 | xfrm_policy_put_afinfo(afinfo); |
88 | return err; | 88 | return err; |
89 | } | 89 | } |
@@ -1251,7 +1251,7 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo) | |||
1251 | return -EINVAL; | 1251 | return -EINVAL; |
1252 | if (unlikely(afinfo->family >= NPROTO)) | 1252 | if (unlikely(afinfo->family >= NPROTO)) |
1253 | return -EAFNOSUPPORT; | 1253 | return -EAFNOSUPPORT; |
1254 | write_lock(&xfrm_policy_afinfo_lock); | 1254 | write_lock_bh(&xfrm_policy_afinfo_lock); |
1255 | if (unlikely(xfrm_policy_afinfo[afinfo->family] != NULL)) | 1255 | if (unlikely(xfrm_policy_afinfo[afinfo->family] != NULL)) |
1256 | err = -ENOBUFS; | 1256 | err = -ENOBUFS; |
1257 | else { | 1257 | else { |
@@ -1268,7 +1268,7 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo) | |||
1268 | afinfo->garbage_collect = __xfrm_garbage_collect; | 1268 | afinfo->garbage_collect = __xfrm_garbage_collect; |
1269 | xfrm_policy_afinfo[afinfo->family] = afinfo; | 1269 | xfrm_policy_afinfo[afinfo->family] = afinfo; |
1270 | } | 1270 | } |
1271 | write_unlock(&xfrm_policy_afinfo_lock); | 1271 | write_unlock_bh(&xfrm_policy_afinfo_lock); |
1272 | return err; | 1272 | return err; |
1273 | } | 1273 | } |
1274 | EXPORT_SYMBOL(xfrm_policy_register_afinfo); | 1274 | EXPORT_SYMBOL(xfrm_policy_register_afinfo); |
@@ -1280,7 +1280,7 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo) | |||
1280 | return -EINVAL; | 1280 | return -EINVAL; |
1281 | if (unlikely(afinfo->family >= NPROTO)) | 1281 | if (unlikely(afinfo->family >= NPROTO)) |
1282 | return -EAFNOSUPPORT; | 1282 | return -EAFNOSUPPORT; |
1283 | write_lock(&xfrm_policy_afinfo_lock); | 1283 | write_lock_bh(&xfrm_policy_afinfo_lock); |
1284 | if (likely(xfrm_policy_afinfo[afinfo->family] != NULL)) { | 1284 | if (likely(xfrm_policy_afinfo[afinfo->family] != NULL)) { |
1285 | if (unlikely(xfrm_policy_afinfo[afinfo->family] != afinfo)) | 1285 | if (unlikely(xfrm_policy_afinfo[afinfo->family] != afinfo)) |
1286 | err = -EINVAL; | 1286 | err = -EINVAL; |
@@ -1294,7 +1294,7 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo) | |||
1294 | afinfo->garbage_collect = NULL; | 1294 | afinfo->garbage_collect = NULL; |
1295 | } | 1295 | } |
1296 | } | 1296 | } |
1297 | write_unlock(&xfrm_policy_afinfo_lock); | 1297 | write_unlock_bh(&xfrm_policy_afinfo_lock); |
1298 | return err; | 1298 | return err; |
1299 | } | 1299 | } |
1300 | EXPORT_SYMBOL(xfrm_policy_unregister_afinfo); | 1300 | EXPORT_SYMBOL(xfrm_policy_unregister_afinfo); |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 3dc3e1f3b7aa..93a2f36ad3db 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -1061,7 +1061,7 @@ int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1061 | return -EINVAL; | 1061 | return -EINVAL; |
1062 | if (unlikely(afinfo->family >= NPROTO)) | 1062 | if (unlikely(afinfo->family >= NPROTO)) |
1063 | return -EAFNOSUPPORT; | 1063 | return -EAFNOSUPPORT; |
1064 | write_lock(&xfrm_state_afinfo_lock); | 1064 | write_lock_bh(&xfrm_state_afinfo_lock); |
1065 | if (unlikely(xfrm_state_afinfo[afinfo->family] != NULL)) | 1065 | if (unlikely(xfrm_state_afinfo[afinfo->family] != NULL)) |
1066 | err = -ENOBUFS; | 1066 | err = -ENOBUFS; |
1067 | else { | 1067 | else { |
@@ -1069,7 +1069,7 @@ int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1069 | afinfo->state_byspi = xfrm_state_byspi; | 1069 | afinfo->state_byspi = xfrm_state_byspi; |
1070 | xfrm_state_afinfo[afinfo->family] = afinfo; | 1070 | xfrm_state_afinfo[afinfo->family] = afinfo; |
1071 | } | 1071 | } |
1072 | write_unlock(&xfrm_state_afinfo_lock); | 1072 | write_unlock_bh(&xfrm_state_afinfo_lock); |
1073 | return err; | 1073 | return err; |
1074 | } | 1074 | } |
1075 | EXPORT_SYMBOL(xfrm_state_register_afinfo); | 1075 | EXPORT_SYMBOL(xfrm_state_register_afinfo); |
@@ -1081,7 +1081,7 @@ int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1081 | return -EINVAL; | 1081 | return -EINVAL; |
1082 | if (unlikely(afinfo->family >= NPROTO)) | 1082 | if (unlikely(afinfo->family >= NPROTO)) |
1083 | return -EAFNOSUPPORT; | 1083 | return -EAFNOSUPPORT; |
1084 | write_lock(&xfrm_state_afinfo_lock); | 1084 | write_lock_bh(&xfrm_state_afinfo_lock); |
1085 | if (likely(xfrm_state_afinfo[afinfo->family] != NULL)) { | 1085 | if (likely(xfrm_state_afinfo[afinfo->family] != NULL)) { |
1086 | if (unlikely(xfrm_state_afinfo[afinfo->family] != afinfo)) | 1086 | if (unlikely(xfrm_state_afinfo[afinfo->family] != afinfo)) |
1087 | err = -EINVAL; | 1087 | err = -EINVAL; |
@@ -1091,7 +1091,7 @@ int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1091 | afinfo->state_bydst = NULL; | 1091 | afinfo->state_bydst = NULL; |
1092 | } | 1092 | } |
1093 | } | 1093 | } |
1094 | write_unlock(&xfrm_state_afinfo_lock); | 1094 | write_unlock_bh(&xfrm_state_afinfo_lock); |
1095 | return err; | 1095 | return err; |
1096 | } | 1096 | } |
1097 | EXPORT_SYMBOL(xfrm_state_unregister_afinfo); | 1097 | EXPORT_SYMBOL(xfrm_state_unregister_afinfo); |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 84e21201f3c0..37f67c23e11b 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -374,10 +374,10 @@ static void do_input(char *alias, | |||
374 | kernel_ulong_t *arr, unsigned int min, unsigned int max) | 374 | kernel_ulong_t *arr, unsigned int min, unsigned int max) |
375 | { | 375 | { |
376 | unsigned int i; | 376 | unsigned int i; |
377 | for (i = min; i < max; i++) { | 377 | |
378 | if (arr[i/BITS_PER_LONG] & (1 << (i%BITS_PER_LONG))) | 378 | for (i = min; i < max; i++) |
379 | sprintf(alias+strlen(alias), "%X,*", i); | 379 | if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG))) |
380 | } | 380 | sprintf(alias + strlen(alias), "%X,*", i); |
381 | } | 381 | } |
382 | 382 | ||
383 | /* input:b0v0p0e0-eXkXrXaXmXlXsXfXwX where X is comma-separated %02X. */ | 383 | /* input:b0v0p0e0-eXkXrXaXmXlXsXfXwX where X is comma-separated %02X. */ |
@@ -386,39 +386,37 @@ static int do_input_entry(const char *filename, struct input_device_id *id, | |||
386 | { | 386 | { |
387 | sprintf(alias, "input:"); | 387 | sprintf(alias, "input:"); |
388 | 388 | ||
389 | ADD(alias, "b", id->flags&INPUT_DEVICE_ID_MATCH_BUS, id->id.bustype); | 389 | ADD(alias, "b", id->flags & INPUT_DEVICE_ID_MATCH_BUS, id->bustype); |
390 | ADD(alias, "v", id->flags&INPUT_DEVICE_ID_MATCH_VENDOR, id->id.vendor); | 390 | ADD(alias, "v", id->flags & INPUT_DEVICE_ID_MATCH_VENDOR, id->vendor); |
391 | ADD(alias, "p", id->flags&INPUT_DEVICE_ID_MATCH_PRODUCT, | 391 | ADD(alias, "p", id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT, id->product); |
392 | id->id.product); | 392 | ADD(alias, "e", id->flags & INPUT_DEVICE_ID_MATCH_VERSION, id->version); |
393 | ADD(alias, "e", id->flags&INPUT_DEVICE_ID_MATCH_VERSION, | ||
394 | id->id.version); | ||
395 | 393 | ||
396 | sprintf(alias + strlen(alias), "-e*"); | 394 | sprintf(alias + strlen(alias), "-e*"); |
397 | if (id->flags&INPUT_DEVICE_ID_MATCH_EVBIT) | 395 | if (id->flags & INPUT_DEVICE_ID_MATCH_EVBIT) |
398 | do_input(alias, id->evbit, 0, EV_MAX); | 396 | do_input(alias, id->evbit, 0, EV_MAX); |
399 | sprintf(alias + strlen(alias), "k*"); | 397 | sprintf(alias + strlen(alias), "k*"); |
400 | if (id->flags&INPUT_DEVICE_ID_MATCH_KEYBIT) | 398 | if (id->flags & INPUT_DEVICE_ID_MATCH_KEYBIT) |
401 | do_input(alias, id->keybit, KEY_MIN_INTERESTING, KEY_MAX); | 399 | do_input(alias, id->keybit, KEY_MIN_INTERESTING, KEY_MAX); |
402 | sprintf(alias + strlen(alias), "r*"); | 400 | sprintf(alias + strlen(alias), "r*"); |
403 | if (id->flags&INPUT_DEVICE_ID_MATCH_RELBIT) | 401 | if (id->flags & INPUT_DEVICE_ID_MATCH_RELBIT) |
404 | do_input(alias, id->relbit, 0, REL_MAX); | 402 | do_input(alias, id->relbit, 0, REL_MAX); |
405 | sprintf(alias + strlen(alias), "a*"); | 403 | sprintf(alias + strlen(alias), "a*"); |
406 | if (id->flags&INPUT_DEVICE_ID_MATCH_ABSBIT) | 404 | if (id->flags & INPUT_DEVICE_ID_MATCH_ABSBIT) |
407 | do_input(alias, id->absbit, 0, ABS_MAX); | 405 | do_input(alias, id->absbit, 0, ABS_MAX); |
408 | sprintf(alias + strlen(alias), "m*"); | 406 | sprintf(alias + strlen(alias), "m*"); |
409 | if (id->flags&INPUT_DEVICE_ID_MATCH_MSCIT) | 407 | if (id->flags & INPUT_DEVICE_ID_MATCH_MSCIT) |
410 | do_input(alias, id->mscbit, 0, MSC_MAX); | 408 | do_input(alias, id->mscbit, 0, MSC_MAX); |
411 | sprintf(alias + strlen(alias), "l*"); | 409 | sprintf(alias + strlen(alias), "l*"); |
412 | if (id->flags&INPUT_DEVICE_ID_MATCH_LEDBIT) | 410 | if (id->flags & INPUT_DEVICE_ID_MATCH_LEDBIT) |
413 | do_input(alias, id->ledbit, 0, LED_MAX); | 411 | do_input(alias, id->ledbit, 0, LED_MAX); |
414 | sprintf(alias + strlen(alias), "s*"); | 412 | sprintf(alias + strlen(alias), "s*"); |
415 | if (id->flags&INPUT_DEVICE_ID_MATCH_SNDBIT) | 413 | if (id->flags & INPUT_DEVICE_ID_MATCH_SNDBIT) |
416 | do_input(alias, id->sndbit, 0, SND_MAX); | 414 | do_input(alias, id->sndbit, 0, SND_MAX); |
417 | sprintf(alias + strlen(alias), "f*"); | 415 | sprintf(alias + strlen(alias), "f*"); |
418 | if (id->flags&INPUT_DEVICE_ID_MATCH_FFBIT) | 416 | if (id->flags & INPUT_DEVICE_ID_MATCH_FFBIT) |
419 | do_input(alias, id->ffbit, 0, FF_MAX); | 417 | do_input(alias, id->ffbit, 0, FF_MAX); |
420 | sprintf(alias + strlen(alias), "w*"); | 418 | sprintf(alias + strlen(alias), "w*"); |
421 | if (id->flags&INPUT_DEVICE_ID_MATCH_SWBIT) | 419 | if (id->flags & INPUT_DEVICE_ID_MATCH_SWBIT) |
422 | do_input(alias, id->swbit, 0, SW_MAX); | 420 | do_input(alias, id->swbit, 0, SW_MAX); |
423 | return 1; | 421 | return 1; |
424 | } | 422 | } |
diff --git a/sound/core/Kconfig b/sound/core/Kconfig index 8efc1b12f3a8..4262a1c87731 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig | |||
@@ -142,7 +142,7 @@ config SND_SUPPORT_OLD_API | |||
142 | 142 | ||
143 | config SND_VERBOSE_PROCFS | 143 | config SND_VERBOSE_PROCFS |
144 | bool "Verbose procfs contents" | 144 | bool "Verbose procfs contents" |
145 | depends on SND | 145 | depends on SND && PROC_FS |
146 | default y | 146 | default y |
147 | help | 147 | help |
148 | Say Y here to include code for verbose procfs contents (provides | 148 | Say Y here to include code for verbose procfs contents (provides |
@@ -171,3 +171,13 @@ config SND_DEBUG_DETECT | |||
171 | help | 171 | help |
172 | Say Y here to enable extra-verbose log messages printed when | 172 | Say Y here to enable extra-verbose log messages printed when |
173 | detecting devices. | 173 | detecting devices. |
174 | |||
175 | config SND_PCM_XRUN_DEBUG | ||
176 | bool "Enable PCM ring buffer overrun/underrun debugging" | ||
177 | default n | ||
178 | depends on SND_DEBUG && SND_VERBOSE_PROCFS | ||
179 | help | ||
180 | Say Y to enable the PCM ring buffer overrun/underrun debugging. | ||
181 | It is usually not required, but if you have trouble with | ||
182 | sound clicking when system is loaded, it may help to determine | ||
183 | the process or driver which causes the scheduling gaps. | ||
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index c5978d6c6080..ac990bf0b48f 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -1242,6 +1242,8 @@ static int snd_pcm_oss_set_format(struct snd_pcm_oss_file *pcm_oss_file, int for | |||
1242 | 1242 | ||
1243 | if (format != AFMT_QUERY) { | 1243 | if (format != AFMT_QUERY) { |
1244 | formats = snd_pcm_oss_get_formats(pcm_oss_file); | 1244 | formats = snd_pcm_oss_get_formats(pcm_oss_file); |
1245 | if (formats < 0) | ||
1246 | return formats; | ||
1245 | if (!(formats & format)) | 1247 | if (!(formats & format)) |
1246 | format = AFMT_U8; | 1248 | format = AFMT_U8; |
1247 | for (idx = 1; idx >= 0; --idx) { | 1249 | for (idx = 1; idx >= 0; --idx) { |
@@ -2212,7 +2214,7 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area) | |||
2212 | return 0; | 2214 | return 0; |
2213 | } | 2215 | } |
2214 | 2216 | ||
2215 | #ifdef CONFIG_PROC_FS | 2217 | #ifdef CONFIG_SND_VERBOSE_PROCFS |
2216 | /* | 2218 | /* |
2217 | * /proc interface | 2219 | * /proc interface |
2218 | */ | 2220 | */ |
@@ -2366,10 +2368,10 @@ static void snd_pcm_oss_proc_done(struct snd_pcm *pcm) | |||
2366 | } | 2368 | } |
2367 | } | 2369 | } |
2368 | } | 2370 | } |
2369 | #else /* !CONFIG_PROC_FS */ | 2371 | #else /* !CONFIG_SND_VERBOSE_PROCFS */ |
2370 | #define snd_pcm_oss_proc_init(pcm) | 2372 | #define snd_pcm_oss_proc_init(pcm) |
2371 | #define snd_pcm_oss_proc_done(pcm) | 2373 | #define snd_pcm_oss_proc_done(pcm) |
2372 | #endif /* CONFIG_PROC_FS */ | 2374 | #endif /* CONFIG_SND_VERBOSE_PROCFS */ |
2373 | 2375 | ||
2374 | /* | 2376 | /* |
2375 | * ENTRY functions | 2377 | * ENTRY functions |
diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 122e10a61ab9..84b00038236d 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c | |||
@@ -142,7 +142,7 @@ static int snd_pcm_control_ioctl(struct snd_card *card, | |||
142 | return -ENOIOCTLCMD; | 142 | return -ENOIOCTLCMD; |
143 | } | 143 | } |
144 | 144 | ||
145 | #if defined(CONFIG_PROC_FS) && defined(CONFIG_SND_VERBOSE_PROCFS) | 145 | #ifdef CONFIG_SND_VERBOSE_PROCFS |
146 | 146 | ||
147 | #define STATE(v) [SNDRV_PCM_STATE_##v] = #v | 147 | #define STATE(v) [SNDRV_PCM_STATE_##v] = #v |
148 | #define STREAM(v) [SNDRV_PCM_STREAM_##v] = #v | 148 | #define STREAM(v) [SNDRV_PCM_STREAM_##v] = #v |
@@ -436,7 +436,7 @@ static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry, | |||
436 | snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr); | 436 | snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr); |
437 | } | 437 | } |
438 | 438 | ||
439 | #ifdef CONFIG_SND_DEBUG | 439 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
440 | static void snd_pcm_xrun_debug_read(struct snd_info_entry *entry, | 440 | static void snd_pcm_xrun_debug_read(struct snd_info_entry *entry, |
441 | struct snd_info_buffer *buffer) | 441 | struct snd_info_buffer *buffer) |
442 | { | 442 | { |
@@ -480,7 +480,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) | |||
480 | } | 480 | } |
481 | pstr->proc_info_entry = entry; | 481 | pstr->proc_info_entry = entry; |
482 | 482 | ||
483 | #ifdef CONFIG_SND_DEBUG | 483 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
484 | if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug", | 484 | if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug", |
485 | pstr->proc_root)) != NULL) { | 485 | pstr->proc_root)) != NULL) { |
486 | entry->c.text.read_size = 64; | 486 | entry->c.text.read_size = 64; |
@@ -501,7 +501,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) | |||
501 | 501 | ||
502 | static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) | 502 | static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) |
503 | { | 503 | { |
504 | #ifdef CONFIG_SND_DEBUG | 504 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
505 | if (pstr->proc_xrun_debug_entry) { | 505 | if (pstr->proc_xrun_debug_entry) { |
506 | snd_info_unregister(pstr->proc_xrun_debug_entry); | 506 | snd_info_unregister(pstr->proc_xrun_debug_entry); |
507 | pstr->proc_xrun_debug_entry = NULL; | 507 | pstr->proc_xrun_debug_entry = NULL; |
@@ -599,12 +599,12 @@ static int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream) | |||
599 | } | 599 | } |
600 | return 0; | 600 | return 0; |
601 | } | 601 | } |
602 | #else /* !CONFIG_PROC_FS */ | 602 | #else /* !CONFIG_SND_VERBOSE_PROCFS */ |
603 | static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; } | 603 | static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; } |
604 | static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; } | 604 | static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; } |
605 | static inline int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) { return 0; } | 605 | static inline int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) { return 0; } |
606 | static inline int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream) { return 0; } | 606 | static inline int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream) { return 0; } |
607 | #endif /* CONFIG_PROC_FS */ | 607 | #endif /* CONFIG_SND_VERBOSE_PROCFS */ |
608 | 608 | ||
609 | /** | 609 | /** |
610 | * snd_pcm_new_stream - create a new PCM stream | 610 | * snd_pcm_new_stream - create a new PCM stream |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 230a940d00bd..eedc6cb038bb 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -130,7 +130,7 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram | |||
130 | static void xrun(struct snd_pcm_substream *substream) | 130 | static void xrun(struct snd_pcm_substream *substream) |
131 | { | 131 | { |
132 | snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); | 132 | snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); |
133 | #ifdef CONFIG_SND_DEBUG | 133 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
134 | if (substream->pstr->xrun_debug) { | 134 | if (substream->pstr->xrun_debug) { |
135 | snd_printd(KERN_DEBUG "XRUN: pcmC%dD%d%c\n", | 135 | snd_printd(KERN_DEBUG "XRUN: pcmC%dD%d%c\n", |
136 | substream->pcm->card->number, | 136 | substream->pcm->card->number, |
@@ -204,7 +204,7 @@ static inline int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *subs | |||
204 | delta = hw_ptr_interrupt - new_hw_ptr; | 204 | delta = hw_ptr_interrupt - new_hw_ptr; |
205 | if (delta > 0) { | 205 | if (delta > 0) { |
206 | if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) { | 206 | if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) { |
207 | #ifdef CONFIG_SND_DEBUG | 207 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
208 | if (runtime->periods > 1 && substream->pstr->xrun_debug) { | 208 | if (runtime->periods > 1 && substream->pstr->xrun_debug) { |
209 | snd_printd(KERN_ERR "Unexpected hw_pointer value [1] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2); | 209 | snd_printd(KERN_ERR "Unexpected hw_pointer value [1] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2); |
210 | if (substream->pstr->xrun_debug > 1) | 210 | if (substream->pstr->xrun_debug > 1) |
@@ -249,7 +249,7 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream) | |||
249 | delta = old_hw_ptr - new_hw_ptr; | 249 | delta = old_hw_ptr - new_hw_ptr; |
250 | if (delta > 0) { | 250 | if (delta > 0) { |
251 | if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) { | 251 | if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) { |
252 | #ifdef CONFIG_SND_DEBUG | 252 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
253 | if (runtime->periods > 2 && substream->pstr->xrun_debug) { | 253 | if (runtime->periods > 2 && substream->pstr->xrun_debug) { |
254 | snd_printd(KERN_ERR "Unexpected hw_pointer value [2] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2); | 254 | snd_printd(KERN_ERR "Unexpected hw_pointer value [2] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2); |
255 | if (substream->pstr->xrun_debug > 1) | 255 | if (substream->pstr->xrun_debug > 1) |
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index a0119ae67dcd..428f8c169ee1 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c | |||
@@ -100,8 +100,10 @@ static void snd_pcm_lib_preallocate_dma_free(struct snd_pcm_substream *substream | |||
100 | int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream) | 100 | int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream) |
101 | { | 101 | { |
102 | snd_pcm_lib_preallocate_dma_free(substream); | 102 | snd_pcm_lib_preallocate_dma_free(substream); |
103 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
103 | snd_info_unregister(substream->proc_prealloc_entry); | 104 | snd_info_unregister(substream->proc_prealloc_entry); |
104 | substream->proc_prealloc_entry = NULL; | 105 | substream->proc_prealloc_entry = NULL; |
106 | #endif | ||
105 | return 0; | 107 | return 0; |
106 | } | 108 | } |
107 | 109 | ||
@@ -124,7 +126,7 @@ int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm) | |||
124 | return 0; | 126 | return 0; |
125 | } | 127 | } |
126 | 128 | ||
127 | #ifdef CONFIG_PROC_FS | 129 | #ifdef CONFIG_SND_VERBOSE_PROCFS |
128 | /* | 130 | /* |
129 | * read callback for prealloc proc file | 131 | * read callback for prealloc proc file |
130 | * | 132 | * |
@@ -203,9 +205,9 @@ static inline void preallocate_info_init(struct snd_pcm_substream *substream) | |||
203 | substream->proc_prealloc_entry = entry; | 205 | substream->proc_prealloc_entry = entry; |
204 | } | 206 | } |
205 | 207 | ||
206 | #else /* !CONFIG_PROC_FS */ | 208 | #else /* !CONFIG_SND_VERBOSE_PROCFS */ |
207 | #define preallocate_info_init(s) | 209 | #define preallocate_info_init(s) |
208 | #endif | 210 | #endif /* CONFIG_SND_VERBOSE_PROCFS */ |
209 | 211 | ||
210 | /* | 212 | /* |
211 | * pre-allocate the buffer and create a proc file for the substream | 213 | * pre-allocate the buffer and create a proc file for the substream |
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index e35fd5779a9d..ae0df549fac7 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c | |||
@@ -675,10 +675,8 @@ static int __init alsa_card_dummy_init(void) | |||
675 | continue; | 675 | continue; |
676 | device = platform_device_register_simple(SND_DUMMY_DRIVER, | 676 | device = platform_device_register_simple(SND_DUMMY_DRIVER, |
677 | i, NULL, 0); | 677 | i, NULL, 0); |
678 | if (IS_ERR(device)) { | 678 | if (IS_ERR(device)) |
679 | err = PTR_ERR(device); | 679 | continue; |
680 | goto errout; | ||
681 | } | ||
682 | devices[i] = device; | 680 | devices[i] = device; |
683 | cards++; | 681 | cards++; |
684 | } | 682 | } |
@@ -686,14 +684,10 @@ static int __init alsa_card_dummy_init(void) | |||
686 | #ifdef MODULE | 684 | #ifdef MODULE |
687 | printk(KERN_ERR "Dummy soundcard not found or device busy\n"); | 685 | printk(KERN_ERR "Dummy soundcard not found or device busy\n"); |
688 | #endif | 686 | #endif |
689 | err = -ENODEV; | 687 | snd_dummy_unregister_all(); |
690 | goto errout; | 688 | return -ENODEV; |
691 | } | 689 | } |
692 | return 0; | 690 | return 0; |
693 | |||
694 | errout: | ||
695 | snd_dummy_unregister_all(); | ||
696 | return err; | ||
697 | } | 691 | } |
698 | 692 | ||
699 | static void __exit alsa_card_dummy_exit(void) | 693 | static void __exit alsa_card_dummy_exit(void) |
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 9ea3059a7064..da7ef26995c3 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c | |||
@@ -251,10 +251,8 @@ static int __init alsa_card_mpu401_init(void) | |||
251 | #endif | 251 | #endif |
252 | device = platform_device_register_simple(SND_MPU401_DRIVER, | 252 | device = platform_device_register_simple(SND_MPU401_DRIVER, |
253 | i, NULL, 0); | 253 | i, NULL, 0); |
254 | if (IS_ERR(device)) { | 254 | if (IS_ERR(device)) |
255 | err = PTR_ERR(device); | 255 | continue; |
256 | goto errout; | ||
257 | } | ||
258 | platform_devices[i] = device; | 256 | platform_devices[i] = device; |
259 | snd_mpu401_devices++; | 257 | snd_mpu401_devices++; |
260 | } | 258 | } |
@@ -266,14 +264,10 @@ static int __init alsa_card_mpu401_init(void) | |||
266 | #ifdef MODULE | 264 | #ifdef MODULE |
267 | printk(KERN_ERR "MPU-401 device not found or device busy\n"); | 265 | printk(KERN_ERR "MPU-401 device not found or device busy\n"); |
268 | #endif | 266 | #endif |
269 | err = -ENODEV; | 267 | snd_mpu401_unregister_all(); |
270 | goto errout; | 268 | return -ENODEV; |
271 | } | 269 | } |
272 | return 0; | 270 | return 0; |
273 | |||
274 | errout: | ||
275 | snd_mpu401_unregister_all(); | ||
276 | return err; | ||
277 | } | 271 | } |
278 | 272 | ||
279 | static void __exit alsa_card_mpu401_exit(void) | 273 | static void __exit alsa_card_mpu401_exit(void) |
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index 1a7fbefe4740..c01b4c5118b9 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c | |||
@@ -996,10 +996,8 @@ static int __init alsa_card_serial_init(void) | |||
996 | continue; | 996 | continue; |
997 | device = platform_device_register_simple(SND_SERIAL_DRIVER, | 997 | device = platform_device_register_simple(SND_SERIAL_DRIVER, |
998 | i, NULL, 0); | 998 | i, NULL, 0); |
999 | if (IS_ERR(device)) { | 999 | if (IS_ERR(device)) |
1000 | err = PTR_ERR(device); | 1000 | continue; |
1001 | goto errout; | ||
1002 | } | ||
1003 | devices[i] = device; | 1001 | devices[i] = device; |
1004 | cards++; | 1002 | cards++; |
1005 | } | 1003 | } |
@@ -1007,14 +1005,10 @@ static int __init alsa_card_serial_init(void) | |||
1007 | #ifdef MODULE | 1005 | #ifdef MODULE |
1008 | printk(KERN_ERR "serial midi soundcard not found or device busy\n"); | 1006 | printk(KERN_ERR "serial midi soundcard not found or device busy\n"); |
1009 | #endif | 1007 | #endif |
1010 | err = -ENODEV; | 1008 | snd_serial_unregister_all(); |
1011 | goto errout; | 1009 | return -ENODEV; |
1012 | } | 1010 | } |
1013 | return 0; | 1011 | return 0; |
1014 | |||
1015 | errout: | ||
1016 | snd_serial_unregister_all(); | ||
1017 | return err; | ||
1018 | } | 1012 | } |
1019 | 1013 | ||
1020 | static void __exit alsa_card_serial_exit(void) | 1014 | static void __exit alsa_card_serial_exit(void) |
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index a3ee306239c9..26eb2499d442 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c | |||
@@ -169,10 +169,8 @@ static int __init alsa_card_virmidi_init(void) | |||
169 | continue; | 169 | continue; |
170 | device = platform_device_register_simple(SND_VIRMIDI_DRIVER, | 170 | device = platform_device_register_simple(SND_VIRMIDI_DRIVER, |
171 | i, NULL, 0); | 171 | i, NULL, 0); |
172 | if (IS_ERR(device)) { | 172 | if (IS_ERR(device)) |
173 | err = PTR_ERR(device); | 173 | continue; |
174 | goto errout; | ||
175 | } | ||
176 | devices[i] = device; | 174 | devices[i] = device; |
177 | cards++; | 175 | cards++; |
178 | } | 176 | } |
@@ -180,14 +178,10 @@ static int __init alsa_card_virmidi_init(void) | |||
180 | #ifdef MODULE | 178 | #ifdef MODULE |
181 | printk(KERN_ERR "Card-VirMIDI soundcard not found or device busy\n"); | 179 | printk(KERN_ERR "Card-VirMIDI soundcard not found or device busy\n"); |
182 | #endif | 180 | #endif |
183 | err = -ENODEV; | 181 | snd_virmidi_unregister_all(); |
184 | goto errout; | 182 | return -ENODEV; |
185 | } | 183 | } |
186 | return 0; | 184 | return 0; |
187 | |||
188 | errout: | ||
189 | snd_virmidi_unregister_all(); | ||
190 | return err; | ||
191 | } | 185 | } |
192 | 186 | ||
193 | static void __exit alsa_card_virmidi_exit(void) | 187 | static void __exit alsa_card_virmidi_exit(void) |
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 83d64bc07ff0..e6bfcf74c1c1 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c | |||
@@ -1179,20 +1179,17 @@ static int __init snd_card_miro_aci_detect(struct snd_card *card, struct snd_mir | |||
1179 | /* force ACI into a known state */ | 1179 | /* force ACI into a known state */ |
1180 | for (i = 0; i < 3; i++) | 1180 | for (i = 0; i < 3; i++) |
1181 | if (aci_cmd(miro, ACI_ERROR_OP, -1, -1) < 0) { | 1181 | if (aci_cmd(miro, ACI_ERROR_OP, -1, -1) < 0) { |
1182 | snd_card_free(card); | ||
1183 | snd_printk(KERN_ERR "can't force aci into known state.\n"); | 1182 | snd_printk(KERN_ERR "can't force aci into known state.\n"); |
1184 | return -ENXIO; | 1183 | return -ENXIO; |
1185 | } | 1184 | } |
1186 | 1185 | ||
1187 | if ((miro->aci_vendor=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0 || | 1186 | if ((miro->aci_vendor=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0 || |
1188 | (miro->aci_product=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0) { | 1187 | (miro->aci_product=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0) { |
1189 | snd_card_free(card); | ||
1190 | snd_printk(KERN_ERR "can't read aci id on 0x%lx.\n", miro->aci_port); | 1188 | snd_printk(KERN_ERR "can't read aci id on 0x%lx.\n", miro->aci_port); |
1191 | return -ENXIO; | 1189 | return -ENXIO; |
1192 | } | 1190 | } |
1193 | 1191 | ||
1194 | if ((miro->aci_version=aci_cmd(miro, ACI_READ_VERSION, -1, -1)) < 0) { | 1192 | if ((miro->aci_version=aci_cmd(miro, ACI_READ_VERSION, -1, -1)) < 0) { |
1195 | snd_card_free(card); | ||
1196 | snd_printk(KERN_ERR "can't read aci version on 0x%lx.\n", | 1193 | snd_printk(KERN_ERR "can't read aci version on 0x%lx.\n", |
1197 | miro->aci_port); | 1194 | miro->aci_port); |
1198 | return -ENXIO; | 1195 | return -ENXIO; |
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index c6c8333acc62..eece1c7e55a0 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/compiler.h> | 40 | #include <linux/compiler.h> |
41 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
42 | #include <linux/dma-mapping.h> | ||
43 | 42 | ||
44 | #include <sound/driver.h> | 43 | #include <sound/driver.h> |
45 | #include <sound/core.h> | 44 | #include <sound/core.h> |
@@ -1052,7 +1051,7 @@ snd_ad1889_remove(struct pci_dev *pci) | |||
1052 | pci_set_drvdata(pci, NULL); | 1051 | pci_set_drvdata(pci, NULL); |
1053 | } | 1052 | } |
1054 | 1053 | ||
1055 | static struct pci_device_id snd_ad1889_ids[] = { | 1054 | static struct pci_device_id snd_ad1889_ids[] __devinitdata = { |
1056 | { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) }, | 1055 | { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) }, |
1057 | { 0, }, | 1056 | { 0, }, |
1058 | }; | 1057 | }; |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index fc92b6896c24..e2dbc2118902 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -279,7 +279,7 @@ struct snd_ali { | |||
279 | #endif | 279 | #endif |
280 | }; | 280 | }; |
281 | 281 | ||
282 | static struct pci_device_id snd_ali_ids[] = { | 282 | static struct pci_device_id snd_ali_ids[] __devinitdata = { |
283 | {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0}, | 283 | {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0}, |
284 | {0, } | 284 | {0, } |
285 | }; | 285 | }; |
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 91899f87f037..901b08ae9174 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c | |||
@@ -146,7 +146,7 @@ struct snd_als300_substream_data { | |||
146 | int block_counter_register; | 146 | int block_counter_register; |
147 | }; | 147 | }; |
148 | 148 | ||
149 | static struct pci_device_id snd_als300_ids[] = { | 149 | static struct pci_device_id snd_als300_ids[] __devinitdata = { |
150 | { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 }, | 150 | { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 }, |
151 | { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS }, | 151 | { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS }, |
152 | { 0, } | 152 | { 0, } |
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index 100d8127a411..60423b1c678b 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c | |||
@@ -116,7 +116,7 @@ struct snd_card_als4000 { | |||
116 | #endif | 116 | #endif |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static struct pci_device_id snd_als4000_ids[] = { | 119 | static struct pci_device_id snd_als4000_ids[] __devinitdata = { |
120 | { 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */ | 120 | { 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */ |
121 | { 0, } | 121 | { 0, } |
122 | }; | 122 | }; |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 12e618851262..d0f759d86d3d 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -284,7 +284,7 @@ struct atiixp { | |||
284 | 284 | ||
285 | /* | 285 | /* |
286 | */ | 286 | */ |
287 | static struct pci_device_id snd_atiixp_ids[] = { | 287 | static struct pci_device_id snd_atiixp_ids[] __devinitdata = { |
288 | { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ | 288 | { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ |
289 | { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ | 289 | { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ |
290 | { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ | 290 | { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ |
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 1d3766044643..12a34c39caa7 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -262,7 +262,7 @@ struct atiixp_modem { | |||
262 | 262 | ||
263 | /* | 263 | /* |
264 | */ | 264 | */ |
265 | static struct pci_device_id snd_atiixp_ids[] = { | 265 | static struct pci_device_id snd_atiixp_ids[] __devinitdata = { |
266 | { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ | 266 | { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ |
267 | { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ | 267 | { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ |
268 | { 0, } | 268 | { 0, } |
diff --git a/sound/pci/au88x0/au8810.c b/sound/pci/au88x0/au8810.c index fce22c7af0ea..bd3352998ad0 100644 --- a/sound/pci/au88x0/au8810.c +++ b/sound/pci/au88x0/au8810.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "au8810.h" | 1 | #include "au8810.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] = { | 3 | static struct pci_device_id snd_vortex_ids[] __devinitdata = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, | 4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, | 5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, |
6 | {0,} | 6 | {0,} |
diff --git a/sound/pci/au88x0/au8820.c b/sound/pci/au88x0/au8820.c index d1fbcce07257..7e3fd8372d8d 100644 --- a/sound/pci/au88x0/au8820.c +++ b/sound/pci/au88x0/au8820.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "au8820.h" | 1 | #include "au8820.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] = { | 3 | static struct pci_device_id snd_vortex_ids[] __devinitdata = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, | 4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | 5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, |
6 | {0,} | 6 | {0,} |
diff --git a/sound/pci/au88x0/au8830.c b/sound/pci/au88x0/au8830.c index d4f2717c14fb..b840f6608a61 100644 --- a/sound/pci/au88x0/au8830.c +++ b/sound/pci/au88x0/au8830.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "au8830.h" | 1 | #include "au8830.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] = { | 3 | static struct pci_device_id snd_vortex_ids[] __devinitdata = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, | 4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | 5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, |
6 | {0,} | 6 | {0,} |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 680077e1e057..52a364524262 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -216,7 +216,7 @@ struct snd_azf3328 { | |||
216 | int irq; | 216 | int irq; |
217 | }; | 217 | }; |
218 | 218 | ||
219 | static const struct pci_device_id snd_azf3328_ids[] = { | 219 | static const struct pci_device_id snd_azf3328_ids[] __devinitdata = { |
220 | { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ | 220 | { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ |
221 | { 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* 3328 */ | 221 | { 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* 3328 */ |
222 | { 0, } | 222 | { 0, } |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 7b44a8db033d..9ee07d4aac1e 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -774,7 +774,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card, | |||
774 | .driver_data = rate } | 774 | .driver_data = rate } |
775 | 775 | ||
776 | /* driver_data is the default digital_rate value for that device */ | 776 | /* driver_data is the default digital_rate value for that device */ |
777 | static struct pci_device_id snd_bt87x_ids[] = { | 777 | static struct pci_device_id snd_bt87x_ids[] __devinitdata = { |
778 | /* Hauppauge WinTV series */ | 778 | /* Hauppauge WinTV series */ |
779 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000), | 779 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000), |
780 | /* Hauppauge WinTV series */ | 780 | /* Hauppauge WinTV series */ |
@@ -911,7 +911,7 @@ static void __devexit snd_bt87x_remove(struct pci_dev *pci) | |||
911 | 911 | ||
912 | /* default entries for all Bt87x cards - it's not exported */ | 912 | /* default entries for all Bt87x cards - it's not exported */ |
913 | /* driver_data is set to 0 to call detection */ | 913 | /* driver_data is set to 0 to call detection */ |
914 | static struct pci_device_id snd_bt87x_default_ids[] = { | 914 | static struct pci_device_id snd_bt87x_default_ids[] __devinitdata = { |
915 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, PCI_ANY_ID, PCI_ANY_ID, 0), | 915 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, PCI_ANY_ID, PCI_ANY_ID, 0), |
916 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, PCI_ANY_ID, PCI_ANY_ID, 0), | 916 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, PCI_ANY_ID, PCI_ANY_ID, 0), |
917 | { } | 917 | { } |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 9477838a9c88..fd8bfebfbd54 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -1561,7 +1561,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci) | |||
1561 | } | 1561 | } |
1562 | 1562 | ||
1563 | // PCI IDs | 1563 | // PCI IDs |
1564 | static struct pci_device_id snd_ca0106_ids[] = { | 1564 | static struct pci_device_id snd_ca0106_ids[] __devinitdata = { |
1565 | { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */ | 1565 | { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */ |
1566 | { 0, } | 1566 | { 0, } |
1567 | }; | 1567 | }; |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 2ecbddbbdcf0..e5ce2dabd081 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2609,7 +2609,7 @@ static inline void snd_cmipci_proc_init(struct cmipci *cm) {} | |||
2609 | #endif | 2609 | #endif |
2610 | 2610 | ||
2611 | 2611 | ||
2612 | static struct pci_device_id snd_cmipci_ids[] = { | 2612 | static struct pci_device_id snd_cmipci_ids[] __devinitdata = { |
2613 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2613 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
2614 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2614 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
2615 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2615 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index ac4e73f69c1d..b3c94d83450a 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -494,7 +494,7 @@ struct cs4281 { | |||
494 | 494 | ||
495 | static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 495 | static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
496 | 496 | ||
497 | static struct pci_device_id snd_cs4281_ids[] = { | 497 | static struct pci_device_id snd_cs4281_ids[] __devinitdata = { |
498 | { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ | 498 | { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ |
499 | { 0, } | 499 | { 0, } |
500 | }; | 500 | }; |
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index c590602e20cd..848d772ae3c6 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c | |||
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control."); | |||
65 | module_param_array(mmap_valid, bool, NULL, 0444); | 65 | module_param_array(mmap_valid, bool, NULL, 0444); |
66 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); | 66 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); |
67 | 67 | ||
68 | static struct pci_device_id snd_cs46xx_ids[] = { | 68 | static struct pci_device_id snd_cs46xx_ids[] __devinitdata = { |
69 | { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ | 69 | { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ |
70 | { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ | 70 | { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ |
71 | { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ | 71 | { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ |
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 9fc7f3827461..2c1213a35dcc 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c | |||
@@ -45,7 +45,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; | |||
45 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; | 45 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; |
46 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | 46 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; |
47 | 47 | ||
48 | static struct pci_device_id snd_cs5535audio_ids[] = { | 48 | static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = { |
49 | { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, | 49 | { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, |
50 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 50 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
51 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO, | 51 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO, |
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index 2dfa932f7825..42b11ba1d210 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c | |||
@@ -77,7 +77,7 @@ MODULE_PARM_DESC(subsystem, "Force card subsystem model."); | |||
77 | /* | 77 | /* |
78 | * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 | 78 | * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 |
79 | */ | 79 | */ |
80 | static struct pci_device_id snd_emu10k1_ids[] = { | 80 | static struct pci_device_id snd_emu10k1_ids[] __devinitdata = { |
81 | { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ | 81 | { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ |
82 | { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ | 82 | { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ |
83 | { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ | 83 | { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ |
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 3e332f398162..d51290c18167 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
37 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
38 | #include <linux/moduleparam.h> | 38 | #include <linux/moduleparam.h> |
39 | #include <linux/dma-mapping.h> | ||
40 | #include <sound/core.h> | 39 | #include <sound/core.h> |
41 | #include <sound/initval.h> | 40 | #include <sound/initval.h> |
42 | #include <sound/pcm.h> | 41 | #include <sound/pcm.h> |
@@ -1596,7 +1595,7 @@ static void __devexit snd_emu10k1x_remove(struct pci_dev *pci) | |||
1596 | } | 1595 | } |
1597 | 1596 | ||
1598 | // PCI IDs | 1597 | // PCI IDs |
1599 | static struct pci_device_id snd_emu10k1x_ids[] = { | 1598 | static struct pci_device_id snd_emu10k1x_ids[] __devinitdata = { |
1600 | { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ | 1599 | { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ |
1601 | { 0, } | 1600 | { 0, } |
1602 | }; | 1601 | }; |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index a5533c86b0b6..ca9e34e88f62 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -446,7 +446,7 @@ struct ensoniq { | |||
446 | 446 | ||
447 | static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 447 | static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
448 | 448 | ||
449 | static struct pci_device_id snd_audiopci_ids[] = { | 449 | static struct pci_device_id snd_audiopci_ids[] __devinitdata = { |
450 | #ifdef CHIP1370 | 450 | #ifdef CHIP1370 |
451 | { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */ | 451 | { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */ |
452 | #endif | 452 | #endif |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index 4d62fe439177..6f9094ca4fb4 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -242,7 +242,7 @@ struct es1938 { | |||
242 | 242 | ||
243 | static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 243 | static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
244 | 244 | ||
245 | static struct pci_device_id snd_es1938_ids[] = { | 245 | static struct pci_device_id snd_es1938_ids[] __devinitdata = { |
246 | { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ | 246 | { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ |
247 | { 0, } | 247 | { 0, } |
248 | }; | 248 | }; |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index e3ad17f53c29..5ff4175c7b6d 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -104,7 +104,6 @@ | |||
104 | #include <linux/slab.h> | 104 | #include <linux/slab.h> |
105 | #include <linux/gameport.h> | 105 | #include <linux/gameport.h> |
106 | #include <linux/moduleparam.h> | 106 | #include <linux/moduleparam.h> |
107 | #include <linux/dma-mapping.h> | ||
108 | #include <linux/mutex.h> | 107 | #include <linux/mutex.h> |
109 | 108 | ||
110 | #include <sound/core.h> | 109 | #include <sound/core.h> |
@@ -593,7 +592,7 @@ struct es1968 { | |||
593 | 592 | ||
594 | static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 593 | static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
595 | 594 | ||
596 | static struct pci_device_id snd_es1968_ids[] = { | 595 | static struct pci_device_id snd_es1968_ids[] __devinitdata = { |
597 | /* Maestro 1 */ | 596 | /* Maestro 1 */ |
598 | { 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO }, | 597 | { 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO }, |
599 | /* Maestro 2 */ | 598 | /* Maestro 2 */ |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 6ab4aefbccf8..d72fc28c580e 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -199,7 +199,7 @@ struct fm801 { | |||
199 | #endif | 199 | #endif |
200 | }; | 200 | }; |
201 | 201 | ||
202 | static struct pci_device_id snd_fm801_ids[] = { | 202 | static struct pci_device_id snd_fm801_ids[] __devinitdata = { |
203 | { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */ | 203 | { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */ |
204 | { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */ | 204 | { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */ |
205 | { 0, } | 205 | { 0, } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 0ad60ae29011..e821d65afa11 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1614,7 +1614,7 @@ static void __devexit azx_remove(struct pci_dev *pci) | |||
1614 | } | 1614 | } |
1615 | 1615 | ||
1616 | /* PCI IDs */ | 1616 | /* PCI IDs */ |
1617 | static struct pci_device_id azx_ids[] = { | 1617 | static struct pci_device_id azx_ids[] __devinitdata = { |
1618 | { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ | 1618 | { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ |
1619 | { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ | 1619 | { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ |
1620 | { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ | 1620 | { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index bcfca159c6a2..40f000ba1362 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -799,10 +799,14 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { | |||
799 | { .modelname = "laptop-eapd", .config = AD1986A_LAPTOP_EAPD }, | 799 | { .modelname = "laptop-eapd", .config = AD1986A_LAPTOP_EAPD }, |
800 | { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024, | 800 | { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024, |
801 | .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ | 801 | .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ |
802 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1153, | ||
803 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS M9 */ | ||
802 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213, | 804 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213, |
803 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS A6J */ | 805 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS A6J */ |
804 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x11f7, | 806 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x11f7, |
805 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS U5A */ | 807 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS U5A */ |
808 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1297, | ||
809 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS Z62F */ | ||
806 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x30af, | 810 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x30af, |
807 | .config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */ | 811 | .config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */ |
808 | {} | 812 | {} |
@@ -1330,12 +1334,8 @@ enum { AD1981_BASIC, AD1981_HP }; | |||
1330 | 1334 | ||
1331 | static struct hda_board_config ad1981_cfg_tbl[] = { | 1335 | static struct hda_board_config ad1981_cfg_tbl[] = { |
1332 | { .modelname = "hp", .config = AD1981_HP }, | 1336 | { .modelname = "hp", .config = AD1981_HP }, |
1333 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x30aa, | 1337 | /* All HP models */ |
1334 | .config = AD1981_HP }, /* HP nx6320 */ | 1338 | { .pci_subvendor = 0x103c, .config = AD1981_HP }, |
1335 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x309f, | ||
1336 | .config = AD1981_HP }, /* HP nx9420 AngelFire */ | ||
1337 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x30a2, | ||
1338 | .config = AD1981_HP }, /* HP nx9420 AngelFire */ | ||
1339 | { .modelname = "basic", .config = AD1981_BASIC }, | 1339 | { .modelname = "basic", .config = AD1981_BASIC }, |
1340 | {} | 1340 | {} |
1341 | }; | 1341 | }; |
@@ -2623,5 +2623,6 @@ struct hda_codec_preset snd_hda_preset_analog[] = { | |||
2623 | { .id = 0x11d41983, .name = "AD1983", .patch = patch_ad1983 }, | 2623 | { .id = 0x11d41983, .name = "AD1983", .patch = patch_ad1983 }, |
2624 | { .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a }, | 2624 | { .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a }, |
2625 | { .id = 0x11d41988, .name = "AD1988", .patch = patch_ad1988 }, | 2625 | { .id = 0x11d41988, .name = "AD1988", .patch = patch_ad1988 }, |
2626 | { .id = 0x11d4198b, .name = "AD1988B", .patch = patch_ad1988 }, | ||
2626 | {} /* terminator */ | 2627 | {} /* terminator */ |
2627 | }; | 2628 | }; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 66bbdb60f50b..f0e9a9c90780 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2148,6 +2148,7 @@ static struct hda_board_config alc880_cfg_tbl[] = { | |||
2148 | { .pci_subvendor = 0x1025, .pci_subdevice = 0x0087, .config = ALC880_6ST_DIG }, | 2148 | { .pci_subvendor = 0x1025, .pci_subdevice = 0x0087, .config = ALC880_6ST_DIG }, |
2149 | { .pci_subvendor = 0x1297, .pci_subdevice = 0xc790, .config = ALC880_6ST_DIG }, /* Shuttle ST20G5 */ | 2149 | { .pci_subvendor = 0x1297, .pci_subdevice = 0xc790, .config = ALC880_6ST_DIG }, /* Shuttle ST20G5 */ |
2150 | { .pci_subvendor = 0x1509, .pci_subdevice = 0x925d, .config = ALC880_6ST_DIG }, /* FIC P4M-915GD1 */ | 2150 | { .pci_subvendor = 0x1509, .pci_subdevice = 0x925d, .config = ALC880_6ST_DIG }, /* FIC P4M-915GD1 */ |
2151 | { .pci_subvendor = 0x1695, .pci_subdevice = 0x4012, .config = ALC880_5ST_DIG }, /* Epox EP-5LDA+ GLi */ | ||
2151 | 2152 | ||
2152 | { .modelname = "asus", .config = ALC880_ASUS }, | 2153 | { .modelname = "asus", .config = ALC880_ASUS }, |
2153 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1964, .config = ALC880_ASUS_DIG }, | 2154 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1964, .config = ALC880_ASUS_DIG }, |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 715260787953..8c440fb98603 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1212,8 +1212,8 @@ static hda_nid_t vaio_mux_nids[] = { 0x15 }; | |||
1212 | static struct hda_input_mux vaio_mux = { | 1212 | static struct hda_input_mux vaio_mux = { |
1213 | .num_items = 2, | 1213 | .num_items = 2, |
1214 | .items = { | 1214 | .items = { |
1215 | /* { "HP", 0x0 }, | 1215 | /* { "HP", 0x0 }, */ |
1216 | { "Unknown", 0x1 }, */ | 1216 | { "Line", 0x1 }, |
1217 | { "Mic", 0x2 }, | 1217 | { "Mic", 0x2 }, |
1218 | { "PCM", 0x3 }, | 1218 | { "PCM", 0x3 }, |
1219 | } | 1219 | } |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 32f8415558a5..c56793b381e2 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <linux/dma-mapping.h> | 56 | #include <linux/dma-mapping.h> |
57 | #include <linux/slab.h> | 57 | #include <linux/slab.h> |
58 | #include <linux/moduleparam.h> | 58 | #include <linux/moduleparam.h> |
59 | #include <linux/dma-mapping.h> | ||
60 | #include <linux/mutex.h> | 59 | #include <linux/mutex.h> |
61 | 60 | ||
62 | #include <sound/core.h> | 61 | #include <sound/core.h> |
@@ -108,7 +107,7 @@ module_param_array(dxr_enable, int, NULL, 0444); | |||
108 | MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); | 107 | MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); |
109 | 108 | ||
110 | 109 | ||
111 | static struct pci_device_id snd_ice1712_ids[] = { | 110 | static struct pci_device_id snd_ice1712_ids[] __devinitdata = { |
112 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ | 111 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ |
113 | { 0, } | 112 | { 0, } |
114 | }; | 113 | }; |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index fce616c2761f..b1c007e022d2 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -86,7 +86,7 @@ MODULE_PARM_DESC(model, "Use the given board model."); | |||
86 | 86 | ||
87 | 87 | ||
88 | /* Both VT1720 and VT1724 have the same PCI IDs */ | 88 | /* Both VT1720 and VT1724 have the same PCI IDs */ |
89 | static struct pci_device_id snd_vt1724_ids[] = { | 89 | static struct pci_device_id snd_vt1724_ids[] __devinitdata = { |
90 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 90 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
91 | { 0, } | 91 | { 0, } |
92 | }; | 92 | }; |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index ebbf2cf4ca0f..0df7602568e2 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -413,7 +413,7 @@ struct intel8x0 { | |||
413 | u32 int_sta_mask; /* interrupt status mask */ | 413 | u32 int_sta_mask; /* interrupt status mask */ |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static struct pci_device_id snd_intel8x0_ids[] = { | 416 | static struct pci_device_id snd_intel8x0_ids[] __devinitdata = { |
417 | { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ | 417 | { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ |
418 | { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ | 418 | { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ |
419 | { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ | 419 | { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ |
@@ -1293,6 +1293,7 @@ static int snd_intel8x0_ali_ac97spdifout_close(struct snd_pcm_substream *substre | |||
1293 | return 0; | 1293 | return 0; |
1294 | } | 1294 | } |
1295 | 1295 | ||
1296 | #if 0 // NYI | ||
1296 | static int snd_intel8x0_ali_spdifin_open(struct snd_pcm_substream *substream) | 1297 | static int snd_intel8x0_ali_spdifin_open(struct snd_pcm_substream *substream) |
1297 | { | 1298 | { |
1298 | struct intel8x0 *chip = snd_pcm_substream_chip(substream); | 1299 | struct intel8x0 *chip = snd_pcm_substream_chip(substream); |
@@ -1308,7 +1309,6 @@ static int snd_intel8x0_ali_spdifin_close(struct snd_pcm_substream *substream) | |||
1308 | return 0; | 1309 | return 0; |
1309 | } | 1310 | } |
1310 | 1311 | ||
1311 | #if 0 // NYI | ||
1312 | static int snd_intel8x0_ali_spdifout_open(struct snd_pcm_substream *substream) | 1312 | static int snd_intel8x0_ali_spdifout_open(struct snd_pcm_substream *substream) |
1313 | { | 1313 | { |
1314 | struct intel8x0 *chip = snd_pcm_substream_chip(substream); | 1314 | struct intel8x0 *chip = snd_pcm_substream_chip(substream); |
@@ -1435,6 +1435,7 @@ static struct snd_pcm_ops snd_intel8x0_ali_ac97spdifout_ops = { | |||
1435 | .pointer = snd_intel8x0_pcm_pointer, | 1435 | .pointer = snd_intel8x0_pcm_pointer, |
1436 | }; | 1436 | }; |
1437 | 1437 | ||
1438 | #if 0 // NYI | ||
1438 | static struct snd_pcm_ops snd_intel8x0_ali_spdifin_ops = { | 1439 | static struct snd_pcm_ops snd_intel8x0_ali_spdifin_ops = { |
1439 | .open = snd_intel8x0_ali_spdifin_open, | 1440 | .open = snd_intel8x0_ali_spdifin_open, |
1440 | .close = snd_intel8x0_ali_spdifin_close, | 1441 | .close = snd_intel8x0_ali_spdifin_close, |
@@ -1446,7 +1447,6 @@ static struct snd_pcm_ops snd_intel8x0_ali_spdifin_ops = { | |||
1446 | .pointer = snd_intel8x0_pcm_pointer, | 1447 | .pointer = snd_intel8x0_pcm_pointer, |
1447 | }; | 1448 | }; |
1448 | 1449 | ||
1449 | #if 0 // NYI | ||
1450 | static struct snd_pcm_ops snd_intel8x0_ali_spdifout_ops = { | 1450 | static struct snd_pcm_ops snd_intel8x0_ali_spdifout_ops = { |
1451 | .open = snd_intel8x0_ali_spdifout_open, | 1451 | .open = snd_intel8x0_ali_spdifout_open, |
1452 | .close = snd_intel8x0_ali_spdifout_close, | 1452 | .close = snd_intel8x0_ali_spdifout_close, |
@@ -1582,7 +1582,7 @@ static struct ich_pcm_table ali_pcms[] __devinitdata = { | |||
1582 | { | 1582 | { |
1583 | .suffix = "IEC958", | 1583 | .suffix = "IEC958", |
1584 | .playback_ops = &snd_intel8x0_ali_ac97spdifout_ops, | 1584 | .playback_ops = &snd_intel8x0_ali_ac97spdifout_ops, |
1585 | .capture_ops = &snd_intel8x0_ali_spdifin_ops, | 1585 | /* .capture_ops = &snd_intel8x0_ali_spdifin_ops, */ |
1586 | .prealloc_size = 64 * 1024, | 1586 | .prealloc_size = 64 * 1024, |
1587 | .prealloc_max_size = 128 * 1024, | 1587 | .prealloc_max_size = 128 * 1024, |
1588 | .ac97_idx = ALID_AC97SPDIFOUT, | 1588 | .ac97_idx = ALID_AC97SPDIFOUT, |
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 47e26aaa9ad7..720635f0cb81 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -224,7 +224,7 @@ struct intel8x0m { | |||
224 | unsigned int pcm_pos_shift; | 224 | unsigned int pcm_pos_shift; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | static struct pci_device_id snd_intel8x0m_ids[] = { | 227 | static struct pci_device_id snd_intel8x0m_ids[] __devinitdata = { |
228 | { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ | 228 | { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ |
229 | { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ | 229 | { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ |
230 | { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ | 230 | { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 4721c096335e..e39fad1a4200 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -424,7 +424,7 @@ module_param_array(enable, bool, NULL, 0444); | |||
424 | MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); | 424 | MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); |
425 | MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>"); | 425 | MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>"); |
426 | 426 | ||
427 | static struct pci_device_id snd_korg1212_ids[] = { | 427 | static struct pci_device_id snd_korg1212_ids[] __devinitdata = { |
428 | { | 428 | { |
429 | .vendor = 0x10b5, | 429 | .vendor = 0x10b5, |
430 | .device = 0x906d, | 430 | .device = 0x906d, |
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 9c90d901e6b9..1928e06b6d82 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #include <linux/vmalloc.h> | 42 | #include <linux/vmalloc.h> |
43 | #include <linux/moduleparam.h> | 43 | #include <linux/moduleparam.h> |
44 | #include <linux/dma-mapping.h> | ||
45 | #include <sound/core.h> | 44 | #include <sound/core.h> |
46 | #include <sound/info.h> | 45 | #include <sound/info.h> |
47 | #include <sound/control.h> | 46 | #include <sound/control.h> |
@@ -870,7 +869,7 @@ struct snd_m3 { | |||
870 | /* | 869 | /* |
871 | * pci ids | 870 | * pci ids |
872 | */ | 871 | */ |
873 | static struct pci_device_id snd_m3_ids[] = { | 872 | static struct pci_device_id snd_m3_ids[] __devinitdata = { |
874 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID, | 873 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID, |
875 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, | 874 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, |
876 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID, | 875 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID, |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index b5a095052d4c..09cc0786495a 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/dma-mapping.h> | ||
32 | 31 | ||
33 | #include <sound/core.h> | 32 | #include <sound/core.h> |
34 | #include <sound/initval.h> | 33 | #include <sound/initval.h> |
@@ -62,7 +61,7 @@ MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); | |||
62 | /* | 61 | /* |
63 | */ | 62 | */ |
64 | 63 | ||
65 | static struct pci_device_id snd_mixart_ids[] = { | 64 | static struct pci_device_id snd_mixart_ids[] __devinitdata = { |
66 | { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */ | 65 | { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */ |
67 | { 0, } | 66 | { 0, } |
68 | }; | 67 | }; |
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index cc297abc9d11..b92d6600deb9 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c | |||
@@ -263,7 +263,7 @@ struct nm256 { | |||
263 | /* | 263 | /* |
264 | * PCI ids | 264 | * PCI ids |
265 | */ | 265 | */ |
266 | static struct pci_device_id snd_nm256_ids[] = { | 266 | static struct pci_device_id snd_nm256_ids[] __devinitdata = { |
267 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 267 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
268 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 268 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
269 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 269 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 35875c8aa299..dafa2235abaa 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
32 | #include <linux/mutex.h> | 32 | #include <linux/mutex.h> |
33 | #include <linux/dma-mapping.h> | ||
34 | 33 | ||
35 | #include <sound/core.h> | 34 | #include <sound/core.h> |
36 | #include <sound/initval.h> | 35 | #include <sound/initval.h> |
@@ -74,7 +73,7 @@ enum { | |||
74 | PCI_ID_LAST | 73 | PCI_ID_LAST |
75 | }; | 74 | }; |
76 | 75 | ||
77 | static struct pci_device_id pcxhr_ids[] = { | 76 | static struct pci_device_id pcxhr_ids[] __devinitdata = { |
78 | { 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, }, /* VX882HR */ | 77 | { 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, }, /* VX882HR */ |
79 | { 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, }, /* PCX882HR */ | 78 | { 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, }, /* PCX882HR */ |
80 | { 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, }, /* VX881HR */ | 79 | { 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, }, /* VX881HR */ |
diff --git a/sound/pci/pcxhr/pcxhr_hwdep.c b/sound/pci/pcxhr/pcxhr_hwdep.c index 03517c10e99c..369c19fea985 100644 --- a/sound/pci/pcxhr/pcxhr_hwdep.c +++ b/sound/pci/pcxhr/pcxhr_hwdep.c | |||
@@ -385,8 +385,8 @@ static int pcxhr_hwdep_dsp_load(struct snd_hwdep *hw, | |||
385 | fw.size = dsp->length; | 385 | fw.size = dsp->length; |
386 | fw.data = vmalloc(fw.size); | 386 | fw.data = vmalloc(fw.size); |
387 | if (! fw.data) { | 387 | if (! fw.data) { |
388 | snd_printk(KERN_ERR "pcxhr: cannot allocate dsp image (%d bytes)\n", | 388 | snd_printk(KERN_ERR "pcxhr: cannot allocate dsp image (%lu bytes)\n", |
389 | fw.size); | 389 | (unsigned long)fw.size); |
390 | return -ENOMEM; | 390 | return -ENOMEM; |
391 | } | 391 | } |
392 | if (copy_from_user(fw.data, dsp->image, dsp->length)) { | 392 | if (copy_from_user(fw.data, dsp->image, dsp->length)) { |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index f148ee434a6b..d8cc985d7241 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -506,7 +506,7 @@ static int riptide_reset(struct cmdif *cif, struct snd_riptide *chip); | |||
506 | /* | 506 | /* |
507 | */ | 507 | */ |
508 | 508 | ||
509 | static struct pci_device_id snd_riptide_ids[] = { | 509 | static struct pci_device_id snd_riptide_ids[] __devinitdata = { |
510 | { | 510 | { |
511 | .vendor = 0x127a,.device = 0x4310, | 511 | .vendor = 0x127a,.device = 0x4310, |
512 | .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, | 512 | .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, |
@@ -527,7 +527,7 @@ static struct pci_device_id snd_riptide_ids[] = { | |||
527 | }; | 527 | }; |
528 | 528 | ||
529 | #ifdef SUPPORT_JOYSTICK | 529 | #ifdef SUPPORT_JOYSTICK |
530 | static struct pci_device_id snd_riptide_joystick_ids[] = { | 530 | static struct pci_device_id snd_riptide_joystick_ids[] __devinitdata = { |
531 | { | 531 | { |
532 | .vendor = 0x127a,.device = 0x4312, | 532 | .vendor = 0x127a,.device = 0x4312, |
533 | .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, | 533 | .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index ab78544bf042..55b1d4838d97 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -227,7 +227,7 @@ struct rme32 { | |||
227 | struct snd_kcontrol *spdif_ctl; | 227 | struct snd_kcontrol *spdif_ctl; |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static struct pci_device_id snd_rme32_ids[] = { | 230 | static struct pci_device_id snd_rme32_ids[] __devinitdata = { |
231 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, | 231 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, |
232 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | 232 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, |
233 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8, | 233 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8, |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index 6c2a9f4a7659..3c1bc533d511 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -232,7 +232,7 @@ struct rme96 { | |||
232 | struct snd_kcontrol *spdif_ctl; | 232 | struct snd_kcontrol *spdif_ctl; |
233 | }; | 233 | }; |
234 | 234 | ||
235 | static struct pci_device_id snd_rme96_ids[] = { | 235 | static struct pci_device_id snd_rme96_ids[] __devinitdata = { |
236 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96, | 236 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96, |
237 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 237 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
238 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8, | 238 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8, |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index ebf7a2b86c23..61f82f0d5cc6 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -568,7 +568,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d | |||
568 | } | 568 | } |
569 | 569 | ||
570 | 570 | ||
571 | static struct pci_device_id snd_hdsp_ids[] = { | 571 | static struct pci_device_id snd_hdsp_ids[] __devinitdata = { |
572 | { | 572 | { |
573 | .vendor = PCI_VENDOR_ID_XILINX, | 573 | .vendor = PCI_VENDOR_ID_XILINX, |
574 | .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP, | 574 | .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP, |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index b5538efd146b..722b9e6ce54a 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -426,7 +426,7 @@ static char channel_map_madi_qs[HDSPM_MAX_CHANNELS] = { | |||
426 | }; | 426 | }; |
427 | 427 | ||
428 | 428 | ||
429 | static struct pci_device_id snd_hdspm_ids[] = { | 429 | static struct pci_device_id snd_hdspm_ids[] __devinitdata = { |
430 | { | 430 | { |
431 | .vendor = PCI_VENDOR_ID_XILINX, | 431 | .vendor = PCI_VENDOR_ID_XILINX, |
432 | .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI, | 432 | .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI, |
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index a687eb63236f..75d6406303d3 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -315,7 +315,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d | |||
315 | } | 315 | } |
316 | 316 | ||
317 | 317 | ||
318 | static struct pci_device_id snd_rme9652_ids[] = { | 318 | static struct pci_device_id snd_rme9652_ids[] __devinitdata = { |
319 | { | 319 | { |
320 | .vendor = 0x10ee, | 320 | .vendor = 0x10ee, |
321 | .device = 0x3fc4, | 321 | .device = 0x3fc4, |
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 2d66a09fe5ee..91f8bf3ae9fa 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -243,7 +243,7 @@ struct sonicvibes { | |||
243 | #endif | 243 | #endif |
244 | }; | 244 | }; |
245 | 245 | ||
246 | static struct pci_device_id snd_sonic_ids[] = { | 246 | static struct pci_device_id snd_sonic_ids[] __devinitdata = { |
247 | { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 247 | { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
248 | { 0, } | 248 | { 0, } |
249 | }; | 249 | }; |
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c index b4538045049f..9624a5f2b875 100644 --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c | |||
@@ -63,7 +63,7 @@ MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM."); | |||
63 | module_param_array(wavetable_size, int, NULL, 0444); | 63 | module_param_array(wavetable_size, int, NULL, 0444); |
64 | MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); | 64 | MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); |
65 | 65 | ||
66 | static struct pci_device_id snd_trident_ids[] = { | 66 | static struct pci_device_id snd_trident_ids[] __devinitdata = { |
67 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), | 67 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), |
68 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, | 68 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, |
69 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), | 69 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 0f171dd1377b..39daf62d2bad 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -123,6 +123,7 @@ module_param(enable, bool, 0444); | |||
123 | #define VIA_REV_8233A 0x40 /* 1 rec, 1 multi-pb, spdf */ | 123 | #define VIA_REV_8233A 0x40 /* 1 rec, 1 multi-pb, spdf */ |
124 | #define VIA_REV_8235 0x50 /* 2 rec, 4 pb, 1 multi-pb, spdif */ | 124 | #define VIA_REV_8235 0x50 /* 2 rec, 4 pb, 1 multi-pb, spdif */ |
125 | #define VIA_REV_8237 0x60 | 125 | #define VIA_REV_8237 0x60 |
126 | #define VIA_REV_8251 0x70 | ||
126 | 127 | ||
127 | /* | 128 | /* |
128 | * Direct registers | 129 | * Direct registers |
@@ -395,7 +396,7 @@ struct via82xx { | |||
395 | #endif | 396 | #endif |
396 | }; | 397 | }; |
397 | 398 | ||
398 | static struct pci_device_id snd_via82xx_ids[] = { | 399 | static struct pci_device_id snd_via82xx_ids[] __devinitdata = { |
399 | /* 0x1106, 0x3058 */ | 400 | /* 0x1106, 0x3058 */ |
400 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ | 401 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ |
401 | /* 0x1106, 0x3059 */ | 402 | /* 0x1106, 0x3059 */ |
@@ -862,6 +863,11 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst | |||
862 | if (!status) | 863 | if (!status) |
863 | status = inb(VIADEV_REG(viadev, OFFSET_STATUS)); | 864 | status = inb(VIADEV_REG(viadev, OFFSET_STATUS)); |
864 | 865 | ||
866 | /* An apparent bug in the 8251 is worked around by sending a | ||
867 | * REG_CTRL_START. */ | ||
868 | if (chip->revision == VIA_REV_8251 && (status & VIA_REG_STAT_EOL)) | ||
869 | snd_via82xx_pcm_trigger(substream, SNDRV_PCM_TRIGGER_START); | ||
870 | |||
865 | if (!(status & VIA_REG_STAT_ACTIVE)) { | 871 | if (!(status & VIA_REG_STAT_ACTIVE)) { |
866 | res = 0; | 872 | res = 0; |
867 | goto unlock; | 873 | goto unlock; |
@@ -2313,6 +2319,7 @@ static struct via823x_info via823x_cards[] __devinitdata = { | |||
2313 | { VIA_REV_8233A, "VIA 8233A", TYPE_VIA8233A }, | 2319 | { VIA_REV_8233A, "VIA 8233A", TYPE_VIA8233A }, |
2314 | { VIA_REV_8235, "VIA 8235", TYPE_VIA8233 }, | 2320 | { VIA_REV_8235, "VIA 8235", TYPE_VIA8233 }, |
2315 | { VIA_REV_8237, "VIA 8237", TYPE_VIA8233 }, | 2321 | { VIA_REV_8237, "VIA 8237", TYPE_VIA8233 }, |
2322 | { VIA_REV_8251, "VIA 8251", TYPE_VIA8233 }, | ||
2316 | }; | 2323 | }; |
2317 | 2324 | ||
2318 | /* | 2325 | /* |
@@ -2325,7 +2332,7 @@ struct dxs_whitelist { | |||
2325 | short action; /* new dxs_support value */ | 2332 | short action; /* new dxs_support value */ |
2326 | }; | 2333 | }; |
2327 | 2334 | ||
2328 | static int __devinit check_dxs_list(struct pci_dev *pci) | 2335 | static int __devinit check_dxs_list(struct pci_dev *pci, int revision) |
2329 | { | 2336 | { |
2330 | static struct dxs_whitelist whitelist[] = { | 2337 | static struct dxs_whitelist whitelist[] = { |
2331 | { .subvendor = 0x1005, .subdevice = 0x4710, .action = VIA_DXS_ENABLE }, /* Avance Logic Mobo */ | 2338 | { .subvendor = 0x1005, .subdevice = 0x4710, .action = VIA_DXS_ENABLE }, /* Avance Logic Mobo */ |
@@ -2342,6 +2349,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) | |||
2342 | { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ | 2349 | { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ |
2343 | { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ | 2350 | { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ |
2344 | { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC }, /* ASUS */ | 2351 | { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC }, /* ASUS */ |
2352 | { .subvendor = 0x1043, .subdevice = 0x81b9, .action = VIA_DXS_SRC }, /* ASUS A8V-MX */ | ||
2345 | { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ | 2353 | { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ |
2346 | { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ | 2354 | { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ |
2347 | { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ | 2355 | { .subvendor = 0x10cf, .subdevice = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ |
@@ -2405,6 +2413,10 @@ static int __devinit check_dxs_list(struct pci_dev *pci) | |||
2405 | } | 2413 | } |
2406 | } | 2414 | } |
2407 | 2415 | ||
2416 | /* for newer revision, default to DXS_SRC */ | ||
2417 | if (revision >= VIA_REV_8235) | ||
2418 | return VIA_DXS_SRC; | ||
2419 | |||
2408 | /* | 2420 | /* |
2409 | * not detected, try 48k rate only to be sure. | 2421 | * not detected, try 48k rate only to be sure. |
2410 | */ | 2422 | */ |
@@ -2449,7 +2461,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci, | |||
2449 | } | 2461 | } |
2450 | if (chip_type != TYPE_VIA8233A) { | 2462 | if (chip_type != TYPE_VIA8233A) { |
2451 | if (dxs_support == VIA_DXS_AUTO) | 2463 | if (dxs_support == VIA_DXS_AUTO) |
2452 | dxs_support = check_dxs_list(pci); | 2464 | dxs_support = check_dxs_list(pci, revision); |
2453 | /* force to use VIA8233 or 8233A model according to | 2465 | /* force to use VIA8233 or 8233A model according to |
2454 | * dxs_support module option | 2466 | * dxs_support module option |
2455 | */ | 2467 | */ |
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index 22ce4d309929..ef97e50cd6c2 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -261,7 +261,7 @@ struct via82xx_modem { | |||
261 | struct snd_info_entry *proc_entry; | 261 | struct snd_info_entry *proc_entry; |
262 | }; | 262 | }; |
263 | 263 | ||
264 | static struct pci_device_id snd_via82xx_modem_ids[] = { | 264 | static struct pci_device_id snd_via82xx_modem_ids[] __devinitdata = { |
265 | { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, }, | 265 | { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, }, |
266 | { 0, } | 266 | { 0, } |
267 | }; | 267 | }; |
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index c816ddf1b215..0f1ebb010a5e 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -60,7 +60,7 @@ enum { | |||
60 | VX_PCI_VX222_NEW | 60 | VX_PCI_VX222_NEW |
61 | }; | 61 | }; |
62 | 62 | ||
63 | static struct pci_device_id snd_vx222_ids[] = { | 63 | static struct pci_device_id snd_vx222_ids[] __devinitdata = { |
64 | { 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, }, /* PLX */ | 64 | { 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, }, /* PLX */ |
65 | { 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, }, /* PLX */ | 65 | { 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, }, /* PLX */ |
66 | { 0, } | 66 | { 0, } |
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index db57ce939fa8..65ebf5f1933a 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c | |||
@@ -70,7 +70,7 @@ MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); | |||
70 | module_param_array(rear_swap, bool, NULL, 0444); | 70 | module_param_array(rear_swap, bool, NULL, 0444); |
71 | MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output"); | 71 | MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output"); |
72 | 72 | ||
73 | static struct pci_device_id snd_ymfpci_ids[] = { | 73 | static struct pci_device_id snd_ymfpci_ids[] __devinitdata = { |
74 | { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ | 74 | { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ |
75 | { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */ | 75 | { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */ |
76 | { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */ | 76 | { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */ |
diff --git a/sound/pcmcia/Kconfig b/sound/pcmcia/Kconfig index 5d1b0b762efa..c9fa1a2bc58b 100644 --- a/sound/pcmcia/Kconfig +++ b/sound/pcmcia/Kconfig | |||
@@ -5,7 +5,7 @@ menu "PCMCIA devices" | |||
5 | 5 | ||
6 | config SND_VXPOCKET | 6 | config SND_VXPOCKET |
7 | tristate "Digigram VXpocket" | 7 | tristate "Digigram VXpocket" |
8 | depends on SND && PCMCIA && ISA | 8 | depends on SND && PCMCIA |
9 | select SND_VX_LIB | 9 | select SND_VX_LIB |
10 | help | 10 | help |
11 | Say Y here to include support for Digigram VXpocket and | 11 | Say Y here to include support for Digigram VXpocket and |
@@ -16,7 +16,7 @@ config SND_VXPOCKET | |||
16 | 16 | ||
17 | config SND_PDAUDIOCF | 17 | config SND_PDAUDIOCF |
18 | tristate "Sound Core PDAudioCF" | 18 | tristate "Sound Core PDAudioCF" |
19 | depends on SND && PCMCIA && ISA | 19 | depends on SND && PCMCIA |
20 | select SND_PCM | 20 | select SND_PCM |
21 | help | 21 | help |
22 | Say Y here to include support for Sound Core PDAudioCF | 22 | Say Y here to include support for Sound Core PDAudioCF |
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 0992a0923f1a..9351846d7a9d 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h | |||
@@ -1531,6 +1531,15 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
1531 | } | 1531 | } |
1532 | }, | 1532 | }, |
1533 | { | 1533 | { |
1534 | USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014), | ||
1535 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | ||
1536 | .vendor_name = "TerraTec", | ||
1537 | .product_name = "PHASE 26", | ||
1538 | .ifnum = 3, | ||
1539 | .type = QUIRK_MIDI_STANDARD_INTERFACE | ||
1540 | } | ||
1541 | }, | ||
1542 | { | ||
1534 | USB_DEVICE(0x0ccd, 0x0035), | 1543 | USB_DEVICE(0x0ccd, 0x0035), |
1535 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | 1544 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { |
1536 | .vendor_name = "Miditech", | 1545 | .vendor_name = "Miditech", |