/[linux-patches]/genpatches-2.6/tags/2.6.32-15/1006_linux-2.6.32.7.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.32-15/1006_linux-2.6.32.7.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1735 - (show annotations) (download)
Wed Aug 4 11:25:09 2010 UTC (3 years, 11 months ago) by mpagano
File size: 148438 byte(s)
2.6.32-15 release
1 diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
2 index ab8300f..50075df 100644
3 --- a/Documentation/DocBook/Makefile
4 +++ b/Documentation/DocBook/Makefile
5 @@ -32,10 +32,10 @@ PS_METHOD = $(prefer-db2x)
6
7 ###
8 # The targets that may be used.
9 -PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs media
10 +PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
11
12 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
13 -xmldocs: $(BOOKS)
14 +xmldocs: $(BOOKS) xmldoclinks
15 sgmldocs: xmldocs
16
17 PS := $(patsubst %.xml, %.ps, $(BOOKS))
18 @@ -45,15 +45,24 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS))
19 pdfdocs: $(PDF)
20
21 HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
22 -htmldocs: media $(HTML)
23 +htmldocs: $(HTML)
24 $(call build_main_index)
25 + $(call build_images)
26
27 MAN := $(patsubst %.xml, %.9, $(BOOKS))
28 mandocs: $(MAN)
29
30 -media:
31 - mkdir -p $(srctree)/Documentation/DocBook/media/
32 - cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(srctree)/Documentation/DocBook/media/
33 +build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \
34 + cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(objtree)/Documentation/DocBook/media/
35 +
36 +xmldoclinks:
37 +ifneq ($(objtree),$(srctree))
38 + for dep in dvb media-entities.tmpl media-indices.tmpl v4l; do \
39 + rm -f $(objtree)/Documentation/DocBook/$$dep \
40 + && ln -s $(srctree)/Documentation/DocBook/$$dep $(objtree)/Documentation/DocBook/ \
41 + || exit; \
42 + done
43 +endif
44
45 installmandocs: mandocs
46 mkdir -p /usr/local/man/man9/
47 diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
48 index 2620d60..94e255a 100644
49 --- a/Documentation/video4linux/CARDLIST.saa7134
50 +++ b/Documentation/video4linux/CARDLIST.saa7134
51 @@ -172,3 +172,4 @@
52 171 -> Beholder BeholdTV X7 [5ace:7595]
53 172 -> RoverMedia TV Link Pro FM [19d1:0138]
54 173 -> Zolid Hybrid TV Tuner PCI [1131:2004]
55 +174 -> Asus Europa Hybrid OEM [1043:4847]
56 diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
57 index 0976049..36e4fb4 100644
58 --- a/arch/arm/mach-davinci/dm646x.c
59 +++ b/arch/arm/mach-davinci/dm646x.c
60 @@ -789,7 +789,14 @@ static struct davinci_id dm646x_ids[] = {
61 .part_no = 0xb770,
62 .manufacturer = 0x017,
63 .cpu_id = DAVINCI_CPU_ID_DM6467,
64 - .name = "dm6467",
65 + .name = "dm6467_rev1.x",
66 + },
67 + {
68 + .variant = 0x1,
69 + .part_no = 0xb770,
70 + .manufacturer = 0x017,
71 + .cpu_id = DAVINCI_CPU_ID_DM6467,
72 + .name = "dm6467_rev3.x",
73 },
74 };
75
76 diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
77 index ae88b14..e82749b 100644
78 --- a/arch/powerpc/sysdev/fsl_pci.c
79 +++ b/arch/powerpc/sysdev/fsl_pci.c
80 @@ -392,8 +392,22 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8536, quirk_fsl_pcie_header);
81 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header);
82 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
83 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
84 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1011E, quirk_fsl_pcie_header);
85 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1011, quirk_fsl_pcie_header);
86 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1013E, quirk_fsl_pcie_header);
87 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1013, quirk_fsl_pcie_header);
88 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1020E, quirk_fsl_pcie_header);
89 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1020, quirk_fsl_pcie_header);
90 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1022E, quirk_fsl_pcie_header);
91 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1022, quirk_fsl_pcie_header);
92 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2010E, quirk_fsl_pcie_header);
93 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2010, quirk_fsl_pcie_header);
94 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2020E, quirk_fsl_pcie_header);
95 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2020, quirk_fsl_pcie_header);
96 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4040E, quirk_fsl_pcie_header);
97 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4040, quirk_fsl_pcie_header);
98 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4080E, quirk_fsl_pcie_header);
99 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4080, quirk_fsl_pcie_header);
100 #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
101
102 #if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
103 diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
104 index ba9d8a7..b400964 100644
105 --- a/arch/s390/kvm/intercept.c
106 +++ b/arch/s390/kvm/intercept.c
107 @@ -213,7 +213,7 @@ static int handle_instruction_and_prog(struct kvm_vcpu *vcpu)
108 return rc2;
109 }
110
111 -static const intercept_handler_t intercept_funcs[0x48 >> 2] = {
112 +static const intercept_handler_t intercept_funcs[] = {
113 [0x00 >> 2] = handle_noop,
114 [0x04 >> 2] = handle_instruction,
115 [0x08 >> 2] = handle_prog,
116 @@ -230,7 +230,7 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)
117 intercept_handler_t func;
118 u8 code = vcpu->arch.sie_block->icptcode;
119
120 - if (code & 3 || code > 0x48)
121 + if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs))
122 return -ENOTSUPP;
123 func = intercept_funcs[code >> 2];
124 if (func)
125 diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
126 index 40e1835..a2a03cf 100644
127 --- a/arch/x86/kernel/cpu/intel.c
128 +++ b/arch/x86/kernel/cpu/intel.c
129 @@ -70,7 +70,6 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
130 if (c->x86_power & (1 << 8)) {
131 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
132 set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
133 - set_cpu_cap(c, X86_FEATURE_TSC_RELIABLE);
134 sched_clock_stable = 1;
135 }
136
137 diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
138 index f8590c5..0c91110 100644
139 --- a/arch/x86/kernel/cpuid.c
140 +++ b/arch/x86/kernel/cpuid.c
141 @@ -234,7 +234,7 @@ static void __exit cpuid_exit(void)
142 for_each_online_cpu(cpu)
143 cpuid_device_destroy(cpu);
144 class_destroy(cpuid_class);
145 - unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
146 + __unregister_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid");
147 unregister_hotcpu_notifier(&cpuid_class_cpu_notifier);
148 }
149
150 diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
151 index b42e63b..5eaeb5e 100644
152 --- a/arch/x86/kernel/msr.c
153 +++ b/arch/x86/kernel/msr.c
154 @@ -290,7 +290,7 @@ static void __exit msr_exit(void)
155 for_each_online_cpu(cpu)
156 msr_device_destroy(cpu);
157 class_destroy(msr_class);
158 - unregister_chrdev(MSR_MAJOR, "cpu/msr");
159 + __unregister_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr");
160 unregister_hotcpu_notifier(&msr_class_cpu_notifier);
161 }
162
163 diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
164 index cd982f4..597683a 100644
165 --- a/arch/x86/kernel/tsc.c
166 +++ b/arch/x86/kernel/tsc.c
167 @@ -763,6 +763,7 @@ void mark_tsc_unstable(char *reason)
168 {
169 if (!tsc_unstable) {
170 tsc_unstable = 1;
171 + sched_clock_stable = 0;
172 printk(KERN_INFO "Marking TSC unstable due to %s\n", reason);
173 /* Change only the rating, when not registered */
174 if (clocksource_tsc.mult)
175 diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
176 index 41659fb..8dfeaaa 100644
177 --- a/arch/x86/kvm/lapic.c
178 +++ b/arch/x86/kvm/lapic.c
179 @@ -374,6 +374,12 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
180 if (unlikely(!apic_enabled(apic)))
181 break;
182
183 + if (trig_mode) {
184 + apic_debug("level trig mode for vector %d", vector);
185 + apic_set_vector(vector, apic->regs + APIC_TMR);
186 + } else
187 + apic_clear_vector(vector, apic->regs + APIC_TMR);
188 +
189 result = !apic_test_and_set_irr(vector, apic);
190 trace_kvm_apic_accept_irq(vcpu->vcpu_id, delivery_mode,
191 trig_mode, vector, !result);
192 @@ -384,11 +390,6 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
193 break;
194 }
195
196 - if (trig_mode) {
197 - apic_debug("level trig mode for vector %d", vector);
198 - apic_set_vector(vector, apic->regs + APIC_TMR);
199 - } else
200 - apic_clear_vector(vector, apic->regs + APIC_TMR);
201 kvm_vcpu_kick(vcpu);
202 break;
203
204 diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
205 index 818b92a..3a01519 100644
206 --- a/arch/x86/kvm/mmu.c
207 +++ b/arch/x86/kvm/mmu.c
208 @@ -477,7 +477,7 @@ static int host_mapping_level(struct kvm *kvm, gfn_t gfn)
209
210 addr = gfn_to_hva(kvm, gfn);
211 if (kvm_is_error_hva(addr))
212 - return page_size;
213 + return PT_PAGE_TABLE_LEVEL;
214
215 down_read(&current->mm->mmap_sem);
216 vma = find_vma(current->mm, addr);
217 @@ -515,11 +515,9 @@ static int mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn)
218 if (host_level == PT_PAGE_TABLE_LEVEL)
219 return host_level;
220
221 - for (level = PT_DIRECTORY_LEVEL; level <= host_level; ++level) {
222 -
223 + for (level = PT_DIRECTORY_LEVEL; level <= host_level; ++level)
224 if (has_wrprotected_page(vcpu->kvm, large_gfn, level))
225 break;
226 - }
227
228 return level - 1;
229 }
230 diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
231 index 85e12cd..5fa3325 100644
232 --- a/arch/x86/kvm/paging_tmpl.h
233 +++ b/arch/x86/kvm/paging_tmpl.h
234 @@ -150,7 +150,9 @@ walk:
235 walker->table_gfn[walker->level - 1] = table_gfn;
236 walker->pte_gpa[walker->level - 1] = pte_gpa;
237
238 - kvm_read_guest(vcpu->kvm, pte_gpa, &pte, sizeof(pte));
239 + if (kvm_read_guest(vcpu->kvm, pte_gpa, &pte, sizeof(pte)))
240 + goto not_present;
241 +
242 trace_kvm_mmu_paging_element(pte, walker->level);
243
244 if (!is_present_gpte(pte))
245 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
246 index 97b31fa..6378e07 100644
247 --- a/arch/x86/kvm/x86.c
248 +++ b/arch/x86/kvm/x86.c
249 @@ -4766,12 +4766,13 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
250 GFP_KERNEL);
251 if (!vcpu->arch.mce_banks) {
252 r = -ENOMEM;
253 - goto fail_mmu_destroy;
254 + goto fail_free_lapic;
255 }
256 vcpu->arch.mcg_cap = KVM_MAX_MCE_BANKS;
257
258 return 0;
259 -
260 +fail_free_lapic:
261 + kvm_free_lapic(vcpu);
262 fail_mmu_destroy:
263 kvm_mmu_destroy(vcpu);
264 fail_free_pio_data:
265 @@ -4782,6 +4783,7 @@ fail:
266
267 void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
268 {
269 + kfree(vcpu->arch.mce_banks);
270 kvm_free_lapic(vcpu);
271 down_read(&vcpu->kvm->slots_lock);
272 kvm_mmu_destroy(vcpu);
273 diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
274 index bbd066e..a8f3ca6 100644
275 --- a/drivers/acpi/processor_idle.c
276 +++ b/drivers/acpi/processor_idle.c
277 @@ -299,6 +299,17 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
278 pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.C2latency;
279 pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.C3latency;
280
281 + /*
282 + * FADT specified C2 latency must be less than or equal to
283 + * 100 microseconds.
284 + */
285 + if (acpi_gbl_FADT.C2latency > ACPI_PROCESSOR_MAX_C2_LATENCY) {
286 + ACPI_DEBUG_PRINT((ACPI_DB_INFO,
287 + "C2 latency too large [%d]\n", acpi_gbl_FADT.C2latency));
288 + /* invalidate C2 */
289 + pr->power.states[ACPI_STATE_C2].address = 0;
290 + }
291 +
292 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
293 "lvl2[0x%08x] lvl3[0x%08x]\n",
294 pr->power.states[ACPI_STATE_C2].address,
295 @@ -495,16 +506,6 @@ static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx)
296 return;
297
298 /*
299 - * C2 latency must be less than or equal to 100
300 - * microseconds.
301 - */
302 - else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) {
303 - ACPI_DEBUG_PRINT((ACPI_DB_INFO,
304 - "latency too large [%d]\n", cx->latency));
305 - return;
306 - }
307 -
308 - /*
309 * Otherwise we've met all of our C2 requirements.
310 * Normalize the C2 latency to expidite policy
311 */
312 diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
313 index a3241a1..9519c77 100644
314 --- a/drivers/ata/ahci.c
315 +++ b/drivers/ata/ahci.c
316 @@ -113,6 +113,7 @@ enum {
317 board_ahci_mcp65 = 6,
318 board_ahci_nopmp = 7,
319 board_ahci_yesncq = 8,
320 + board_ahci_nosntf = 9,
321
322 /* global controller registers */
323 HOST_CAP = 0x00, /* host capabilities */
324 @@ -235,6 +236,7 @@ enum {
325 AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */
326 AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as
327 link offline */
328 + AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */
329
330 /* ap->flags bits */
331
332 @@ -508,7 +510,7 @@ static const struct ata_port_info ahci_port_info[] = {
333 .udma_mask = ATA_UDMA6,
334 .port_ops = &ahci_ops,
335 },
336 - /* board_ahci_yesncq */
337 + [board_ahci_yesncq] =
338 {
339 AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
340 .flags = AHCI_FLAG_COMMON,
341 @@ -516,6 +518,14 @@ static const struct ata_port_info ahci_port_info[] = {
342 .udma_mask = ATA_UDMA6,
343 .port_ops = &ahci_ops,
344 },
345 + [board_ahci_nosntf] =
346 + {
347 + AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF),
348 + .flags = AHCI_FLAG_COMMON,
349 + .pio_mask = ATA_PIO4,
350 + .udma_mask = ATA_UDMA6,
351 + .port_ops = &ahci_ops,
352 + },
353 };
354
355 static const struct pci_device_id ahci_pci_tbl[] = {
356 @@ -531,7 +541,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
357 { PCI_VDEVICE(INTEL, 0x2683), board_ahci }, /* ESB2 */
358 { PCI_VDEVICE(INTEL, 0x27c6), board_ahci }, /* ICH7-M DH */
359 { PCI_VDEVICE(INTEL, 0x2821), board_ahci }, /* ICH8 */
360 - { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* ICH8 */
361 + { PCI_VDEVICE(INTEL, 0x2822), board_ahci_nosntf }, /* ICH8 */
362 { PCI_VDEVICE(INTEL, 0x2824), board_ahci }, /* ICH8 */
363 { PCI_VDEVICE(INTEL, 0x2829), board_ahci }, /* ICH8M */
364 { PCI_VDEVICE(INTEL, 0x282a), board_ahci }, /* ICH8M */
365 @@ -849,6 +859,12 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
366 cap &= ~HOST_CAP_PMP;
367 }
368
369 + if ((cap & HOST_CAP_SNTF) && (hpriv->flags & AHCI_HFLAG_NO_SNTF)) {
370 + dev_printk(KERN_INFO, &pdev->dev,
371 + "controller can't do SNTF, turning off CAP_SNTF\n");
372 + cap &= ~HOST_CAP_SNTF;
373 + }
374 +
375 if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361 &&
376 port_map != 1) {
377 dev_printk(KERN_INFO, &pdev->dev,
378 diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
379 index 9ac4e37..0c6155f 100644
380 --- a/drivers/ata/ata_piix.c
381 +++ b/drivers/ata/ata_piix.c
382 @@ -869,10 +869,10 @@ static void do_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev, in
383 (timings[pio][1] << 8);
384 }
385
386 - if (ap->udma_mask) {
387 + if (ap->udma_mask)
388 udma_enable &= ~(1 << devid);
389 - pci_write_config_word(dev, master_port, master_data);
390 - }
391 +
392 + pci_write_config_word(dev, master_port, master_data);
393 }
394 /* Don't scribble on 0x48 if the controller does not support UDMA */
395 if (ap->udma_mask)
396 diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
397 index a1cb5af..33faaa2 100644
398 --- a/drivers/base/devtmpfs.c
399 +++ b/drivers/base/devtmpfs.c
400 @@ -353,6 +353,7 @@ int __init devtmpfs_init(void)
401 {
402 int err;
403 struct vfsmount *mnt;
404 + char options[] = "mode=0755";
405
406 err = register_filesystem(&dev_fs_type);
407 if (err) {
408 @@ -361,7 +362,7 @@ int __init devtmpfs_init(void)
409 return err;
410 }
411
412 - mnt = kern_mount(&dev_fs_type);
413 + mnt = kern_mount_data(&dev_fs_type, options);
414 if (IS_ERR(mnt)) {
415 err = PTR_ERR(mnt);
416 printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err);
417 diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
418 index 938100f..3a2ccb0 100644
419 --- a/drivers/firmware/dmi_scan.c
420 +++ b/drivers/firmware/dmi_scan.c
421 @@ -429,7 +429,7 @@ static bool dmi_matches(const struct dmi_system_id *dmi)
422 for (i = 0; i < ARRAY_SIZE(dmi->matches); i++) {
423 int s = dmi->matches[i].slot;
424 if (s == DMI_NONE)
425 - continue;
426 + break;
427 if (dmi_ident[s]
428 && strstr(dmi_ident[s], dmi->matches[i].substr))
429 continue;
430 @@ -440,6 +440,15 @@ static bool dmi_matches(const struct dmi_system_id *dmi)
431 }
432
433 /**
434 + * dmi_is_end_of_table - check for end-of-table marker
435 + * @dmi: pointer to the dmi_system_id structure to check
436 + */
437 +static bool dmi_is_end_of_table(const struct dmi_system_id *dmi)
438 +{
439 + return dmi->matches[0].slot == DMI_NONE;
440 +}
441 +
442 +/**
443 * dmi_check_system - check system DMI data
444 * @list: array of dmi_system_id structures to match against
445 * All non-null elements of the list must match
446 @@ -457,7 +466,7 @@ int dmi_check_system(const struct dmi_system_id *list)
447 int count = 0;
448 const struct dmi_system_id *d;
449
450 - for (d = list; d->ident; d++)
451 + for (d = list; !dmi_is_end_of_table(d); d++)
452 if (dmi_matches(d)) {
453 count++;
454 if (d->callback && d->callback(d))
455 @@ -484,7 +493,7 @@ const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list)
456 {
457 const struct dmi_system_id *d;
458
459 - for (d = list; d->ident; d++)
460 + for (d = list; !dmi_is_end_of_table(d); d++)
461 if (dmi_matches(d))
462 return d;
463
464 diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
465 index 03bd703..5d901f6 100644
466 --- a/drivers/hid/usbhid/hid-core.c
467 +++ b/drivers/hid/usbhid/hid-core.c
468 @@ -998,7 +998,8 @@ static int usbhid_start(struct hid_device *hid)
469 usbhid->urbctrl->transfer_dma = usbhid->ctrlbuf_dma;
470 usbhid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP);
471
472 - usbhid_init_reports(hid);
473 + if (!(hid->quirks & HID_QUIRK_NO_INIT_REPORTS))
474 + usbhid_init_reports(hid);
475
476 set_bit(HID_STARTED, &usbhid->iofl);
477
478 diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
479 index 0d9045a..5713b93 100644
480 --- a/drivers/hid/usbhid/hid-quirks.c
481 +++ b/drivers/hid/usbhid/hid-quirks.c
482 @@ -280,7 +280,7 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct)
483 if (idVendor == USB_VENDOR_ID_NCR &&
484 idProduct >= USB_DEVICE_ID_NCR_FIRST &&
485 idProduct <= USB_DEVICE_ID_NCR_LAST)
486 - return HID_QUIRK_NOGET;
487 + return HID_QUIRK_NO_INIT_REPORTS;
488
489 down_read(&dquirks_rwsem);
490 bl_entry = usbhid_exists_dquirk(idVendor, idProduct);
491 diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c
492 index da1b1f9..f600813 100644
493 --- a/drivers/hwmon/fschmd.c
494 +++ b/drivers/hwmon/fschmd.c
495 @@ -767,6 +767,7 @@ leave:
496 static int watchdog_open(struct inode *inode, struct file *filp)
497 {
498 struct fschmd_data *pos, *data = NULL;
499 + int watchdog_is_open;
500
501 /* We get called from drivers/char/misc.c with misc_mtx hold, and we
502 call misc_register() from fschmd_probe() with watchdog_data_mutex
503 @@ -781,10 +782,12 @@ static int watchdog_open(struct inode *inode, struct file *filp)
504 }
505 }
506 /* Note we can never not have found data, so we don't check for this */
507 - kref_get(&data->kref);
508 + watchdog_is_open = test_and_set_bit(0, &data->watchdog_is_open);
509 + if (!watchdog_is_open)
510 + kref_get(&data->kref);
511 mutex_unlock(&watchdog_data_mutex);
512
513 - if (test_and_set_bit(0, &data->watchdog_is_open))
514 + if (watchdog_is_open)
515 return -EBUSY;
516
517 /* Start the watchdog */
518 diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
519 index 2bf5116..df3eb8c 100644
520 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
521 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
522 @@ -884,6 +884,7 @@ struct ipoib_neigh *ipoib_neigh_alloc(struct neighbour *neighbour,
523
524 neigh->neighbour = neighbour;
525 neigh->dev = dev;
526 + memset(&neigh->dgid.raw, 0, sizeof (union ib_gid));
527 *to_ipoib_neigh(neighbour) = neigh;
528 skb_queue_head_init(&neigh->queue);
529 ipoib_cm_set(neigh, NULL);
530 diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
531 index f361106..fc8823b 100644
532 --- a/drivers/input/mouse/alps.c
533 +++ b/drivers/input/mouse/alps.c
534 @@ -5,6 +5,7 @@
535 * Copyright (c) 2003-2005 Peter Osterlund <petero2@telia.com>
536 * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
537 * Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
538 + * Copyright (c) 2009 Sebastian Kapfer <sebastian_kapfer@gmx.net>
539 *
540 * ALPS detection, tap switching and status querying info is taken from
541 * tpconfig utility (by C. Scott Ananian and Bruce Kall).
542 @@ -35,6 +36,8 @@
543 #define ALPS_OLDPROTO 0x10
544 #define ALPS_PASS 0x20
545 #define ALPS_FW_BK_2 0x40
546 +#define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with
547 + 6-byte ALPS packet */
548
549 static const struct alps_model_info alps_model_data[] = {
550 { { 0x32, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
551 @@ -55,7 +58,9 @@ static const struct alps_model_info alps_model_data[] = {
552 { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
553 { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
554 { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
555 - { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude E6500 */
556 + /* Dell Latitude E5500, E6400, E6500, Precision M4400 */
557 + { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
558 + ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
559 { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 }, /* Dell Vostro 1400 */
560 };
561
562 @@ -66,20 +71,88 @@ static const struct alps_model_info alps_model_data[] = {
563 */
564
565 /*
566 - * ALPS abolute Mode - new format
567 + * PS/2 packet format
568 + *
569 + * byte 0: 0 0 YSGN XSGN 1 M R L
570 + * byte 1: X7 X6 X5 X4 X3 X2 X1 X0
571 + * byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
572 + *
573 + * Note that the device never signals overflow condition.
574 + *
575 + * ALPS absolute Mode - new format
576 *
577 * byte 0: 1 ? ? ? 1 ? ? ?
578 * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
579 - * byte 2: 0 x10 x9 x8 x7 ? fin ges
580 + * byte 2: 0 x10 x9 x8 x7 ? fin ges
581 * byte 3: 0 y9 y8 y7 1 M R L
582 * byte 4: 0 y6 y5 y4 y3 y2 y1 y0
583 * byte 5: 0 z6 z5 z4 z3 z2 z1 z0
584 *
585 + * Dualpoint device -- interleaved packet format
586 + *
587 + * byte 0: 1 1 0 0 1 1 1 1
588 + * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
589 + * byte 2: 0 x10 x9 x8 x7 0 fin ges
590 + * byte 3: 0 0 YSGN XSGN 1 1 1 1
591 + * byte 4: X7 X6 X5 X4 X3 X2 X1 X0
592 + * byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
593 + * byte 6: 0 y9 y8 y7 1 m r l
594 + * byte 7: 0 y6 y5 y4 y3 y2 y1 y0
595 + * byte 8: 0 z6 z5 z4 z3 z2 z1 z0
596 + *
597 + * CAPITALS = stick, miniscules = touchpad
598 + *
599 * ?'s can have different meanings on different models,
600 * such as wheel rotation, extra buttons, stick buttons
601 * on a dualpoint, etc.
602 */
603
604 +static bool alps_is_valid_first_byte(const struct alps_model_info *model,
605 + unsigned char data)
606 +{
607 + return (data & model->mask0) == model->byte0;
608 +}
609 +
610 +static void alps_report_buttons(struct psmouse *psmouse,
611 + struct input_dev *dev1, struct input_dev *dev2,
612 + int left, int right, int middle)
613 +{
614 + struct alps_data *priv = psmouse->private;
615 + const struct alps_model_info *model = priv->i;
616 +
617 + if (model->flags & ALPS_PS2_INTERLEAVED) {
618 + struct input_dev *dev;
619 +
620 + /*
621 + * If shared button has already been reported on the
622 + * other device (dev2) then this event should be also
623 + * sent through that device.
624 + */
625 + dev = test_bit(BTN_LEFT, dev2->key) ? dev2 : dev1;
626 + input_report_key(dev, BTN_LEFT, left);
627 +
628 + dev = test_bit(BTN_RIGHT, dev2->key) ? dev2 : dev1;
629 + input_report_key(dev, BTN_RIGHT, right);
630 +
631 + dev = test_bit(BTN_MIDDLE, dev2->key) ? dev2 : dev1;
632 + input_report_key(dev, BTN_MIDDLE, middle);
633 +
634 + /*
635 + * Sync the _other_ device now, we'll do the first
636 + * device later once we report the rest of the events.
637 + */
638 + input_sync(dev2);
639 + } else {
640 + /*
641 + * For devices with non-interleaved packets we know what
642 + * device buttons belong to so we can simply report them.
643 + */
644 + input_report_key(dev1, BTN_LEFT, left);
645 + input_report_key(dev1, BTN_RIGHT, right);
646 + input_report_key(dev1, BTN_MIDDLE, middle);
647 + }
648 +}
649 +
650 static void alps_process_packet(struct psmouse *psmouse)
651 {
652 struct alps_data *priv = psmouse->private;
653 @@ -89,18 +162,6 @@ static void alps_process_packet(struct psmouse *psmouse)
654 int x, y, z, ges, fin, left, right, middle;
655 int back = 0, forward = 0;
656
657 - if ((packet[0] & 0xc8) == 0x08) { /* 3-byte PS/2 packet */
658 - input_report_key(dev2, BTN_LEFT, packet[0] & 1);
659 - input_report_key(dev2, BTN_RIGHT, packet[0] & 2);
660 - input_report_key(dev2, BTN_MIDDLE, packet[0] & 4);
661 - input_report_rel(dev2, REL_X,
662 - packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0);
663 - input_report_rel(dev2, REL_Y,
664 - packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0);
665 - input_sync(dev2);
666 - return;
667 - }
668 -
669 if (priv->i->flags & ALPS_OLDPROTO) {
670 left = packet[2] & 0x10;
671 right = packet[2] & 0x08;
672 @@ -136,18 +197,13 @@ static void alps_process_packet(struct psmouse *psmouse)
673 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x));
674 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y));
675
676 - input_report_key(dev2, BTN_LEFT, left);
677 - input_report_key(dev2, BTN_RIGHT, right);
678 - input_report_key(dev2, BTN_MIDDLE, middle);
679 + alps_report_buttons(psmouse, dev2, dev, left, right, middle);
680
681 - input_sync(dev);
682 input_sync(dev2);
683 return;
684 }
685
686 - input_report_key(dev, BTN_LEFT, left);
687 - input_report_key(dev, BTN_RIGHT, right);
688 - input_report_key(dev, BTN_MIDDLE, middle);
689 + alps_report_buttons(psmouse, dev, dev2, left, right, middle);
690
691 /* Convert hardware tap to a reasonable Z value */
692 if (ges && !fin) z = 40;
693 @@ -188,25 +244,168 @@ static void alps_process_packet(struct psmouse *psmouse)
694 input_sync(dev);
695 }
696
697 +static void alps_report_bare_ps2_packet(struct psmouse *psmouse,
698 + unsigned char packet[],
699 + bool report_buttons)
700 +{
701 + struct alps_data *priv = psmouse->private;
702 + struct input_dev *dev2 = priv->dev2;
703 +
704 + if (report_buttons)
705 + alps_report_buttons(psmouse, dev2, psmouse->dev,
706 + packet[0] & 1, packet[0] & 2, packet[0] & 4);
707 +
708 + input_report_rel(dev2, REL_X,
709 + packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0);
710 + input_report_rel(dev2, REL_Y,
711 + packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0);
712 +
713 + input_sync(dev2);
714 +}
715 +
716 +static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse)
717 +{
718 + struct alps_data *priv = psmouse->private;
719 +
720 + if (psmouse->pktcnt < 6)
721 + return PSMOUSE_GOOD_DATA;
722 +
723 + if (psmouse->pktcnt == 6) {
724 + /*
725 + * Start a timer to flush the packet if it ends up last
726 + * 6-byte packet in the stream. Timer needs to fire
727 + * psmouse core times out itself. 20 ms should be enough
728 + * to decide if we are getting more data or not.
729 + */
730 + mod_timer(&priv->timer, jiffies + msecs_to_jiffies(20));
731 + return PSMOUSE_GOOD_DATA;
732 + }
733 +
734 + del_timer(&priv->timer);
735 +
736 + if (psmouse->packet[6] & 0x80) {
737 +
738 + /*
739 + * Highest bit is set - that means we either had
740 + * complete ALPS packet and this is start of the
741 + * next packet or we got garbage.
742 + */
743 +
744 + if (((psmouse->packet[3] |
745 + psmouse->packet[4] |
746 + psmouse->packet[5]) & 0x80) ||
747 + (!alps_is_valid_first_byte(priv->i, psmouse->packet[6]))) {
748 + dbg("refusing packet %x %x %x %x "
749 + "(suspected interleaved ps/2)\n",
750 + psmouse->packet[3], psmouse->packet[4],
751 + psmouse->packet[5], psmouse->packet[6]);
752 + return PSMOUSE_BAD_DATA;
753 + }
754 +
755 + alps_process_packet(psmouse);
756 +
757 + /* Continue with the next packet */
758 + psmouse->packet[0] = psmouse->packet[6];
759 + psmouse->pktcnt = 1;
760 +
761 + } else {
762 +
763 + /*
764 + * High bit is 0 - that means that we indeed got a PS/2
765 + * packet in the middle of ALPS packet.
766 + *
767 + * There is also possibility that we got 6-byte ALPS
768 + * packet followed by 3-byte packet from trackpoint. We
769 + * can not distinguish between these 2 scenarios but
770 + * becase the latter is unlikely to happen in course of
771 + * normal operation (user would need to press all
772 + * buttons on the pad and start moving trackpoint
773 + * without touching the pad surface) we assume former.
774 + * Even if we are wrong the wost thing that would happen
775 + * the cursor would jump but we should not get protocol
776 + * desynchronization.
777 + */
778 +
779 + alps_report_bare_ps2_packet(psmouse, &psmouse->packet[3],
780 + false);
781 +
782 + /*
783 + * Continue with the standard ALPS protocol handling,
784 + * but make sure we won't process it as an interleaved
785 + * packet again, which may happen if all buttons are
786 + * pressed. To avoid this let's reset the 4th bit which
787 + * is normally 1.
788 + */
789 + psmouse->packet[3] = psmouse->packet[6] & 0xf7;
790 + psmouse->pktcnt = 4;
791 + }
792 +
793 + return PSMOUSE_GOOD_DATA;
794 +}
795 +
796 +static void alps_flush_packet(unsigned long data)
797 +{
798 + struct psmouse *psmouse = (struct psmouse *)data;
799 +
800 + serio_pause_rx(psmouse->ps2dev.serio);
801 +
802 + if (psmouse->pktcnt == 6) {
803 +
804 + /*
805 + * We did not any more data in reasonable amount of time.
806 + * Validate the last 3 bytes and process as a standard
807 + * ALPS packet.
808 + */
809 + if ((psmouse->packet[3] |
810 + psmouse->packet[4] |
811 + psmouse->packet[5]) & 0x80) {
812 + dbg("refusing packet %x %x %x "
813 + "(suspected interleaved ps/2)\n",
814 + psmouse->packet[3], psmouse->packet[4],
815 + psmouse->packet[5]);
816 + } else {
817 + alps_process_packet(psmouse);
818 + }
819 + psmouse->pktcnt = 0;
820 + }
821 +
822 + serio_continue_rx(psmouse->ps2dev.serio);
823 +}
824 +
825 static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
826 {
827 struct alps_data *priv = psmouse->private;
828 + const struct alps_model_info *model = priv->i;
829
830 if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */
831 if (psmouse->pktcnt == 3) {
832 - alps_process_packet(psmouse);
833 + alps_report_bare_ps2_packet(psmouse, psmouse->packet,
834 + true);
835 return PSMOUSE_FULL_PACKET;
836 }
837 return PSMOUSE_GOOD_DATA;
838 }
839
840 - if ((psmouse->packet[0] & priv->i->mask0) != priv->i->byte0)
841 + /* Check for PS/2 packet stuffed in the middle of ALPS packet. */
842 +
843 + if ((model->flags & ALPS_PS2_INTERLEAVED) &&
844 + psmouse->pktcnt >= 4 && (psmouse->packet[3] & 0x0f) == 0x0f) {
845 + return alps_handle_interleaved_ps2(psmouse);
846 + }
847 +
848 + if (!alps_is_valid_first_byte(model, psmouse->packet[0])) {
849 + dbg("refusing packet[0] = %x (mask0 = %x, byte0 = %x)\n",
850 + psmouse->packet[0], model->mask0, model->byte0);
851 return PSMOUSE_BAD_DATA;
852 + }
853
854 /* Bytes 2 - 6 should have 0 in the highest bit */
855 if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
856 - (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
857 + (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) {
858 + dbg("refusing packet[%i] = %x\n",
859 + psmouse->pktcnt - 1, psmouse->packet[psmouse->pktcnt - 1]);
860 return PSMOUSE_BAD_DATA;
861 + }
862
863 if (psmouse->pktcnt == 6) {
864 alps_process_packet(psmouse);
865 @@ -445,6 +644,7 @@ static void alps_disconnect(struct psmouse *psmouse)
866 struct alps_data *priv = psmouse->private;
867
868 psmouse_reset(psmouse);
869 + del_timer_sync(&priv->timer);
870 input_unregister_device(priv->dev2);
871 kfree(priv);
872 }
873 @@ -461,6 +661,8 @@ int alps_init(struct psmouse *psmouse)
874 goto init_fail;
875
876 priv->dev2 = dev2;
877 + setup_timer(&priv->timer, alps_flush_packet, (unsigned long)psmouse);
878 +
879 psmouse->private = priv;
880
881 if (alps_hw_init(psmouse, &version))
882 diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
883 index bc87936..904ed8b 100644
884 --- a/drivers/input/mouse/alps.h
885 +++ b/drivers/input/mouse/alps.h
886 @@ -23,6 +23,7 @@ struct alps_data {
887 char phys[32]; /* Phys */
888 const struct alps_model_info *i;/* Info */
889 int prev_fin; /* Finger bit from previous packet */
890 + struct timer_list timer;
891 };
892
893 #ifdef CONFIG_MOUSE_PS2_ALPS
894 diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
895 index 2bcf1ac..2a5982e 100644
896 --- a/drivers/input/serio/i8042-x86ia64io.h
897 +++ b/drivers/input/serio/i8042-x86ia64io.h
898 @@ -67,10 +67,12 @@ static inline void i8042_write_command(int val)
899
900 #include <linux/dmi.h>
901
902 -static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
903 +static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
904 {
905 - /* AUX LOOP command does not raise AUX IRQ */
906 - .ident = "Arima-Rioworks HDAMB",
907 + /*
908 + * Arima-Rioworks HDAMB -
909 + * AUX LOOP command does not raise AUX IRQ
910 + */
911 .matches = {
912 DMI_MATCH(DMI_BOARD_VENDOR, "RIOWORKS"),
913 DMI_MATCH(DMI_BOARD_NAME, "HDAMB"),
914 @@ -78,7 +80,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
915 },
916 },
917 {
918 - .ident = "ASUS G1S",
919 + /* ASUS G1S */
920 .matches = {
921 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
922 DMI_MATCH(DMI_BOARD_NAME, "G1S"),
923 @@ -86,8 +88,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
924 },
925 },
926 {
927 - /* AUX LOOP command does not raise AUX IRQ */
928 - .ident = "ASUS P65UP5",
929 + /* ASUS P65UP5 - AUX LOOP command does not raise AUX IRQ */
930 .matches = {
931 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
932 DMI_MATCH(DMI_BOARD_NAME, "P/I-P65UP5"),
933 @@ -95,7 +96,6 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
934 },
935 },
936 {
937 - .ident = "Compaq Proliant 8500",
938 .matches = {
939 DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
940 DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
941 @@ -103,7 +103,6 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
942 },
943 },
944 {
945 - .ident = "Compaq Proliant DL760",
946 .matches = {
947 DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
948 DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
949 @@ -111,7 +110,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
950 },
951 },
952 {
953 - .ident = "OQO Model 01",
954 + /* OQO Model 01 */
955 .matches = {
956 DMI_MATCH(DMI_SYS_VENDOR, "OQO"),
957 DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"),
958 @@ -119,8 +118,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
959 },
960 },
961 {
962 - /* AUX LOOP does not work properly */
963 - .ident = "ULI EV4873",
964 + /* ULI EV4873 - AUX LOOP does not work properly */
965 .matches = {
966 DMI_MATCH(DMI_SYS_VENDOR, "ULI"),
967 DMI_MATCH(DMI_PRODUCT_NAME, "EV4873"),
968 @@ -128,7 +126,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
969 },
970 },
971 {
972 - .ident = "Microsoft Virtual Machine",
973 + /* Microsoft Virtual Machine */
974 .matches = {
975 DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
976 DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
977 @@ -136,7 +134,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
978 },
979 },
980 {
981 - .ident = "Medion MAM 2070",
982 + /* Medion MAM 2070 */
983 .matches = {
984 DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
985 DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"),
986 @@ -144,7 +142,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
987 },
988 },
989 {
990 - .ident = "Blue FB5601",
991 + /* Blue FB5601 */
992 .matches = {
993 DMI_MATCH(DMI_SYS_VENDOR, "blue"),
994 DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"),
995 @@ -152,7 +150,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
996 },
997 },
998 {
999 - .ident = "Gigabyte M912",
1000 + /* Gigabyte M912 */
1001 .matches = {
1002 DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
1003 DMI_MATCH(DMI_PRODUCT_NAME, "M912"),
1004 @@ -160,7 +158,14 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
1005 },
1006 },
1007 {
1008 - .ident = "HP DV9700",
1009 + /* Gigabyte M1022M netbook */
1010 + .matches = {
1011 + DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co.,Ltd."),
1012 + DMI_MATCH(DMI_BOARD_NAME, "M1022E"),
1013 + DMI_MATCH(DMI_BOARD_VERSION, "1.02"),
1014 + },
1015 + },
1016 + {
1017 .matches = {
1018 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1019 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"),
1020 @@ -177,72 +182,72 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
1021 * ... apparently some Toshibas don't like MUX mode either and
1022 * die horrible death on reboot.
1023 */
1024 -static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
1025 +static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
1026 {
1027 - .ident = "Fujitsu Lifebook P7010/P7010D",
1028 + /* Fujitsu Lifebook P7010/P7010D */
1029 .matches = {
1030 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
1031 DMI_MATCH(DMI_PRODUCT_NAME, "P7010"),
1032 },
1033 },
1034 {
1035 - .ident = "Fujitsu Lifebook P7010",
1036 + /* Fujitsu Lifebook P7010 */
1037 .matches = {
1038 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1039 DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"),
1040 },
1041 },
1042 {
1043 - .ident = "Fujitsu Lifebook P5020D",
1044 + /* Fujitsu Lifebook P5020D */
1045 .matches = {
1046 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
1047 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"),
1048 },
1049 },
1050 {
1051 - .ident = "Fujitsu Lifebook S2000",
1052 + /* Fujitsu Lifebook S2000 */
1053 .matches = {
1054 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
1055 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"),
1056 },
1057 },
1058 {
1059 - .ident = "Fujitsu Lifebook S6230",
1060 + /* Fujitsu Lifebook S6230 */
1061 .matches = {
1062 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
1063 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"),
1064 },
1065 },
1066 {
1067 - .ident = "Fujitsu T70H",
1068 + /* Fujitsu T70H */
1069 .matches = {
1070 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
1071 DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"),
1072 },
1073 },
1074 {
1075 - .ident = "Fujitsu-Siemens Lifebook T3010",
1076 + /* Fujitsu-Siemens Lifebook T3010 */
1077 .matches = {
1078 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1079 DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"),
1080 },
1081 },
1082 {
1083 - .ident = "Fujitsu-Siemens Lifebook E4010",
1084 + /* Fujitsu-Siemens Lifebook E4010 */
1085 .matches = {
1086 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1087 DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"),
1088 },
1089 },
1090 {
1091 - .ident = "Fujitsu-Siemens Amilo Pro 2010",
1092 + /* Fujitsu-Siemens Amilo Pro 2010 */
1093 .matches = {
1094 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1095 DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
1096 },
1097 },
1098 {
1099 - .ident = "Fujitsu-Siemens Amilo Pro 2030",
1100 + /* Fujitsu-Siemens Amilo Pro 2030 */
1101 .matches = {
1102 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1103 DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
1104 @@ -253,7 +258,7 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
1105 * No data is coming from the touchscreen unless KBC
1106 * is in legacy mode.
1107 */
1108 - .ident = "Panasonic CF-29",
1109 + /* Panasonic CF-29 */
1110 .matches = {
1111 DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
1112 DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"),
1113 @@ -261,10 +266,10 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
1114 },
1115 {
1116 /*
1117 - * Errors on MUX ports are reported without raising AUXDATA
1118 + * HP Pavilion DV4017EA -
1119 + * errors on MUX ports are reported without raising AUXDATA
1120 * causing "spurious NAK" messages.
1121 */
1122 - .ident = "HP Pavilion DV4017EA",
1123 .matches = {
1124 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1125 DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"),
1126 @@ -272,9 +277,9 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
1127 },
1128 {
1129 /*
1130 - * Like DV4017EA does not raise AUXERR for errors on MUX ports.
1131 + * HP Pavilion ZT1000 -
1132 + * like DV4017EA does not raise AUXERR for errors on MUX ports.
1133 */
1134 - .ident = "HP Pavilion ZT1000",
1135 .matches = {
1136 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1137 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"),
1138 @@ -283,44 +288,41 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
1139 },
1140 {
1141 /*
1142 - * Like DV4017EA does not raise AUXERR for errors on MUX ports.
1143 + * HP Pavilion DV4270ca -
1144 + * like DV4017EA does not raise AUXERR for errors on MUX ports.
1145 */
1146 - .ident = "HP Pavilion DV4270ca",
1147 .matches = {
1148 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1149 DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"),
1150 },
1151 },
1152 {
1153 - .ident = "Toshiba P10",
1154 .matches = {
1155 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1156 DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"),
1157 },
1158 },
1159 {
1160 - .ident = "Toshiba Equium A110",
1161 .matches = {
1162 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1163 DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"),
1164 },
1165 },
1166 {
1167 - .ident = "Alienware Sentia",
1168 .matches = {
1169 DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"),
1170 DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"),
1171 },
1172 },
1173 {
1174 - .ident = "Sharp Actius MM20",
1175 + /* Sharp Actius MM20 */
1176 .matches = {
1177 DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
1178 DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"),
1179 },
1180 },
1181 {
1182 - .ident = "Sony Vaio FS-115b",
1183 + /* Sony Vaio FS-115b */
1184 .matches = {
1185 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
1186 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"),
1187 @@ -328,73 +330,72 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
1188 },
1189 {
1190 /*
1191 - * Reset and GET ID commands issued via KBD port are
1192 + * Sony Vaio FZ-240E -
1193 + * reset and GET ID commands issued via KBD port are
1194 * sometimes being delivered to AUX3.
1195 */
1196 - .ident = "Sony Vaio FZ-240E",
1197 .matches = {
1198 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
1199 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"),
1200 },
1201 },
1202 {
1203 - .ident = "Amoi M636/A737",
1204 + /* Amoi M636/A737 */
1205 .matches = {
1206 DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."),
1207 DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"),
1208 },
1209 },
1210 {
1211 - .ident = "Lenovo 3000 n100",
1212 + /* Lenovo 3000 n100 */
1213 .matches = {
1214 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1215 DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
1216 },
1217 },
1218 {
1219 - .ident = "Acer Aspire 1360",
1220 .matches = {
1221 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1222 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"),
1223 },
1224 },
1225 {
1226 - .ident = "Gericom Bellagio",
1227 + /* Gericom Bellagio */
1228 .matches = {
1229 DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
1230 DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"),
1231 },
1232 },
1233 {
1234 - .ident = "IBM 2656",
1235 + /* IBM 2656 */
1236 .matches = {
1237 DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
1238 DMI_MATCH(DMI_PRODUCT_NAME, "2656"),
1239 },
1240 },
1241 {
1242 - .ident = "Dell XPS M1530",
1243 + /* Dell XPS M1530 */
1244 .matches = {
1245 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
1246 DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"),
1247 },
1248 },
1249 {
1250 - .ident = "Compal HEL80I",
1251 + /* Compal HEL80I */
1252 .matches = {
1253 DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"),
1254 DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"),
1255 },
1256 },
1257 {
1258 - .ident = "Dell Vostro 1510",
1259 + /* Dell Vostro 1510 */
1260 .matches = {
1261 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
1262 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
1263 },
1264 },
1265 {
1266 - .ident = "Acer Aspire 5536",
1267 + /* Acer Aspire 5536 */
1268 .matches = {
1269 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1270 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"),
1271 @@ -404,65 +405,65 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
1272 { }
1273 };
1274
1275 -static struct dmi_system_id __initdata i8042_dmi_reset_table[] = {
1276 +static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {
1277 {
1278 - .ident = "MSI Wind U-100",
1279 + /* MSI Wind U-100 */
1280 .matches = {
1281 DMI_MATCH(DMI_BOARD_NAME, "U-100"),
1282 DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
1283 },
1284 },
1285 {
1286 - .ident = "LG Electronics X110",
1287 + /* LG Electronics X110 */
1288 .matches = {
1289 DMI_MATCH(DMI_BOARD_NAME, "X110"),
1290 DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."),
1291 },
1292 },
1293 {
1294 - .ident = "Acer Aspire One 150",
1295 + /* Acer Aspire One 150 */
1296 .matches = {
1297 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1298 DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"),
1299 },
1300 },
1301 {
1302 - .ident = "Advent 4211",
1303 + /* Advent 4211 */
1304 .matches = {
1305 DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"),
1306 DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"),
1307 },
1308 },
1309 {
1310 - .ident = "Medion Akoya Mini E1210",
1311 + /* Medion Akoya Mini E1210 */
1312 .matches = {
1313 DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
1314 DMI_MATCH(DMI_PRODUCT_NAME, "E1210"),
1315 },
1316 },
1317 {
1318 - .ident = "Mivvy M310",
1319 + /* Mivvy M310 */
1320 .matches = {
1321 DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"),
1322 DMI_MATCH(DMI_PRODUCT_NAME, "N10"),
1323 },
1324 },
1325 {
1326 - .ident = "Dell Vostro 1320",
1327 + /* Dell Vostro 1320 */
1328 .matches = {
1329 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
1330 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1320"),
1331 },
1332 },
1333 {
1334 - .ident = "Dell Vostro 1520",
1335 + /* Dell Vostro 1520 */
1336 .matches = {
1337 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
1338 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1520"),
1339 },
1340 },
1341 {
1342 - .ident = "Dell Vostro 1720",
1343 + /* Dell Vostro 1720 */
1344 .matches = {
1345 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
1346 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"),
1347 @@ -472,16 +473,16 @@ static struct dmi_system_id __initdata i8042_dmi_reset_table[] = {
1348 };
1349
1350 #ifdef CONFIG_PNP
1351 -static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = {
1352 +static const struct dmi_system_id __initconst i8042_dmi_nopnp_table[] = {
1353 {
1354 - .ident = "Intel MBO Desktop D845PESV",
1355 + /* Intel MBO Desktop D845PESV */
1356 .matches = {
1357 DMI_MATCH(DMI_BOARD_NAME, "D845PESV"),
1358 DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
1359 },
1360 },
1361 {
1362 - .ident = "MSI Wind U-100",
1363 + /* MSI Wind U-100 */
1364 .matches = {
1365 DMI_MATCH(DMI_BOARD_NAME, "U-100"),
1366 DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
1367 @@ -490,27 +491,23 @@ static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = {
1368 { }
1369 };
1370
1371 -static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = {
1372 +static const struct dmi_system_id __initconst i8042_dmi_laptop_table[] = {
1373 {
1374 - .ident = "Portable",
1375 .matches = {
1376 DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
1377 },
1378 },
1379 {
1380 - .ident = "Laptop",
1381 .matches = {
1382 DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */
1383 },
1384 },
1385 {
1386 - .ident = "Notebook",
1387 .matches = {
1388 DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
1389 },
1390 },
1391 {
1392 - .ident = "Sub-Notebook",
1393 .matches = {
1394 DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */
1395 },
1396 @@ -525,58 +522,65 @@ static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = {
1397 * Originally, this was just confined to older laptops, but a few Acer laptops
1398 * have turned up in 2007 that also need this again.
1399 */
1400 -static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
1401 +static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = {
1402 + {
1403 + /* Acer Aspire 5610 */
1404 + .matches = {
1405 + DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1406 + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"),
1407 + },
1408 + },
1409 {
1410 - .ident = "Acer Aspire 5630",
1411 + /* Acer Aspire 5630 */
1412 .matches = {
1413 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1414 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"),
1415 },
1416 },
1417 {
1418 - .ident = "Acer Aspire 5650",
1419 + /* Acer Aspire 5650 */
1420 .matches = {
1421 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1422 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"),
1423 },
1424 },
1425 {
1426 - .ident = "Acer Aspire 5680",
1427 + /* Acer Aspire 5680 */
1428 .matches = {
1429 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1430 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"),
1431 },
1432 },
1433 {
1434 - .ident = "Acer Aspire 5720",
1435 + /* Acer Aspire 5720 */
1436 .matches = {
1437 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1438 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"),
1439 },
1440 },
1441 {
1442 - .ident = "Acer Aspire 9110",
1443 + /* Acer Aspire 9110 */
1444 .matches = {
1445 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1446 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"),
1447 },
1448 },
1449 {
1450 - .ident = "Acer TravelMate 660",
1451 + /* Acer TravelMate 660 */
1452 .matches = {
1453 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1454 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"),
1455 },
1456 },
1457 {
1458 - .ident = "Acer TravelMate 2490",
1459 + /* Acer TravelMate 2490 */
1460 .matches = {
1461 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1462 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"),
1463 },
1464 },
1465 {
1466 - .ident = "Acer TravelMate 4280",
1467 + /* Acer TravelMate 4280 */
1468 .matches = {
1469 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1470 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"),
1471 diff --git a/drivers/md/md.c b/drivers/md/md.c
1472 index c6a6685..08f7471 100644
1473 --- a/drivers/md/md.c
1474 +++ b/drivers/md/md.c
1475 @@ -4173,7 +4173,7 @@ static int do_md_run(mddev_t * mddev)
1476 mddev->barriers_work = 1;
1477 mddev->ok_start_degraded = start_dirty_degraded;
1478
1479 - if (start_readonly)
1480 + if (start_readonly && mddev->ro == 0)
1481 mddev->ro = 2; /* read-only, but switch on first write */
1482
1483 err = mddev->pers->run(mddev);
1484 diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
1485 index 8f88a58..6b03dbf 100644
1486 --- a/drivers/media/dvb/siano/smsusb.c
1487 +++ b/drivers/media/dvb/siano/smsusb.c
1488 @@ -533,8 +533,18 @@ struct usb_device_id smsusb_id_table[] = {
1489 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1490 { USB_DEVICE(0x2040, 0xb910),
1491 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1492 + { USB_DEVICE(0x2040, 0xb980),
1493 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1494 + { USB_DEVICE(0x2040, 0xb990),
1495 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1496 { USB_DEVICE(0x2040, 0xc000),
1497 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1498 + { USB_DEVICE(0x2040, 0xc010),
1499 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1500 + { USB_DEVICE(0x2040, 0xc080),
1501 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1502 + { USB_DEVICE(0x2040, 0xc090),
1503 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
1504 { } /* Terminating entry */
1505 };
1506
1507 diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
1508 index 0901322..6781a07 100644
1509 --- a/drivers/media/video/saa7134/saa7134-cards.c
1510 +++ b/drivers/media/video/saa7134/saa7134-cards.c
1511 @@ -5279,6 +5279,30 @@ struct saa7134_board saa7134_boards[] = {
1512 .amux = TV,
1513 },
1514 },
1515 + [SAA7134_BOARD_ASUS_EUROPA_HYBRID] = {
1516 + .name = "Asus Europa Hybrid OEM",
1517 + .audio_clock = 0x00187de7,
1518 + .tuner_type = TUNER_PHILIPS_TD1316,
1519 + .radio_type = UNSET,
1520 + .tuner_addr = 0x61,
1521 + .radio_addr = ADDR_UNSET,
1522 + .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE,
1523 + .mpeg = SAA7134_MPEG_DVB,
1524 + .inputs = { {
1525 + .name = name_tv,
1526 + .vmux = 3,
1527 + .amux = TV,
1528 + .tv = 1,
1529 + }, {
1530 + .name = name_comp1,
1531 + .vmux = 4,
1532 + .amux = LINE2,
1533 + }, {
1534 + .name = name_svideo,
1535 + .vmux = 8,
1536 + .amux = LINE2,
1537 + } },
1538 + },
1539
1540 };
1541
1542 @@ -6418,6 +6442,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
1543 .subdevice = 0x2004,
1544 .driver_data = SAA7134_BOARD_ZOLID_HYBRID_PCI,
1545 }, {
1546 + .vendor = PCI_VENDOR_ID_PHILIPS,
1547 + .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
1548 + .subvendor = 0x1043,
1549 + .subdevice = 0x4847,
1550 + .driver_data = SAA7134_BOARD_ASUS_EUROPA_HYBRID,
1551 + }, {
1552 /* --- boards without eeprom + subsystem ID --- */
1553 .vendor = PCI_VENDOR_ID_PHILIPS,
1554 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
1555 @@ -7079,6 +7109,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
1556 /* break intentionally omitted */
1557 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
1558 case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
1559 + case SAA7134_BOARD_ASUS_EUROPA_HYBRID:
1560 {
1561
1562 /* The Philips EUROPA based hybrid boards have the tuner
1563 diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
1564 index a26e997..b8a805c 100644
1565 --- a/drivers/media/video/saa7134/saa7134-dvb.c
1566 +++ b/drivers/media/video/saa7134/saa7134-dvb.c
1567 @@ -1116,6 +1116,7 @@ static int dvb_init(struct saa7134_dev *dev)
1568 break;
1569 case SAA7134_BOARD_PHILIPS_EUROPA:
1570 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
1571 + case SAA7134_BOARD_ASUS_EUROPA_HYBRID:
1572 fe0->dvb.frontend = dvb_attach(tda10046_attach,
1573 &philips_europa_config,
1574 &dev->i2c_adap);
1575 diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
1576 index f8697d4..94e1a3b 100644
1577 --- a/drivers/media/video/saa7134/saa7134.h
1578 +++ b/drivers/media/video/saa7134/saa7134.h
1579 @@ -297,6 +297,7 @@ struct saa7134_format {
1580 #define SAA7134_BOARD_BEHOLD_X7 171
1581 #define SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM 172
1582 #define SAA7134_BOARD_ZOLID_HYBRID_PCI 173
1583 +#define SAA7134_BOARD_ASUS_EUROPA_HYBRID 174
1584
1585 #define SAA7134_MAXBOARDS 32
1586 #define SAA7134_INPUT_MAX 8
1587 diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c
1588 index 1b89735..4a293b4 100644
1589 --- a/drivers/media/video/uvc/uvc_ctrl.c
1590 +++ b/drivers/media/video/uvc/uvc_ctrl.c
1591 @@ -1405,7 +1405,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev, struct uvc_entity *entity)
1592 size = entity->processing.bControlSize;
1593
1594 for (i = 0; i < ARRAY_SIZE(blacklist); ++i) {
1595 - if (!usb_match_id(dev->intf, &blacklist[i].id))
1596 + if (!usb_match_one_id(dev->intf, &blacklist[i].id))
1597 continue;
1598
1599 if (blacklist[i].index >= 8 * size ||
1600 diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
1601 index c1d7b88..425bf5a 100644
1602 --- a/drivers/mtd/ubi/upd.c
1603 +++ b/drivers/mtd/ubi/upd.c
1604 @@ -155,6 +155,7 @@ int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol,
1605 if (err)
1606 return err;
1607 vol->updating = 0;
1608 + return 0;
1609 }
1610
1611 vol->upd_buf = vmalloc(ubi->leb_size);
1612 diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
1613 index 1afc61e..4004402 100644
1614 --- a/drivers/mtd/ubi/vtbl.c
1615 +++ b/drivers/mtd/ubi/vtbl.c
1616 @@ -566,6 +566,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
1617 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs);
1618 vol->alignment = be32_to_cpu(vtbl[i].alignment);
1619 vol->data_pad = be32_to_cpu(vtbl[i].data_pad);
1620 + vol->upd_marker = vtbl[i].upd_marker;
1621 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ?
1622 UBI_DYNAMIC_VOLUME : UBI_STATIC_VOLUME;
1623 vol->name_len = be16_to_cpu(vtbl[i].name_len);
1624 diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h
1625 index 2a1120a..790e55b 100644
1626 --- a/drivers/net/atl1c/atl1c.h
1627 +++ b/drivers/net/atl1c/atl1c.h
1628 @@ -534,6 +534,9 @@ struct atl1c_adapter {
1629 #define __AT_TESTING 0x0001
1630 #define __AT_RESETTING 0x0002
1631 #define __AT_DOWN 0x0003
1632 + u8 work_event;
1633 +#define ATL1C_WORK_EVENT_RESET 0x01
1634 +#define ATL1C_WORK_EVENT_LINK_CHANGE 0x02
1635 u32 msg_enable;
1636
1637 bool have_msi;
1638 @@ -545,8 +548,7 @@ struct atl1c_adapter {
1639 spinlock_t tx_lock;
1640 atomic_t irq_sem;
1641
1642 - struct work_struct reset_task;
1643 - struct work_struct link_chg_task;
1644 + struct work_struct common_task;
1645 struct timer_list watchdog_timer;
1646 struct timer_list phy_config_timer;
1647
1648 diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
1649 index 1372e9a..be00ee9 100644
1650 --- a/drivers/net/atl1c/atl1c_main.c
1651 +++ b/drivers/net/atl1c/atl1c_main.c
1652 @@ -198,27 +198,12 @@ static void atl1c_phy_config(unsigned long data)
1653
1654 void atl1c_reinit_locked(struct atl1c_adapter *adapter)
1655 {
1656 -
1657 WARN_ON(in_interrupt());
1658 atl1c_down(adapter);
1659 atl1c_up(adapter);
1660 clear_bit(__AT_RESETTING, &adapter->flags);
1661 }
1662
1663 -static void atl1c_reset_task(struct work_struct *work)
1664 -{
1665 - struct atl1c_adapter *adapter;
1666 - struct net_device *netdev;
1667 -
1668 - adapter = container_of(work, struct atl1c_adapter, reset_task);
1669 - netdev = adapter->netdev;
1670 -
1671 - netif_device_detach(netdev);
1672 - atl1c_down(adapter);
1673 - atl1c_up(adapter);
1674 - netif_device_attach(netdev);
1675 -}
1676 -
1677 static void atl1c_check_link_status(struct atl1c_adapter *adapter)
1678 {
1679 struct atl1c_hw *hw = &adapter->hw;
1680 @@ -275,18 +260,6 @@ static void atl1c_check_link_status(struct atl1c_adapter *adapter)
1681 }
1682 }
1683
1684 -/*
1685 - * atl1c_link_chg_task - deal with link change event Out of interrupt context
1686 - * @netdev: network interface device structure
1687 - */
1688 -static void atl1c_link_chg_task(struct work_struct *work)
1689 -{
1690 - struct atl1c_adapter *adapter;
1691 -
1692 - adapter = container_of(work, struct atl1c_adapter, link_chg_task);
1693 - atl1c_check_link_status(adapter);
1694 -}
1695 -
1696 static void atl1c_link_chg_event(struct atl1c_adapter *adapter)
1697 {
1698 struct net_device *netdev = adapter->netdev;
1699 @@ -311,20 +284,40 @@ static void atl1c_link_chg_event(struct atl1c_adapter *adapter)
1700 adapter->link_speed = SPEED_0;
1701 }
1702 }
1703 - schedule_work(&adapter->link_chg_task);
1704 +
1705 + adapter->work_event |= ATL1C_WORK_EVENT_LINK_CHANGE;
1706 + schedule_work(&adapter->common_task);
1707 }
1708
1709 -static void atl1c_del_timer(struct atl1c_adapter *adapter)
1710 +static void atl1c_common_task(struct work_struct *work)
1711 {
1712 - del_timer_sync(&adapter->phy_config_timer);
1713 + struct atl1c_adapter *adapter;
1714 + struct net_device *netdev;
1715 +
1716 + adapter = container_of(work, struct atl1c_adapter, common_task);
1717 + netdev = adapter->netdev;
1718 +
1719 + if (adapter->work_event & ATL1C_WORK_EVENT_RESET) {
1720 + netif_device_detach(netdev);
1721 + atl1c_down(adapter);
1722 + atl1c_up(adapter);
1723 + netif_device_attach(netdev);
1724 + return;
1725 + }
1726 +
1727 + if (adapter->work_event & ATL1C_WORK_EVENT_LINK_CHANGE)
1728 + atl1c_check_link_status(adapter);
1729 +
1730 + return;
1731 }
1732
1733 -static void atl1c_cancel_work(struct atl1c_adapter *adapter)
1734 +
1735 +static void atl1c_del_timer(struct atl1c_adapter *adapter)
1736 {
1737 - cancel_work_sync(&adapter->reset_task);
1738 - cancel_work_sync(&adapter->link_chg_task);
1739 + del_timer_sync(&adapter->phy_config_timer);
1740 }
1741
1742 +
1743 /*
1744 * atl1c_tx_timeout - Respond to a Tx Hang
1745 * @netdev: network interface device structure
1746 @@ -334,7 +327,8 @@ static void atl1c_tx_timeout(struct net_device *netdev)
1747 struct atl1c_adapter *adapter = netdev_priv(netdev);
1748
1749 /* Do the reset outside of interrupt context */
1750 - schedule_work(&adapter->reset_task);
1751 + adapter->work_event |= ATL1C_WORK_EVENT_RESET;
1752 + schedule_work(&adapter->common_task);
1753 }
1754
1755 /*
1756 @@ -1536,7 +1530,8 @@ static irqreturn_t atl1c_intr(int irq, void *data)
1757 /* reset MAC */
1758 hw->intr_mask &= ~ISR_ERROR;
1759 AT_WRITE_REG(hw, REG_IMR, hw->intr_mask);
1760 - schedule_work(&adapter->reset_task);
1761 + adapter->work_event |= ATL1C_WORK_EVENT_RESET;
1762 + schedule_work(&adapter->common_task);
1763 break;
1764 }
1765
1766 @@ -2200,8 +2195,7 @@ void atl1c_down(struct atl1c_adapter *adapter)
1767 struct net_device *netdev = adapter->netdev;
1768
1769 atl1c_del_timer(adapter);
1770 - atl1c_cancel_work(adapter);
1771 -
1772 + adapter->work_event = 0; /* clear all event */
1773 /* signal that we're down so the interrupt handler does not
1774 * reschedule our watchdog timer */
1775 set_bit(__AT_DOWN, &adapter->flags);
1776 @@ -2601,8 +2595,8 @@ static int __devinit atl1c_probe(struct pci_dev *pdev,
1777 adapter->hw.mac_addr[4], adapter->hw.mac_addr[5]);
1778
1779 atl1c_hw_set_mac_addr(&adapter->hw);
1780 - INIT_WORK(&adapter->reset_task, atl1c_reset_task);
1781 - INIT_WORK(&adapter->link_chg_task, atl1c_link_chg_task);
1782 + INIT_WORK(&adapter->common_task, atl1c_common_task);
1783 + adapter->work_event = 0;
1784 err = register_netdev(netdev);
1785 if (err) {
1786 dev_err(&pdev->dev, "register netdevice failed\n");
1787 diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
1788 index 955da73..1b5facf 100644
1789 --- a/drivers/net/atl1e/atl1e_main.c
1790 +++ b/drivers/net/atl1e/atl1e_main.c
1791 @@ -1666,41 +1666,6 @@ static int atl1e_tso_csum(struct atl1e_adapter *adapter,
1792 }
1793 return 0;
1794 }
1795 -
1796 - if (offload_type & SKB_GSO_TCPV6) {
1797 - real_len = (((unsigned char *)ipv6_hdr(skb) - skb->data)
1798 - + ntohs(ipv6_hdr(skb)->payload_len));
1799 - if (real_len < skb->len)
1800 - pskb_trim(skb, real_len);
1801 -
1802 - /* check payload == 0 byte ? */
1803 - hdr_len = (skb_transport_offset(skb) + tcp_hdrlen(skb));
1804 - if (unlikely(skb->len == hdr_len)) {
1805 - /* only xsum need */
1806 - dev_warn(&pdev->dev,
1807 - "IPV6 tso with zero data??\n");
1808 - goto check_sum;
1809 - } else {
1810 - tcp_hdr(skb)->check = ~csum_ipv6_magic(
1811 - &ipv6_hdr(skb)->saddr,
1812 - &ipv6_hdr(skb)->daddr,
1813 - 0, IPPROTO_TCP, 0);
1814 - tpd->word3 |= 1 << TPD_IP_VERSION_SHIFT;
1815 - hdr_len >>= 1;
1816 - tpd->word3 |= (hdr_len & TPD_V6_IPHLLO_MASK) <<
1817 - TPD_V6_IPHLLO_SHIFT;
1818 - tpd->word3 |= ((hdr_len >> 3) &
1819 - TPD_V6_IPHLHI_MASK) <<
1820 - TPD_V6_IPHLHI_SHIFT;
1821 - tpd->word3 |= (tcp_hdrlen(skb) >> 2 &
1822 - TPD_TCPHDRLEN_MASK) <<
1823 - TPD_TCPHDRLEN_SHIFT;
1824 - tpd->word3 |= ((skb_shinfo(skb)->gso_size) &
1825 - TPD_MSS_MASK) << TPD_MSS_SHIFT;
1826 - tpd->word3 |= 1 << TPD_SEGMENT_EN_SHIFT;
1827 - }
1828 - }
1829 - return 0;
1830 }
1831
1832 check_sum:
1833 @@ -2289,7 +2254,6 @@ static int atl1e_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
1834 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
1835 netdev->features |= NETIF_F_LLTX;
1836 netdev->features |= NETIF_F_TSO;
1837 - netdev->features |= NETIF_F_TSO6;
1838
1839 return 0;
1840 }
1841 diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
1842 index 3b79a22..a84f1c5 100644
1843 --- a/drivers/net/benet/be.h
1844 +++ b/drivers/net/benet/be.h
1845 @@ -35,20 +35,31 @@
1846 #define DRV_VER "2.101.205"
1847 #define DRV_NAME "be2net"
1848 #define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC"
1849 +#define BE3_NAME "ServerEngines BladeEngine3 10Gbps NIC"
1850 #define OC_NAME "Emulex OneConnect 10Gbps NIC"
1851 +#define OC_NAME1 "Emulex OneConnect 10Gbps NIC (be3)"
1852 #define DRV_DESC BE_NAME "Driver"
1853
1854 #define BE_VENDOR_ID 0x19a2
1855 #define BE_DEVICE_ID1 0x211
1856 +#define BE_DEVICE_ID2 0x221
1857 #define OC_DEVICE_ID1 0x700
1858 #define OC_DEVICE_ID2 0x701
1859 +#define OC_DEVICE_ID3 0x710
1860
1861 static inline char *nic_name(struct pci_dev *pdev)
1862 {
1863 - if (pdev->device == OC_DEVICE_ID1 || pdev->device == OC_DEVICE_ID2)
1864 + switch (pdev->device) {
1865 + case OC_DEVICE_ID1:
1866 + case OC_DEVICE_ID2:
1867 return OC_NAME;
1868 - else
1869 + case OC_DEVICE_ID3:
1870 + return OC_NAME1;
1871 + case BE_DEVICE_ID2:
1872 + return BE3_NAME;
1873 + default:
1874 return BE_NAME;
1875 + }
1876 }
1877
1878 /* Number of bytes of an RX frame that are copied to skb->data */
1879 diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
1880 index 876b357..3749bb1 100644
1881 --- a/drivers/net/benet/be_main.c
1882 +++ b/drivers/net/benet/be_main.c
1883 @@ -31,8 +31,10 @@ MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data.");
1884
1885 static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = {
1886 { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) },
1887 + { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID2) },
1888 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) },
1889 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) },
1890 + { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID3) },
1891 { 0 }
1892 };
1893 MODULE_DEVICE_TABLE(pci, be_dev_ids);
1894 diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
1895 index a2fc70a..35d896b 100644
1896 --- a/drivers/net/qlge/qlge_main.c
1897 +++ b/drivers/net/qlge/qlge_main.c
1898 @@ -3310,10 +3310,8 @@ static int ql_adapter_initialize(struct ql_adapter *qdev)
1899
1900 /* Initialize the port and set the max framesize. */
1901 status = qdev->nic_ops->port_initialize(qdev);
1902 - if (status) {
1903 - QPRINTK(qdev, IFUP, ERR, "Failed to start port.\n");
1904 - return status;
1905 - }
1906 + if (status)
1907 + QPRINTK(qdev, IFUP, ERR, "Failed to start port.\n");
1908
1909 /* Set up the MAC address and frame routing filter. */
1910 status = ql_cam_route_initialize(qdev);
1911 @@ -3714,9 +3712,6 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
1912 struct sockaddr *addr = p;
1913 int status;
1914
1915 - if (netif_running(ndev))
1916 - return -EBUSY;
1917 -
1918 if (!is_valid_ether_addr(addr->sa_data))
1919 return -EADDRNOTAVAIL;
1920 memcpy(ndev->dev_addr, addr->sa_data, ndev->addr_len);
1921 @@ -3868,8 +3863,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
1922 struct net_device *ndev, int cards_found)
1923 {
1924 struct ql_adapter *qdev = netdev_priv(ndev);
1925 - int pos, err = 0;
1926 - u16 val16;
1927 + int err = 0;
1928
1929 memset((void *)qdev, 0, sizeof(*qdev));
1930 err = pci_enable_device(pdev);
1931 @@ -3881,18 +3875,12 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
1932 qdev->ndev = ndev;
1933 qdev->pdev = pdev;
1934 pci_set_drvdata(pdev, ndev);
1935 - pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
1936 - if (pos <= 0) {
1937 - dev_err(&pdev->dev, PFX "Cannot find PCI Express capability, "
1938 - "aborting.\n");
1939 - return pos;
1940 - } else {
1941 - pci_read_config_word(pdev, pos + PCI_EXP_DEVCTL, &val16);
1942 - val16 &= ~PCI_EXP_DEVCTL_NOSNOOP_EN;
1943 - val16 |= (PCI_EXP_DEVCTL_CERE |
1944 - PCI_EXP_DEVCTL_NFERE |
1945 - PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE);
1946 - pci_write_config_word(pdev, pos + PCI_EXP_DEVCTL, val16);
1947 +
1948 + /* Set PCIe read request size */
1949 + err = pcie_set_readrq(pdev, 4096);
1950 + if (err) {
1951 + dev_err(&pdev->dev, "Set readrq failed.\n");
1952 + goto err_out;
1953 }
1954
1955 err = pci_request_regions(pdev, DRV_NAME);
1956 diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
1957 index aec05f2..32b1e1f 100644
1958 --- a/drivers/net/qlge/qlge_mpi.c
1959 +++ b/drivers/net/qlge/qlge_mpi.c
1960 @@ -446,6 +446,9 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
1961 ql_aen_lost(qdev, mbcp);
1962 break;
1963
1964 + case AEN_DCBX_CHG:
1965 + /* Need to support AEN 8110 */
1966 + break;
1967 default:
1968 QPRINTK(qdev, DRV, ERR,
1969 "Unsupported AE %.08x.\n", mbcp->mbox_out[0]);
1970 diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
1971 index 489c4de..d443ad7 100644
1972 --- a/drivers/net/sfc/tx.c
1973 +++ b/drivers/net/sfc/tx.c
1974 @@ -821,8 +821,6 @@ static void efx_enqueue_unwind(struct efx_tx_queue *tx_queue)
1975 tx_queue->efx->type->txd_ring_mask];
1976 efx_tsoh_free(tx_queue, buffer);
1977 EFX_BUG_ON_PARANOID(buffer->skb);
1978 - buffer->len = 0;
1979 - buffer->continuation = true;
1980 if (buffer->unmap_len) {
1981 unmap_addr = (buffer->dma_addr + buffer->len -
1982 buffer->unmap_len);
1983 @@ -836,6 +834,8 @@ static void efx_enqueue_unwind(struct efx_tx_queue *tx_queue)
1984 PCI_DMA_TODEVICE);
1985 buffer->unmap_len = 0;
1986 }
1987 + buffer->len = 0;
1988 + buffer->continuation = true;
1989 }
1990 }
1991
1992 diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
1993 index e974e58..f141a4f 100644
1994 --- a/drivers/net/wireless/ath/ar9170/usb.c
1995 +++ b/drivers/net/wireless/ath/ar9170/usb.c
1996 @@ -68,8 +68,10 @@ static struct usb_device_id ar9170_usb_ids[] = {
1997 { USB_DEVICE(0x0cf3, 0x1002) },
1998 /* Cace Airpcap NX */
1999 { USB_DEVICE(0xcace, 0x0300) },
2000 - /* D-Link DWA 160A */
2001 + /* D-Link DWA 160 A1 */
2002 { USB_DEVICE(0x07d1, 0x3c10) },
2003 + /* D-Link DWA 160 A2 */
2004 + { USB_DEVICE(0x07d1, 0x3a09) },
2005 /* Netgear WNDA3100 */
2006 { USB_DEVICE(0x0846, 0x9010) },
2007 /* Netgear WN111 v2 */
2008 diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
2009 index 94a1225..133df70 100644
2010 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c
2011 +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
2012 @@ -1666,6 +1666,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
2013 .valid_rx_ant = ANT_ABC,
2014 .need_pll_cfg = true,
2015 .ht_greenfield_support = true,
2016 + .use_rts_for_ht = true, /* use rts/cts protection */
2017 };
2018
2019 struct iwl_cfg iwl5100_bg_cfg = {
2020 @@ -1717,6 +1718,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
2021 .valid_rx_ant = ANT_AB,
2022 .need_pll_cfg = true,
2023 .ht_greenfield_support = true,
2024 + .use_rts_for_ht = true, /* use rts/cts protection */
2025 };
2026
2027 struct iwl_cfg iwl5350_agn_cfg = {
2028 @@ -1734,6 +1736,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
2029 .valid_rx_ant = ANT_ABC,
2030 .need_pll_cfg = true,
2031 .ht_greenfield_support = true,
2032 + .use_rts_for_ht = true, /* use rts/cts protection */
2033 };
2034
2035 struct iwl_cfg iwl5150_agn_cfg = {
2036 @@ -1751,6 +1754,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
2037 .valid_rx_ant = ANT_AB,
2038 .need_pll_cfg = true,
2039 .ht_greenfield_support = true,
2040 + .use_rts_for_ht = true, /* use rts/cts protection */
2041 };
2042
2043 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
2044 diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c
2045 index 62d15f6..0d91a8a 100644
2046 --- a/drivers/pci/pcie/aer/aer_inject.c
2047 +++ b/drivers/pci/pcie/aer/aer_inject.c
2048 @@ -392,8 +392,14 @@ static int aer_inject(struct aer_error_inj *einj)
2049 if (ret)
2050 goto out_put;
2051
2052 - if (find_aer_device(rpdev, &edev))
2053 + if (find_aer_device(rpdev, &edev)) {
2054 + if (!get_service_data(edev)) {
2055 + printk(KERN_WARNING "AER service is not initialized\n");
2056 + ret = -EINVAL;
2057 + goto out_put;
2058 + }
2059 aer_irq(-1, edev);
2060 + }
2061 else
2062 ret = -EINVAL;
2063 out_put:
2064 diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
2065 index cb1a027..dd58c6a 100644
2066 --- a/drivers/pci/setup-bus.c
2067 +++ b/drivers/pci/setup-bus.c
2068 @@ -142,7 +142,6 @@ static void pci_setup_bridge(struct pci_bus *bus)
2069 struct pci_dev *bridge = bus->self;
2070 struct pci_bus_region region;
2071 u32 l, bu, lu, io_upper16;
2072 - int pref_mem64;
2073
2074 if (pci_is_enabled(bridge))
2075 return;
2076 @@ -198,7 +197,6 @@ static void pci_setup_bridge(struct pci_bus *bus)
2077 pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, 0);
2078
2079 /* Set up PREF base/limit. */
2080 - pref_mem64 = 0;
2081 bu = lu = 0;
2082 pcibios_resource_to_bus(bridge, &region, bus->resource[2]);
2083 if (bus->resource[2]->flags & IORESOURCE_PREFETCH) {
2084 @@ -206,7 +204,6 @@ static void pci_setup_bridge(struct pci_bus *bus)
2085 l = (region.start >> 16) & 0xfff0;
2086 l |= region.end & 0xfff00000;
2087 if (bus->resource[2]->flags & IORESOURCE_MEM_64) {
2088 - pref_mem64 = 1;
2089 bu = upper_32_bits(region.start);
2090 lu = upper_32_bits(region.end);
2091 width = 16;
2092 @@ -221,11 +218,9 @@ static void pci_setup_bridge(struct pci_bus *bus)
2093 }
2094 pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l);
2095
2096 - if (pref_mem64) {
2097 - /* Set the upper 32 bits of PREF base & limit. */
2098 - pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, bu);
2099 - pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, lu);
2100 - }
2101 + /* Set the upper 32 bits of PREF base & limit. */
2102 + pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, bu);
2103 + pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, lu);
2104
2105 pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl);
2106 }
2107 diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
2108 index 2490b74..55f9973 100644
2109 --- a/drivers/s390/cio/device.c
2110 +++ b/drivers/s390/cio/device.c
2111 @@ -1292,7 +1292,7 @@ static int io_subchannel_probe(struct subchannel *sch)
2112 sch->private = kzalloc(sizeof(struct io_subchannel_private),
2113 GFP_KERNEL | GFP_DMA);
2114 if (!sch->private)
2115 - goto out_err;
2116 + goto out_schedule;
2117 /*
2118 * First check if a fitting device may be found amongst the
2119 * disconnected devices or in the orphanage.
2120 @@ -1317,7 +1317,7 @@ static int io_subchannel_probe(struct subchannel *sch)
2121 }
2122 cdev = io_subchannel_create_ccwdev(sch);
2123 if (IS_ERR(cdev))
2124 - goto out_err;
2125 + goto out_schedule;
2126 rc = io_subchannel_recog(cdev, sch);
2127 if (rc) {
2128 spin_lock_irqsave(sch->lock, flags);
2129 @@ -1325,9 +1325,7 @@ static int io_subchannel_probe(struct subchannel *sch)
2130 spin_unlock_irqrestore(sch->lock, flags);
2131 }
2132 return 0;
2133 -out_err:
2134 - kfree(sch->private);
2135 - sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group);
2136 +
2137 out_schedule:
2138 io_subchannel_schedule_removal(sch);
2139 return 0;
2140 @@ -1341,13 +1339,14 @@ io_subchannel_remove (struct subchannel *sch)
2141
2142 cdev = sch_get_cdev(sch);
2143 if (!cdev)
2144 - return 0;
2145 + goto out_free;
2146 /* Set ccw device to not operational and drop reference. */
2147 spin_lock_irqsave(cdev->ccwlock, flags);
2148 sch_set_cdev(sch, NULL);
2149 cdev->private->state = DEV_STATE_NOT_OPER;
2150 spin_unlock_irqrestore(cdev->ccwlock, flags);
2151 ccw_device_unregister(cdev);
2152 +out_free:
2153 kfree(sch->private);
2154 sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group);
2155 return 0;
2156 diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
2157 index b9613d7..13b703a 100644
2158 --- a/drivers/s390/cio/device_fsm.c
2159 +++ b/drivers/s390/cio/device_fsm.c
2160 @@ -1080,14 +1080,14 @@ void ccw_device_trigger_reprobe(struct ccw_device *cdev)
2161 ccw_device_start_id(cdev, 0);
2162 }
2163
2164 -static void
2165 -ccw_device_offline_irq(struct ccw_device *cdev, enum dev_event dev_event)
2166 +static void ccw_device_disabled_irq(struct ccw_device *cdev,
2167 + enum dev_event dev_event)
2168 {
2169 struct subchannel *sch;
2170
2171 sch = to_subchannel(cdev->dev.parent);
2172 /*
2173 - * An interrupt in state offline means a previous disable was not
2174 + * An interrupt in a disabled state means a previous disable was not
2175 * successful - should not happen, but we try to disable again.
2176 */
2177 cio_disable_subchannel(sch);
2178 @@ -1150,25 +1150,12 @@ ccw_device_nop(struct ccw_device *cdev, enum dev_event dev_event)
2179 }
2180
2181 /*
2182 - * Bug operation action.
2183 - */
2184 -static void
2185 -ccw_device_bug(struct ccw_device *cdev, enum dev_event dev_event)
2186 -{
2187 - CIO_MSG_EVENT(0, "Internal state [%i][%i] not handled for device "
2188 - "0.%x.%04x\n", cdev->private->state, dev_event,
2189 - cdev->private->dev_id.ssid,
2190 - cdev->private->dev_id.devno);
2191 - BUG();
2192 -}
2193 -
2194 -/*
2195 * device statemachine
2196 */
2197 fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = {
2198 [DEV_STATE_NOT_OPER] = {
2199 [DEV_EVENT_NOTOPER] = ccw_device_nop,
2200 - [DEV_EVENT_INTERRUPT] = ccw_device_bug,
2201 + [DEV_EVENT_INTERRUPT] = ccw_device_disabled_irq,
2202 [DEV_EVENT_TIMEOUT] = ccw_device_nop,
2203 [DEV_EVENT_VERIFY] = ccw_device_nop,
2204 },
2205 @@ -1186,7 +1173,7 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = {
2206 },
2207 [DEV_STATE_OFFLINE] = {
2208 [DEV_EVENT_NOTOPER] = ccw_device_generic_notoper,
2209 - [DEV_EVENT_INTERRUPT] = ccw_device_offline_irq,
2210 + [DEV_EVENT_INTERRUPT] = ccw_device_disabled_irq,
2211 [DEV_EVENT_TIMEOUT] = ccw_device_nop,
2212 [DEV_EVENT_VERIFY] = ccw_device_offline_verify,
2213 },
2214 @@ -1243,7 +1230,7 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = {
2215 [DEV_STATE_DISCONNECTED] = {
2216 [DEV_EVENT_NOTOPER] = ccw_device_nop,
2217 [DEV_EVENT_INTERRUPT] = ccw_device_start_id,
2218 - [DEV_EVENT_TIMEOUT] = ccw_device_bug,
2219 + [DEV_EVENT_TIMEOUT] = ccw_device_nop,
2220 [DEV_EVENT_VERIFY] = ccw_device_start_id,
2221 },
2222 [DEV_STATE_DISCONNECTED_SENSE_ID] = {
2223 diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
2224 index c84eadd..395c04c 100644
2225 --- a/drivers/s390/net/netiucv.c
2226 +++ b/drivers/s390/net/netiucv.c
2227 @@ -741,13 +741,13 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg)
2228 if (single_flag) {
2229 if ((skb = skb_dequeue(&conn->commit_queue))) {
2230 atomic_dec(&skb->users);
2231 - dev_kfree_skb_any(skb);
2232 if (privptr) {
2233 privptr->stats.tx_packets++;
2234 privptr->stats.tx_bytes +=
2235 (skb->len - NETIUCV_HDRLEN
2236 - - NETIUCV_HDRLEN);
2237 + - NETIUCV_HDRLEN);
2238 }
2239 + dev_kfree_skb_any(skb);
2240 }
2241 }
2242 conn->tx_buff->data = conn->tx_buff->head;
2243 diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c
2244 index 3ee1cbc..bfec4fa 100644
2245 --- a/drivers/scsi/device_handler/scsi_dh.c
2246 +++ b/drivers/scsi/device_handler/scsi_dh.c
2247 @@ -304,18 +304,15 @@ static int scsi_dh_notifier(struct notifier_block *nb,
2248 sdev = to_scsi_device(dev);
2249
2250 if (action == BUS_NOTIFY_ADD_DEVICE) {
2251 + err = device_create_file(dev, &scsi_dh_state_attr);
2252 + /* don't care about err */
2253 devinfo = device_handler_match(NULL, sdev);
2254 - if (!devinfo)
2255 - goto out;
2256 -
2257 - err = scsi_dh_handler_attach(sdev, devinfo);
2258 - if (!err)
2259 - err = device_create_file(dev, &scsi_dh_state_attr);
2260 + if (devinfo)
2261 + err = scsi_dh_handler_attach(sdev, devinfo);
2262 } else if (action == BUS_NOTIFY_DEL_DEVICE) {
2263 device_remove_file(dev, &scsi_dh_state_attr);
2264 scsi_dh_handler_detach(sdev, NULL);
2265 }
2266 -out:
2267 return err;
2268 }
2269
2270 diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
2271 index 704b8e0..70ab5d0 100644
2272 --- a/drivers/scsi/fcoe/fcoe.c
2273 +++ b/drivers/scsi/fcoe/fcoe.c
2274 @@ -137,7 +137,7 @@ static struct scsi_host_template fcoe_shost_template = {
2275 .change_queue_depth = fc_change_queue_depth,
2276 .change_queue_type = fc_change_queue_type,
2277 .this_id = -1,
2278 - .cmd_per_lun = 32,
2279 + .cmd_per_lun = 3,
2280 .can_queue = FCOE_MAX_OUTSTANDING_COMMANDS,
2281 .use_clustering = ENABLE_CLUSTERING,
2282 .sg_tablesize = SG_ALL,
2283 @@ -160,6 +160,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe,
2284 {
2285 struct fcoe_ctlr *fip = &fcoe->ctlr;
2286 struct netdev_hw_addr *ha;
2287 + struct net_device *real_dev;
2288 u8 flogi_maddr[ETH_ALEN];
2289
2290 fcoe->netdev = netdev;
2291 @@ -173,10 +174,12 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe,
2292
2293 /* look for SAN MAC address, if multiple SAN MACs exist, only
2294 * use the first one for SPMA */
2295 + real_dev = (netdev->priv_flags & IFF_802_1Q_VLAN) ?
2296 + vlan_dev_real_dev(netdev) : netdev;
2297 rcu_read_lock();
2298 - for_each_dev_addr(netdev, ha) {
2299 + for_each_dev_addr(real_dev, ha) {
2300 if ((ha->type == NETDEV_HW_ADDR_T_SAN) &&
2301 - (is_valid_ether_addr(fip->ctl_src_addr))) {
2302 + (is_valid_ether_addr(ha->addr))) {
2303 memcpy(fip->ctl_src_addr, ha->addr, ETH_ALEN);
2304 fip->spma = 1;
2305 break;
2306 @@ -664,7 +667,7 @@ static int fcoe_ddp_setup(struct fc_lport *lp, u16 xid,
2307 {
2308 struct net_device *n = fcoe_netdev(lp);
2309
2310 - if (n->netdev_ops && n->netdev_ops->ndo_fcoe_ddp_setup)
2311 + if (n->netdev_ops->ndo_fcoe_ddp_setup)
2312 return n->netdev_ops->ndo_fcoe_ddp_setup(n, xid, sgl, sgc);
2313
2314 return 0;
2315 @@ -681,7 +684,7 @@ static int fcoe_ddp_done(struct fc_lport *lp, u16 xid)
2316 {
2317 struct net_device *n = fcoe_netdev(lp);
2318
2319 - if (n->netdev_ops && n->netdev_ops->ndo_fcoe_ddp_done)
2320 + if (n->netdev_ops->ndo_fcoe_ddp_done)
2321 return n->netdev_ops->ndo_fcoe_ddp_done(n, xid);
2322 return 0;
2323 }
2324 @@ -1631,7 +1634,7 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp)
2325 {
2326 struct fcoe_interface *fcoe;
2327 struct net_device *netdev;
2328 - int rc;
2329 + int rc = 0;
2330
2331 mutex_lock(&fcoe_config_mutex);
2332 #ifdef CONFIG_FCOE_MODULE
2333 diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
2334 index c48799e..d4cb3f9 100644
2335 --- a/drivers/scsi/libfc/fc_disc.c
2336 +++ b/drivers/scsi/libfc/fc_disc.c
2337 @@ -371,7 +371,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc)
2338 disc, lport->e_d_tov))
2339 return;
2340 err:
2341 - fc_disc_error(disc, fp);
2342 + fc_disc_error(disc, NULL);
2343 }
2344
2345 /**
2346 diff --git a/drivers/scsi/libfc/fc_elsct.c b/drivers/scsi/libfc/fc_elsct.c
2347 index 5cfa687..9298458 100644
2348 --- a/drivers/scsi/libfc/fc_elsct.c
2349 +++ b/drivers/scsi/libfc/fc_elsct.c
2350 @@ -53,8 +53,10 @@ static struct fc_seq *fc_elsct_send(struct fc_lport *lport,
2351 did = FC_FID_DIR_SERV;
2352 }
2353
2354 - if (rc)
2355 + if (rc) {
2356 + fc_frame_free(fp);
2357 return NULL;
2358 + }
2359
2360 fc_fill_fc_hdr(fp, r_ctl, did, fc_host_port_id(lport->host), fh_type,
2361 FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0);
2362 diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
2363 index 59a4408..7a14402 100644
2364 --- a/drivers/scsi/libfc/fc_fcp.c
2365 +++ b/drivers/scsi/libfc/fc_fcp.c
2366 @@ -302,10 +302,13 @@ static void fc_fcp_ddp_done(struct fc_fcp_pkt *fsp)
2367 if (!fsp)
2368 return;
2369
2370 + if (fsp->xfer_ddp == FC_XID_UNKNOWN)
2371 + return;
2372 +
2373 lp = fsp->lp;
2374 - if (fsp->xfer_ddp && lp->tt.ddp_done) {
2375 + if (lp->tt.ddp_done) {
2376 fsp->xfer_len = lp->tt.ddp_done(lp, fsp->xfer_ddp);
2377 - fsp->xfer_ddp = 0;
2378 + fsp->xfer_ddp = FC_XID_UNKNOWN;
2379 }
2380 }
2381
2382 @@ -572,7 +575,8 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq,
2383 tlen -= sg_bytes;
2384 remaining -= sg_bytes;
2385
2386 - if (tlen)
2387 + if ((skb_shinfo(fp_skb(fp))->nr_frags < FC_FRAME_SG_LEN) &&
2388 + (tlen))
2389 continue;
2390
2391 /*
2392 @@ -1048,7 +1052,6 @@ static int fc_fcp_cmd_send(struct fc_lport *lp, struct fc_fcp_pkt *fsp,
2393
2394 seq = lp->tt.exch_seq_send(lp, fp, resp, fc_fcp_pkt_destroy, fsp, 0);
2395 if (!seq) {
2396 - fc_frame_free(fp);
2397 rc = -1;
2398 goto unlock;
2399 }
2400 @@ -1313,7 +1316,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt *fsp)
2401 fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */
2402 return;
2403 }
2404 - fc_frame_free(fp);
2405 retry:
2406 if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY)
2407 fc_fcp_timer_set(fsp, FC_SCSI_REC_TOV);
2408 @@ -1561,10 +1563,9 @@ static void fc_fcp_srr(struct fc_fcp_pkt *fsp, enum fc_rctl r_ctl, u32 offset)
2409
2410 seq = lp->tt.exch_seq_send(lp, fp, fc_fcp_srr_resp, NULL,
2411 fsp, jiffies_to_msecs(FC_SCSI_REC_TOV));
2412 - if (!seq) {
2413 - fc_frame_free(fp);
2414 + if (!seq)
2415 goto retry;
2416 - }
2417 +
2418 fsp->recov_seq = seq;
2419 fsp->xfer_len = offset;
2420 fsp->xfer_contig_end = offset;
2421 @@ -1708,6 +1709,7 @@ int fc_queuecommand(struct scsi_cmnd *sc_cmd, void (*done)(struct scsi_cmnd *))
2422 fsp->cmd = sc_cmd; /* save the cmd */
2423 fsp->lp = lp; /* save the softc ptr */
2424 fsp->rport = rport; /* set the remote port ptr */
2425 + fsp->xfer_ddp = FC_XID_UNKNOWN;
2426 sc_cmd->scsi_done = done;
2427
2428 /*
2429 @@ -1846,7 +1848,8 @@ static void fc_io_compl(struct fc_fcp_pkt *fsp)
2430 * scsi status is good but transport level
2431 * underrun.
2432 */
2433 - sc_cmd->result = DID_OK << 16;
2434 + sc_cmd->result = (fsp->state & FC_SRB_RCV_STATUS ?
2435 + DID_OK : DID_ERROR) << 16;
2436 } else {
2437 /*
2438 * scsi got underrun, this is an error
2439 @@ -2046,18 +2049,16 @@ EXPORT_SYMBOL(fc_eh_host_reset);
2440 int fc_slave_alloc(struct scsi_device *sdev)
2441 {
2442 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
2443 - int queue_depth;
2444
2445 if (!rport || fc_remote_port_chkready(rport))
2446 return -ENXIO;
2447
2448 - if (sdev->tagged_supported) {
2449 - if (sdev->host->hostt->cmd_per_lun)
2450 - queue_depth = sdev->host->hostt->cmd_per_lun;
2451 - else
2452 - queue_depth = FC_FCP_DFLT_QUEUE_DEPTH;
2453 - scsi_activate_tcq(sdev, queue_depth);
2454 - }
2455 + if (sdev->tagged_supported)
2456 + scsi_activate_tcq(sdev, FC_FCP_DFLT_QUEUE_DEPTH);
2457 + else
2458 + scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev),
2459 + FC_FCP_DFLT_QUEUE_DEPTH);
2460 +
2461 return 0;
2462 }
2463 EXPORT_SYMBOL(fc_slave_alloc);
2464 diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
2465 index bd2f771..536492a 100644
2466 --- a/drivers/scsi/libfc/fc_lport.c
2467 +++ b/drivers/scsi/libfc/fc_lport.c
2468 @@ -329,7 +329,7 @@ static void fc_lport_add_fc4_type(struct fc_lport *lport, enum fc_fh_type type)
2469 * @sp: current sequence in the RLIR exchange
2470 * @fp: RLIR request frame
2471 *
2472 - * Locking Note: The lport lock is exected to be held before calling
2473 + * Locking Note: The lport lock is expected to be held before calling
2474 * this function.
2475 */
2476 static void fc_lport_recv_rlir_req(struct fc_seq *sp, struct fc_frame *fp,
2477 @@ -348,7 +348,7 @@ static void fc_lport_recv_rlir_req(struct fc_seq *sp, struct fc_frame *fp,
2478 * @sp: current sequence in the ECHO exchange
2479 * @fp: ECHO request frame
2480 *
2481 - * Locking Note: The lport lock is exected to be held before calling
2482 + * Locking Note: The lport lock is expected to be held before calling
2483 * this function.
2484 */
2485 static void fc_lport_recv_echo_req(struct fc_seq *sp, struct fc_frame *in_fp,
2486 @@ -361,7 +361,7 @@ static void fc_lport_recv_echo_req(struct fc_seq *sp, struct fc_frame *in_fp,
2487 void *dp;
2488 u32 f_ctl;
2489
2490 - FC_LPORT_DBG(lport, "Received RLIR request while in state %s\n",
2491 + FC_LPORT_DBG(lport, "Received ECHO request while in state %s\n",
2492 fc_lport_state(lport));
2493
2494 len = fr_len(in_fp) - sizeof(struct fc_frame_header);
2495 @@ -374,7 +374,7 @@ static void fc_lport_recv_echo_req(struct fc_seq *sp, struct fc_frame *in_fp,
2496 if (fp) {
2497 dp = fc_frame_payload_get(fp, len);
2498 memcpy(dp, pp, len);
2499 - *((u32 *)dp) = htonl(ELS_LS_ACC << 24);
2500 + *((__be32 *)dp) = htonl(ELS_LS_ACC << 24);
2501 sp = lport->tt.seq_start_next(sp);
2502 f_ctl = FC_FC_EX_CTX | FC_FC_LAST_SEQ | FC_FC_END_SEQ;
2503 fc_fill_fc_hdr(fp, FC_RCTL_ELS_REP, ep->did, ep->sid,
2504 @@ -385,12 +385,12 @@ static void fc_lport_recv_echo_req(struct fc_seq *sp, struct fc_frame *in_fp,
2505 }
2506
2507 /**
2508 - * fc_lport_recv_echo_req() - Handle received Request Node ID data request
2509 - * @lport: Fibre Channel local port recieving the RNID
2510 - * @sp: current sequence in the RNID exchange
2511 - * @fp: RNID request frame
2512 + * fc_lport_recv_rnid_req() - Handle received Request Node ID data request
2513 + * @sp: The sequence in the RNID exchange
2514 + * @fp: The RNID request frame
2515 + * @lport: The local port recieving the RNID
2516 *
2517 - * Locking Note: The lport lock is exected to be held before calling
2518 + * Locking Note: The lport lock is expected to be held before calling
2519 * this function.
2520 */
2521 static void fc_lport_recv_rnid_req(struct fc_seq *sp, struct fc_frame *in_fp,
2522 @@ -667,7 +667,7 @@ static void fc_lport_enter_ready(struct fc_lport *lport)
2523 * Accept it with the common service parameters indicating our N port.
2524 * Set up to do a PLOGI if we have the higher-number WWPN.
2525 *
2526 - * Locking Note: The lport lock is exected to be held before calling
2527 + * Locking Note: The lport lock is expected to be held before calling
2528 * this function.
2529 */
2530 static void fc_lport_recv_flogi_req(struct fc_seq *sp_in,
2531 @@ -1115,7 +1115,7 @@ static void fc_lport_enter_scr(struct fc_lport *lport)
2532
2533 if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR,
2534 fc_lport_scr_resp, lport, lport->e_d_tov))
2535 - fc_lport_error(lport, fp);
2536 + fc_lport_error(lport, NULL);
2537 }
2538
2539 /**
2540 @@ -1186,7 +1186,7 @@ static void fc_lport_enter_rpn_id(struct fc_lport *lport)
2541 if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, FC_NS_RPN_ID,
2542 fc_lport_rpn_id_resp,
2543 lport, lport->e_d_tov))
2544 - fc_lport_error(lport, fp);
2545 + fc_lport_error(lport, NULL);
2546 }
2547
2548 static struct fc_rport_operations fc_lport_rport_ops = {
2549 @@ -1237,10 +1237,13 @@ static void fc_lport_timeout(struct work_struct *work)
2550
2551 switch (lport->state) {
2552 case LPORT_ST_DISABLED:
2553 + WARN_ON(1);
2554 + break;
2555 case LPORT_ST_READY:
2556 - case LPORT_ST_RESET:
2557 WARN_ON(1);
2558 break;
2559 + case LPORT_ST_RESET:
2560 + break;
2561 case LPORT_ST_FLOGI:
2562 fc_lport_enter_flogi(lport);
2563 break;
2564 @@ -1337,7 +1340,7 @@ static void fc_lport_enter_logo(struct fc_lport *lport)
2565
2566 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO,
2567 fc_lport_logo_resp, lport, lport->e_d_tov))
2568 - fc_lport_error(lport, fp);
2569 + fc_lport_error(lport, NULL);
2570 }
2571
2572 /**
2573 @@ -1453,7 +1456,7 @@ void fc_lport_enter_flogi(struct fc_lport *lport)
2574
2575 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_FLOGI,
2576 fc_lport_flogi_resp, lport, lport->e_d_tov))
2577 - fc_lport_error(lport, fp);
2578 + fc_lport_error(lport, NULL);
2579 }
2580
2581 /* Configure a fc_lport */
2582 diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
2583 index 03ea674..ff558a6 100644
2584 --- a/drivers/scsi/libfc/fc_rport.c
2585 +++ b/drivers/scsi/libfc/fc_rport.c
2586 @@ -86,6 +86,7 @@ static const char *fc_rport_state_names[] = {
2587 [RPORT_ST_LOGO] = "LOGO",
2588 [RPORT_ST_ADISC] = "ADISC",
2589 [RPORT_ST_DELETE] = "Delete",
2590 + [RPORT_ST_RESTART] = "Restart",
2591 };
2592
2593 /**
2594 @@ -99,8 +100,7 @@ static struct fc_rport_priv *fc_rport_lookup(const struct fc_lport *lport,
2595 struct fc_rport_priv *rdata;
2596
2597 list_for_each_entry(rdata, &lport->disc.rports, peers)
2598 - if (rdata->ids.port_id == port_id &&
2599 - rdata->rp_state != RPORT_ST_DELETE)
2600 + if (rdata->ids.port_id == port_id)
2601 return rdata;
2602 return NULL;
2603 }
2604 @@ -235,6 +235,7 @@ static void fc_rport_work(struct work_struct *work)
2605 struct fc_rport_operations *rport_ops;
2606 struct fc_rport_identifiers ids;
2607 struct fc_rport *rport;
2608 + int restart = 0;
2609
2610 mutex_lock(&rdata->rp_mutex);
2611 event = rdata->event;
2612 @@ -287,8 +288,20 @@ static void fc_rport_work(struct work_struct *work)
2613 mutex_unlock(&rdata->rp_mutex);
2614
2615 if (port_id != FC_FID_DIR_SERV) {
2616 + /*
2617 + * We must drop rp_mutex before taking disc_mutex.
2618 + * Re-evaluate state to allow for restart.
2619 + * A transition to RESTART state must only happen
2620 + * while disc_mutex is held and rdata is on the list.
2621 + */
2622 mutex_lock(&lport->disc.disc_mutex);
2623 - list_del(&rdata->peers);
2624 + mutex_lock(&rdata->rp_mutex);
2625 + if (rdata->rp_state == RPORT_ST_RESTART)
2626 + restart = 1;
2627 + else
2628 + list_del(&rdata->peers);
2629 + rdata->event = RPORT_EV_NONE;
2630 + mutex_unlock(&rdata->rp_mutex);
2631 mutex_unlock(&lport->disc.disc_mutex);
2632 }
2633
2634 @@ -312,7 +325,13 @@ static void fc_rport_work(struct work_struct *work)
2635 mutex_unlock(&rdata->rp_mutex);
2636 fc_remote_port_delete(rport);
2637 }
2638 - kref_put(&rdata->kref, lport->tt.rport_destroy);
2639 + if (restart) {
2640 + mutex_lock(&rdata->rp_mutex);
2641 + FC_RPORT_DBG(rdata, "work restart\n");
2642 + fc_rport_enter_plogi(rdata);
2643 + mutex_unlock(&rdata->rp_mutex);
2644 + } else
2645 + kref_put(&rdata->kref, lport->tt.rport_destroy);
2646 break;
2647
2648 default:
2649 @@ -342,6 +361,12 @@ int fc_rport_login(struct fc_rport_priv *rdata)
2650 FC_RPORT_DBG(rdata, "ADISC port\n");
2651 fc_rport_enter_adisc(rdata);
2652 break;
2653 + case RPORT_ST_RESTART:
2654 + break;
2655 + case RPORT_ST_DELETE:
2656 + FC_RPORT_DBG(rdata, "Restart deleted port\n");
2657 + fc_rport_state_enter(rdata, RPORT_ST_RESTART);
2658 + break;
2659 default:
2660 FC_RPORT_DBG(rdata, "Login to port\n");
2661 fc_rport_enter_plogi(rdata);
2662 @@ -397,20 +422,21 @@ int fc_rport_logoff(struct fc_rport_priv *rdata)
2663
2664 if (rdata->rp_state == RPORT_ST_DELETE) {
2665 FC_RPORT_DBG(rdata, "Port in Delete state, not removing\n");
2666 - mutex_unlock(&rdata->rp_mutex);
2667 goto out;
2668 }
2669
2670 - fc_rport_enter_logo(rdata);
2671 + if (rdata->rp_state == RPORT_ST_RESTART)
2672 + FC_RPORT_DBG(rdata, "Port in Restart state, deleting\n");
2673 + else
2674 + fc_rport_enter_logo(rdata);
2675
2676 /*
2677 * Change the state to Delete so that we discard
2678 * the response.
2679 */
2680 fc_rport_enter_delete(rdata, RPORT_EV_STOP);
2681 - mutex_unlock(&rdata->rp_mutex);
2682 -
2683 out:
2684 + mutex_unlock(&rdata->rp_mutex);
2685 return 0;
2686 }
2687
2688 @@ -466,6 +492,7 @@ static void fc_rport_timeout(struct work_struct *work)
2689 case RPORT_ST_READY:
2690 case RPORT_ST_INIT:
2691 case RPORT_ST_DELETE:
2692 + case RPORT_ST_RESTART:
2693 break;
2694 }
2695
2696 @@ -499,6 +526,7 @@ static void fc_rport_error(struct fc_rport_priv *rdata, struct fc_frame *fp)
2697 fc_rport_enter_logo(rdata);
2698 break;
2699 case RPORT_ST_DELETE:
2700 + case RPORT_ST_RESTART:
2701 case RPORT_ST_READY:
2702 case RPORT_ST_INIT:
2703 break;
2704 @@ -632,7 +660,7 @@ static void fc_rport_enter_plogi(struct fc_rport_priv *rdata)
2705
2706 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI,
2707 fc_rport_plogi_resp, rdata, lport->e_d_tov))
2708 - fc_rport_error_retry(rdata, fp);
2709 + fc_rport_error_retry(rdata, NULL);
2710 else
2711 kref_get(&rdata->kref);
2712 }
2713 @@ -793,7 +821,7 @@ static void fc_rport_enter_prli(struct fc_rport_priv *rdata)
2714
2715 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PRLI,
2716 fc_rport_prli_resp, rdata, lport->e_d_tov))
2717 - fc_rport_error_retry(rdata, fp);
2718 + fc_rport_error_retry(rdata, NULL);
2719 else
2720 kref_get(&rdata->kref);
2721 }
2722 @@ -889,7 +917,7 @@ static void fc_rport_enter_rtv(struct fc_rport_priv *rdata)
2723
2724 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV,
2725 fc_rport_rtv_resp, rdata, lport->e_d_tov))
2726 - fc_rport_error_retry(rdata, fp);
2727 + fc_rport_error_retry(rdata, NULL);
2728 else
2729 kref_get(&rdata->kref);
2730 }
2731 @@ -919,7 +947,7 @@ static void fc_rport_enter_logo(struct fc_rport_priv *rdata)
2732
2733 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO,
2734 fc_rport_logo_resp, rdata, lport->e_d_tov))
2735 - fc_rport_error_retry(rdata, fp);
2736 + fc_rport_error_retry(rdata, NULL);
2737 else
2738 kref_get(&rdata->kref);
2739 }
2740 @@ -1006,7 +1034,7 @@ static void fc_rport_enter_adisc(struct fc_rport_priv *rdata)
2741 }
2742 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC,
2743 fc_rport_adisc_resp, rdata, lport->e_d_tov))
2744 - fc_rport_error_retry(rdata, fp);
2745 + fc_rport_error_retry(rdata, NULL);
2746 else
2747 kref_get(&rdata->kref);
2748 }
2749 @@ -1248,6 +1276,7 @@ static void fc_rport_recv_plogi_req(struct fc_lport *lport,
2750 }
2751 break;
2752 case RPORT_ST_PRLI:
2753 + case RPORT_ST_RTV:
2754 case RPORT_ST_READY:
2755 case RPORT_ST_ADISC:
2756 FC_RPORT_DBG(rdata, "Received PLOGI in logged-in state %d "
2757 @@ -1255,11 +1284,14 @@ static void fc_rport_recv_plogi_req(struct fc_lport *lport,
2758 /* XXX TBD - should reset */
2759 break;
2760 case RPORT_ST_DELETE:
2761 - default:
2762 - FC_RPORT_DBG(rdata, "Received PLOGI in unexpected state %d\n",
2763 - rdata->rp_state);
2764 - fc_frame_free(rx_fp);
2765 - goto out;
2766 + case RPORT_ST_LOGO:
2767 + case RPORT_ST_RESTART:
2768 + FC_RPORT_DBG(rdata, "Received PLOGI in state %s - send busy\n",
2769 + fc_rport_state(rdata));
2770 + mutex_unlock(&rdata->rp_mutex);
2771 + rjt_data.reason = ELS_RJT_BUSY;
2772 + rjt_data.explan = ELS_EXPL_NONE;
2773 + goto reject;
2774 }
2775
2776 /*
2777 @@ -1402,7 +1434,7 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
2778 break;
2779 case FC_TYPE_FCP:
2780 fcp_parm = ntohl(rspp->spp_params);
2781 - if (fcp_parm * FCP_SPPF_RETRY)
2782 + if (fcp_parm & FCP_SPPF_RETRY)
2783 rdata->flags |= FC_RP_FLAGS_RETRY;
2784 rdata->supported_classes = FC_COS_CLASS3;
2785 if (fcp_parm & FCP_SPPF_INIT_FCN)
2786 @@ -1510,14 +1542,14 @@ static void fc_rport_recv_logo_req(struct fc_lport *lport,
2787 FC_RPORT_DBG(rdata, "Received LOGO request while in state %s\n",
2788 fc_rport_state(rdata));
2789
2790 + fc_rport_enter_delete(rdata, RPORT_EV_LOGO);
2791 +
2792 /*
2793 - * If the remote port was created due to discovery,
2794 - * log back in. It may have seen a stale RSCN about us.
2795 + * If the remote port was created due to discovery, set state
2796 + * to log back in. It may have seen a stale RSCN about us.
2797 */
2798 - if (rdata->rp_state != RPORT_ST_DELETE && rdata->disc_id)
2799 - fc_rport_enter_plogi(rdata);
2800 - else
2801 - fc_rport_enter_delete(rdata, RPORT_EV_LOGO);
2802 + if (rdata->disc_id)
2803 + fc_rport_state_enter(rdata, RPORT_ST_RESTART);
2804 mutex_unlock(&rdata->rp_mutex);
2805 } else
2806 FC_RPORT_ID_DBG(lport, sid,
2807 diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
2808 index f913f1e..549bc7d 100644
2809 --- a/drivers/scsi/lpfc/lpfc_init.c
2810 +++ b/drivers/scsi/lpfc/lpfc_init.c
2811 @@ -4384,9 +4384,13 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba *phba)
2812 pdev = phba->pcidev;
2813
2814 /* Set the device DMA mask size */
2815 - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0)
2816 - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
2817 + if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0
2818 + || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(64)) != 0) {
2819 + if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0
2820 + || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(32)) != 0) {
2821 return error;
2822 + }
2823 + }
2824
2825 /* Get the bus address of Bar0 and Bar2 and the number of bytes
2826 * required by each mapping.
2827 @@ -5940,9 +5944,13 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
2828 pdev = phba->pcidev;
2829
2830 /* Set the device DMA mask size */
2831 - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0)
2832 - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
2833 + if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0
2834 + || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(64)) != 0) {
2835 + if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0
2836 + || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(32)) != 0) {
2837 return error;
2838 + }
2839 + }
2840
2841 /* Get the bus address of SLI4 device Bar0, Bar1, and Bar2 and the
2842 * number of bytes required by each mapping. They are actually
2843 diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h
2844 index ab47c46..5af66db 100644
2845 --- a/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h
2846 +++ b/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h
2847 @@ -348,6 +348,14 @@ typedef struct _MPI2_CONFIG_REPLY
2848 #define MPI2_MFGPAGE_DEVID_SAS2108_3 (0x0077)
2849 #define MPI2_MFGPAGE_DEVID_SAS2116_1 (0x0064)
2850 #define MPI2_MFGPAGE_DEVID_SAS2116_2 (0x0065)
2851 +#define MPI2_MFGPAGE_DEVID_SAS2208_1 (0x0080)
2852 +#define MPI2_MFGPAGE_DEVID_SAS2208_2 (0x0081)
2853 +#define MPI2_MFGPAGE_DEVID_SAS2208_3 (0x0082)
2854 +#define MPI2_MFGPAGE_DEVID_SAS2208_4 (0x0083)
2855 +#define MPI2_MFGPAGE_DEVID_SAS2208_5 (0x0084)
2856 +#define MPI2_MFGPAGE_DEVID_SAS2208_6 (0x0085)
2857 +#define MPI2_MFGPAGE_DEVID_SAS2208_7 (0x0086)
2858 +#define MPI2_MFGPAGE_DEVID_SAS2208_8 (0x0087)
2859
2860
2861 /* Manufacturing Page 0 */
2862 diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
2863 index 86ab32d..1743640 100644
2864 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
2865 +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
2866 @@ -196,10 +196,28 @@ static struct pci_device_id scsih_pci_table[] = {
2867 PCI_ANY_ID, PCI_ANY_ID },
2868 { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_3,
2869 PCI_ANY_ID, PCI_ANY_ID },
2870 + /* Meteor ~ 2116 */
2871 { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2116_1,
2872 PCI_ANY_ID, PCI_ANY_ID },
2873 { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2116_2,
2874 PCI_ANY_ID, PCI_ANY_ID },
2875 + /* Thunderbolt ~ 2208 */
2876 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_1,
2877 + PCI_ANY_ID, PCI_ANY_ID },
2878 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_2,
2879 + PCI_ANY_ID, PCI_ANY_ID },
2880 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_3,
2881 + PCI_ANY_ID, PCI_ANY_ID },
2882 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_4,
2883 + PCI_ANY_ID, PCI_ANY_ID },
2884 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_5,
2885 + PCI_ANY_ID, PCI_ANY_ID },
2886 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_6,
2887 + PCI_ANY_ID, PCI_ANY_ID },
2888 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_7,
2889 + PCI_ANY_ID, PCI_ANY_ID },
2890 + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_8,
2891 + PCI_ANY_ID, PCI_ANY_ID },
2892 {0} /* Terminating entry */
2893 };
2894 MODULE_DEVICE_TABLE(pci, scsih_pci_table);
2895 diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
2896 index 93c2622..802e91c 100644
2897 --- a/drivers/scsi/scsi_devinfo.c
2898 +++ b/drivers/scsi/scsi_devinfo.c
2899 @@ -168,11 +168,10 @@ static struct {
2900 {"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN | BLIST_INQUIRY_36},
2901 {"Generic", "USB Storage-SMC", "0180", BLIST_FORCELUN | BLIST_INQUIRY_36},
2902 {"Generic", "USB Storage-SMC", "0207", BLIST_FORCELUN | BLIST_INQUIRY_36},
2903 - {"HITACHI", "DF400", "*", BLIST_SPARSELUN},
2904 - {"HITACHI", "DF500", "*", BLIST_SPARSELUN},
2905 - {"HITACHI", "DF600", "*", BLIST_SPARSELUN},
2906 - {"HITACHI", "DISK-SUBSYSTEM", "*", BLIST_ATTACH_PQ3 | BLIST_SPARSELUN | BLIST_LARGELUN},
2907 - {"HITACHI", "OPEN-E", "*", BLIST_ATTACH_PQ3 | BLIST_SPARSELUN | BLIST_LARGELUN},
2908 + {"HITACHI", "DF400", "*", BLIST_REPORTLUN2},
2909 + {"HITACHI", "DF500", "*", BLIST_REPORTLUN2},
2910 + {"HITACHI", "DISK-SUBSYSTEM", "*", BLIST_REPORTLUN2},
2911 + {"HITACHI", "OPEN-", "*", BLIST_REPORTLUN2},
2912 {"HITACHI", "OP-C-", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
2913 {"HITACHI", "3380-", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
2914 {"HITACHI", "3390-", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
2915 diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
2916 index 45be82f..bf52dec 100644
2917 --- a/drivers/scsi/scsi_transport_fc.c
2918 +++ b/drivers/scsi/scsi_transport_fc.c
2919 @@ -2395,6 +2395,7 @@ fc_rport_final_delete(struct work_struct *work)
2920 struct Scsi_Host *shost = rport_to_shost(rport);
2921 struct fc_internal *i = to_fc_internal(shost->transportt);
2922 unsigned long flags;
2923 + int do_callback = 0;
2924
2925 /*
2926 * if a scan is pending, flush the SCSI Host work_q so that
2927 @@ -2433,8 +2434,15 @@ fc_rport_final_delete(struct work_struct *work)
2928 * Avoid this call if we already called it when we preserved the
2929 * rport for the binding.
2930 */
2931 + spin_lock_irqsave(shost->host_lock, flags);
2932 if (!(rport->flags & FC_RPORT_DEVLOSS_CALLBK_DONE) &&
2933 - (i->f->dev_loss_tmo_callbk))
2934 + (i->f->dev_loss_tmo_callbk)) {
2935 + rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE;
2936 + do_callback = 1;
2937 + }
2938 + spin_unlock_irqrestore(shost->host_lock, flags);
2939 +
2940 + if (do_callback)
2941 i->f->dev_loss_tmo_callbk(rport);
2942
2943 fc_bsg_remove(rport->rqst_q);
2944 @@ -2981,6 +2989,7 @@ fc_timeout_deleted_rport(struct work_struct *work)
2945 struct fc_internal *i = to_fc_internal(shost->transportt);
2946 struct fc_host_attrs *fc_host = shost_to_fc_host(shost);
2947 unsigned long flags;
2948 + int do_callback = 0;
2949
2950 spin_lock_irqsave(shost->host_lock, flags);
2951
2952 @@ -3046,7 +3055,6 @@ fc_timeout_deleted_rport(struct work_struct *work)
2953 rport->roles = FC_PORT_ROLE_UNKNOWN;
2954 rport->port_state = FC_PORTSTATE_NOTPRESENT;
2955 rport->flags &= ~FC_RPORT_FAST_FAIL_TIMEDOUT;
2956 - rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE;
2957
2958 /*
2959 * Pre-emptively kill I/O rather than waiting for the work queue
2960 @@ -3056,32 +3064,40 @@ fc_timeout_deleted_rport(struct work_struct *work)
2961 spin_unlock_irqrestore(shost->host_lock, flags);
2962 fc_terminate_rport_io(rport);
2963
2964 - BUG_ON(rport->port_state != FC_PORTSTATE_NOTPRESENT);
2965 + spin_lock_irqsave(shost->host_lock, flags);
2966
2967 - /* remove the identifiers that aren't used in the consisting binding */
2968 - switch (fc_host->tgtid_bind_type) {
2969 - case FC_TGTID_BIND_BY_WWPN:
2970 - rport->node_name = -1;
2971 - rport->port_id = -1;
2972 - break;
2973 - case FC_TGTID_BIND_BY_WWNN:
2974 - rport->port_name = -1;
2975 - rport->port_id = -1;
2976 - break;
2977 - case FC_TGTID_BIND_BY_ID:
2978 - rport->node_name = -1;
2979 - rport->port_name = -1;
2980 - break;
2981 - case FC_TGTID_BIND_NONE: /* to keep compiler happy */
2982 - break;
2983 + if (rport->port_state == FC_PORTSTATE_NOTPRESENT) { /* still missing */
2984 +
2985 + /* remove the identifiers that aren't used in the consisting binding */
2986 + switch (fc_host->tgtid_bind_type) {
2987 + case FC_TGTID_BIND_BY_WWPN:
2988 + rport->node_name = -1;
2989 + rport->port_id = -1;
2990 + break;
2991 + case FC_TGTID_BIND_BY_WWNN:
2992 + rport->port_name = -1;
2993 + rport->port_id = -1;
2994 + break;
2995 + case FC_TGTID_BIND_BY_ID:
2996 + rport->node_name = -1;
2997 + rport->port_name = -1;
2998 + break;
2999 + case FC_TGTID_BIND_NONE: /* to keep compiler happy */
3000 + break;
3001 + }
3002 +
3003 + /*
3004 + * As this only occurs if the remote port (scsi target)
3005 + * went away and didn't come back - we'll remove
3006 + * all attached scsi devices.
3007 + */
3008 + rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE;
3009 + fc_queue_work(shost, &rport->stgt_delete_work);
3010 +
3011 + do_callback = 1;
3012 }
3013
3014 - /*
3015 - * As this only occurs if the remote port (scsi target)
3016 - * went away and didn't come back - we'll remove
3017 - * all attached scsi devices.
3018 - */
3019 - fc_queue_work(shost, &rport->stgt_delete_work);
3020 + spin_unlock_irqrestore(shost->host_lock, flags);
3021
3022 /*
3023 * Notify the driver that the rport is now dead. The LLDD will
3024 @@ -3089,7 +3105,7 @@ fc_timeout_deleted_rport(struct work_struct *work)
3025 *
3026 * Note: we set the CALLBK_DONE flag above to correspond
3027 */
3028 - if (i->f->dev_loss_tmo_callbk)
3029 + if (do_callback && i->f->dev_loss_tmo_callbk)
3030 i->f->dev_loss_tmo_callbk(rport);
3031 }
3032
3033 diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
3034 index ad897df..de2f8c4 100644
3035 --- a/drivers/scsi/scsi_transport_iscsi.c
3036 +++ b/drivers/scsi/scsi_transport_iscsi.c
3037 @@ -627,8 +627,10 @@ static void __iscsi_block_session(struct work_struct *work)
3038 spin_unlock_irqrestore(&session->lock, flags);
3039 scsi_target_block(&session->dev);
3040 ISCSI_DBG_TRANS_SESSION(session, "Completed SCSI target blocking\n");
3041 - queue_delayed_work(iscsi_eh_timer_workq, &session->recovery_work,
3042 - session->recovery_tmo * HZ);
3043 + if (session->recovery_tmo >= 0)
3044 + queue_delayed_work(iscsi_eh_timer_workq,
3045 + &session->recovery_work,
3046 + session->recovery_tmo * HZ);
3047 }
3048
3049 void iscsi_block_session(struct iscsi_cls_session *session)
3050 @@ -1348,8 +1350,7 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
3051 switch (ev->u.set_param.param) {
3052 case ISCSI_PARAM_SESS_RECOVERY_TMO:
3053 sscanf(data, "%d", &value);
3054 - if (value != 0)
3055 - session->recovery_tmo = value;
3056 + session->recovery_tmo = value;
3057 break;
3058 default:
3059 err = transport->set_param(conn, ev->u.set_param.param,
3060 diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
3061 index ebcc6d0..13a1b39 100644
3062 --- a/drivers/usb/serial/ftdi_sio.c
3063 +++ b/drivers/usb/serial/ftdi_sio.c
3064 @@ -598,6 +598,20 @@ static struct usb_device_id id_table_combined [] = {
3065 { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) },
3066 { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) },
3067 { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) },
3068 + { USB_DEVICE(BANDB_VID, BANDB_USOPTL4_PID) },
3069 + { USB_DEVICE(BANDB_VID, BANDB_USPTL4_PID) },
3070 + { USB_DEVICE(BANDB_VID, BANDB_USO9ML2DR_2_PID) },
3071 + { USB_DEVICE(BANDB_VID, BANDB_USO9ML2DR_PID) },
3072 + { USB_DEVICE(BANDB_VID, BANDB_USOPTL4DR2_PID) },
3073 + { USB_DEVICE(BANDB_VID, BANDB_USOPTL4DR_PID) },
3074 + { USB_DEVICE(BANDB_VID, BANDB_485USB9F_2W_PID) },
3075 + { USB_DEVICE(BANDB_VID, BANDB_485USB9F_4W_PID) },
3076 + { USB_DEVICE(BANDB_VID, BANDB_232USB9M_PID) },
3077 + { USB_DEVICE(BANDB_VID, BANDB_485USBTB_2W_PID) },
3078 + { USB_DEVICE(BANDB_VID, BANDB_485USBTB_4W_PID) },
3079 + { USB_DEVICE(BANDB_VID, BANDB_TTL5USB9M_PID) },
3080 + { USB_DEVICE(BANDB_VID, BANDB_TTL3USB9M_PID) },
3081 + { USB_DEVICE(BANDB_VID, BANDB_ZZ_PROG1_USB_PID) },
3082 { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) },
3083 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) },
3084 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) },
3085 diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
3086 index 6f31e0d..4586a24 100644
3087 --- a/drivers/usb/serial/ftdi_sio.h
3088 +++ b/drivers/usb/serial/ftdi_sio.h
3089 @@ -662,6 +662,20 @@
3090 #define BANDB_USOTL4_PID 0xAC01 /* USOTL4 Isolated RS-485 Converter */
3091 #define BANDB_USTL4_PID 0xAC02 /* USTL4 RS-485 Converter */
3092 #define BANDB_USO9ML2_PID 0xAC03 /* USO9ML2 Isolated RS-232 Converter */
3093 +#define BANDB_USOPTL4_PID 0xAC11
3094 +#define BANDB_USPTL4_PID 0xAC12
3095 +#define BANDB_USO9ML2DR_2_PID 0xAC16
3096 +#define BANDB_USO9ML2DR_PID 0xAC17
3097 +#define BANDB_USOPTL4DR2_PID 0xAC18 /* USOPTL4R-2 2-port Isolated RS-232 Converter */
3098 +#define BANDB_USOPTL4DR_PID 0xAC19
3099 +#define BANDB_485USB9F_2W_PID 0xAC25
3100 +#define BANDB_485USB9F_4W_PID 0xAC26
3101 +#define BANDB_232USB9M_PID 0xAC27
3102 +#define BANDB_485USBTB_2W_PID 0xAC33
3103 +#define BANDB_485USBTB_4W_PID 0xAC34
3104 +#define BANDB_TTL5USB9M_PID 0xAC49
3105 +#define BANDB_TTL3USB9M_PID 0xAC50
3106 +#define BANDB_ZZ_PROG1_USB_PID 0xBA02
3107
3108 /*
3109 * RM Michaelides CANview USB (http://www.rmcan.com)
3110 diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
3111 index f11abf5..485fa9c 100644
3112 --- a/drivers/usb/serial/mos7840.c
3113 +++ b/drivers/usb/serial/mos7840.c
3114 @@ -121,8 +121,14 @@
3115 * moschip_id_table_combined
3116 */
3117 #define USB_VENDOR_ID_BANDB 0x0856
3118 -#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44
3119 +#define BANDB_DEVICE_ID_USO9ML2_2 0xAC22
3120 +#define BANDB_DEVICE_ID_USO9ML2_4 0xAC24
3121 +#define BANDB_DEVICE_ID_US9ML2_2 0xAC29
3122 +#define BANDB_DEVICE_ID_US9ML2_4 0xAC30
3123 +#define BANDB_DEVICE_ID_USPTL4_2 0xAC31
3124 +#define BANDB_DEVICE_ID_USPTL4_4 0xAC32
3125 #define BANDB_DEVICE_ID_USOPTL4_2 0xAC42
3126 +#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44
3127
3128 /* This driver also supports
3129 * ATEN UC2324 device using Moschip MCS7840
3130 @@ -177,8 +183,14 @@
3131 static struct usb_device_id moschip_port_id_table[] = {
3132 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)},
3133 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)},
3134 - {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)},
3135 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2)},
3136 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_4)},
3137 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_2)},
3138 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_4)},
3139 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_2)},
3140 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_4)},
3141 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)},
3142 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)},
3143 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)},
3144 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)},
3145 {} /* terminating entry */
3146 @@ -187,8 +199,14 @@ static struct usb_device_id moschip_port_id_table[] = {
3147 static __devinitdata struct usb_device_id moschip_id_table_combined[] = {
3148 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)},
3149 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)},
3150 - {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)},
3151 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2)},
3152 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_4)},
3153 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_2)},
3154 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_4)},
3155 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_2)},
3156 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_4)},
3157 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)},
3158 + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)},
3159 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)},
3160 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)},
3161 {} /* terminating entry */
3162 diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
3163 index 6a51edd..4bdb7f1 100644
3164 --- a/drivers/watchdog/iTCO_wdt.c
3165 +++ b/drivers/watchdog/iTCO_wdt.c
3166 @@ -1,5 +1,5 @@
3167 /*
3168 - * intel TCO Watchdog Driver (Used in i82801 and i63xxESB chipsets)
3169 + * intel TCO Watchdog Driver
3170 *
3171 * (c) Copyright 2006-2009 Wim Van Sebroeck <wim@iguana.be>.
3172 *
3173 @@ -14,47 +14,24 @@
3174 *
3175 * The TCO watchdog is implemented in the following I/O controller hubs:
3176 * (See the intel documentation on http://developer.intel.com.)
3177 - * 82801AA (ICH) : document number 290655-003, 290677-014,
3178 - * 82801AB (ICHO) : document number 290655-003, 290677-014,
3179 - * 82801BA (ICH2) : document number 290687-002, 298242-027,
3180 - * 82801BAM (ICH2-M) : document number 290687-002, 298242-027,
3181 - * 82801CA (ICH3-S) : document number 290733-003, 290739-013,
3182 - * 82801CAM (ICH3-M) : document number 290716-001, 290718-007,
3183 - * 82801DB (ICH4) : document number 290744-001, 290745-025,
3184 - * 82801DBM (ICH4-M) : document number 252337-001, 252663-008,
3185 - * 82801E (C-ICH) : document number 273599-001, 273645-002,
3186 - * 82801EB (ICH5) : document number 252516-001, 252517-028,
3187 - * 82801ER (ICH5R) : document number 252516-001, 252517-028,
3188 - * 6300ESB (6300ESB) : document number 300641-004, 300884-013,
3189 - * 82801FB (ICH6) : document number 301473-002, 301474-026,
3190 - * 82801FR (ICH6R) : document number 301473-002, 301474-026,
3191 - * 82801FBM (ICH6-M) : document number 301473-002, 301474-026,
3192 - * 82801FW (ICH6W) : document number 301473-001, 301474-026,
3193 - * 82801FRW (ICH6RW) : document number 301473-001, 301474-026,
3194 - * 631xESB (631xESB) : document number 313082-001, 313075-006,
3195 - * 632xESB (632xESB) : document number 313082-001, 313075-006,
3196 - * 82801GB (ICH7) : document number 307013-003, 307014-024,
3197 - * 82801GR (ICH7R) : document number 307013-003, 307014-024,
3198 - * 82801GDH (ICH7DH) : document number 307013-003, 307014-024,
3199 - * 82801GBM (ICH7-M) : document number 307013-003, 307014-024,
3200 - * 82801GHM (ICH7-M DH) : document number 307013-003, 307014-024,
3201 - * 82801GU (ICH7-U) : document number 307013-003, 307014-024,
3202 - * 82801HB (ICH8) : document number 313056-003, 313057-017,
3203 - * 82801HR (ICH8R) : document number 313056-003, 313057-017,
3204 - * 82801HBM (ICH8M) : document number 313056-003, 313057-017,
3205 - * 82801HH (ICH8DH) : document number 313056-003, 313057-017,
3206 - * 82801HO (ICH8DO) : document number 313056-003, 313057-017,
3207 - * 82801HEM (ICH8M-E) : document number 313056-003, 313057-017,
3208 - * 82801IB (ICH9) : document number 316972-004, 316973-012,
3209 - * 82801IR (ICH9R) : document number 316972-004, 316973-012,
3210 - * 82801IH (ICH9DH) : document number 316972-004, 316973-012,
3211 - * 82801IO (ICH9DO) : document number 316972-004, 316973-012,
3212 - * 82801IBM (ICH9M) : document number 316972-004, 316973-012,
3213 - * 82801IEM (ICH9M-E) : document number 316972-004, 316973-012,
3214 - * 82801JIB (ICH10) : document number 319973-002, 319974-002,
3215 - * 82801JIR (ICH10R) : document number 319973-002, 319974-002,
3216 - * 82801JD (ICH10D) : document number 319973-002, 319974-002,
3217 - * 82801JDO (ICH10DO) : document number 319973-002, 319974-002
3218 + * document number 290655-003, 290677-014: 82801AA (ICH), 82801AB (ICHO)
3219 + * document number 290687-002, 298242-027: 82801BA (ICH2)
3220 + * document number 290733-003, 290739-013: 82801CA (ICH3-S)
3221 + * document number 290716-001, 290718-007: 82801CAM (ICH3-M)
3222 + * document number 290744-001, 290745-025: 82801DB (ICH4)
3223 + * document number 252337-001, 252663-008: 82801DBM (ICH4-M)
3224 + * document number 273599-001, 273645-002: 82801E (C-ICH)
3225 + * document number 252516-001, 252517-028: 82801EB (ICH5), 82801ER (ICH5R)
3226 + * document number 300641-004, 300884-013: 6300ESB
3227 + * document number 301473-002, 301474-026: 82801F (ICH6)
3228 + * document number 313082-001, 313075-006: 631xESB, 632xESB
3229 + * document number 307013-003, 307014-024: 82801G (ICH7)
3230 + * document number 313056-003, 313057-017: 82801H (ICH8)
3231 + * document number 316972-004, 316973-012: 82801I (ICH9)
3232 + * document number 319973-002, 319974-002: 82801J (ICH10)
3233 + * document number 322169-001, 322170-003: 5 Series, 3400 Series (PCH)
3234 + * document number 320066-003, 320257-008: EP80597 (IICH)
3235 + * document number TBD : Cougar Point (CPT)
3236 */
3237
3238 /*
3239 @@ -122,6 +99,24 @@ enum iTCO_chipsets {
3240 TCO_ICH10R, /* ICH10R */
3241 TCO_ICH10D, /* ICH10D */
3242 TCO_ICH10DO, /* ICH10DO */
3243 + TCO_PCH, /* PCH Desktop Full Featured */
3244 + TCO_PCHM, /* PCH Mobile Full Featured */
3245 + TCO_P55, /* P55 */
3246 + TCO_PM55, /* PM55 */
3247 + TCO_H55, /* H55 */
3248 + TCO_QM57, /* QM57 */
3249 + TCO_H57, /* H57 */
3250 + TCO_HM55, /* HM55 */
3251 + TCO_Q57, /* Q57 */
3252 + TCO_HM57, /* HM57 */
3253 + TCO_PCHMSFF, /* PCH Mobile SFF Full Featured */
3254 + TCO_QS57, /* QS57 */
3255 + TCO_3400, /* 3400 */
3256 + TCO_3420, /* 3420 */
3257 + TCO_3450, /* 3450 */
3258 + TCO_EP80579, /* EP80579 */
3259 + TCO_CPTD, /* CPT Desktop */
3260 + TCO_CPTM, /* CPT Mobile */
3261 };
3262
3263 static struct {
3264 @@ -162,6 +157,24 @@ static struct {
3265 {"ICH10R", 2},
3266 {"ICH10D", 2},
3267 {"ICH10DO", 2},
3268 + {"PCH Desktop Full Featured", 2},
3269 + {"PCH Mobile Full Featured", 2},
3270 + {"P55", 2},
3271 + {"PM55", 2},
3272 + {"H55", 2},
3273 + {"QM57", 2},
3274 + {"H57", 2},
3275 + {"HM55", 2},
3276 + {"Q57", 2},
3277 + {"HM57", 2},
3278 + {"PCH Mobile SFF Full Featured", 2},
3279 + {"QS57", 2},
3280 + {"3400", 2},
3281 + {"3420", 2},
3282 + {"3450", 2},
3283 + {"EP80579", 2},
3284 + {"CPT Desktop", 2},
3285 + {"CPT Mobile", 2},
3286 {NULL, 0}
3287 };
3288
3289 @@ -230,6 +243,24 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = {
3290 { ITCO_PCI_DEVICE(0x3a16, TCO_ICH10R)},
3291 { ITCO_PCI_DEVICE(0x3a1a, TCO_ICH10D)},
3292 { ITCO_PCI_DEVICE(0x3a14, TCO_ICH10DO)},
3293 + { ITCO_PCI_DEVICE(0x3b00, TCO_PCH)},
3294 + { ITCO_PCI_DEVICE(0x3b01, TCO_PCHM)},
3295 + { ITCO_PCI_DEVICE(0x3b02, TCO_P55)},
3296 + { ITCO_PCI_DEVICE(0x3b03, TCO_PM55)},
3297 + { ITCO_PCI_DEVICE(0x3b06, TCO_H55)},
3298 + { ITCO_PCI_DEVICE(0x3b07, TCO_QM57)},
3299 + { ITCO_PCI_DEVICE(0x3b08, TCO_H57)},
3300 + { ITCO_PCI_DEVICE(0x3b09, TCO_HM55)},
3301 + { ITCO_PCI_DEVICE(0x3b0a, TCO_Q57)},
3302 + { ITCO_PCI_DEVICE(0x3b0b, TCO_HM57)},
3303 + { ITCO_PCI_DEVICE(0x3b0d, TCO_PCHMSFF)},
3304 + { ITCO_PCI_DEVICE(0x3b0f, TCO_QS57)},
3305 + { ITCO_PCI_DEVICE(0x3b12, TCO_3400)},
3306 + { ITCO_PCI_DEVICE(0x3b14, TCO_3420)},
3307 + { ITCO_PCI_DEVICE(0x3b16, TCO_3450)},
3308 + { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)},
3309 + { ITCO_PCI_DEVICE(0x1c42, TCO_CPTD)},
3310 + { ITCO_PCI_DEVICE(0x1c43, TCO_CPTM)},
3311 { 0, }, /* End of list */
3312 };
3313 MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl);
3314 diff --git a/fs/fcntl.c b/fs/fcntl.c
3315 index 97e01dc..5ef953e 100644
3316 --- a/fs/fcntl.c
3317 +++ b/fs/fcntl.c
3318 @@ -199,7 +199,9 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
3319 static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
3320 int force)
3321 {
3322 - write_lock_irq(&filp->f_owner.lock);
3323 + unsigned long flags;
3324 +
3325 + write_lock_irqsave(&filp->f_owner.lock, flags);
3326 if (force || !filp->f_owner.pid) {
3327 put_pid(filp->f_owner.pid);
3328 filp->f_owner.pid = get_pid(pid);
3329 @@ -211,7 +213,7 @@ static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
3330 filp->f_owner.euid = cred->euid;
3331 }
3332 }
3333 - write_unlock_irq(&filp->f_owner.lock);
3334 + write_unlock_irqrestore(&filp->f_owner.lock, flags);
3335 }
3336
3337 int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
3338 diff --git a/fs/nfs/super.c b/fs/nfs/super.c
3339 index 90be551..e71f0fd 100644
3340 --- a/fs/nfs/super.c
3341 +++ b/fs/nfs/super.c
3342 @@ -734,8 +734,6 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int ve
3343
3344 data = kzalloc(sizeof(*data), GFP_KERNEL);
3345 if (data) {
3346 - data->rsize = NFS_MAX_FILE_IO_SIZE;
3347 - data->wsize = NFS_MAX_FILE_IO_SIZE;
3348 data->acregmin = NFS_DEF_ACREGMIN;
3349 data->acregmax = NFS_DEF_ACREGMAX;
3350 data->acdirmin = NFS_DEF_ACDIRMIN;
3351 diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
3352 index 725d02f..6d9c6aa 100644
3353 --- a/fs/nfsd/nfs4acl.c
3354 +++ b/fs/nfsd/nfs4acl.c
3355 @@ -389,7 +389,7 @@ sort_pacl(struct posix_acl *pacl)
3356 sort_pacl_range(pacl, 1, i-1);
3357
3358 BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ);
3359 - j = i++;
3360 + j = ++i;
3361 while (pacl->a_entries[j].e_tag == ACL_GROUP)
3362 j++;
3363 sort_pacl_range(pacl, i, j-1);
3364 diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c
3365 index 038a602..49cfd5f 100644
3366 --- a/fs/partitions/efi.c
3367 +++ b/fs/partitions/efi.c
3368 @@ -1,7 +1,9 @@
3369 /************************************************************
3370 * EFI GUID Partition Table handling
3371 - * Per Intel EFI Specification v1.02
3372 - * http://developer.intel.com/technology/efi/efi.htm
3373 + *
3374 + * http://www.uefi.org/specs/
3375 + * http://www.intel.com/technology/efi/
3376 + *
3377 * efi.[ch] by Matt Domsch <Matt_Domsch@dell.com>
3378 * Copyright 2000,2001,2002,2004 Dell Inc.
3379 *
3380 @@ -92,6 +94,7 @@
3381 *
3382 ************************************************************/
3383 #include <linux/crc32.h>
3384 +#include <linux/math64.h>
3385 #include "check.h"
3386 #include "efi.h"
3387
3388 @@ -141,7 +144,8 @@ last_lba(struct block_device *bdev)
3389 {
3390 if (!bdev || !bdev->bd_inode)
3391 return 0;
3392 - return (bdev->bd_inode->i_size >> 9) - 1ULL;
3393 + return div_u64(bdev->bd_inode->i_size,
3394 + bdev_logical_block_size(bdev)) - 1ULL;
3395 }
3396
3397 static inline int
3398 @@ -188,6 +192,7 @@ static size_t
3399 read_lba(struct block_device *bdev, u64 lba, u8 * buffer, size_t count)
3400 {
3401 size_t totalreadcount = 0;
3402 + sector_t n = lba * (bdev_logical_block_size(bdev) / 512);
3403
3404 if (!bdev || !buffer || lba > last_lba(bdev))
3405 return 0;
3406 @@ -195,7 +200,7 @@ read_lba(struct block_device *bdev, u64 lba, u8 * buffer, size_t count)
3407 while (count) {
3408 int copied = 512;
3409 Sector sect;
3410 - unsigned char *data = read_dev_sector(bdev, lba++, &sect);
3411 + unsigned char *data = read_dev_sector(bdev, n++, &sect);
3412 if (!data)
3413 break;
3414 if (copied > count)
3415 @@ -257,15 +262,16 @@ static gpt_header *
3416 alloc_read_gpt_header(struct block_device *bdev, u64 lba)
3417 {
3418 gpt_header *gpt;
3419 + unsigned ssz = bdev_logical_block_size(bdev);
3420 +
3421 if (!bdev)
3422 return NULL;
3423
3424 - gpt = kzalloc(sizeof (gpt_header), GFP_KERNEL);
3425 + gpt = kzalloc(ssz, GFP_KERNEL);
3426 if (!gpt)
3427 return NULL;
3428
3429 - if (read_lba(bdev, lba, (u8 *) gpt,
3430 - sizeof (gpt_header)) < sizeof (gpt_header)) {
3431 + if (read_lba(bdev, lba, (u8 *) gpt, ssz) < ssz) {
3432 kfree(gpt);
3433 gpt=NULL;
3434 return NULL;
3435 @@ -601,6 +607,7 @@ efi_partition(struct parsed_partitions *state, struct block_device *bdev)
3436 gpt_header *gpt = NULL;
3437 gpt_entry *ptes = NULL;
3438 u32 i;
3439 + unsigned ssz = bdev_logical_block_size(bdev) / 512;
3440
3441 if (!find_valid_gpt(bdev, &gpt, &ptes) || !gpt || !ptes) {
3442 kfree(gpt);
3443 @@ -611,13 +618,14 @@ efi_partition(struct parsed_partitions *state, struct block_device *bdev)
3444 pr_debug("GUID Partition Table is valid! Yea!\n");
3445
3446 for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) && i < state->limit-1; i++) {
3447 + u64 start = le64_to_cpu(ptes[i].starting_lba);
3448 + u64 size = le64_to_cpu(ptes[i].ending_lba) -
3449 + le64_to_cpu(ptes[i].starting_lba) + 1ULL;
3450 +
3451 if (!is_pte_valid(&ptes[i], last_lba(bdev)))
3452 continue;
3453
3454 - put_partition(state, i+1, le64_to_cpu(ptes[i].starting_lba),
3455 - (le64_to_cpu(ptes[i].ending_lba) -
3456 - le64_to_cpu(ptes[i].starting_lba) +
3457 - 1ULL));
3458 + put_partition(state, i+1, start * ssz, size * ssz);
3459
3460 /* If this is a RAID volume, tell md */
3461 if (!efi_guidcmp(ptes[i].partition_type_guid,
3462 diff --git a/fs/partitions/efi.h b/fs/partitions/efi.h
3463 index 2cc89d0..6998b58 100644
3464 --- a/fs/partitions/efi.h
3465 +++ b/fs/partitions/efi.h
3466 @@ -37,7 +37,6 @@
3467 #define EFI_PMBR_OSTYPE_EFI 0xEF
3468 #define EFI_PMBR_OSTYPE_EFI_GPT 0xEE
3469
3470 -#define GPT_BLOCK_SIZE 512
3471 #define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
3472 #define GPT_HEADER_REVISION_V1 0x00010000
3473 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1
3474 @@ -79,7 +78,12 @@ typedef struct _gpt_header {
3475 __le32 num_partition_entries;
3476 __le32 sizeof_partition_entry;
3477 __le32 partition_entry_array_crc32;
3478 - u8 reserved2[GPT_BLOCK_SIZE - 92];
3479 +
3480 + /* The rest of the logical block is reserved by UEFI and must be zero.
3481 + * EFI standard handles this by:
3482 + *
3483 + * uint8_t reserved2[ BlockSize - 92 ];
3484 + */
3485 } __attribute__ ((packed)) gpt_header;
3486
3487 typedef struct _gpt_entry_attributes {
3488 diff --git a/fs/super.c b/fs/super.c
3489 index 19eb70b..aff046b 100644
3490 --- a/fs/super.c
3491 +++ b/fs/super.c
3492 @@ -901,8 +901,9 @@ int get_sb_single(struct file_system_type *fs_type,
3493 return error;
3494 }
3495 s->s_flags |= MS_ACTIVE;
3496 + } else {
3497 + do_remount_sb(s, flags, data, 0);
3498 }
3499 - do_remount_sb(s, flags, data, 0);
3500 simple_set_mnt(mnt, s);
3501 return 0;
3502 }
3503 diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
3504 index 9d7febd..0946997 100644
3505 --- a/include/acpi/platform/aclinux.h
3506 +++ b/include/acpi/platform/aclinux.h
3507 @@ -152,7 +152,7 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
3508 #include <linux/hardirq.h>
3509 #define ACPI_PREEMPTION_POINT() \
3510 do { \
3511 - if (!in_atomic_preempt_off()) \
3512 + if (!in_atomic_preempt_off() && !irqs_disabled()) \
3513 cond_resched(); \
3514 } while (0)
3515
3516 diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
3517 index 83d2fbd..64b1a4c 100644
3518 --- a/include/linux/clocksource.h
3519 +++ b/include/linux/clocksource.h
3520 @@ -151,6 +151,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc,
3521 * subtraction of non 64 bit counters
3522 * @mult: cycle to nanosecond multiplier
3523 * @shift: cycle to nanosecond divisor (power of two)
3524 + * @max_idle_ns: max idle time permitted by the clocksource (nsecs)
3525 * @flags: flags describing special properties
3526 * @vread: vsyscall based read
3527 * @resume: resume function for the clocksource, if necessary
3528 @@ -168,6 +169,7 @@ struct clocksource {
3529 cycle_t mask;
3530 u32 mult;
3531 u32 shift;
3532 + u64 max_idle_ns;
3533 unsigned long flags;
3534 cycle_t (*vread)(void);
3535 void (*resume)(void);
3536 diff --git a/include/linux/hid.h b/include/linux/hid.h
3537 index 10f6284..8709365 100644
3538 --- a/include/linux/hid.h
3539 +++ b/include/linux/hid.h
3540 @@ -312,6 +312,7 @@ struct hid_item {
3541 #define HID_QUIRK_MULTI_INPUT 0x00000040
3542 #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
3543 #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
3544 +#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
3545
3546 /*
3547 * This is the global environment of the parser. This information is
3548 diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
3549 index 84cf1f3..1b7f2a7 100644
3550 --- a/include/linux/pci_ids.h
3551 +++ b/include/linux/pci_ids.h
3552 @@ -2290,6 +2290,20 @@
3553 #define PCI_DEVICE_ID_MPC8536 0x0051
3554 #define PCI_DEVICE_ID_P2020E 0x0070
3555 #define PCI_DEVICE_ID_P2020 0x0071
3556 +#define PCI_DEVICE_ID_P2010E 0x0078
3557 +#define PCI_DEVICE_ID_P2010 0x0079
3558 +#define PCI_DEVICE_ID_P1020E 0x0100
3559 +#define PCI_DEVICE_ID_P1020 0x0101
3560 +#define PCI_DEVICE_ID_P1011E 0x0108
3561 +#define PCI_DEVICE_ID_P1011 0x0109
3562 +#define PCI_DEVICE_ID_P1022E 0x0110
3563 +#define PCI_DEVICE_ID_P1022 0x0111
3564 +#define PCI_DEVICE_ID_P1013E 0x0118
3565 +#define PCI_DEVICE_ID_P1013 0x0119
3566 +#define PCI_DEVICE_ID_P4080E 0x0400
3567 +#define PCI_DEVICE_ID_P4080 0x0401
3568 +#define PCI_DEVICE_ID_P4040E 0x0408
3569 +#define PCI_DEVICE_ID_P4040 0x0409
3570 #define PCI_DEVICE_ID_MPC8641 0x7010
3571 #define PCI_DEVICE_ID_MPC8641D 0x7011
3572 #define PCI_DEVICE_ID_MPC8610 0x7018
3573 diff --git a/include/linux/time.h b/include/linux/time.h
3574 index fe04e5e..6e026e4 100644
3575 --- a/include/linux/time.h
3576 +++ b/include/linux/time.h
3577 @@ -148,6 +148,7 @@ extern void monotonic_to_bootbased(struct timespec *ts);
3578
3579 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
3580 extern int timekeeping_valid_for_hres(void);
3581 +extern u64 timekeeping_max_deferment(void);
3582 extern void update_wall_time(void);
3583 extern void update_xtime_cache(u64 nsec);
3584 extern void timekeeping_leap_insert(int leapsecond);
3585 diff --git a/include/scsi/fc_frame.h b/include/scsi/fc_frame.h
3586 index c35d238..148126d 100644
3587 --- a/include/scsi/fc_frame.h
3588 +++ b/include/scsi/fc_frame.h
3589 @@ -37,6 +37,9 @@
3590 #define FC_FRAME_HEADROOM 32 /* headroom for VLAN + FCoE headers */
3591 #define FC_FRAME_TAILROOM 8 /* trailer space for FCoE */
3592
3593 +/* Max number of skb frags allowed, reserving one for fcoe_crc_eof page */
3594 +#define FC_FRAME_SG_LEN (MAX_SKB_FRAGS - 1)
3595 +
3596 #define fp_skb(fp) (&((fp)->skb))
3597 #define fr_hdr(fp) ((fp)->skb.data)
3598 #define fr_len(fp) ((fp)->skb.len)
3599 diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
3600 index 65dc9aa..09a124b 100644
3601 --- a/include/scsi/libfc.h
3602 +++ b/include/scsi/libfc.h
3603 @@ -145,6 +145,7 @@ enum fc_rport_state {
3604 RPORT_ST_LOGO, /* port logout sent */
3605 RPORT_ST_ADISC, /* Discover Address sent */
3606 RPORT_ST_DELETE, /* port being deleted */
3607 + RPORT_ST_RESTART, /* remote port being deleted and will restart */
3608 };
3609
3610 /**
3611 diff --git a/init/calibrate.c b/init/calibrate.c
3612 index a379c90..6eb48e5 100644
3613 --- a/init/calibrate.c
3614 +++ b/init/calibrate.c
3615 @@ -123,23 +123,26 @@ void __cpuinit calibrate_delay(void)
3616 {
3617 unsigned long ticks, loopbit;
3618 int lps_precision = LPS_PREC;
3619 + static bool printed;
3620
3621 if (preset_lpj) {
3622 loops_per_jiffy = preset_lpj;
3623 - printk(KERN_INFO
3624 - "Calibrating delay loop (skipped) preset value.. ");
3625 - } else if ((smp_processor_id() == 0) && lpj_fine) {
3626 + if (!printed)
3627 + pr_info("Calibrating delay loop (skipped) "
3628 + "preset value.. ");
3629 + } else if ((!printed) && lpj_fine) {
3630 loops_per_jiffy = lpj_fine;
3631 - printk(KERN_INFO
3632 - "Calibrating delay loop (skipped), "
3633 + pr_info("Calibrating delay loop (skipped), "
3634 "value calculated using timer frequency.. ");
3635 } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) {
3636 - printk(KERN_INFO
3637 - "Calibrating delay using timer specific routine.. ");
3638 + if (!printed)
3639 + pr_info("Calibrating delay using timer "
3640 + "specific routine.. ");
3641 } else {
3642 loops_per_jiffy = (1<<12);
3643
3644 - printk(KERN_INFO "Calibrating delay loop... ");
3645 + if (!printed)
3646 + pr_info("Calibrating delay loop... ");
3647 while ((loops_per_jiffy <<= 1) != 0) {
3648 /* wait for "start of" clock tick */
3649 ticks = jiffies;
3650 @@ -170,7 +173,10 @@ void __cpuinit calibrate_delay(void)
3651 loops_per_jiffy &= ~loopbit;
3652 }
3653 }
3654 - printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n",
3655 + if (!printed)
3656 + pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
3657 loops_per_jiffy/(500000/HZ),
3658 (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);
3659 +
3660 + printed = true;
3661 }
3662 diff --git a/ipc/msg.c b/ipc/msg.c
3663 index 2ceab7f..779f762 100644
3664 --- a/ipc/msg.c
3665 +++ b/ipc/msg.c
3666 @@ -125,6 +125,7 @@ void msg_init_ns(struct ipc_namespace *ns)
3667 void msg_exit_ns(struct ipc_namespace *ns)
3668 {
3669 free_ipcs(ns, &msg_ids(ns), freeque);
3670 + idr_destroy(&ns->ids[IPC_MSG_IDS].ipcs_idr);
3671 }
3672 #endif
3673
3674 diff --git a/ipc/sem.c b/ipc/sem.c
3675 index 87c2b64..2f2a479 100644
3676 --- a/ipc/sem.c
3677 +++ b/ipc/sem.c
3678 @@ -129,6 +129,7 @@ void sem_init_ns(struct ipc_namespace *ns)
3679 void sem_exit_ns(struct ipc_namespace *ns)
3680 {
3681 free_ipcs(ns, &sem_ids(ns), freeary);
3682 + idr_destroy(&ns->ids[IPC_SEM_IDS].ipcs_idr);
3683 }
3684 #endif
3685
3686 diff --git a/ipc/shm.c b/ipc/shm.c
3687 index 11bec62..e9b039f 100644
3688 --- a/ipc/shm.c
3689 +++ b/ipc/shm.c
3690 @@ -101,6 +101,7 @@ static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
3691 void shm_exit_ns(struct ipc_namespace *ns)
3692 {
3693 free_ipcs(ns, &shm_ids(ns), do_shm_rmid);
3694 + idr_destroy(&ns->ids[IPC_SHM_IDS].ipcs_idr);
3695 }
3696 #endif
3697
3698 diff --git a/kernel/cpu.c b/kernel/cpu.c
3699 index b216886..291ac58 100644
3700 --- a/kernel/cpu.c
3701 +++ b/kernel/cpu.c
3702 @@ -400,10 +400,9 @@ int disable_nonboot_cpus(void)
3703 if (cpu == first_cpu)
3704 continue;
3705 error = _cpu_down(cpu, 1);
3706 - if (!error) {
3707 + if (!error)
3708 cpumask_set_cpu(cpu, frozen_cpus);
3709 - printk("CPU%d is down\n", cpu);
3710 - } else {
3711 + else {
3712 printk(KERN_ERR "Error taking CPU%d down: %d\n",
3713 cpu, error);
3714 break;
3715 diff --git a/kernel/sched.c b/kernel/sched.c
3716 index bf841d8..60d74cc 100644
3717 --- a/kernel/sched.c
3718 +++ b/kernel/sched.c
3719 @@ -816,6 +816,7 @@ const_debug unsigned int sysctl_sched_nr_migrate = 32;
3720 * default: 0.25ms
3721 */
3722 unsigned int sysctl_sched_shares_ratelimit = 250000;
3723 +unsigned int normalized_sysctl_sched_shares_ratelimit = 250000;
3724
3725 /*
3726 * Inject some fuzzyness into changing the per-cpu group shares
3727 @@ -1812,6 +1813,7 @@ static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares)
3728 #endif
3729
3730 static void calc_load_account_active(struct rq *this_rq);
3731 +static void update_sysctl(void);
3732
3733 #include "sched_stats.h"
3734 #include "sched_idletask.c"
3735 @@ -7018,22 +7020,23 @@ cpumask_var_t nohz_cpu_mask;
3736 *
3737 * This idea comes from the SD scheduler of Con Kolivas:
3738 */
3739 -static inline void sched_init_granularity(void)
3740 +static void update_sysctl(void)
3741 {
3742 - unsigned int factor = 1 + ilog2(num_online_cpus());
3743 - const unsigned long limit = 200000000;
3744 -
3745 - sysctl_sched_min_granularity *= factor;
3746 - if (sysctl_sched_min_granularity > limit)
3747 - sysctl_sched_min_granularity = limit;
3748 -
3749 - sysctl_sched_latency *= factor;
3750 - if (sysctl_sched_latency > limit)
3751 - sysctl_sched_latency = limit;
3752 + unsigned int cpus = min(num_online_cpus(), 8U);
3753 + unsigned int factor = 1 + ilog2(cpus);
3754
3755 - sysctl_sched_wakeup_granularity *= factor;
3756 +#define SET_SYSCTL(name) \
3757 + (sysctl_##name = (factor) * normalized_sysctl_##name)
3758 + SET_SYSCTL(sched_min_granularity);
3759 + SET_SYSCTL(sched_latency);
3760 + SET_SYSCTL(sched_wakeup_granularity);
3761 + SET_SYSCTL(sched_shares_ratelimit);
3762 +#undef SET_SYSCTL
3763 +}
3764
3765 - sysctl_sched_shares_ratelimit *= factor;
3766 +static inline void sched_init_granularity(void)
3767 +{
3768 + update_sysctl();
3769 }
3770
3771 #ifdef CONFIG_SMP
3772 @@ -8061,6 +8064,7 @@ static cpumask_var_t cpu_isolated_map;
3773 /* Setup the mask of cpus configured for isolated domains */
3774 static int __init isolated_cpu_setup(char *str)
3775 {
3776 + alloc_bootmem_cpumask_var(&cpu_isolated_map);
3777 cpulist_parse(str, cpu_isolated_map);
3778 return 1;
3779 }
3780 @@ -9591,7 +9595,9 @@ void __init sched_init(void)
3781 zalloc_cpumask_var(&nohz.cpu_mask, GFP_NOWAIT);
3782 alloc_cpumask_var(&nohz.ilb_grp_nohz_mask, GFP_NOWAIT);
3783 #endif
3784 - zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT);
3785 + /* May be allocated at isolcpus cmdline parse time */
3786 + if (cpu_isolated_map == NULL)
3787 + zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT);
3788 #endif /* SMP */
3789
3790 perf_event_init();
3791 diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
3792 index 199228b..d80812d 100644
3793 --- a/kernel/sched_fair.c
3794 +++ b/kernel/sched_fair.c
3795 @@ -35,12 +35,14 @@
3796 * run vmstat and monitor the context-switches (cs) field)
3797 */
3798 unsigned int sysctl_sched_latency = 5000000ULL;
3799 +unsigned int normalized_sysctl_sched_latency = 5000000ULL;
3800
3801 /*
3802 * Minimal preemption granularity for CPU-bound tasks:
3803 * (default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds)
3804 */
3805 unsigned int sysctl_sched_min_granularity = 1000000ULL;
3806 +unsigned int normalized_sysctl_sched_min_granularity = 1000000ULL;
3807
3808 /*
3809 * is kept at sysctl_sched_latency / sysctl_sched_min_granularity
3810 @@ -70,6 +72,7 @@ unsigned int __read_mostly sysctl_sched_compat_yield;
3811 * have immediate wakeup/sleep latencies.
3812 */
3813 unsigned int sysctl_sched_wakeup_granularity = 1000000UL;
3814 +unsigned int normalized_sysctl_sched_wakeup_granularity = 1000000UL;
3815
3816 const_debug unsigned int sysctl_sched_migration_cost = 500000UL;
3817
3818 @@ -1880,6 +1883,17 @@ move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
3819
3820 return 0;
3821 }
3822 +
3823 +static void rq_online_fair(struct rq *rq)
3824 +{
3825 + update_sysctl();
3826 +}
3827 +
3828 +static void rq_offline_fair(struct rq *rq)
3829 +{
3830 + update_sysctl();
3831 +}
3832 +
3833 #endif /* CONFIG_SMP */
3834
3835 /*
3836 @@ -2027,6 +2041,8 @@ static const struct sched_class fair_sched_class = {
3837
3838 .load_balance = load_balance_fair,
3839 .move_one_task = move_one_task_fair,
3840 + .rq_online = rq_online_fair,
3841 + .rq_offline = rq_offline_fair,
3842 #endif
3843
3844 .set_curr_task = set_curr_task_fair,
3845 diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
3846 index 9484be4..0d809ae 100644
3847 --- a/kernel/time/clockevents.c
3848 +++ b/kernel/time/clockevents.c
3849 @@ -20,6 +20,8 @@
3850 #include <linux/sysdev.h>
3851 #include <linux/tick.h>
3852
3853 +#include "tick-internal.h"
3854 +
3855 /* The registered clock event devices */
3856 static LIST_HEAD(clockevent_devices);
3857 static LIST_HEAD(clockevents_released);
3858 @@ -258,7 +260,8 @@ void clockevents_notify(unsigned long reason, void *arg)
3859 cpu = *((int *)arg);
3860 list_for_each_entry_safe(dev, tmp, &clockevent_devices, list) {
3861 if (cpumask_test_cpu(cpu, dev->cpumask) &&
3862 - cpumask_weight(dev->cpumask) == 1) {
3863 + cpumask_weight(dev->cpumask) == 1 &&
3864 + !tick_is_broadcast_device(dev)) {
3865 BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
3866 list_del(&dev->list);
3867 }
3868 diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
3869 index 5e18c6a..5155dc3 100644
3870 --- a/kernel/time/clocksource.c
3871 +++ b/kernel/time/clocksource.c
3872 @@ -416,6 +416,47 @@ void clocksource_touch_watchdog(void)
3873 #ifdef CONFIG_GENERIC_TIME
3874
3875 /**
3876 + * clocksource_max_deferment - Returns max time the clocksource can be deferred
3877 + * @cs: Pointer to clocksource
3878 + *
3879 + */
3880 +static u64 clocksource_max_deferment(struct clocksource *cs)
3881 +{
3882 + u64 max_nsecs, max_cycles;
3883 +
3884 + /*
3885 + * Calculate the maximum number of cycles that we can pass to the
3886 + * cyc2ns function without overflowing a 64-bit signed result. The
3887 + * maximum number of cycles is equal to ULLONG_MAX/cs->mult which
3888 + * is equivalent to the below.
3889 + * max_cycles < (2^63)/cs->mult
3890 + * max_cycles < 2^(log2((2^63)/cs->mult))
3891 + * max_cycles < 2^(log2(2^63) - log2(cs->mult))
3892 + * max_cycles < 2^(63 - log2(cs->mult))
3893 + * max_cycles < 1 << (63 - log2(cs->mult))
3894 + * Please note that we add 1 to the result of the log2 to account for
3895 + * any rounding errors, ensure the above inequality is satisfied and
3896 + * no overflow will occur.
3897 + */
3898 + max_cycles = 1ULL << (63 - (ilog2(cs->mult) + 1));
3899 +
3900 + /*
3901 + * The actual maximum number of cycles we can defer the clocksource is
3902 + * determined by the minimum of max_cycles and cs->mask.
3903 + */
3904 + max_cycles = min_t(u64, max_cycles, (u64) cs->mask);
3905 + max_nsecs = clocksource_cyc2ns(max_cycles, cs->mult, cs->shift);
3906 +
3907 + /*
3908 + * To ensure that the clocksource does not wrap whilst we are idle,
3909 + * limit the time the clocksource can be deferred by 12.5%. Please
3910 + * note a margin of 12.5% is used because this can be computed with
3911 + * a shift, versus say 10% which would require division.
3912 + */
3913 + return max_nsecs - (max_nsecs >> 5);
3914 +}
3915 +
3916 +/**
3917 * clocksource_select - Select the best clocksource available
3918 *
3919 * Private function. Must hold clocksource_mutex when called.
3920 @@ -511,6 +552,9 @@ static void clocksource_enqueue(struct clocksource *cs)
3921 */
3922 int clocksource_register(struct clocksource *cs)
3923 {
3924 + /* calculate max idle time permitted for this clocksource */
3925 + cs->max_idle_ns = clocksource_max_deferment(cs);
3926 +
3927 mutex_lock(&clocksource_mutex);
3928 clocksource_enqueue(cs);
3929 clocksource_select();
3930 diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
3931 index 89aed59..44320b1 100644
3932 --- a/kernel/time/tick-sched.c
3933 +++ b/kernel/time/tick-sched.c
3934 @@ -216,6 +216,7 @@ void tick_nohz_stop_sched_tick(int inidle)
3935 struct tick_sched *ts;
3936 ktime_t last_update, expires, now;
3937 struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
3938 + u64 time_delta;
3939 int cpu;
3940
3941 local_irq_save(flags);
3942 @@ -275,6 +276,17 @@ void tick_nohz_stop_sched_tick(int inidle)
3943 seq = read_seqbegin(&xtime_lock);
3944 last_update = last_jiffies_update;
3945 last_jiffies = jiffies;
3946 +
3947 + /*
3948 + * On SMP we really should only care for the CPU which
3949 + * has the do_timer duty assigned. All other CPUs can
3950 + * sleep as long as they want.
3951 + */
3952 + if (cpu == tick_do_timer_cpu ||
3953 + tick_do_timer_cpu == TICK_DO_TIMER_NONE)
3954 + time_delta = timekeeping_max_deferment();
3955 + else
3956 + time_delta = KTIME_MAX;
3957 } while (read_seqretry(&xtime_lock, seq));
3958
3959 /* Get the next timer wheel timer */
3960 @@ -294,11 +306,26 @@ void tick_nohz_stop_sched_tick(int inidle)
3961 if ((long)delta_jiffies >= 1) {
3962
3963 /*
3964 - * calculate the expiry time for the next timer wheel
3965 - * timer
3966 - */
3967 - expires = ktime_add_ns(last_update, tick_period.tv64 *
3968 - delta_jiffies);
3969 + * calculate the expiry time for the next timer wheel
3970 + * timer. delta_jiffies >= NEXT_TIMER_MAX_DELTA signals
3971 + * that there is no timer pending or at least extremely
3972 + * far into the future (12 days for HZ=1000). In this
3973 + * case we set the expiry to the end of time.
3974 + */
3975 + if (likely(delta_jiffies < NEXT_TIMER_MAX_DELTA)) {
3976 + /*
3977 + * Calculate the time delta for the next timer event.
3978 + * If the time delta exceeds the maximum time delta
3979 + * permitted by the current clocksource then adjust
3980 + * the time delta accordingly to ensure the
3981 + * clocksource does not wrap.
3982 + */
3983 + time_delta = min_t(u64, time_delta,
3984 + tick_period.tv64 * delta_jiffies);
3985 + expires = ktime_add_ns(last_update, time_delta);
3986 + } else {
3987 + expires.tv64 = KTIME_MAX;
3988 + }
3989
3990 /*
3991 * If this cpu is the one which updates jiffies, then
3992 @@ -342,22 +369,19 @@ void tick_nohz_stop_sched_tick(int inidle)
3993
3994 ts->idle_sleeps++;
3995
3996 + /* Mark expires */
3997 + ts->idle_expires = expires;
3998 +
3999 /*
4000 - * delta_jiffies >= NEXT_TIMER_MAX_DELTA signals that
4001 - * there is no timer pending or at least extremly far
4002 - * into the future (12 days for HZ=1000). In this case
4003 - * we simply stop the tick timer:
4004 + * If the expiration time == KTIME_MAX, then
4005 + * in this case we simply stop the tick timer.
4006 */
4007 - if (unlikely(delta_jiffies >= NEXT_TIMER_MAX_DELTA)) {
4008 - ts->idle_expires.tv64 = KTIME_MAX;
4009 + if (unlikely(expires.tv64 == KTIME_MAX)) {
4010 if (ts->nohz_mode == NOHZ_MODE_HIGHRES)
4011 hrtimer_cancel(&ts->sched_timer);
4012 goto out;
4013 }
4014
4015 - /* Mark expiries */
4016 - ts->idle_expires = expires;
4017 -
4018 if (ts->nohz_mode == NOHZ_MODE_HIGHRES) {
4019 hrtimer_start(&ts->sched_timer, expires,
4020 HRTIMER_MODE_ABS_PINNED);
4021 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
4022 index c3a4e29..66d090e 100644
4023 --- a/kernel/time/timekeeping.c
4024 +++ b/kernel/time/timekeeping.c
4025 @@ -488,6 +488,17 @@ int timekeeping_valid_for_hres(void)
4026 }
4027
4028 /**
4029 + * timekeeping_max_deferment - Returns max time the clocksource can be deferred
4030 + *
4031 + * Caller must observe xtime_lock via read_seqbegin/read_seqretry to
4032 + * ensure that the clocksource does not change!
4033 + */
4034 +u64 timekeeping_max_deferment(void)
4035 +{
4036 + return timekeeper.clock->max_idle_ns;
4037 +}
4038 +
4039 +/**
4040 * read_persistent_clock - Return time from the persistent clock.
4041 *
4042 * Weak dummy function for arches that do not yet support it.
4043 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
4044 index cca675e..fe2d3f8 100644
4045 --- a/net/mac80211/cfg.c
4046 +++ b/net/mac80211/cfg.c
4047 @@ -1306,6 +1306,9 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
4048 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
4049 struct ieee80211_conf *conf = &local->hw.conf;
4050
4051 + if (sdata->vif.type != NL80211_IFTYPE_STATION)
4052 + return -EOPNOTSUPP;
4053 +
4054 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
4055 return -EOPNOTSUPP;
4056
4057 diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c
4058 index 6dc4652..ae66305 100644
4059 --- a/net/netfilter/xt_conntrack.c
4060 +++ b/net/netfilter/xt_conntrack.c
4061 @@ -113,7 +113,8 @@ ct_proto_port_check(const struct xt_conntrack_mtinfo2 *info,
4062 }
4063
4064 static bool
4065 -conntrack_mt(const struct sk_buff *skb, const struct xt_match_param *par)
4066 +conntrack_mt(const struct sk_buff *skb, const struct xt_match_param *par,
4067 + u16 state_mask, u16 status_mask)
4068 {
4069 const struct xt_conntrack_mtinfo2 *info = par->matchinfo;
4070 enum ip_conntrack_info ctinfo;
4071 @@ -136,7 +137,7 @@ conntrack_mt(const struct sk_buff *skb, const struct xt_match_param *par)
4072 if (test_bit(IPS_DST_NAT_BIT, &ct->status))
4073 statebit |= XT_CONNTRACK_STATE_DNAT;
4074 }
4075 - if (!!(info->state_mask & statebit) ^
4076 + if (!!(state_mask & statebit) ^
4077 !(info->invert_flags & XT_CONNTRACK_STATE))
4078 return false;
4079 }
4080 @@ -172,7 +173,7 @@ conntrack_mt(const struct sk_buff *skb, const struct xt_match_param *par)
4081 return false;
4082
4083 if ((info->match_flags & XT_CONNTRACK_STATUS) &&
4084 - (!!(info->status_mask & ct->status) ^
4085 + (!!(status_mask & ct->status) ^
4086 !(info->invert_flags & XT_CONNTRACK_STATUS)))
4087 return false;
4088
4089 @@ -192,11 +193,17 @@ conntrack_mt(const struct sk_buff *skb, const struct xt_match_param *par)
4090 static bool
4091 conntrack_mt_v1(const struct sk_buff *skb, const struct xt_match_param *par)
4092 {
4093 - const struct xt_conntrack_mtinfo2 *const *info = par->matchinfo;
4094 - struct xt_match_param newpar = *par;
4095 + const struct xt_conntrack_mtinfo1 *info = par->matchinfo;
4096
4097 - newpar.matchinfo = *info;
4098 - return conntrack_mt(skb, &newpar);
4099 + return conntrack_mt(skb, par, info->state_mask, info->status_mask);
4100 +}
4101 +
4102 +static bool
4103 +conntrack_mt_v2(const struct sk_buff *skb, const struct xt_match_param *par)
4104 +{
4105 + const struct xt_conntrack_mtinfo2 *info = par->matchinfo;
4106 +
4107 + return conntrack_mt(skb, par, info->state_mask, info->status_mask);
4108 }
4109
4110 static bool conntrack_mt_check(const struct xt_mtchk_param *par)
4111 @@ -209,45 +216,11 @@ static bool conntrack_mt_check(const struct xt_mtchk_param *par)
4112 return true;
4113 }
4114
4115 -static bool conntrack_mt_check_v1(const struct xt_mtchk_param *par)
4116 -{
4117 - struct xt_conntrack_mtinfo1 *info = par->matchinfo;
4118 - struct xt_conntrack_mtinfo2 *up;
4119 - int ret = conntrack_mt_check(par);
4120 -
4121 - if (ret < 0)
4122 - return ret;
4123 -
4124 - up = kmalloc(sizeof(*up), GFP_KERNEL);
4125 - if (up == NULL) {
4126 - nf_ct_l3proto_module_put(par->family);
4127 - return -ENOMEM;
4128 - }
4129 -
4130 - /*
4131 - * The strategy here is to minimize the overhead of v1 matching,
4132 - * by prebuilding a v2 struct and putting the pointer into the
4133 - * v1 dataspace.
4134 - */
4135 - memcpy(up, info, offsetof(typeof(*info), state_mask));
4136 - up->state_mask = info->state_mask;
4137 - up->status_mask = info->status_mask;
4138 - *(void **)info = up;
4139 - return true;
4140 -}
4141 -
4142 static void conntrack_mt_destroy(const struct xt_mtdtor_param *par)
4143 {
4144 nf_ct_l3proto_module_put(par->family);
4145 }
4146
4147 -static void conntrack_mt_destroy_v1(const struct xt_mtdtor_param *par)
4148 -{
4149 - struct xt_conntrack_mtinfo2 **info = par->matchinfo;
4150 - kfree(*info);
4151 - conntrack_mt_destroy(par);
4152 -}
4153 -
4154 static struct xt_match conntrack_mt_reg[] __read_mostly = {
4155 {
4156 .name = "conntrack",
4157 @@ -255,8 +228,8 @@ static struct xt_match conntrack_mt_reg[] __read_mostly = {
4158 .family = NFPROTO_UNSPEC,
4159 .matchsize = sizeof(struct xt_conntrack_mtinfo1),
4160 .match = conntrack_mt_v1,
4161 - .checkentry = conntrack_mt_check_v1,
4162 - .destroy = conntrack_mt_destroy_v1,
4163 + .checkentry = conntrack_mt_check,
4164 + .destroy = conntrack_mt_destroy,
4165 .me = THIS_MODULE,
4166 },
4167 {
4168 @@ -264,7 +237,7 @@ static struct xt_match conntrack_mt_reg[] __read_mostly = {
4169 .revision = 2,
4170 .family = NFPROTO_UNSPEC,
4171 .matchsize = sizeof(struct xt_conntrack_mtinfo2),
4172 - .match = conntrack_mt,
4173 + .match = conntrack_mt_v2,
4174 .checkentry = conntrack_mt_check,
4175 .destroy = conntrack_mt_destroy,
4176 .me = THIS_MODULE,
4177 diff --git a/net/wireless/sme.c b/net/wireless/sme.c
4178 index 9f0b280..b2930e3 100644
4179 --- a/net/wireless/sme.c
4180 +++ b/net/wireless/sme.c
4181 @@ -655,6 +655,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
4182 memset(&wrqu, 0, sizeof(wrqu));
4183 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
4184 wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
4185 + wdev->wext.connect.ssid_len = 0;
4186 #endif
4187 }
4188
4189 diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
4190 index 7e4ee4e..03784da 100644
4191 --- a/sound/pci/hda/hda_intel.c
4192 +++ b/sound/pci/hda/hda_intel.c
4193 @@ -2694,6 +2694,9 @@ static struct pci_device_id azx_ids[] = {
4194 { PCI_DEVICE(0x10de, 0x0ac1), .driver_data = AZX_DRIVER_NVIDIA },
4195 { PCI_DEVICE(0x10de, 0x0ac2), .driver_data = AZX_DRIVER_NVIDIA },
4196 { PCI_DEVICE(0x10de, 0x0ac3), .driver_data = AZX_DRIVER_NVIDIA },
4197 + { PCI_DEVICE(0x10de, 0x0be2), .driver_data = AZX_DRIVER_NVIDIA },
4198 + { PCI_DEVICE(0x10de, 0x0be3), .driver_data = AZX_DRIVER_NVIDIA },
4199 + { PCI_DEVICE(0x10de, 0x0be4), .driver_data = AZX_DRIVER_NVIDIA },
4200 { PCI_DEVICE(0x10de, 0x0d94), .driver_data = AZX_DRIVER_NVIDIA },
4201 { PCI_DEVICE(0x10de, 0x0d95), .driver_data = AZX_DRIVER_NVIDIA },
4202 { PCI_DEVICE(0x10de, 0x0d96), .driver_data = AZX_DRIVER_NVIDIA },
4203 diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c
4204 index 01a18ed..7c23016 100644
4205 --- a/sound/pci/hda/patch_intelhdmi.c
4206 +++ b/sound/pci/hda/patch_intelhdmi.c
4207 @@ -684,7 +684,7 @@ static struct hda_codec_preset snd_hda_preset_intelhdmi[] = {
4208 { .id = 0x80862801, .name = "G45 DEVBLC", .patch = patch_intel_hdmi },
4209 { .id = 0x80862802, .name = "G45 DEVCTG", .patch = patch_intel_hdmi },
4210 { .id = 0x80862803, .name = "G45 DEVELK", .patch = patch_intel_hdmi },
4211 - { .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi },
4212 + { .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi_ibexpeak },
4213 { .id = 0x80860054, .name = "Q57 DEVIBX", .patch = patch_intel_hdmi_ibexpeak },
4214 { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi },
4215 {} /* terminator */
4216 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
4217 index 075c3a6..c2e9370 100644
4218 --- a/sound/pci/hda/patch_realtek.c
4219 +++ b/sound/pci/hda/patch_realtek.c
4220 @@ -2401,6 +2401,8 @@ static const char *alc_slave_sws[] = {
4221 "Speaker Playback Switch",
4222 "Mono Playback Switch",
4223 "IEC958 Playback Switch",
4224 + "Line-Out Playback Switch",
4225 + "PCM Playback Switch",
4226 NULL,
4227 };
4228
4229 @@ -8839,7 +8841,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
4230 SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG),
4231 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG),
4232 SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */
4233 - SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC883_TARGA_2ch_DIG),
4234 + SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC882_AUTO),
4235 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
4236 SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG),
4237 SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG),
4238 @@ -10152,7 +10154,7 @@ static void alc262_hp_t5735_setup(struct hda_codec *codec)
4239 struct alc_spec *spec = codec->spec;
4240
4241 spec->autocfg.hp_pins[0] = 0x15;
4242 - spec->autocfg.speaker_pins[0] = 0x0c; /* HACK: not actually a pin */
4243 + spec->autocfg.speaker_pins[0] = 0x14;
4244 }
4245
4246 static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = {
4247 @@ -11586,9 +11588,9 @@ static struct alc_config_preset alc262_presets[] = {
4248 .num_channel_mode = ARRAY_SIZE(alc262_modes),
4249 .channel_mode = alc262_modes,
4250 .input_mux = &alc262_capture_source,
4251 - .unsol_event = alc_automute_amp_unsol_event,
4252 + .unsol_event = alc_sku_unsol_event,
4253 .setup = alc262_hp_t5735_setup,
4254 - .init_hook = alc_automute_amp,
4255 + .init_hook = alc_inithook,
4256 },
4257 [ALC262_HP_RP5700] = {
4258 .mixers = { alc262_hp_rp5700_mixer },
4259 diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c
4260 index fd948bf..f5020ad 100644
4261 --- a/sound/pci/ice1712/juli.c
4262 +++ b/sound/pci/ice1712/juli.c
4263 @@ -504,6 +504,31 @@ static int __devinit juli_add_controls(struct snd_ice1712 *ice)
4264 }
4265
4266 /*
4267 + * suspend/resume
4268 + * */
4269 +
4270 +#ifdef CONFIG_PM
4271 +static int juli_resume(struct snd_ice1712 *ice)
4272 +{
4273 + struct snd_akm4xxx *ak = ice->akm;
4274 + struct juli_spec *spec = ice->spec;
4275 + /* akm4358 un-reset, un-mute */
4276 + snd_akm4xxx_reset(ak, 0);
4277 + /* reinit ak4114 */
4278 + snd_ak4114_reinit(spec->ak4114);
4279 + return 0;
4280 +}
4281 +
4282 +static int juli_suspend(struct snd_ice1712 *ice)
4283 +{
4284 + struct snd_akm4xxx *ak = ice->akm;
4285 + /* akm4358 reset and soft-mute */
4286 + snd_akm4xxx_reset(ak, 1);
4287 + return 0;
4288 +}
4289 +#endif
4290 +
4291 +/*
4292 * initialize the chip
4293 */
4294
4295 @@ -646,6 +671,13 @@ static int __devinit juli_init(struct snd_ice1712 *ice)
4296 ice->set_spdif_clock = juli_set_spdif_clock;
4297
4298 ice->spdif.ops.open = juli_spdif_in_open;
4299 +
4300 +#ifdef CONFIG_PM
4301 + ice->pm_resume = juli_resume;
4302 + ice->pm_suspend = juli_suspend;
4303 + ice->pm_suspend_enabled = 1;
4304 +#endif
4305 +
4306 return 0;
4307 }
4308
4309 diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
4310 index fe1307b..eedf33c 100644
4311 --- a/sound/soc/codecs/wm8903.c
4312 +++ b/sound/soc/codecs/wm8903.c
4313 @@ -1506,7 +1506,7 @@ static int wm8903_resume(struct platform_device *pdev)
4314 struct i2c_client *i2c = codec->control_data;
4315 int i;
4316 u16 *reg_cache = codec->reg_cache;
4317 - u16 *tmp_cache = kmemdup(codec->reg_cache, sizeof(wm8903_reg_defaults),
4318 + u16 *tmp_cache = kmemdup(reg_cache, sizeof(wm8903_reg_defaults),
4319 GFP_KERNEL);
4320
4321 /* Bring the codec back up to standby first to minimise pop/clicks */
4322 @@ -1518,6 +1518,7 @@ static int wm8903_resume(struct platform_device *pdev)
4323 for (i = 2; i < ARRAY_SIZE(wm8903_reg_defaults); i++)
4324 if (tmp_cache[i] != reg_cache[i])
4325 snd_soc_write(codec, i, tmp_cache[i]);
4326 + kfree(tmp_cache);
4327 } else {
4328 dev_err(&i2c->dev, "Failed to allocate temporary cache\n");
4329 }
4330 diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
4331 index bb4ebd8..251282c 100644
4332 --- a/virt/kvm/eventfd.c
4333 +++ b/virt/kvm/eventfd.c
4334 @@ -168,7 +168,7 @@ irqfd_ptable_queue_proc(struct file *file, wait_queue_head_t *wqh,
4335 static int
4336 kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
4337 {
4338 - struct _irqfd *irqfd;
4339 + struct _irqfd *irqfd, *tmp;
4340 struct file *file = NULL;
4341 struct eventfd_ctx *eventfd = NULL;
4342 int ret;
4343 @@ -205,9 +205,20 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
4344 init_waitqueue_func_entry(&irqfd->wait, irqfd_wakeup);
4345 init_poll_funcptr(&irqfd->pt, irqfd_ptable_queue_proc);
4346
4347 + spin_lock_irq(&kvm->irqfds.lock);
4348 +
4349 + ret = 0;
4350 + list_for_each_entry(tmp, &kvm->irqfds.items, list) {
4351 + if (irqfd->eventfd != tmp->eventfd)
4352 + continue;
4353 + /* This fd is used for another irq already. */
4354 + ret = -EBUSY;
4355 + spin_unlock_irq(&kvm->irqfds.lock);
4356 + goto fail;
4357 + }
4358 +
4359 events = file->f_op->poll(file, &irqfd->pt);
4360
4361 - spin_lock_irq(&kvm->irqfds.lock);
4362 list_add_tail(&irqfd->list, &kvm->irqfds.items);
4363 spin_unlock_irq(&kvm->irqfds.lock);
4364
4365 diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
4366 index 03e5b21..5288885 100644
4367 --- a/virt/kvm/irq_comm.c
4368 +++ b/virt/kvm/irq_comm.c
4369 @@ -209,11 +209,13 @@ int kvm_request_irq_source_id(struct kvm *kvm)
4370
4371 if (irq_source_id >= BITS_PER_LONG) {
4372 printk(KERN_WARNING "kvm: exhaust allocatable IRQ sources!\n");
4373 - return -EFAULT;
4374 + irq_source_id = -EFAULT;
4375 + goto unlock;
4376 }
4377
4378 ASSERT(irq_source_id != KVM_USERSPACE_IRQ_SOURCE_ID);
4379 set_bit(irq_source_id, bitmap);
4380 +unlock:
4381 mutex_unlock(&kvm->irq_lock);
4382
4383 return irq_source_id;
4384 @@ -229,11 +231,15 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id)
4385 if (irq_source_id < 0 ||
4386 irq_source_id >= BITS_PER_LONG) {
4387 printk(KERN_ERR "kvm: IRQ source ID out of range!\n");
4388 - return;
4389 + goto unlock;
4390 }
4391 + clear_bit(irq_source_id, &kvm->arch.irq_sources_bitmap);
4392 + if (!irqchip_in_kernel(kvm))
4393 + goto unlock;
4394 +
4395 for (i = 0; i < KVM_IOAPIC_NUM_PINS; i++)
4396 clear_bit(irq_source_id, &kvm->arch.irq_states[i]);
4397 - clear_bit(irq_source_id, &kvm->arch.irq_sources_bitmap);
4398 +unlock:
4399 mutex_unlock(&kvm->irq_lock);
4400 }
4401

  ViewVC Help
Powered by ViewVC 1.1.20