/[linux-patches]/genpatches-2.6/tags/2.6.34-10/1002_linux-2.6.34.3.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.34-10/1002_linux-2.6.34.3.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1771 - (show annotations) (download)
Tue Aug 31 14:13:10 2010 UTC (3 years, 11 months ago) by mpagano
File size: 45517 byte(s)
2.6.34-10 release
1 diff --git a/Documentation/.gitignore b/Documentation/.gitignore
2 new file mode 100644
3 index 0000000..bcd907b
4 --- /dev/null
5 +++ b/Documentation/.gitignore
6 @@ -0,0 +1,7 @@
7 +filesystems/dnotify_test
8 +laptops/dslm
9 +timers/hpet_example
10 +vm/hugepage-mmap
11 +vm/hugepage-shm
12 +vm/map_hugetlb
13 +
14 diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c
15 index 70b2389..d2cfb11 100644
16 --- a/arch/arm/plat-mxc/gpio.c
17 +++ b/arch/arm/plat-mxc/gpio.c
18 @@ -215,13 +215,16 @@ static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset,
19 struct mxc_gpio_port *port =
20 container_of(chip, struct mxc_gpio_port, chip);
21 u32 l;
22 + unsigned long flags;
23
24 + spin_lock_irqsave(&port->lock, flags);
25 l = __raw_readl(port->base + GPIO_GDIR);
26 if (dir)
27 l |= 1 << offset;
28 else
29 l &= ~(1 << offset);
30 __raw_writel(l, port->base + GPIO_GDIR);
31 + spin_unlock_irqrestore(&port->lock, flags);
32 }
33
34 static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
35 @@ -230,9 +233,12 @@ static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
36 container_of(chip, struct mxc_gpio_port, chip);
37 void __iomem *reg = port->base + GPIO_DR;
38 u32 l;
39 + unsigned long flags;
40
41 + spin_lock_irqsave(&port->lock, flags);
42 l = (__raw_readl(reg) & (~(1 << offset))) | (value << offset);
43 __raw_writel(l, reg);
44 + spin_unlock_irqrestore(&port->lock, flags);
45 }
46
47 static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset)
48 @@ -286,6 +292,8 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
49 port[i].chip.base = i * 32;
50 port[i].chip.ngpio = 32;
51
52 + spin_lock_init(&port[i].lock);
53 +
54 /* its a serious configuration bug when it fails */
55 BUG_ON( gpiochip_add(&port[i].chip) < 0 );
56
57 diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h
58 index 894d2f8..6bd932c 100644
59 --- a/arch/arm/plat-mxc/include/mach/gpio.h
60 +++ b/arch/arm/plat-mxc/include/mach/gpio.h
61 @@ -36,6 +36,7 @@ struct mxc_gpio_port {
62 int virtual_irq_start;
63 struct gpio_chip chip;
64 u32 both_edges;
65 + spinlock_t lock;
66 };
67
68 int mxc_gpio_init(struct mxc_gpio_port*, int);
69 diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
70 index 4c247e0..df971fa 100644
71 --- a/arch/parisc/kernel/firmware.c
72 +++ b/arch/parisc/kernel/firmware.c
73 @@ -1123,7 +1123,6 @@ static char __attribute__((aligned(64))) iodc_dbuf[4096];
74 */
75 int pdc_iodc_print(const unsigned char *str, unsigned count)
76 {
77 - static int posx; /* for simple TAB-Simulation... */
78 unsigned int i;
79 unsigned long flags;
80
81 @@ -1133,19 +1132,12 @@ int pdc_iodc_print(const unsigned char *str, unsigned count)
82 iodc_dbuf[i+0] = '\r';
83 iodc_dbuf[i+1] = '\n';
84 i += 2;
85 - posx = 0;
86 goto print;
87 - case '\t':
88 - while (posx & 7) {
89 - iodc_dbuf[i] = ' ';
90 - i++, posx++;
91 - }
92 - break;
93 case '\b': /* BS */
94 - posx -= 2;
95 + i--; /* overwrite last */
96 default:
97 iodc_dbuf[i] = str[i];
98 - i++, posx++;
99 + i++;
100 break;
101 }
102 }
103 diff --git a/arch/x86/.gitignore b/arch/x86/.gitignore
104 new file mode 100644
105 index 0000000..0280790
106 --- /dev/null
107 +++ b/arch/x86/.gitignore
108 @@ -0,0 +1,3 @@
109 +boot/compressed/vmlinux
110 +tools/test_get_len
111 +
112 diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
113 index dd3df44..ca850d4 100644
114 --- a/arch/x86/kvm/mmu.c
115 +++ b/arch/x86/kvm/mmu.c
116 @@ -1901,6 +1901,8 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
117 pgprintk("hfn old %lx new %lx\n",
118 spte_to_pfn(*sptep), pfn);
119 rmap_remove(vcpu->kvm, sptep);
120 + __set_spte(sptep, shadow_trap_nonpresent_pte);
121 + kvm_flush_remote_tlbs(vcpu->kvm);
122 } else
123 was_rmapped = 1;
124 }
125 diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
126 index 65d8d79..27dff06 100644
127 --- a/arch/x86/xen/enlighten.c
128 +++ b/arch/x86/xen/enlighten.c
129 @@ -927,7 +927,7 @@ static const struct pv_init_ops xen_init_ops __initdata = {
130 };
131
132 static const struct pv_time_ops xen_time_ops __initdata = {
133 - .sched_clock = xen_sched_clock,
134 + .sched_clock = xen_clocksource_read,
135 };
136
137 static const struct pv_cpu_ops xen_cpu_ops __initdata = {
138 diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
139 index 32764b8..e90360f 100644
140 --- a/arch/x86/xen/time.c
141 +++ b/arch/x86/xen/time.c
142 @@ -155,45 +155,6 @@ static void do_stolen_accounting(void)
143 account_idle_ticks(ticks);
144 }
145
146 -/*
147 - * Xen sched_clock implementation. Returns the number of unstolen
148 - * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED
149 - * states.
150 - */
151 -unsigned long long xen_sched_clock(void)
152 -{
153 - struct vcpu_runstate_info state;
154 - cycle_t now;
155 - u64 ret;
156 - s64 offset;
157 -
158 - /*
159 - * Ideally sched_clock should be called on a per-cpu basis
160 - * anyway, so preempt should already be disabled, but that's
161 - * not current practice at the moment.
162 - */
163 - preempt_disable();
164 -
165 - now = xen_clocksource_read();
166 -
167 - get_runstate_snapshot(&state);
168 -
169 - WARN_ON(state.state != RUNSTATE_running);
170 -
171 - offset = now - state.state_entry_time;
172 - if (offset < 0)
173 - offset = 0;
174 -
175 - ret = state.time[RUNSTATE_blocked] +
176 - state.time[RUNSTATE_running] +
177 - offset;
178 -
179 - preempt_enable();
180 -
181 - return ret;
182 -}
183 -
184 -
185 /* Get the TSC speed from Xen */
186 unsigned long xen_tsc_khz(void)
187 {
188 diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
189 index ac9f798..c20a6c9 100644
190 --- a/drivers/edac/amd64_edac.c
191 +++ b/drivers/edac/amd64_edac.c
192 @@ -178,7 +178,7 @@ static int amd64_set_scrub_rate(struct mem_ctl_info *mci, u32 *bandwidth)
193
194 default:
195 amd64_printk(KERN_ERR, "Unsupported family!\n");
196 - break;
197 + return -EINVAL;
198 }
199 return amd64_search_set_scrub_rate(pvt->misc_f3_ctl, *bandwidth,
200 min_scrubrate);
201 @@ -1430,7 +1430,7 @@ static inline u64 f10_get_base_addr_offset(u64 sys_addr, int hi_range_sel,
202 u64 chan_off;
203
204 if (hi_range_sel) {
205 - if (!(dct_sel_base_addr & 0xFFFFF800) &&
206 + if (!(dct_sel_base_addr & 0xFFFF0000) &&
207 hole_valid && (sys_addr >= 0x100000000ULL))
208 chan_off = hole_off << 16;
209 else
210 @@ -1679,7 +1679,7 @@ static void f10_map_sysaddr_to_csrow(struct mem_ctl_info *mci,
211 * ganged. Otherwise @chan should already contain the channel at
212 * this point.
213 */
214 - if (dct_ganging_enabled(pvt) && pvt->nbcfg & K8_NBCFG_CHIPKILL)
215 + if (dct_ganging_enabled(pvt) && (pvt->nbcfg & K8_NBCFG_CHIPKILL))
216 chan = get_channel_from_ecc_syndrome(mci, syndrome);
217
218 if (chan >= 0)
219 diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
220 index 6d524a1..5ca2470 100644
221 --- a/drivers/gpu/drm/i915/intel_overlay.c
222 +++ b/drivers/gpu/drm/i915/intel_overlay.c
223 @@ -950,7 +950,7 @@ static int check_overlay_src(struct drm_device *dev,
224 || rec->src_width < N_HORIZ_Y_TAPS*4)
225 return -EINVAL;
226
227 - /* check alingment constrains */
228 + /* check alignment constraints */
229 switch (rec->flags & I915_OVERLAY_TYPE_MASK) {
230 case I915_OVERLAY_RGB:
231 /* not implemented */
232 @@ -982,7 +982,10 @@ static int check_overlay_src(struct drm_device *dev,
233 return -EINVAL;
234
235 /* stride checking */
236 - stride_mask = 63;
237 + if (IS_I830(dev) || IS_845G(dev))
238 + stride_mask = 255;
239 + else
240 + stride_mask = 63;
241
242 if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask)
243 return -EINVAL;
244 diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
245 index 8f3454e..7261325 100644
246 --- a/drivers/gpu/drm/radeon/r600.c
247 +++ b/drivers/gpu/drm/radeon/r600.c
248 @@ -361,7 +361,17 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev)
249 u32 tmp;
250
251 /* flush hdp cache so updates hit vram */
252 - WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1);
253 + if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740)) {
254 + void __iomem *ptr = (void *)rdev->gart.table.vram.ptr;
255 + u32 tmp;
256 +
257 + /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read
258 + * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL
259 + */
260 + WREG32(HDP_DEBUG1, 0);
261 + tmp = readl((void __iomem *)ptr);
262 + } else
263 + WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1);
264
265 WREG32(VM_CONTEXT0_INVALIDATION_LOW_ADDR, rdev->mc.gtt_start >> 12);
266 WREG32(VM_CONTEXT0_INVALIDATION_HIGH_ADDR, (rdev->mc.gtt_end - 1) >> 12);
267 @@ -2949,5 +2959,15 @@ int r600_debugfs_mc_info_init(struct radeon_device *rdev)
268 */
269 void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo)
270 {
271 - WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1);
272 + /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read
273 + * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL
274 + */
275 + if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740)) {
276 + void __iomem *ptr = (void *)rdev->gart.table.vram.ptr;
277 + u32 tmp;
278 +
279 + WREG32(HDP_DEBUG1, 0);
280 + tmp = readl((void __iomem *)ptr);
281 + } else
282 + WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1);
283 }
284 diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h
285 index 59c1f87..84bc28e 100644
286 --- a/drivers/gpu/drm/radeon/r600d.h
287 +++ b/drivers/gpu/drm/radeon/r600d.h
288 @@ -245,6 +245,7 @@
289 #define HDP_NONSURFACE_SIZE 0x2C0C
290 #define HDP_REG_COHERENCY_FLUSH_CNTL 0x54A0
291 #define HDP_TILING_CONFIG 0x2F3C
292 +#define HDP_DEBUG1 0x2F34
293
294 #define MC_VM_AGP_TOP 0x2184
295 #define MC_VM_AGP_BOT 0x2188
296 diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
297 index 1bac9ee..0fb8fc1 100644
298 --- a/drivers/gpu/drm/radeon/radeon_atombios.c
299 +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
300 @@ -1024,21 +1024,18 @@ bool radeon_atombios_sideport_present(struct radeon_device *rdev)
301 u8 frev, crev;
302 u16 data_offset;
303
304 + /* sideport is AMD only */
305 + if (rdev->family == CHIP_RS600)
306 + return false;
307 +
308 if (atom_parse_data_header(mode_info->atom_context, index, NULL,
309 &frev, &crev, &data_offset)) {
310 igp_info = (union igp_info *)(mode_info->atom_context->bios +
311 data_offset);
312 switch (crev) {
313 case 1:
314 - /* AMD IGPS */
315 - if ((rdev->family == CHIP_RS690) ||
316 - (rdev->family == CHIP_RS740)) {
317 - if (igp_info->info.ulBootUpMemoryClock)
318 - return true;
319 - } else {
320 - if (igp_info->info.ucMemoryType & 0xf0)
321 - return true;
322 - }
323 + if (igp_info->info.ulBootUpMemoryClock)
324 + return true;
325 break;
326 case 2:
327 if (igp_info->info_2.ucMemoryType & 0x0f)
328 diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
329 index 37db8ad..61136a4 100644
330 --- a/drivers/gpu/drm/radeon/radeon_combios.c
331 +++ b/drivers/gpu/drm/radeon/radeon_combios.c
332 @@ -693,6 +693,10 @@ bool radeon_combios_sideport_present(struct radeon_device *rdev)
333 struct drm_device *dev = rdev->ddev;
334 u16 igp_info;
335
336 + /* sideport is AMD only */
337 + if (rdev->family == CHIP_RS400)
338 + return false;
339 +
340 igp_info = combios_get_table_offset(dev, COMBIOS_INTEGRATED_SYSTEM_INFO_TABLE);
341
342 if (igp_info) {
343 diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
344 index a81bc7a..85bd022 100644
345 --- a/drivers/gpu/drm/radeon/rs600.c
346 +++ b/drivers/gpu/drm/radeon/rs600.c
347 @@ -475,7 +475,6 @@ void rs600_mc_init(struct radeon_device *rdev)
348 rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev);
349 base = RREG32_MC(R_000004_MC_FB_LOCATION);
350 base = G_000004_MC_FB_START(base) << 16;
351 - rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev);
352 radeon_vram_location(rdev, &rdev->mc, base);
353 radeon_gtt_location(rdev, &rdev->mc);
354 radeon_update_bandwidth_info(rdev);
355 diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
356 index bbf3da7..97e3002 100644
357 --- a/drivers/gpu/drm/radeon/rs690.c
358 +++ b/drivers/gpu/drm/radeon/rs690.c
359 @@ -158,8 +158,8 @@ void rs690_mc_init(struct radeon_device *rdev)
360 rdev->mc.visible_vram_size = rdev->mc.aper_size;
361 base = RREG32_MC(R_000100_MCCFG_FB_LOCATION);
362 base = G_000100_MC_FB_START(base) << 16;
363 - rs690_pm_info(rdev);
364 rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev);
365 + rs690_pm_info(rdev);
366 radeon_vram_location(rdev, &rdev->mc, base);
367 radeon_gtt_location(rdev, &rdev->mc);
368 radeon_update_bandwidth_info(rdev);
369 diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
370 index 97958a6..82c8ec6 100644
371 --- a/drivers/gpu/drm/radeon/rv770.c
372 +++ b/drivers/gpu/drm/radeon/rv770.c
373 @@ -174,7 +174,10 @@ static void rv770_mc_program(struct radeon_device *rdev)
374 WREG32((0x2c20 + j), 0x00000000);
375 WREG32((0x2c24 + j), 0x00000000);
376 }
377 - WREG32(HDP_REG_COHERENCY_FLUSH_CNTL, 0);
378 + /* r7xx hw bug. Read from HDP_DEBUG1 rather
379 + * than writing to HDP_REG_COHERENCY_FLUSH_CNTL
380 + */
381 + tmp = RREG32(HDP_DEBUG1);
382
383 rv515_mc_stop(rdev, &save);
384 if (r600_mc_wait_for_idle(rdev)) {
385 diff --git a/drivers/gpu/drm/radeon/rv770d.h b/drivers/gpu/drm/radeon/rv770d.h
386 index 9506f8c..6111a02 100644
387 --- a/drivers/gpu/drm/radeon/rv770d.h
388 +++ b/drivers/gpu/drm/radeon/rv770d.h
389 @@ -128,6 +128,7 @@
390 #define HDP_NONSURFACE_SIZE 0x2C0C
391 #define HDP_REG_COHERENCY_FLUSH_CNTL 0x54A0
392 #define HDP_TILING_CONFIG 0x2F3C
393 +#define HDP_DEBUG1 0x2F34
394
395 #define MC_SHARED_CHMAP 0x2004
396 #define NOOFCHAN_SHIFT 12
397 diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
398 index 48c84a5..00e5fcac8 100644
399 --- a/drivers/misc/enclosure.c
400 +++ b/drivers/misc/enclosure.c
401 @@ -285,8 +285,11 @@ enclosure_component_register(struct enclosure_device *edev,
402 cdev->groups = enclosure_groups;
403
404 err = device_register(cdev);
405 - if (err)
406 - ERR_PTR(err);
407 + if (err) {
408 + ecomp->number = -1;
409 + put_device(cdev);
410 + return ERR_PTR(err);
411 + }
412
413 return ecomp;
414 }
415 diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
416 index 8bdcd5f..4fc3147 100644
417 --- a/drivers/net/e1000e/hw.h
418 +++ b/drivers/net/e1000e/hw.h
419 @@ -306,7 +306,7 @@ enum e1e_registers {
420 #define E1000_KMRNCTRLSTA_INBAND_PARAM 0x9 /* Kumeran InBand Parameters */
421 #define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000 /* Nearend Loopback mode */
422 #define E1000_KMRNCTRLSTA_K1_CONFIG 0x7
423 -#define E1000_KMRNCTRLSTA_K1_ENABLE 0x140E
424 +#define E1000_KMRNCTRLSTA_K1_ENABLE 0x0002
425 #define E1000_KMRNCTRLSTA_K1_DISABLE 0x1400
426
427 #define IFE_PHY_EXTENDED_STATUS_CONTROL 0x10
428 diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
429 index dbf8178..64a06ed 100644
430 --- a/drivers/net/e1000e/netdev.c
431 +++ b/drivers/net/e1000e/netdev.c
432 @@ -3041,13 +3041,18 @@ static int e1000_test_msi(struct e1000_adapter *adapter)
433
434 /* disable SERR in case the MSI write causes a master abort */
435 pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd);
436 - pci_write_config_word(adapter->pdev, PCI_COMMAND,
437 - pci_cmd & ~PCI_COMMAND_SERR);
438 + if (pci_cmd & PCI_COMMAND_SERR)
439 + pci_write_config_word(adapter->pdev, PCI_COMMAND,
440 + pci_cmd & ~PCI_COMMAND_SERR);
441
442 err = e1000_test_msi_interrupt(adapter);
443
444 - /* restore previous setting of command word */
445 - pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd);
446 + /* re-enable SERR */
447 + if (pci_cmd & PCI_COMMAND_SERR) {
448 + pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd);
449 + pci_cmd |= PCI_COMMAND_SERR;
450 + pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd);
451 + }
452
453 /* success ! */
454 if (!err)
455 diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
456 index c9baa2a..c5edd41 100644
457 --- a/drivers/net/igb/igb_main.c
458 +++ b/drivers/net/igb/igb_main.c
459 @@ -322,9 +322,6 @@ static void igb_cache_ring_register(struct igb_adapter *adapter)
460 for (; i < adapter->rss_queues; i++)
461 adapter->rx_ring[i]->reg_idx = rbase_offset +
462 Q_IDX_82576(i);
463 - for (; j < adapter->rss_queues; j++)
464 - adapter->tx_ring[j]->reg_idx = rbase_offset +
465 - Q_IDX_82576(j);
466 }
467 case e1000_82575:
468 case e1000_82580:
469 @@ -685,7 +682,10 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
470
471 /* Number of supported queues. */
472 adapter->num_rx_queues = adapter->rss_queues;
473 - adapter->num_tx_queues = adapter->rss_queues;
474 + if (adapter->vfs_allocated_count)
475 + adapter->num_tx_queues = 1;
476 + else
477 + adapter->num_tx_queues = adapter->rss_queues;
478
479 /* start with one vector for every rx queue */
480 numvecs = adapter->num_rx_queues;
481 diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
482 index 404a034..1644b1a 100644
483 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
484 +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
485 @@ -721,7 +721,7 @@ static void ath9k_hw_get_def_gain_boundaries_pdadcs(struct ath_hw *ah,
486 vpdTableI[i][sizeCurrVpdTable - 2]);
487 vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep);
488
489 - if (tgtIndex > maxIndex) {
490 + if (tgtIndex >= maxIndex) {
491 while ((ss <= tgtIndex) &&
492 (k < (AR5416_NUM_PDADC_VALUES - 1))) {
493 tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] +
494 diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
495 index 20d5414..1774a59 100644
496 --- a/drivers/net/wireless/ath/ath9k/hw.c
497 +++ b/drivers/net/wireless/ath/ath9k/hw.c
498 @@ -863,7 +863,8 @@ int ath9k_hw_init(struct ath_hw *ah)
499
500 if (ah->config.serialize_regmode == SER_REG_MODE_AUTO) {
501 if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI ||
502 - (AR_SREV_9280(ah) && !ah->is_pciexpress)) {
503 + ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) &&
504 + !ah->is_pciexpress)) {
505 ah->config.serialize_regmode =
506 SER_REG_MODE_ON;
507 } else {
508 @@ -1955,7 +1956,8 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
509 macStaId1 = REG_READ(ah, AR_STA_ID1) & AR_STA_ID1_BASE_RATE_11B;
510
511 /* For chips on which RTC reset is done, save TSF before it gets cleared */
512 - if (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
513 + if (AR_SREV_9100(ah) ||
514 + (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)))
515 tsf = ath9k_hw_gettsf64(ah);
516
517 saveLedState = REG_READ(ah, AR_CFG_LED) &
518 @@ -1985,7 +1987,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
519 }
520
521 /* Restore TSF */
522 - if (tsf && AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
523 + if (tsf)
524 ath9k_hw_settsf64(ah, tsf);
525
526 if (AR_SREV_9280_10_OR_LATER(ah))
527 @@ -2005,6 +2007,17 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
528 if (r)
529 return r;
530
531 + /*
532 + * Some AR91xx SoC devices frequently fail to accept TSF writes
533 + * right after the chip reset. When that happens, write a new
534 + * value after the initvals have been applied, with an offset
535 + * based on measured time difference
536 + */
537 + if (AR_SREV_9100(ah) && (ath9k_hw_gettsf64(ah) < tsf)) {
538 + tsf += 1500;
539 + ath9k_hw_settsf64(ah, tsf);
540 + }
541 +
542 /* Setup MFP options for CCMP */
543 if (AR_SREV_9280_20_OR_LATER(ah)) {
544 /* Mask Retry(b11), PwrMgt(b12), MoreData(b13) to 0 in mgmt
545 diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
546 index 294b486..0b2ade3 100644
547 --- a/drivers/net/wireless/ath/ath9k/xmit.c
548 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
549 @@ -453,6 +453,14 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
550 bf = bf_next;
551 }
552
553 + /* prepend un-acked frames to the beginning of the pending frame queue */
554 + if (!list_empty(&bf_pending)) {
555 + spin_lock_bh(&txq->axq_lock);
556 + list_splice(&bf_pending, &tid->buf_q);
557 + ath_tx_queue_tid(txq, tid);
558 + spin_unlock_bh(&txq->axq_lock);
559 + }
560 +
561 if (tid->state & AGGR_CLEANUP) {
562 if (tid->baw_head == tid->baw_tail) {
563 tid->state &= ~AGGR_ADDBA_COMPLETE;
564 @@ -465,14 +473,6 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
565 return;
566 }
567
568 - /* prepend un-acked frames to the beginning of the pending frame queue */
569 - if (!list_empty(&bf_pending)) {
570 - spin_lock_bh(&txq->axq_lock);
571 - list_splice(&bf_pending, &tid->buf_q);
572 - ath_tx_queue_tid(txq, tid);
573 - spin_unlock_bh(&txq->axq_lock);
574 - }
575 -
576 rcu_read_unlock();
577
578 if (needreset)
579 @@ -2230,37 +2230,37 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)
580
581 void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an)
582 {
583 - int i;
584 - struct ath_atx_ac *ac, *ac_tmp;
585 - struct ath_atx_tid *tid, *tid_tmp;
586 + struct ath_atx_ac *ac;
587 + struct ath_atx_tid *tid;
588 struct ath_txq *txq;
589 + int i, tidno;
590
591 - for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
592 - if (ATH_TXQ_SETUP(sc, i)) {
593 - txq = &sc->tx.txq[i];
594 + for (tidno = 0, tid = &an->tid[tidno];
595 + tidno < WME_NUM_TID; tidno++, tid++) {
596 + i = tid->ac->qnum;
597
598 - spin_lock_bh(&txq->axq_lock);
599 + if (!ATH_TXQ_SETUP(sc, i))
600 + continue;
601
602 - list_for_each_entry_safe(ac,
603 - ac_tmp, &txq->axq_acq, list) {
604 - tid = list_first_entry(&ac->tid_q,
605 - struct ath_atx_tid, list);
606 - if (tid && tid->an != an)
607 - continue;
608 - list_del(&ac->list);
609 - ac->sched = false;
610 -
611 - list_for_each_entry_safe(tid,
612 - tid_tmp, &ac->tid_q, list) {
613 - list_del(&tid->list);
614 - tid->sched = false;
615 - ath_tid_drain(sc, txq, tid);
616 - tid->state &= ~AGGR_ADDBA_COMPLETE;
617 - tid->state &= ~AGGR_CLEANUP;
618 - }
619 - }
620 + txq = &sc->tx.txq[i];
621 + ac = tid->ac;
622
623 - spin_unlock_bh(&txq->axq_lock);
624 + spin_lock_bh(&txq->axq_lock);
625 +
626 + if (tid->sched) {
627 + list_del(&tid->list);
628 + tid->sched = false;
629 + }
630 +
631 + if (ac->sched) {
632 + list_del(&ac->list);
633 + tid->ac->sched = false;
634 }
635 +
636 + ath_tid_drain(sc, txq, tid);
637 + tid->state &= ~AGGR_ADDBA_COMPLETE;
638 + tid->state &= ~AGGR_CLEANUP;
639 +
640 + spin_unlock_bh(&txq->axq_lock);
641 }
642 }
643 diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
644 index a8299a3..49353a2 100644
645 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c
646 +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
647 @@ -607,11 +607,10 @@ void iwl_bg_scan_check(struct work_struct *data)
648 return;
649
650 mutex_lock(&priv->mutex);
651 - if (test_bit(STATUS_SCANNING, &priv->status) ||
652 - test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
653 - IWL_DEBUG_SCAN(priv, "Scan completion watchdog resetting "
654 - "adapter (%dms)\n",
655 - jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG));
656 + if (test_bit(STATUS_SCANNING, &priv->status) &&
657 + !test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
658 + IWL_DEBUG_SCAN(priv, "Scan completion watchdog (%dms)\n",
659 + jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG));
660
661 if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
662 iwl_send_scan_abort(priv);
663 @@ -950,12 +949,11 @@ void iwl_bg_abort_scan(struct work_struct *work)
664 !test_bit(STATUS_GEO_CONFIGURED, &priv->status))
665 return;
666
667 - mutex_lock(&priv->mutex);
668 -
669 - cancel_delayed_work_sync(&priv->scan_check);
670 - set_bit(STATUS_SCAN_ABORTING, &priv->status);
671 - iwl_send_scan_abort(priv);
672 + cancel_delayed_work(&priv->scan_check);
673
674 + mutex_lock(&priv->mutex);
675 + if (test_bit(STATUS_SCAN_ABORTING, &priv->status))
676 + iwl_send_scan_abort(priv);
677 mutex_unlock(&priv->mutex);
678 }
679 EXPORT_SYMBOL(iwl_bg_abort_scan);
680 diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
681 index 188bc84..d02be78 100644
682 --- a/drivers/parisc/led.c
683 +++ b/drivers/parisc/led.c
684 @@ -176,16 +176,18 @@ static ssize_t led_proc_write(struct file *file, const char *buf,
685 size_t count, loff_t *pos)
686 {
687 void *data = PDE(file->f_path.dentry->d_inode)->data;
688 - char *cur, lbuf[count + 1];
689 + char *cur, lbuf[32];
690 int d;
691
692 if (!capable(CAP_SYS_ADMIN))
693 return -EACCES;
694
695 - memset(lbuf, 0, count + 1);
696 + if (count >= sizeof(lbuf))
697 + count = sizeof(lbuf)-1;
698
699 if (copy_from_user(lbuf, buf, count))
700 return -EFAULT;
701 + lbuf[count] = 0;
702
703 cur = lbuf;
704
705 diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c
706 index 5732bb2..3d55124 100644
707 --- a/drivers/ssb/driver_chipcommon_pmu.c
708 +++ b/drivers/ssb/driver_chipcommon_pmu.c
709 @@ -502,9 +502,9 @@ static void ssb_pmu_resources_init(struct ssb_chipcommon *cc)
710 chipco_write32(cc, SSB_CHIPCO_PMU_MAXRES_MSK, max_msk);
711 }
712
713 -/* http://bcm-v4.sipsolutions.net/802.11/SSB/PmuInit */
714 void ssb_pmu_init(struct ssb_chipcommon *cc)
715 {
716 + struct ssb_bus *bus = cc->dev->bus;
717 u32 pmucap;
718
719 if (!(cc->capabilities & SSB_CHIPCO_CAP_PMU))
720 @@ -516,12 +516,15 @@ void ssb_pmu_init(struct ssb_chipcommon *cc)
721 ssb_dprintk(KERN_DEBUG PFX "Found rev %u PMU (capabilities 0x%08X)\n",
722 cc->pmu.rev, pmucap);
723
724 - if (cc->pmu.rev == 1)
725 - chipco_mask32(cc, SSB_CHIPCO_PMU_CTL,
726 - ~SSB_CHIPCO_PMU_CTL_NOILPONW);
727 - else
728 - chipco_set32(cc, SSB_CHIPCO_PMU_CTL,
729 - SSB_CHIPCO_PMU_CTL_NOILPONW);
730 + if (cc->pmu.rev >= 1) {
731 + if ((bus->chip_id == 0x4325) && (bus->chip_rev < 2)) {
732 + chipco_mask32(cc, SSB_CHIPCO_PMU_CTL,
733 + ~SSB_CHIPCO_PMU_CTL_NOILPONW);
734 + } else {
735 + chipco_set32(cc, SSB_CHIPCO_PMU_CTL,
736 + SSB_CHIPCO_PMU_CTL_NOILPONW);
737 + }
738 + }
739 ssb_pmu_pll_init(cc);
740 ssb_pmu_resources_init(cc);
741 }
742 diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
743 index 7e284ae..a7c5351 100644
744 --- a/drivers/ssb/pci.c
745 +++ b/drivers/ssb/pci.c
746 @@ -23,7 +23,6 @@
747
748 #include "ssb_private.h"
749
750 -bool ssb_is_sprom_available(struct ssb_bus *bus);
751
752 /* Define the following to 1 to enable a printk on each coreswitch. */
753 #define SSB_VERBOSE_PCICORESWITCH_DEBUG 0
754 @@ -169,7 +168,7 @@ err_pci:
755 }
756
757 /* Get the word-offset for a SSB_SPROM_XXX define. */
758 -#define SPOFF(offset) ((offset) / sizeof(u16))
759 +#define SPOFF(offset) (((offset) - SSB_SPROM_BASE1) / sizeof(u16))
760 /* Helper to extract some _offset, which is one of the SSB_SPROM_XXX defines. */
761 #define SPEX16(_outvar, _offset, _mask, _shift) \
762 out->_outvar = ((in[SPOFF(_offset)] & (_mask)) >> (_shift))
763 @@ -254,11 +253,6 @@ static int sprom_do_read(struct ssb_bus *bus, u16 *sprom)
764 {
765 int i;
766
767 - /* Check if SPROM can be read */
768 - if (ioread16(bus->mmio + bus->sprom_offset) == 0xFFFF) {
769 - ssb_printk(KERN_ERR PFX "Unable to read SPROM\n");
770 - return -ENODEV;
771 - }
772 for (i = 0; i < bus->sprom_size; i++)
773 sprom[i] = ioread16(bus->mmio + bus->sprom_offset + (i * 2));
774
775 @@ -653,23 +647,17 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus,
776 if (!buf)
777 goto out;
778 bus->sprom_size = SSB_SPROMSIZE_WORDS_R123;
779 - err = sprom_do_read(bus, buf);
780 - if (err)
781 - goto out_free;
782 + sprom_do_read(bus, buf);
783 err = sprom_check_crc(buf, bus->sprom_size);
784 if (err) {
785 /* try for a 440 byte SPROM - revision 4 and higher */
786 kfree(buf);
787 buf = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16),
788 GFP_KERNEL);
789 - if (!buf) {
790 - err = -ENOMEM;
791 + if (!buf)
792 goto out;
793 - }
794 bus->sprom_size = SSB_SPROMSIZE_WORDS_R4;
795 - err = sprom_do_read(bus, buf);
796 - if (err)
797 - goto out_free;
798 + sprom_do_read(bus, buf);
799 err = sprom_check_crc(buf, bus->sprom_size);
800 if (err) {
801 /* All CRC attempts failed.
802 diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
803 index d63c889..1d6834d 100644
804 --- a/drivers/staging/comedi/Kconfig
805 +++ b/drivers/staging/comedi/Kconfig
806 @@ -16,6 +16,7 @@ config COMEDI_DEBUG
807 config COMEDI_PCI_DRIVERS
808 tristate "Comedi PCI drivers"
809 depends on COMEDI && PCI
810 + select COMEDI_8255
811 default N
812 ---help---
813 Enable lots of comedi PCI drivers to be built
814 @@ -23,6 +24,7 @@ config COMEDI_PCI_DRIVERS
815 config COMEDI_PCMCIA_DRIVERS
816 tristate "Comedi PCMCIA drivers"
817 depends on COMEDI && PCMCIA && PCCARD
818 + select COMEDI_8255
819 default N
820 ---help---
821 Enable lots of comedi PCMCIA and PCCARD drivers to be built
822 @@ -33,3 +35,6 @@ config COMEDI_USB_DRIVERS
823 default N
824 ---help---
825 Enable lots of comedi USB drivers to be built
826 +
827 +config COMEDI_8255
828 + tristate
829 diff --git a/drivers/staging/comedi/drivers/Makefile b/drivers/staging/comedi/drivers/Makefile
830 index df2854d..33b1d52 100644
831 --- a/drivers/staging/comedi/drivers/Makefile
832 +++ b/drivers/staging/comedi/drivers/Makefile
833 @@ -8,8 +8,10 @@ obj-$(CONFIG_COMEDI) += comedi_test.o
834 obj-$(CONFIG_COMEDI) += comedi_parport.o
835 obj-$(CONFIG_COMEDI) += pcm_common.o
836
837 +# Comedi 8255 module
838 +obj-$(CONFIG_COMEDI_8255) += 8255.o
839 +
840 # Comedi PCI drivers
841 -obj-$(CONFIG_COMEDI_PCI_DRIVERS) += 8255.o
842 obj-$(CONFIG_COMEDI_PCI_DRIVERS) += acl7225b.o
843 obj-$(CONFIG_COMEDI_PCI_DRIVERS) += addi_apci_035.o
844 obj-$(CONFIG_COMEDI_PCI_DRIVERS) += addi_apci_1032.o
845 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
846 index b60a14d..4f15745 100644
847 --- a/drivers/usb/core/hcd.c
848 +++ b/drivers/usb/core/hcd.c
849 @@ -1330,7 +1330,7 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
850 urb->setup_dma))
851 return -EAGAIN;
852 urb->transfer_flags |= URB_SETUP_MAP_SINGLE;
853 - } else if (hcd->driver->flags & HCD_LOCAL_MEM)
854 + } else if (hcd->driver->flags & HCD_LOCAL_MEM) {
855 ret = hcd_alloc_coherent(
856 urb->dev->bus, mem_flags,
857 &urb->setup_dma,
858 @@ -1340,6 +1340,7 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
859 if (ret)
860 return ret;
861 urb->transfer_flags |= URB_SETUP_MAP_LOCAL;
862 + }
863 }
864
865 dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
866 diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
867 index 25fddc1..a5a7227 100644
868 --- a/fs/gfs2/dir.c
869 +++ b/fs/gfs2/dir.c
870 @@ -392,7 +392,7 @@ static int gfs2_dirent_find_space(const struct gfs2_dirent *dent,
871 unsigned totlen = be16_to_cpu(dent->de_rec_len);
872
873 if (gfs2_dirent_sentinel(dent))
874 - actual = GFS2_DIRENT_SIZE(0);
875 + actual = 0;
876 if (totlen - actual >= required)
877 return 1;
878 return 0;
879 diff --git a/fs/nfs/file.c b/fs/nfs/file.c
880 index 8d965bd..8fc1c55 100644
881 --- a/fs/nfs/file.c
882 +++ b/fs/nfs/file.c
883 @@ -27,6 +27,7 @@
884 #include <linux/pagemap.h>
885 #include <linux/aio.h>
886 #include <linux/gfp.h>
887 +#include <linux/swap.h>
888
889 #include <asm/uaccess.h>
890 #include <asm/system.h>
891 @@ -489,11 +490,19 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
892 */
893 static int nfs_release_page(struct page *page, gfp_t gfp)
894 {
895 + struct address_space *mapping = page->mapping;
896 +
897 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
898
899 /* Only do I/O if gfp is a superset of GFP_KERNEL */
900 - if ((gfp & GFP_KERNEL) == GFP_KERNEL)
901 - nfs_wb_page(page->mapping->host, page);
902 + if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL) {
903 + int how = FLUSH_SYNC;
904 +
905 + /* Don't let kswapd deadlock waiting for OOM RPC calls */
906 + if (current_is_kswapd())
907 + how = 0;
908 + nfs_commit_inode(mapping->host, how);
909 + }
910 /* If PagePrivate() is set, then the page is not freeable */
911 if (PagePrivate(page))
912 return 0;
913 diff --git a/fs/nfs/write.c b/fs/nfs/write.c
914 index 91679e2..caf47fc 100644
915 --- a/fs/nfs/write.c
916 +++ b/fs/nfs/write.c
917 @@ -1379,7 +1379,7 @@ static const struct rpc_call_ops nfs_commit_ops = {
918 .rpc_release = nfs_commit_release,
919 };
920
921 -static int nfs_commit_inode(struct inode *inode, int how)
922 +int nfs_commit_inode(struct inode *inode, int how)
923 {
924 LIST_HEAD(head);
925 int may_wait = how & FLUSH_SYNC;
926 @@ -1443,11 +1443,6 @@ out_mark_dirty:
927 return ret;
928 }
929 #else
930 -static int nfs_commit_inode(struct inode *inode, int how)
931 -{
932 - return 0;
933 -}
934 -
935 static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc)
936 {
937 return 0;
938 diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
939 index 2d428b0..3a9940e 100644
940 --- a/include/drm/drm_pciids.h
941 +++ b/include/drm/drm_pciids.h
942 @@ -146,6 +146,8 @@
943 {0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
944 {0x1002, 0x6889, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
945 {0x1002, 0x688A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
946 + {0x1002, 0x688C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
947 + {0x1002, 0x688D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
948 {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
949 {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
950 {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \
951 @@ -161,6 +163,7 @@
952 {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \
953 {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
954 {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
955 + {0x1002, 0x68c7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
956 {0x1002, 0x68c8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \
957 {0x1002, 0x68c9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \
958 {0x1002, 0x68d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \
959 @@ -174,6 +177,7 @@
960 {0x1002, 0x68e8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \
961 {0x1002, 0x68e9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \
962 {0x1002, 0x68f1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \
963 + {0x1002, 0x68f2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \
964 {0x1002, 0x68f8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \
965 {0x1002, 0x68f9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \
966 {0x1002, 0x68fe, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \
967 @@ -314,6 +318,7 @@
968 {0x1002, 0x9456, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
969 {0x1002, 0x945A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
970 {0x1002, 0x945B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
971 + {0x1002, 0x945E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
972 {0x1002, 0x9460, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
973 {0x1002, 0x9462, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
974 {0x1002, 0x946A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
975 @@ -324,6 +329,7 @@
976 {0x1002, 0x9487, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
977 {0x1002, 0x9488, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
978 {0x1002, 0x9489, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
979 + {0x1002, 0x948A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
980 {0x1002, 0x948F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
981 {0x1002, 0x9490, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
982 {0x1002, 0x9491, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
983 @@ -366,6 +372,7 @@
984 {0x1002, 0x9553, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
985 {0x1002, 0x9555, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
986 {0x1002, 0x9557, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
987 + {0x1002, 0x955f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
988 {0x1002, 0x9580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_NEW_MEMMAP}, \
989 {0x1002, 0x9581, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
990 {0x1002, 0x9583, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
991 diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
992 index 07ce460..1436eb5 100644
993 --- a/include/linux/nfs_fs.h
994 +++ b/include/linux/nfs_fs.h
995 @@ -479,8 +479,15 @@ extern int nfs_wb_all(struct inode *inode);
996 extern int nfs_wb_page(struct inode *inode, struct page* page);
997 extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
998 #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
999 +extern int nfs_commit_inode(struct inode *, int);
1000 extern struct nfs_write_data *nfs_commitdata_alloc(void);
1001 extern void nfs_commit_free(struct nfs_write_data *wdata);
1002 +#else
1003 +static inline int
1004 +nfs_commit_inode(struct inode *inode, int how)
1005 +{
1006 + return 0;
1007 +}
1008 #endif
1009
1010 static inline int
1011 diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
1012 index 732ba9a..a2608bf 100644
1013 --- a/include/linux/ssb/ssb.h
1014 +++ b/include/linux/ssb/ssb.h
1015 @@ -305,8 +305,8 @@ struct ssb_bus {
1016 /* ID information about the Chip. */
1017 u16 chip_id;
1018 u16 chip_rev;
1019 - u16 sprom_size; /* number of words in sprom */
1020 u16 sprom_offset;
1021 + u16 sprom_size; /* number of words in sprom */
1022 u8 chip_package;
1023
1024 /* List of devices (cores) on the backplane. */
1025 @@ -395,6 +395,9 @@ extern int ssb_bus_sdiobus_register(struct ssb_bus *bus,
1026
1027 extern void ssb_bus_unregister(struct ssb_bus *bus);
1028
1029 +/* Does the device have an SPROM? */
1030 +extern bool ssb_is_sprom_available(struct ssb_bus *bus);
1031 +
1032 /* Set a fallback SPROM.
1033 * See kdoc at the function definition for complete documentation. */
1034 extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom);
1035 diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h
1036 index 7600f38..2cdf249 100644
1037 --- a/include/linux/ssb/ssb_driver_chipcommon.h
1038 +++ b/include/linux/ssb/ssb_driver_chipcommon.h
1039 @@ -46,7 +46,6 @@
1040 #define SSB_PLLTYPE_7 0x00038000 /* 25Mhz, 4 dividers */
1041 #define SSB_CHIPCO_CAP_PCTL 0x00040000 /* Power Control */
1042 #define SSB_CHIPCO_CAP_OTPS 0x00380000 /* OTP size */
1043 -#define SSB_CHIPCO_CAP_SPROM 0x40000000 /* SPROM present */
1044 #define SSB_CHIPCO_CAP_OTPS_SHIFT 19
1045 #define SSB_CHIPCO_CAP_OTPS_BASE 5
1046 #define SSB_CHIPCO_CAP_JTAGM 0x00400000 /* JTAG master present */
1047 @@ -54,6 +53,7 @@
1048 #define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */
1049 #define SSB_CHIPCO_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */
1050 #define SSB_CHIPCO_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */
1051 +#define SSB_CHIPCO_CAP_SPROM 0x40000000 /* SPROM present */
1052 #define SSB_CHIPCO_CORECTL 0x0008
1053 #define SSB_CHIPCO_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */
1054 #define SSB_CHIPCO_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */
1055 @@ -386,6 +386,7 @@
1056
1057
1058 /** Chip specific Chip-Status register contents. */
1059 +#define SSB_CHIPCO_CHST_4322_SPROM_EXISTS 0x00000040 /* SPROM present */
1060 #define SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL 0x00000003
1061 #define SSB_CHIPCO_CHST_4325_DEFCIS_SEL 0 /* OTP is powered up, use def. CIS, no SPROM */
1062 #define SSB_CHIPCO_CHST_4325_SPROM_SEL 1 /* OTP is powered up, SPROM is present */
1063 @@ -399,6 +400,18 @@
1064 #define SSB_CHIPCO_CHST_4325_RCAL_VALUE_SHIFT 4
1065 #define SSB_CHIPCO_CHST_4325_PMUTOP_2B 0x00000200 /* 1 for 2b, 0 for to 2a */
1066
1067 +/** Macros to determine SPROM presence based on Chip-Status register. */
1068 +#define SSB_CHIPCO_CHST_4312_SPROM_PRESENT(status) \
1069 + ((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \
1070 + SSB_CHIPCO_CHST_4325_OTP_SEL)
1071 +#define SSB_CHIPCO_CHST_4322_SPROM_PRESENT(status) \
1072 + (status & SSB_CHIPCO_CHST_4322_SPROM_EXISTS)
1073 +#define SSB_CHIPCO_CHST_4325_SPROM_PRESENT(status) \
1074 + (((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \
1075 + SSB_CHIPCO_CHST_4325_DEFCIS_SEL) && \
1076 + ((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \
1077 + SSB_CHIPCO_CHST_4325_OTP_SEL))
1078 +
1079
1080
1081 /** Clockcontrol masks and values **/
1082 diff --git a/mm/memory.c b/mm/memory.c
1083 index 833952d..cceea05 100644
1084 --- a/mm/memory.c
1085 +++ b/mm/memory.c
1086 @@ -1385,10 +1385,20 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1087 return i ? : -EFAULT;
1088 }
1089 if (pages) {
1090 - struct page *page = vm_normal_page(gate_vma, start, *pte);
1091 + struct page *page;
1092 +
1093 + page = vm_normal_page(gate_vma, start, *pte);
1094 + if (!page) {
1095 + if (!(gup_flags & FOLL_DUMP) &&
1096 + is_zero_pfn(pte_pfn(*pte)))
1097 + page = pte_page(*pte);
1098 + else {
1099 + pte_unmap(pte);
1100 + return i ? : -EFAULT;
1101 + }
1102 + }
1103 pages[i] = page;
1104 - if (page)
1105 - get_page(page);
1106 + get_page(page);
1107 }
1108 pte_unmap(pte);
1109 if (vmas)
1110 diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
1111 index 98ce9bc..c85109d 100644
1112 --- a/net/9p/trans_fd.c
1113 +++ b/net/9p/trans_fd.c
1114 @@ -948,7 +948,7 @@ p9_fd_create_unix(struct p9_client *client, const char *addr, char *args)
1115
1116 csocket = NULL;
1117
1118 - if (strlen(addr) > UNIX_PATH_MAX) {
1119 + if (strlen(addr) >= UNIX_PATH_MAX) {
1120 P9_EPRINTK(KERN_ERR, "p9_trans_unix: address too long: %s\n",
1121 addr);
1122 return -ENAMETOOLONG;
1123 diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
1124 index 7b7080e..73b8d24 100644
1125 --- a/net/mac80211/mesh_plink.c
1126 +++ b/net/mac80211/mesh_plink.c
1127 @@ -65,7 +65,6 @@ void mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata)
1128 {
1129 atomic_inc(&sdata->u.mesh.mshstats.estab_plinks);
1130 mesh_accept_plinks_update(sdata);
1131 - ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
1132 }
1133
1134 static inline
1135 @@ -73,7 +72,6 @@ void mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata)
1136 {
1137 atomic_dec(&sdata->u.mesh.mshstats.estab_plinks);
1138 mesh_accept_plinks_update(sdata);
1139 - ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
1140 }
1141
1142 /**
1143 @@ -115,7 +113,7 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
1144 }
1145
1146 /**
1147 - * mesh_plink_deactivate - deactivate mesh peer link
1148 + * __mesh_plink_deactivate - deactivate mesh peer link
1149 *
1150 * @sta: mesh peer link to deactivate
1151 *
1152 @@ -123,18 +121,23 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
1153 *
1154 * Locking: the caller must hold sta->lock
1155 */
1156 -static void __mesh_plink_deactivate(struct sta_info *sta)
1157 +static bool __mesh_plink_deactivate(struct sta_info *sta)
1158 {
1159 struct ieee80211_sub_if_data *sdata = sta->sdata;
1160 + bool deactivated = false;
1161
1162 - if (sta->plink_state == PLINK_ESTAB)
1163 + if (sta->plink_state == PLINK_ESTAB) {
1164 mesh_plink_dec_estab_count(sdata);
1165 + deactivated = true;
1166 + }
1167 sta->plink_state = PLINK_BLOCKED;
1168 mesh_path_flush_by_nexthop(sta);
1169 +
1170 + return deactivated;
1171 }
1172
1173 /**
1174 - * __mesh_plink_deactivate - deactivate mesh peer link
1175 + * mesh_plink_deactivate - deactivate mesh peer link
1176 *
1177 * @sta: mesh peer link to deactivate
1178 *
1179 @@ -142,9 +145,15 @@ static void __mesh_plink_deactivate(struct sta_info *sta)
1180 */
1181 void mesh_plink_deactivate(struct sta_info *sta)
1182 {
1183 + struct ieee80211_sub_if_data *sdata = sta->sdata;
1184 + bool deactivated;
1185 +
1186 spin_lock_bh(&sta->lock);
1187 - __mesh_plink_deactivate(sta);
1188 + deactivated = __mesh_plink_deactivate(sta);
1189 spin_unlock_bh(&sta->lock);
1190 +
1191 + if (deactivated)
1192 + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
1193 }
1194
1195 static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
1196 @@ -381,10 +390,16 @@ int mesh_plink_open(struct sta_info *sta)
1197
1198 void mesh_plink_block(struct sta_info *sta)
1199 {
1200 + struct ieee80211_sub_if_data *sdata = sta->sdata;
1201 + bool deactivated;
1202 +
1203 spin_lock_bh(&sta->lock);
1204 - __mesh_plink_deactivate(sta);
1205 + deactivated = __mesh_plink_deactivate(sta);
1206 sta->plink_state = PLINK_BLOCKED;
1207 spin_unlock_bh(&sta->lock);
1208 +
1209 + if (deactivated)
1210 + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
1211 }
1212
1213
1214 @@ -397,6 +412,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
1215 enum plink_event event;
1216 enum plink_frame_type ftype;
1217 size_t baselen;
1218 + bool deactivated;
1219 u8 ie_len;
1220 u8 *baseaddr;
1221 __le16 plid, llid, reason;
1222 @@ -651,8 +667,9 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
1223 case CNF_ACPT:
1224 del_timer(&sta->plink_timer);
1225 sta->plink_state = PLINK_ESTAB;
1226 - mesh_plink_inc_estab_count(sdata);
1227 spin_unlock_bh(&sta->lock);
1228 + mesh_plink_inc_estab_count(sdata);
1229 + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
1230 mpl_dbg("Mesh plink with %pM ESTABLISHED\n",
1231 sta->sta.addr);
1232 break;
1233 @@ -684,8 +701,9 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
1234 case OPN_ACPT:
1235 del_timer(&sta->plink_timer);
1236 sta->plink_state = PLINK_ESTAB;
1237 - mesh_plink_inc_estab_count(sdata);
1238 spin_unlock_bh(&sta->lock);
1239 + mesh_plink_inc_estab_count(sdata);
1240 + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
1241 mpl_dbg("Mesh plink with %pM ESTABLISHED\n",
1242 sta->sta.addr);
1243 mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid,
1244 @@ -702,11 +720,13 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
1245 case CLS_ACPT:
1246 reason = cpu_to_le16(MESH_CLOSE_RCVD);
1247 sta->reason = reason;
1248 - __mesh_plink_deactivate(sta);
1249 + deactivated = __mesh_plink_deactivate(sta);
1250 sta->plink_state = PLINK_HOLDING;
1251 llid = sta->llid;
1252 mod_plink_timer(sta, dot11MeshHoldingTimeout(sdata));
1253 spin_unlock_bh(&sta->lock);
1254 + if (deactivated)
1255 + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
1256 mesh_plink_frame_tx(sdata, PLINK_CLOSE, sta->sta.addr, llid,
1257 plid, reason);
1258 break;
1259 diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
1260 index 22139fa..04c6dfd 100644
1261 --- a/net/wireless/mlme.c
1262 +++ b/net/wireless/mlme.c
1263 @@ -44,10 +44,10 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len)
1264 }
1265 }
1266
1267 - WARN_ON(!done);
1268 -
1269 - nl80211_send_rx_auth(rdev, dev, buf, len, GFP_KERNEL);
1270 - cfg80211_sme_rx_auth(dev, buf, len);
1271 + if (done) {
1272 + nl80211_send_rx_auth(rdev, dev, buf, len, GFP_KERNEL);
1273 + cfg80211_sme_rx_auth(dev, buf, len);
1274 + }
1275
1276 wdev_unlock(wdev);
1277 }
1278 diff --git a/net/wireless/scan.c b/net/wireless/scan.c
1279 index a026c6d..0163070 100644
1280 --- a/net/wireless/scan.c
1281 +++ b/net/wireless/scan.c
1282 @@ -275,6 +275,7 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
1283 {
1284 struct cfg80211_registered_device *dev = wiphy_to_dev(wiphy);
1285 struct cfg80211_internal_bss *bss, *res = NULL;
1286 + unsigned long now = jiffies;
1287
1288 spin_lock_bh(&dev->bss_lock);
1289
1290 @@ -283,6 +284,10 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
1291 continue;
1292 if (channel && bss->pub.channel != channel)
1293 continue;
1294 + /* Don't get expired BSS structs */
1295 + if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) &&
1296 + !atomic_read(&bss->hold))
1297 + continue;
1298 if (is_bss(&bss->pub, bssid, ssid, ssid_len)) {
1299 res = bss;
1300 kref_get(&res->ref);

  ViewVC Help
Powered by ViewVC 1.1.20