aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-02-28add copyright notices and license headerHEADmasterMatt Turner14-0/+326
2011-01-25drm/glint: program crtc and dacMatt Turner4-20/+276
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-01-25drm/glint: add bare TTM memory manager and framebufferMatt Turner12-26/+612
The TTM code uses the drm_addmap hack, so I can get something on the screen sooner rather than later. Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-01-25drm/glint: add pci probe and remove functions, set DRIVER_MODESETMatt Turner1-1/+19
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-01-25drm/glint: reorganize VRAM initMatt Turner2-27/+43
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-01-25drm/glint: attach connector and encoderMatt Turner1-0/+2
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-01-25drm/glint: initial connector/vga work, fill in drm_connector_helper_funcsMatt Turner5-1/+98
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-01-25drm/glint: initial encoder/dac work, fill in drm_encoder_helper_funcsMatt Turner5-2/+112
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-13drm/glint: more CRTC work, fill drm_crtc_helper_funcsMatt Turner3-0/+91
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-13drm/glint: initial CRTC workMatt Turner7-1/+147
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-13drm/glint: detect VRAM sizeMatt Turner3-0/+86
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-13drm/glint: map register BAR.Matt Turner6-2/+122
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-29drm/glint: fill in glint_init and glint_exit.Matt Turner1-1/+4
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-29drm/glint: add stubs and fill out drm_driver structMatt Turner5-1/+87
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-29drm/glint: add PCI IDs.Matt Turner3-2/+24
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-29drm/glint: initial commit.Matt Turner5-0/+47
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-29Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds12-193/+280
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: Don't count_vm_events for discard bio in submit_bio. cfq: fix recursive call in cfq_blkiocg_update_completion_stats() cfq-iosched: Fixed boot warning with BLK_CGROUP=y and CFQ_GROUP_IOSCHED=n cfq: Don't allow queue merges for queues that have no process references block: fix DISCARD_BARRIER requests cciss: set SCSI max cmd len to 16, as default is wrong cpqarray: fix two more wrong section type cpqarray: fix wrong __init type on pci probe function drbd: Fixed a race between disk-attach and unexpected state changes writeback: fix pin_sb_for_writeback writeback: add missing requeue_io in writeback_inodes_wb writeback: simplify and split bdi_start_writeback writeback: simplify wakeup_flusher_threads writeback: fix writeback_inodes_wb from writeback_inodes_sb writeback: enforce s_umount locking in writeback_inodes_sb writeback: queue work on stack in writeback_inodes_sb writeback: fix writeback completion notifications
2010-06-29fs: fix superblock iteration racenpiggin@suse.de3-0/+23
list_for_each_entry_safe is not suitable to protect against concurrent modification of the list. 6754af6 introduced a race in sb walking. list_for_each_entry can use the trick of pinning the current entry in the list before we drop and retake the lock because it subsequently follows cur->next. However list_for_each_entry_safe saves n=cur->next for following before entering the loop body, so when the lock is dropped, n may be deleted. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Christoph Hellwig <hch@infradead.org> Cc: John Stultz <johnstul@us.ibm.com> Cc: Frank Mayhar <fmayhar@google.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-28Merge branch 'perf-fixes-for-linus' of ↵Linus Torvalds9-6/+39
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: tracing: Fix undeclared ENOSYS in include/linux/tracepoint.h perf record: prevent kill(0, SIGTERM); perf session: Remove threads from tree on PERF_RECORD_EXIT perf/tracing: Fix regression of perf losing kprobe events perf_events: Fix Intel Westmere event constraints perf record: Don't call newt functions when not initialized
2010-06-28Merge branch 'irq-fixes-for-linus' of ↵Linus Torvalds1-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: genirq: Deal with desc->set_type() changing desc->chip
2010-06-28Merge branch 'sched-fixes-for-linus' of ↵Linus Torvalds2-65/+79
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Prevent compiler from optimising the sched_avg_update() loop sched: Fix over-scheduling bug sched: Fix PROVE_RCU vs cpu_cgroup
2010-06-28Merge branch 'timers-fixes-for-linus' of ↵Linus Torvalds1-4/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: nohz: Fix nohz ratelimit
2010-06-28Merge branch 'core-fixes-for-linus' of ↵Linus Torvalds3-2/+13
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: silence PROVE_RCU in sched_fork() idr: fix RCU lockdep splat in idr_get_next() rcu: apply RCU protection to wake_affine()
2010-06-28Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds14-24/+45
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, Calgary: Increase max PHB number x86: Fix rebooting on Dell Precision WorkStation T7400 x86: Fix vsyscall on gcc 4.5 with -Os x86, pat: Proper init of memtype subtree_max_end um, hweight: Fix UML boot crash due to x86 optimized hweight x86, setup: Set ax register in boot vga query percpu, x86: Avoid warnings of unused variables in per cpu x86, irq: Rename gsi_end gsi_top, and fix off by one errors x86: use __ASSEMBLY__ rather than __ASSEMBLER__
2010-06-28Merge branch 'fixes' of ssh://master.kernel.org/~sfr/next-fixesLinus Torvalds9-1/+8
* 'fixes' of ssh://master.kernel.org/~sfr/next-fixes: acpi: update gfp/slab.h includes ocfs2: update gfp/slab.h includes davinci: update gfp/slab.h includes arm: update gfp/slab.h includes v4l-dvb: update gfp/slab.h includes
2010-06-27Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds7-79/+187
* 'for-linus' of git://neil.brown.name/md: md/raid5: don't include 'spare' drives when reshaping to fewer devices. md/raid5: add a missing 'continue' in a loop. md/raid5: Allow recovered part of partially recovered devices to be in-sync md/raid5: More careful check for "has array failed". md: Don't update ->recovery_offset when reshaping an array to fewer devices. md/raid5: avoid oops when number of devices is reduced then increased. md: enable raid4->raid0 takeover md: clear layout after ->raid0 takeover md: fix raid10 takeover: use new_layout for setup_conf md: fix handling of array level takeover that re-arranges devices. md: raid10: Fix null pointer dereference in fix_read_error() Restore partition detection of newly created md arrays.
2010-06-28acpi: update gfp/slab.h includesTejun Heo2-0/+2
Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28ocfs2: update gfp/slab.h includesTejun Heo1-1/+0
Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Joel Becker <joel.becker@oracle.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28davinci: update gfp/slab.h includesTejun Heo1-0/+1
Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28arm: update gfp/slab.h includesTejun Heo1-0/+1
Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28v4l-dvb: update gfp/slab.h includesTejun Heo4-0/+4
Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-27Merge branch 'for-linus' of ↵Linus Torvalds1-6/+30
git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: fix first chunk match in per_cpu_ptr_to_phys() percpu: fix trivial bugs in pcpu_build_alloc_info()
2010-06-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds56-380/+617
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (52 commits) phylib: Add autoload support for the LXT973 phy. ISDN: hysdn, fix potential NULL dereference vxge: fix memory leak in vxge_alloc_msix() error path isdn/gigaset: correct CAPI connection state storage isdn/gigaset: encode HLC and BC together isdn/gigaset: correct CAPI DATA_B3 Delivery Confirmation isdn/gigaset: correct CAPI voice connection encoding isdn/gigaset: honor CAPI application's buffer size request cpmac: do not leak struct net_device on phy_connect errors smc91c92_cs: fix the problem that lan & modem does not work simultaneously ipv6: fix NULL reference in proxy neighbor discovery Bluetooth: Bring back var 'i' increment xfrm: check bundle policy existance before dereferencing it sky2: enable rx/tx in sky2_phy_reinit() cnic: Disable statistics initialization for eth clients that do not support statistics net: add dependency on fw class module to qlcnic and netxen_nic snmp: fix SNMP_ADD_STATS() hso: remove setting of low_latency flag udp: Fix bogus UFO packet generation lasi82596: fix netdev_mc_count conversion ...
2010-06-27Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds5-94/+94
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFSv4: Fix an embarassing typo in encode_attrs() NFSv4: Ensure that /proc/self/mountinfo displays the minor version number NFSv4.1: Ensure that we initialise the session when following a referral SUNRPC: Fix a re-entrancy bug in xs_tcp_read_calldir() nfs4 use mandatory attribute file type in nfs4_get_root
2010-06-27Merge branch 'sh/for-linus' of ↵Linus Torvalds4-5/+2
git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 * 'sh/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: clocksource: sh_cmt: Fix up bogus shift value. arch/sh/mm: Eliminate a double lock sh: Fix up IORESOURCE_PCI_FIXED usage in pcibios_fixup_device_resources(). sh: remove duplicated #include
2010-06-27Merge branch 'for-linus' of ↵Linus Torvalds7-9/+28
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: MAINTAINERS - Add an entry for the input MT protocol Input: wacom - fix serial number handling on Cintiq 21UX2 Input: fixup X86_MRST selects Input: sysrq - fix "stuck" SysRq mode Input: ad7877 - fix spi word size to 16 bit Input: pcf8574_keypad - fix off by one in pcf8574_kp_irq_handler()
2010-06-27Merge branch 'for_linus' of ↵Linus Torvalds2-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: ext3: update ctime when changing the file's permission by setfacl ext2: update ctime when changing the file's permission by setfacl
2010-06-27Merge branch 'virtio' of ↵Linus Torvalds3-1/+5
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6 * 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6: virtio-pci: disable msi at startup virtio: return ENOMEM on out of memory
2010-06-27Merge branch 'for-linus' of ↵Linus Torvalds2-7/+16
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI/PM: Do not use native PCIe PME by default
2010-06-27Merge branch 'for-linus' of ↵Linus Torvalds8-59/+140
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: usb/endpoint, fix dangling pointer use ALSA: asihpi - Get rid of incorrect "long" types and casts. ASoC: DaVinci: Fix McASP hardware FIFO configuration ALSA: hda - Fix line-in for mb5 model MacBook (Pro) 5,1 / 5,2 ALSA: usb-audio: fix UAC2 control value queries ALSA: usb-audio: parse UAC2 sample rate ranges correctly ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE ALSA: usb-audio: add check for faulty clock in parse_audio_format_rates_v2() ALSA: hda - Don't check capture source mixer if no ADC is available
2010-06-27Merge branch 'hwmon-for-linus' of ↵Linus Torvalds3-3/+19
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (k8temp) Bypass core swapping on single-core processors hwmon: (i5k_amb) Fix sysfs attribute for lockdep hwmon: (k10temp) Do not blacklist known working CPU models
2010-06-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds2-7/+10
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: watchdog: at32ap700x_wdt: register misc device last in probe() function watchdog: [PATCH 3/3] imx2_wdt: fix section mismatch
2010-06-27Merge git://git.infradead.org/iommu-2.6Linus Torvalds1-3/+11
* git://git.infradead.org/iommu-2.6: intel-iommu: Force-disable IOMMU for iGFX on broken Cantiga revisions. intel-iommu: Fix double lock in get_domain_for_dev() intel-iommu: Fix reference by physical address in intel_iommu_attach_device()
2010-06-27Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linuxLinus Torvalds2-14/+5
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: OMAP: OMAPFB: fix rfbi.c compile error OMAPFB: LCDC: change update_mode to DISABLED when going suspend
2010-06-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds7-111/+98
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: MAINTAINERS: change mailing list address for CIFS cifs: remove bogus first_time check in NTLMv2 session setup code cifs: don't call cifs_new_fileinfo unless cifs_open succeeds cifs: don't ignore cifs_posix_open_inode_helper return value cifs: clean up arguments to cifs_open_inode_helper cifs: pass instantiated filp back after open call cifs: move cifs_new_fileinfo call out of cifs_posix_open cifs: implement drop_inode superblock op cifs: don't attempt busy-file rename unless it's in same directory
2010-06-27Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds6-4/+47
* 'merge' of git://git.secretlab.ca/git/linux-2.6: powerpc/5200: fix lite5200 ethernet phy address powerpc/5200: Fix build error in sound code. powerpc/5200: fix oops during going to standby powerpc/5200: add lite5200 onboard I2C eeprom and flash maintainers: Add git trees for SPI and device tree of: Drop properties with "/" in their name
2010-06-27Merge branch 'for-linus' of ↵Linus Torvalds8-54/+160
git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6: alpha: Fix de2104x driver failing to readout MAC address correctly alpha: Detect Super IO chip, no IDE on Avanti, enable EPP19 alpha: fix pci_mmap_resource API breakage alpha: fix __arch_hweight32 typo
2010-06-27Merge branch 'merge' of ↵Linus Torvalds75-514/+93
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Fix mpic_resume on early G5 macs powerpc: rtas_flash needs to use rtas_data_buf powerpc: Unconditionally enabled irq stacks powerpc/kexec: Wait for online/possible CPUs only. powerpc: Disable CONFIG_SYSFS_DEPRECATED powerpc/boot: Remove addRamdisk.c since it is now unused powerpc: Move kdump default base address to 64MB on 64bit powerpc: Remove dead CONFIG_HIGHPTE powerpc/fsl-booke: Move loadcam_entry back to asm code to fix SMP ftrace powerpc/fsl-booke: Fix InstructionTLBError execute permission check
2010-06-27Merge branch 'for-linus' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: TPM: ReadPubEK output struct fix
2010-06-27Merge branch 'rc-fixes' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kbuild: fix LOCALVERSION handling to match description kbuild: Fix modpost segfault
2010-06-27Merge branch 'release' of ↵Linus Torvalds30-237/+298
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI / PM: Do not enable GPEs for system wakeup in advance ACPICA: Truncate I/O addresses to 16 bits for Windows compatibility ACPICA: Limit maximum time for Sleep() operator ACPICA: Fix namestring associated with AE_NO_HANDLER exception ACPI / ACPICA: Fix sysfs GPE interface ACPI / ACPICA: Fix GPE initialization ACPI / ACPICA: Avoid writing full enable masks to GPE registers ACPI / ACPICA: Fix low-level GPE manipulation code ACPI / ACPICA: Use helper function for computing GPE masks ACPI / ACPICA: Do not attempt to disable GPE when installing handler ACPI: Disable Vista compatibility for Sony VGN-NS50B_L ACPI: fan: fix unbalanced code block ACPI: Store NVS state even when entering suspend to RAM suspend: Move NVS save/restore code to generic suspend functionality ACPI: Do not try to set up acpi processor stuff on cores exceeding maxcpus= ACPI: acpi_pad: Don't needlessly mark LAPIC unstable
2010-06-27KEYS: Propagate error code instead of returning -EINVALDan Carpenter1-2/+2
This is from a Smatch check I'm writing. strncpy_from_user() returns -EFAULT on error so the first change just silences a warning but doesn't change how the code works. The other change is a bug fix because install_thread_keyring_to_cred() can return a variety of errors such as -EINVAL, -EEXIST, -ENOMEM or -EKEYREVOKED. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-26phylib: Add autoload support for the LXT973 phy.David Woodhouse1-0/+1
Commit e13647c1 (phylib: Add support for the LXT973 phy.) added a new ID but neglected to also add it to the MODULE_DEVICE_TABLE. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-26ISDN: hysdn, fix potential NULL dereferenceJiri Slaby1-1/+2
Stanse found that lp is dereferenced earlier than checked for being NULL in hysdn_rx_netpkt. Move the initialization below the test. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Patrick McHardy <kaber@trash.net> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-26vxge: fix memory leak in vxge_alloc_msix() error pathMichal Schmidt1-9/+20
When pci_enable_msix() returned ret<0, entries and vxge_entries were leaked. While at it, use the centralized exit idiom in the function. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25isdn/gigaset: correct CAPI connection state storageTilman Schmidt3-53/+180
CAPI applications can handle several connections in parallel, so one connection state per application isn't sufficient. Store the connection state in the channel structure instead. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25isdn/gigaset: encode HLC and BC togetherTilman Schmidt3-38/+52
Adapt to buggy device firmware which accepts setting HLC only in the same command line as BC, by encoding HLC and BC in a single command if both are specified, and rejecting HLC without BC. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25isdn/gigaset: correct CAPI DATA_B3 Delivery ConfirmationTilman Schmidt1-32/+51
The Gigaset CAPI driver handled all DATA_B3_REQ messages as if the Delivery Confirmation flag bit was set, delaying the emission of the DATA_B3_CONF reply until the data was actually transmitted. Some CAPI applications (notably Asterisk) aren't happy with that behaviour. Change it to actually evaluate the Delivery Confirmation flag as described the CAPI specification. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25isdn/gigaset: correct CAPI voice connection encodingTilman Schmidt1-4/+4
Make the Gigaset CAPI driver select L2_VOICE (AT^SBPR=2) as the layer 2 encoding for transparent connections, like the ISDN4Linux variant. L2_BITSYNC (AT^SBPR=0) mutes internal connections and distorts external ones. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25isdn/gigaset: honor CAPI application's buffer size requestTilman Schmidt6-112/+94
Fix the Gigaset CAPI driver to limit the length of a connection's payload data receive buffers to the corresponding CAPI application's data buffer size, as some real-life CAPI applications tend to be rather unhappy if they receive bigger data blocks than requested. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25cpmac: do not leak struct net_device on phy_connect errorsFlorian Fainelli1-1/+2
If the call to phy_connect fails, we will return directly instead of freeing the previously allocated struct net_device. Signed-off-by: Florian Fainelli <florian@openwrt.org> CC: stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25smc91c92_cs: fix the problem that lan & modem does not work simultaneouslyKen Kawasaki1-5/+13
smc91c92_cs: Fix the problem that lan & modem does not work simultaneously in the Megahertz multi-function card. We need to write MEGAHERTZ_ISR to retrigger interrupt. Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25ipv6: fix NULL reference in proxy neighbor discoverystephen hemminger1-1/+1
The addition of TLLAO option created a kernel OOPS regression for the case where neighbor advertisement is being sent via proxy path. When using proxy, ipv6_get_ifaddr() returns NULL causing the NULL dereference. Change causing the bug was: commit f7734fdf61ec6bb848e0bafc1fb8bad2c124bb50 Author: Octavian Purdila <opurdila@ixiacom.com> Date: Fri Oct 2 11:39:15 2009 +0000 make TLLAO option for NA packets configurable Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25x86, Calgary: Increase max PHB numberDarrick J. Wong1-5/+10
Newer systems (x3950M2) can have 48 PHBs per chassis and 8 chassis, so bump the limits up and provide an explanation of the requirements for each class. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Cc: Corinna Schultz <cschultz@linux.vnet.ibm.com> Cc: <stable@kernel.org> LKML-Reference: <20100624212647.GI15515@tux1.beaverton.ibm.com> [ v2: Fixed build bug, added back PHBS_PER_CALGARY == 4 ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-06-25sched: Prevent compiler from optimising the sched_avg_update() loopWill Deacon1-0/+6
GCC 4.4.1 on ARM has been observed to replace the while loop in sched_avg_update with a call to uldivmod, resulting in the following build failure at link-time: kernel/built-in.o: In function `sched_avg_update': kernel/sched.c:1261: undefined reference to `__aeabi_uldivmod' kernel/sched.c:1261: undefined reference to `__aeabi_uldivmod' make: *** [.tmp_vmlinux1] Error 1 This patch introduces a fake data hazard to the loop body to prevent the compiler optimising the loop away. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: <stable@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-06-24Bluetooth: Bring back var 'i' incrementGustavo F. Padovan1-0/+2
commit ff6e2163f28a1094fb5ca5950fe2b43c3cf6bc7a accidentally added a regression on the bnep code. Fixing it. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-24MAINTAINERS - Add an entry for the input MT protocolHenrik Rydberg1-0/+7
This patch adds a maintainer for the input multitouch (MT) protocol, such that get_maintainer.pl selects it whenever an MT event is present in the patch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-25ext3: update ctime when changing the file's permission by setfaclMiao Xie1-0/+1
ext3 didn't update the ctime of the file when its permission was changed. Steps to reproduce: # touch aaa # stat -c %Z aaa 1275289822 # setfacl -m 'u::x,g::x,o::x' aaa # stat -c %Z aaa 1275289822 <- unchanged But, according to the spec of the ctime, ext3 must update it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Jan Kara <jack@suse.cz>
2010-06-25ext2: update ctime when changing the file's permission by setfaclJan Kara1-0/+1
ext2 didn't update the ctime of the file when its permission was changed. Steps to reproduce: # touch aaa # stat -c %Z aaa 1275289822 # setfacl -m 'u::x,g::x,o::x' aaa # stat -c %Z aaa 1275289822 <- unchanged But, according to the spec of the ctime, ext2 must update it. Port of ext3 patch by Miao Xie <miaox@cn.fujitsu.com>. Signed-off-by: Jan Kara <jack@suse.cz>
2010-06-24xfrm: check bundle policy existance before dereferencing itTimo Teräs1-1/+2
Fix the bundle validation code to not assume having a valid policy. When we have multiple transformations for a xfrm policy, the bundle instance will be a chain of bundles with only the first one having the policy reference. When policy_genid is bumped it will expire the first bundle in the chain which is equivalent of expiring the whole chain. Reported-bisected-and-tested-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-24block: Don't count_vm_events for discard bio in submit_bio.Tao Ma1-1/+1
In submit_bio, we count vm events by check READ/WRITE. But actually DISCARD_NOBARRIER also has the WRITE flag set. It looks as if in blkdev_issue_discard, we also add a page as the payload and the bio_has_data check isn't enough. So add another check for discard bio. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-24md/raid5: don't include 'spare' drives when reshaping to fewer devices.NeilBrown1-2/+7
There are few situations where it would make any sense to add a spare when reducing the number of devices in an array, but it is conceivable: A 6 drive RAID6 with two missing devices could be reshaped to a 5 drive RAID6, and a spare could become available just in time for the reshape, but not early enough to have been recovered first. 'freezing' recovery can make this easy to do without any races. However doing such a thing is a bad idea. md will not record the partially-recovered state of the 'spare' and when the reshape finished it will think that the spare is still spare. Easiest way to avoid this confusion is to simply disallow it. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md/raid5: add a missing 'continue' in a loop.NeilBrown1-1/+3
As the comment says, the tail of this loop only applies to devices that are not fully in sync, so if In_sync was set, we should avoid the rest of the loop. This bug will hardly ever cause an actual problem. The worst it can do is allow an array to be assembled that is dirty and degraded, which is not generally a good idea (without warning the sysadmin first). This will only happen if the array is RAID4 or a RAID5/6 in an intermediate state during a reshape and so has one drive that is all 'parity' - no data - while some other device has failed. This is certainly possible, but not at all common. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md/raid5: Allow recovered part of partially recovered devices to be in-syncNeilBrown1-12/+30
During a recovery of reshape the early part of some devices might be in-sync while the later parts are not. We we know we are looking at an early part it is good to treat that part as in-sync for stripe calculations. This is particularly important for a reshape which suffers device failure. Treating the data as in-sync can mean the difference between data-safety and data-loss. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md/raid5: More careful check for "has array failed".NeilBrown1-4/+71
When we are reshaping an array, the device failure combinations that cause us to decide that the array as failed are more subtle. In particular, any 'spare' will be fully in-sync in the section of the array that has already been reshaped, thus failures that affect only that section are less critical. So encode this subtlety in a new function and call it as appropriate. The case that showed this problem was a 4 drive RAID5 to 8 drive RAID6 conversion where the last two devices failed. This resulted in: good good good good incomplete good good failed failed while converting a 5-drive RAID6 to 8 drive RAID5 The incomplete device causes the whole array to look bad, bad as it was actually good for the section that had been converted to 8-drives, all the data was actually safe. Reported-by: Terry Morris <tbmorris@tbmorris.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md: Don't update ->recovery_offset when reshaping an array to fewer devices.NeilBrown2-0/+3
When an array is reshaped to have fewer devices, the reshape proceeds from the end of the devices to the beginning. If a device happens to be non-In_sync (which is possible but rare) we would normally update the ->recovery_offset as the reshape progresses. However that would be wrong as the recover_offset records that the early part of the device is in_sync, while in fact it would only be the later part that is in_sync, and in any case the offset number would be measured from the wrong end of the device. Relatedly, if after a reshape a spare is discovered to not be recoverred all the way to the end, not allow spare_active to incorporate it in the array. This becomes relevant in the following sample scenario: A 4 drive RAID5 is converted to a 6 drive RAID6 in a combined operation. The RAID5->RAID6 conversion will cause a 5 drive to be included as a spare, then the 5drive -> 6drive reshape will effectively rebuild that spare as it progresses. The 6th drive is treated as in_sync the whole time as there is never any case that we might consider reading from it, but must not because there is no valid data. If we interrupt this reshape part-way through and reverse it to return to a 5-drive RAID6 (or event a 4-drive RAID5), we don't want to update the recovery_offset - as that would be wrong - and we don't want to include that spare as active in the 5-drive RAID6 when the reversed reshape completed and it will be mostly out-of-sync still. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md/raid5: avoid oops when number of devices is reduced then increased.NeilBrown1-9/+10
The entries in the stripe_cache maintained by raid5 are enlarged when we increased the number of devices in the array, but not shrunk when we reduce the number of devices. So if entries are added after reducing the number of devices, we much ensure to initialise the whole entry, not just the part that is currently relevant. Otherwise if we enlarge the array again, we will reference uninitialised values. As grow_buffers/shrink_buffer now want to use a count that is stored explicity in the raid_conf, they should get it from there rather than being passed it as a parameter. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md: enable raid4->raid0 takeoverMaciej Trela1-2/+6
Only level 5 with layout=PARITY_N can be taken over to raid0 now. Lets allow level 4 either. Signed-off-by: Maciej Trela <maciej.trela@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md: clear layout after ->raid0 takeoverMaciej Trela1-0/+2
After takeover from raid5/10 -> raid0 mddev->layout is not cleared. Signed-off-by: Maciej Trela <maciej.trela@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md: fix raid10 takeover: use new_layout for setup_confMaciej Trela1-8/+7
Use mddev->new_layout in setup_conf. Also use new_chunk, and don't set ->degraded in takeover(). That gets set in run() Signed-off-by: Maciej Trela <maciej.trela@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md: fix handling of array level takeover that re-arranges devices.NeilBrown6-35/+41
Most array level changes leave the list of devices largely unchanged, possibly causing one at the end to become redundant. However conversions between RAID0 and RAID10 need to renumber all devices (except 0). This renumbering is currently being done in the ->run method when the new personality takes over. However this is too late as the common code in md.c might already have invalidated some of the devices if they had a ->raid_disk number that appeared to high. Moving it into the ->takeover method is too early as the array is still active at that time and wrong ->raid_disk numbers could cause confusion. So add a ->new_raid_disk field to mdk_rdev_s and use it to communicate the new raid_disk number. Now the common code knows exactly which devices need to be renumbered, and which can be invalidated, and can do it all at a convenient time when the array is suspend. It can also update some symlinks in sysfs which previously were not be updated correctly. Reported-by: Maciej Trela <maciej.trela@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24md: raid10: Fix null pointer dereference in fix_read_error()Prasanna S. Panchamukhi1-6/+6
Such NULL pointer dereference can occur when the driver was fixing the read errors/bad blocks and the disk was physically removed causing a system crash. This patch check if the rcu_dereference() returns valid rdev before accessing it in fix_read_error(). Cc: stable@kernel.org Signed-off-by: Prasanna S. Panchamukhi <prasanna.panchamukhi@riverbed.com> Signed-off-by: Rob Becker <rbecker@riverbed.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24Restore partition detection of newly created md arrays.NeilBrown1-0/+1
Commit b821eaa572fd737faaf6928ba046e571526c36c6 broke partition detection for md arrays. The logic was almost right. However if revalidate_disk is called when the device is not yet open, bdev->bd_disk won't be set, so the flush_disk() Call will not set bd_invalidated. So when md_open is called we still need to ensure that ->bd_invalidated gets set. This is easily done with a call to check_disk_size_change in the place where the offending commit removed check_disk_change. At the important times, the size will have changed from 0 to non-zero, so check_disk_size_change will set bd_invalidated. Tested-by: Duncan <1i5t5.duncan@cox.net> Reported-by: Duncan <1i5t5.duncan@cox.net> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-23sched: silence PROVE_RCU in sched_fork()Peter Zijlstra1-0/+9
Because cgroup_fork() is ran before sched_fork() [ from copy_process() ] and the child's pid is not yet visible the child is pinned to its cgroup. Therefore we can silence this warning. A nicer solution would be moving cgroup_fork() to right after dup_task_struct() and exclude PF_STARTING from task_subsys_state(). Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2010-06-23sky2: enable rx/tx in sky2_phy_reinit()Brandon Philips1-5/+14
sky2_phy_reinit is called by the ethtool helpers sky2_set_settings, sky2_nway_reset and sky2_set_pauseparam when netif_running. However, at the end of sky2_phy_init GM_GP_CTRL has GM_GPCR_RX_ENA and GM_GPCR_TX_ENA cleared. So, doing these commands causes the device to stop working: $ ethtool -r eth0 $ ethtool -A eth0 autoneg off Fix this issue by enabling Rx/Tx after running sky2_phy_init in sky2_phy_reinit. Signed-off-by: Brandon Philips <bphilips@suse.de> Tested-by: Brandon Philips <bphilips@suse.de> Cc: stable@kernel.org Tested-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23MAINTAINERS: change mailing list address for CIFSJeff Layton1-1/+1
We're moving the mailing list to linux-cifs@vger.kernel.org. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-06-23cnic: Disable statistics initialization for eth clients that do not support ↵Dmitry Kravkov1-21/+34
statistics Disable statistics initialization for eth clients that do not support statistics. This prevents memory corruption on bnx2x hw. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
2010-06-23net: add dependency on fw class module to qlcnic and netxen_nicAnirban Chakraborty1-0/+2
netxen_nic and qlcnic driver depends on firmware_class module. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23snmp: fix SNMP_ADD_STATS()Eric Dumazet1-1/+1
commit aa2ea0586d9d (tcp: fix outsegs stat for TSO segments) incorrectly assumed SNMP_ADD_STATS() was used from BH context. Fix this using mib[!in_softirq()] instead of mib[0] Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23idr: fix RCU lockdep splat in idr_get_next()Paul E. McKenney1-2/+2
Convert to rcu_dereference_raw() given that many callers may have many different locking models. Located-by: Miles Lane <miles.lane@gmail.com> Tested-by: Miles Lane <miles.lane@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2010-06-23rcu: apply RCU protection to wake_affine()Daniel J Blueman1-0/+2
The task_group() function returns a pointer that must be protected by either RCU, the ->alloc_lock, or the cgroup lock (see the rcu_dereference_check() in task_subsys_state(), which is invoked by task_group()). The wake_affine() function currently does none of these, which means that a concurrent update would be within its rights to free the structure returned by task_group(). Because wake_affine() uses this structure only to compute load-balancing heuristics, there is no reason to acquire either of the two locks. Therefore, this commit introduces an RCU read-side critical section that starts before the first call to task_group() and ends after the last use of the "tg" pointer returned from task_group(). Thanks to Li Zefan for pointing out the need to extend the RCU read-side critical section from that proposed by the original patch. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2010-06-23virtio-pci: disable msi at startupMichael S. Tsirkin2-0/+4
virtio-pci resets the device at startup by writing to the status register, but this does not clear the pci config space, specifically msi enable status which affects register layout. This breaks things like kdump when they try to use e.g. virtio-blk. Fix by forcing msi off at startup. Since pci.c already has a routine to do this, we export and use it instead of duplicating code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: linux-pci@vger.kernel.org Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: stable@kernel.org
2010-06-23virtio: return ENOMEM on out of memoryMichael S. Tsirkin1-1/+1
add_buf returns ring size on out of memory, this is not what devices expect. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: stable@kernel.org # .34.x
2010-06-22Input: wacom - fix serial number handling on Cintiq 21UX2Ping Cheng1-4/+5
Cintiq 21UX2 added 8 more bits for the tool serial number and more buttons for the expresskey. We did not enable them properly in the last patch. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-22Input: fixup X86_MRST selectsRandy Dunlap2-2/+2
Some of the recent X86_MRST additions make some "select"s conditional on X86_MRST but missed some related kconfig symbols, causing: drivers/built-in.o: In function `ps2_end_command': (.text+0x257ab2): undefined reference to `i8042_check_port_owner' drivers/built-in.o: In function `ps2_end_command': (.text+0x257ae1): undefined reference to `i8042_unlock_chip' drivers/built-in.o: In function `ps2_begin_command': (.text+0x257b40): undefined reference to `i8042_check_port_owner' drivers/built-in.o: In function `ps2_begin_command': (.text+0x257b6f): undefined reference to `i8042_lock_chip' when SERIO_I8042=m, SERIO_LIBPS2=y, KEYBOARD_ATKBD=y. We need to make i8042 dependant upon !X86_MRST and allow deselecting atkbd on Moorestown even when !CONFIG_EMBEDDED. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-22Merge commit 'v2.6.35-rc3' into for-linusDmitry Torokhov1029-7874/+83540
2010-06-22Merge branch 'master' of ↵David S. Miller1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2010-06-22NFSv4: Fix an embarassing typo in encode_attrs()Trond Myklebust1-2/+2
Apparently, we have never been able to set the atime correctly from the NFSv4 client. Reported-by: 小倉一夫 <ka-ogura@bd6.so-net.ne.jp> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
2010-06-22NFSv4: Ensure that /proc/self/mountinfo displays the minor version numberTrond Myklebust1-4/+18
Currently, we do not display the minor version mount parameter in the /proc mount info. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
2010-06-22NFSv4.1: Ensure that we initialise the session when following a referralTrond Myklebust1-71/+51
Put the code that is common to both the referral and ordinary mount cases into a common helper routine. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-06-22SUNRPC: Fix a re-entrancy bug in xs_tcp_read_calldir()Trond Myklebust1-16/+22
If the attempt to read the calldir fails, then instead of storing the read bytes, we currently discard them. This leads to a garbage final result when upon re-entry to the same routine, we read the remaining bytes. Fixes the regression in bugzilla number 16213. Please see https://bugzilla.kernel.org/show_bug.cgi?id=16213 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
2010-06-22nfs4 use mandatory attribute file type in nfs4_get_rootAndy Adamson1-1/+1
S_ISDIR(fsinfo.fattr->mode) checks the file type rather than the mode bits, so we should be checking for the NFS_ATTR_FATTR_TYPE fattr property. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
2010-06-22hso: remove setting of low_latency flagFilip Aben1-1/+0
This patch removes the setting of the low_latency flag. tty_flip_buffer_push() is occasionally being called in irq context, which causes a hang if the low_latency flag is set. Removing the low_latency flag only seems to impact the flush to ldisc, which will now be put on a workqueue. Signed-off-by: Filip Aben <f.aben@option.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-22clocksource: sh_cmt: Fix up bogus shift value.Paul Mundt1-1/+1
The previous CMT fixup accidentally copied in the TMU shift value, reset this back to its original value while preserving the TMU fix. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-21udp: Fix bogus UFO packet generationHerbert Xu1-3/+6
It has been reported that the new UFO software fallback path fails under certain conditions with NFS. I tracked the problem down to the generation of UFO packets that are smaller than the MTU. The software fallback path simply discards these packets. This patch fixes the problem by not generating such packets on the UFO path. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-21lasi82596: fix netdev_mc_count conversionHelge Deller1-1/+1
Fix commit 4cd24eaf0 (net: use netdev_mc_count and netdev_mc_empty when appropriate) Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-21NET: MIPSsim: Fix modpost warning.Ralf Baechle1-1/+1
$ make CONFIG_DEBUG_SECTION_MISMATCH=y [...] WARNING: drivers/net/built-in.o(.data+0x0): Section mismatch in reference from the variable mipsnet_driver to the function .init.text:mipsnet_probe() The variable mipsnet_driver references the function __init mipsnet_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, [...] Fixed by making mipsnet_probe __devinit. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/net/mipsnet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-21tracing: Fix undeclared ENOSYS in include/linux/tracepoint.hWu Zhangjin1-0/+1
The header file include/linux/tracepoint.h may be included without include/linux/errno.h and then the compiler will fail on building for undelcared ENOSYS. This patch fixes this problem via including <linux/errno.h> to include/linux/tracepoint.h. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> LKML-Reference: <1277118549-622-1-git-send-email-wuzhangjin@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-06-21Merge branch 'fix/misc' into for-linusTakashi Iwai1-0/+1
2010-06-21ALSA: usb/endpoint, fix dangling pointer useJiri Slaby1-0/+1
Stanse found that in snd_usb_parse_audio_endpoints, there is a dangling pointer dereference. When snd_usb_parse_audio_format fails, fp is freed, and continue invoked. On the next loop, there is "fp && fp->altsetting == 1 && fp->channels == 1" test, but fp is set from the last iteration (but is bogus) and thus ilegally dereferenced. Set fp to NULL before "continue". Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-21cfq: fix recursive call in cfq_blkiocg_update_completion_stats()Jens Axboe1-1/+1
e98ef89b has a typo, causing cfq_blkiocg_update_completion_stats() to call itself instead of blkiocg_update_completion_stats(). Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-21arch/sh/mm: Eliminate a double lockJulia Lawall1-1/+1
The function begins and ends with a read_lock. The latter is changed to a read_unlock. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @locked@ expression E1; position p; @@ read_lock(E1@p,...); @r exists@ expression x <= locked.E1; expression locked.E1; expression E2; identifier lock; position locked.p,p1,p2; @@ *lock@p1 (E1@p,...); ... when != E1 when != \(x = E2\|&x\) *lock@p2 (E1,...); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-20Merge branch 'fix/misc' into for-linusTakashi Iwai1-11/+11
2010-06-20Merge branch 'fix/asoc' into for-linusTakashi Iwai1-2/+0
2010-06-20x86: Fix rebooting on Dell Precision WorkStation T7400Thomas Backlund1-0/+8
Dell Precision WorkStation T7400 freezes on reboot unless reboot=b is used. Reference: https://qa.mandriva.com/show_bug.cgi?id=58017 Signed-off-by: Thomas Backlund <tmb@mandriva.org> LKML-Reference: <4C1CC6E9.6000701@mandriva.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-06-20hwmon: (k8temp) Bypass core swapping on single-core processorsJean Delvare1-1/+1
Commit a2e066bba2aad6583e3ff648bf28339d6c9f0898 introduced core swapping for CPU models 64 and later. I recently had a report about a Sempron 3200+, model 95, for which this patch broke temperature reading. It happens that this is a single-core processor, so the effect of the swapping was to read a temperature value for a core that didn't exist, leading to an incorrect value (-49 degrees C.) Disabling core swapping on singe-core processors should fix this. Additional comment from Andreas: The BKDG says Thermal Sensor Core Select (ThermSenseCoreSel)-Bit 2. This bit selects the CPU whose temperature is reported in the CurTemp field. This bit only applies to dual core processors. For single core processors CPU0 Thermal Sensor is always selected. k8temp_probe() correctly detected that SEL_CORE can't be used on single core CPU. Thus k8temp did never update the temperature values stored in temp[1][x] and -49 degrees was reported. For single core CPUs we must use the values read into temp[0][x]. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Rick Moritz <rhavin@gmx.net> Acked-by: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: stable@kernel.org
2010-06-20hwmon: (i5k_amb) Fix sysfs attribute for lockdepKAMEZAWA Hiroyuki1-0/+6
i5k_amb.ko uses dynamically allocated memory (by kmalloc) for attributes passed to sysfs. So, sysfs_attr_init() should be called for working happy with lockdep. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org [2.6.34 only]
2010-06-20hwmon: (k10temp) Do not blacklist known working CPU modelsJean Delvare1-2/+12
When detecting AM2+ or AM3 socket with DDR2, only blacklist cores which are known to exist in AM2+ format. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Clemens Ladisch <clemens@ladisch.de> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: stable@kernel.org
2010-06-18x86: Fix vsyscall on gcc 4.5 with -OsAndi Kleen1-1/+1
This fixes the -Os breaks with gcc 4.5 bug. rdtsc_barrier needs to be force inlined, otherwise user space will jump into kernel space and kill init. This also addresses http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44129 I believe. Signed-off-by: Andi Kleen <ak@linux.intel.com> LKML-Reference: <20100618210859.GA10913@basil.fritz.box> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: <stable@kernel.org>
2010-06-18ath5k: initialize ah->ah_current_channelBob Copeland1-0/+1
ath5k assumes ah_current_channel is always a valid pointer in several places, but a newly created interface may not have a channel. To avoid null pointer dereferences, set it up to point to the first available channel until later reconfigured. This fixes the following oops: $ rmmod ath5k $ insmod ath5k $ iw phy0 set distance 11000 BUG: unable to handle kernel NULL pointer dereference at 00000006 IP: [<d0a1ff24>] ath5k_hw_set_coverage_class+0x74/0x1b0 [ath5k] *pde = 00000000 Oops: 0000 [#1] last sysfs file: /sys/devices/pci0000:00/0000:00:0e.0/ieee80211/phy0/index Modules linked in: usbhid option usb_storage usbserial usblp evdev lm90 scx200_acb i2c_algo_bit i2c_dev i2c_core via_rhine ohci_hcd ne2k_pci 8390 leds_alix2 xt_IMQ imq nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_cc Pid: 1597, comm: iw Not tainted (2.6.32.14 #8) EIP: 0060:[<d0a1ff24>] EFLAGS: 00010296 CPU: 0 EIP is at ath5k_hw_set_coverage_class+0x74/0x1b0 [ath5k] EAX: 000000c2 EBX: 00000000 ECX: ffffffff EDX: c12d2080 ESI: 00000019 EDI: cf8c0000 EBP: d0a30edc ESP: cfa09bf4 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 Process iw (pid: 1597, ti=cfa09000 task=cf88a000 task.ti=cfa09000) Stack: d0a34f35 d0a353f8 d0a30edc 000000fe cf8c0000 00000000 1900063d cfa8c9e0 <0> cfa8c9e8 cfa8c0c0 cfa8c000 d0a27f0c 199d84b4 cfa8c200 00000010 d09bfdc7 <0> 00000000 00000000 ffffffff d08e0d28 cf9263c0 00000001 cfa09cc4 00000000 Call Trace: [<d0a27f0c>] ? ath5k_hw_attach+0xc8c/0x3c10 [ath5k] [<d09bfdc7>] ? __ieee80211_request_smps+0x1347/0x1580 [mac80211] [<d08e0d28>] ? nl80211_send_scan_start+0x7b8/0x4520 [cfg80211] [<c10f5db9>] ? nla_parse+0x59/0xc0 [<c11ca8d9>] ? genl_rcv_msg+0x169/0x1a0 [<c11ca770>] ? genl_rcv_msg+0x0/0x1a0 [<c11c7e68>] ? netlink_rcv_skb+0x38/0x90 [<c11c9649>] ? genl_rcv+0x19/0x30 [<c11c7c03>] ? netlink_unicast+0x1b3/0x220 [<c11c893e>] ? netlink_sendmsg+0x26e/0x290 [<c11a409e>] ? sock_sendmsg+0xbe/0xf0 [<c1032780>] ? autoremove_wake_function+0x0/0x50 [<c104d846>] ? __alloc_pages_nodemask+0x106/0x530 [<c1074933>] ? do_lookup+0x53/0x1b0 [<c10766f9>] ? __link_path_walk+0x9b9/0x9e0 [<c11acab0>] ? verify_iovec+0x50/0x90 [<c11a42b1>] ? sys_sendmsg+0x1e1/0x270 [<c1048e50>] ? find_get_page+0x10/0x50 [<c104a96f>] ? filemap_fault+0x5f/0x370 [<c1059159>] ? __do_fault+0x319/0x370 [<c11a55b4>] ? sys_socketcall+0x244/0x290 [<c101962c>] ? do_page_fault+0x1ec/0x270 [<c1019440>] ? do_page_fault+0x0/0x270 [<c1002ae5>] ? syscall_call+0x7/0xb Code: 00 b8 fe 00 00 00 b9 f8 53 a3 d0 89 5c 24 14 89 7c 24 10 89 44 24 0c 89 6c 24 08 89 4c 24 04 c7 04 24 35 4f a3 d0 e8 7c 30 60 f0 <0f> b7 43 06 ba 06 00 00 00 a8 10 75 0e 83 e0 20 83 f8 01 19 d2 EIP: [<d0a1ff24>] ath5k_hw_set_coverage_class+0x74/0x1b0 [ath5k] SS:ESP 0068:cfa09bf4 CR2: 0000000000000006 ---[ end trace 54f73d6b10ceb87b ]--- Cc: stable@kernel.org Reported-by: Steve Brown <sbrown@cortland.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-18cfq-iosched: Fixed boot warning with BLK_CGROUP=y and CFQ_GROUP_IOSCHED=nVivek Goyal2-27/+142
Hi Jens, Few days back Ingo noticed a CFQ boot time warning. This patch fixes it. The issue here is that with CFQ_GROUP_IOSCHED=n, CFQ should not really be making blkio stat related calls. > Hm, it's still not entirely fixed, as of 2.6.35-rc2-00131-g7908a9e. With > some > configs i get bad spinlock warnings during bootup: > > [ 28.968013] initcall net_olddevs_init+0x0/0x82 returned 0 after 93750 > usecs > [ 28.972003] calling b44_init+0x0/0x55 @ 1 > [ 28.976009] bus: 'pci': add driver b44 > [ 28.976374] sda: > [ 28.978157] BUG: spinlock bad magic on CPU#1, async/0/117 > [ 28.980000] lock: 7e1c5bbc, .magic: 00000000, .owner: <none>/-1, +.owner_cpu: 0 > [ 28.980000] Pid: 117, comm: async/0 Not tainted +2.6.35-rc2-tip-01092-g010e7ef-dirty #8183 > [ 28.980000] Call Trace: > [ 28.980000] [<41ba6d55>] ? printk+0x20/0x24 > [ 28.980000] [<4134b7b7>] spin_bug+0x7c/0x87 > [ 28.980000] [<4134b853>] do_raw_spin_lock+0x1e/0x123 > [ 28.980000] [<41ba92ca>] ? _raw_spin_lock_irqsave+0x12/0x20 > [ 28.980000] [<41ba92d2>] _raw_spin_lock_irqsave+0x1a/0x20 > [ 28.980000] [<4133476f>] blkiocg_update_io_add_stats+0x25/0xfb > [ 28.980000] [<41335dae>] ? cfq_prio_tree_add+0xb1/0xc1 > [ 28.980000] [<41337bc7>] cfq_insert_request+0x8c/0x425 Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-18PCI/PM: Do not use native PCIe PME by defaultRafael J. Wysocki2-7/+16
Commit c7f486567c1d0acd2e4166c47069835b9f75e77b (PCI PM: PCIe PME root port service driver) causes the native PCIe PME signaling to be used by default, if the BIOS allows the kernel to control the standard configuration registers of PCIe root ports. However, the native PCIe PME is coupled to the native PCIe hotplug and calling pcie_pme_acpi_setup() makes some BIOSes expect that the native PCIe hotplug will be used as well. That, in turn, causes problems to appear on systems where the PCIe hotplug driver is not loaded. The usual symptom, as reported by Jaroslav Kameník and others, is that the ACPI GPE associated with PCIe hotplug keeps firing continuously causing kacpid to take substantial percentage of CPU time. To work around this issue, change the default so that the native PCIe PME signaling is only used if directly requested with the help of the pcie_pme= command line switch. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15924 , which is a listed regression from 2.6.33. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-by: Jaroslav Kameník <jaroslav@kamenik.cz> Tested-by: Antoni Grzymala <antekgrzymala@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-06-18percpu: fix first chunk match in per_cpu_ptr_to_phys()Tejun Heo1-3/+28
per_cpu_ptr_to_phys() determines whether the passed in @addr belongs to the first_chunk or not by just matching the address against the address range of the base unit (unit0, used by cpu0). When an adress from another cpu was passed in, it will always determine that the address doesn't belong to the first chunk even when it does. This makes the function return a bogus physical address which may lead to crash. This problem was discovered by Cliff Wickman while investigating a crash during kdump on a SGI UV system. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Cliff Wickman <cpw@sgi.com> Tested-by: Cliff Wickman <cpw@sgi.com> Cc: stable@kernel.org
2010-06-18sched: Fix over-scheduling bugAlex,Shi1-3/+0
Commit e70971591 ("sched: Optimize unused cgroup configuration") introduced an imbalanced scheduling bug. If we do not use CGROUP, function update_h_load won't update h_load. When the system has a large number of tasks far more than logical CPU number, the incorrect cfs_rq[cpu]->h_load value will cause load_balance() to pull too many tasks to the local CPU from the busiest CPU. So the busiest CPU keeps going in a round robin. That will hurt performance. The issue was found originally by a scientific calculation workload that developed by Yanmin. With that commit, the workload performance drops about 40%. CPU before after 00 : 2 : 7 01 : 1 : 7 02 : 11 : 6 03 : 12 : 7 04 : 6 : 6 05 : 11 : 7 06 : 10 : 6 07 : 12 : 7 08 : 11 : 6 09 : 12 : 6 10 : 1 : 6 11 : 1 : 6 12 : 6 : 6 13 : 2 : 6 14 : 2 : 6 15 : 1 : 6 Reviewed-by: Yanmin zhang <yanmin.zhang@intel.com> Signed-off-by: Alex Shi <alex.shi@intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1276754893.9452.5442.camel@debian> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-06-17bridge: fdb cleanup runs too oftenstephen hemminger1-4/+2
It is common in end-node, non STP bridges to set forwarding delay to zero; which causes the forwarding database cleanup to run every clock tick. Change to run only as soon as needed or at next ageing timer interval which ever is sooner. Use round_jiffies_up macro rather than attempting round up by changing value. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-17cfq: Don't allow queue merges for queues that have no process referencesJeff Moyer1-2/+11
Hi, A user reported a kernel bug when running a particular program that did the following: created 32 threads - each thread took a mutex, grabbed a global offset, added a buffer size to that offset, released the lock - read from the given offset in the file - created a new thread to do the same - exited The result is that cfq's close cooperator logic would trigger, as the threads were issuing I/O within the mean seek distance of one another. This workload managed to routinely trigger a use after free bug when walking the list of merge candidates for a particular cfqq (cfqq->new_cfqq). The logic used for merging queues looks like this: static void cfq_setup_merge(struct cfq_queue *cfqq, struct cfq_queue *new_cfqq) { int process_refs, new_process_refs; struct cfq_queue *__cfqq; /* Avoid a circular list and skip interim queue merges */ while ((__cfqq = new_cfqq->new_cfqq)) { if (__cfqq == cfqq) return; new_cfqq = __cfqq; } process_refs = cfqq_process_refs(cfqq); /* * If the process for the cfqq has gone away, there is no * sense in merging the queues. */ if (process_refs == 0) return; /* * Merge in the direction of the lesser amount of work. */ new_process_refs = cfqq_process_refs(new_cfqq); if (new_process_refs >= process_refs) { cfqq->new_cfqq = new_cfqq; atomic_add(process_refs, &new_cfqq->ref); } else { new_cfqq->new_cfqq = cfqq; atomic_add(new_process_refs, &cfqq->ref); } } When a merge candidate is found, we add the process references for the queue with less references to the queue with more. The actual merging of queues happens when a new request is issued for a given cfqq. In the case of the test program, it only does a single pread call to read in 1MB, so the actual merge never happens. Normally, this is fine, as when the queue exits, we simply drop the references we took on the other cfqqs in the merge chain: /* * If this queue was scheduled to merge with another queue, be * sure to drop the reference taken on that queue (and others in * the merge chain). See cfq_setup_merge and cfq_merge_cfqqs. */ __cfqq = cfqq->new_cfqq; while (__cfqq) { if (__cfqq == cfqq) { WARN(1, "cfqq->new_cfqq loop detected\n"); break; } next = __cfqq->new_cfqq; cfq_put_queue(__cfqq); __cfqq = next; } However, there is a hole in this logic. Consider the following (and keep in mind that each I/O keeps a reference to the cfqq): q1->new_cfqq = q2 // q2 now has 2 process references q3->new_cfqq = q2 // q2 now has 3 process references // the process associated with q2 exits // q2 now has 2 process references // queue 1 exits, drops its reference on q2 // q2 now has 1 process reference // q3 exits, so has 0 process references, and hence drops its references // to q2, which leaves q2 also with 0 process references q4 comes along and wants to merge with q3 q3->new_cfqq still points at q2! We follow that link and end up at an already freed cfqq. So, the fix is to not follow a merge chain if the top-most queue does not have a process reference, otherwise any queue in the chain could be already freed. I also changed the logic to disallow merging with a queue that does not have any process references. Previously, we did this check for one of the merge candidates, but not the other. That doesn't really make sense. Without the attached patch, my system would BUG within a couple of seconds of running the reproducer program. With the patch applied, my system ran the program for over an hour without issues. This addresses the following bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16217 Thanks a ton to Phil Carns for providing the bug report and an excellent reproducer. [ Note for stable: this applies to 2.6.32/33/34 ]. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Reported-by: Phil Carns <carns@mcs.anl.gov> Cc: stable@kernel.org Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-17nohz: Fix nohz ratelimitPeter Zijlstra1-4/+1
Chris Wedgwood reports that 39c0cbe (sched: Rate-limit nohz) causes a serial console regression, unresponsiveness, and indeed it does. The reason is that the nohz code is skipped even when the tick was already stopped before the nohz_ratelimit(cpu) condition changed. Move the nohz_ratelimit() check to the other conditions which prevent long idle sleeps. Reported-by: Chris Wedgwood <cw@f00f.org> Tested-by: Brian Bloniarz <bmb@athenacr.com> Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Greg KH <gregkh@suse.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Jef Driesen <jefdriesen@telenet.be> LKML-Reference: <1276790557.27822.516.camel@twins> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2010-06-17perf record: prevent kill(0, SIGTERM);Ian Munsie1-1/+1
At exit, perf record will kill the process it was profiling by sending a SIGTERM to child_pid (if it had been initialised), but in certain situations child_pid may be 0 and perf would mistakenly kill more processes than intended. child_pid is set to the return of fork() to either 0 or the pid of the child. Ordinarily this would not present an issue as the child calls execvp to spawn the process to be profiled and would therefore never run it's sig_atexit and never attempt to kill pid 0. However, if a nonexistant binary had been passed in to perf record the call to execvp would fail and child_pid would be left set to 0. The child would then exit and it's atexit handler, finding that child_pid was initialised to 0, would call kill(0, SIGTERM), resulting in every process within it's process group being killed. In the case that perf was being run directly from the shell this typically would not be an issue as the shell isolates the process. However, if perf was being called from another program it could kill unexpected processes, which may even include X. This patch changes the logic of the test for whether child_pid was initialised to only consider positive pids as valid, thereby never attempting to kill pid 0. Cc: David S. Miller <davem@davemloft.net> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <1276072680-17378-1-git-send-email-imunsie@au1.ibm.com> Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-06-17Merge branch 'bugzilla-15951' into releaseLen Brown2-15/+9
2010-06-17ACPI / PM: Do not enable GPEs for system wakeup in advanceRafael J. Wysocki2-15/+9
After commit 9630bdd9b15d2f489c646d8bc04b60e53eb5ec78 (ACPI: Use GPE reference counting to support shared GPEs) the wakeup enable mask bits of GPEs are set as soon as the GPEs are enabled to wake up the system. Unfortunately, this leads to a regression reported by Michal Hocko, where a system is woken up from ACPI S5 by a device that is not supposed to do that, because the wakeup enable mask bit of this device's GPE is always set when acpi_enter_sleep_state() calls acpi_hw_enable_all_wakeup_gpes(), although it should only be set if the device is supposed to wake up the system from the target state. To work around this issue, rework the ACPI power management code so that GPEs are not enabled to wake up the system upfront, but only during a system state transition when the target state of the system is known. [Of course, this means that the reference counting of "wakeup" GPEs doesn't really make sense and it is sufficient to set/unset the wakeup mask bits for them during system sleep transitions. This will allow us to simplify the GPE handling code quite a bit, but that change is too intrusive for 2.6.35.] Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15951 Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-and-tested-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Len Brown <len.brown@intel.com>
2010-06-17bnx2: fix dma_get_ops compilation breakageFUJITA Tomonori1-7/+4
This removes dma_get_ops() prefetch optimization in bnx2. bnx2 uses dma_get_ops() to see if dma_sync_single_for_cpu() is noop. bnx2 does prefetch if it's noop. But dma_get_ops() isn't available on all the architectures (only the architectures that uses dma_map_ops struct have it). Using dma_get_ops() in drivers leads to compilation breakage on many architectures. This patch removes dma_get_ops() and changes bnx2 to do prefetch on all the architectures. This adds useless prefetch on non-coherent architectures but this is harmless. It is also unlikely to cause the performance drop. [ Remove now unused local variable 'pdev' -DaveM ] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-17perf session: Remove threads from tree on PERF_RECORD_EXITArnaldo Carvalho de Melo4-2/+20
Move them to a session->dead_threads list just like we do with maps that are replaced, because we may have hist_entries pointing to them. This fixes a bug when inserting maps for a new thread that reused the TID, mixing maps for two different threads, causing an endless loop. The code for insering maps should be made more robust but for .35 this is the minimalistic patch. Reported-by: Ingo Molnar <mingo@elte.hu> Cc: David S. Miller <davem@davemloft.net> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-06-17watchdog: at32ap700x_wdt: register misc device last in probe() functionHans-Christian Egtvedt1-6/+10
This patch reworks the probe() function in the at32ap700x_wdt driver, this to make sure the miscdev is properly initialized and the driver is ready to be accessed. Reported-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Wim Van sebroeck <wim@iguana.be>
2010-06-17block: fix DISCARD_BARRIER requestsChristoph Hellwig1-5/+2
Filesystems assume that DISCARD_BARRIER are full barriers, so that they don't have to track in-progress discard operation when submitting new I/O. But currently we only treat them as elevator barriers, which don't actually do the nessecary queue drains. Also remove the unlikely around both the DISCARD and BARRIER requests - the happen far too often for a static mispredict. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-17percpu: fix trivial bugs in pcpu_build_alloc_info()Pavel V. Panteleev1-3/+2
Fix the following two trivial bugs in pcpu_build_alloc_info() * we should memset group_cnt to 0 by size of group_cnt, not size of group_map (both are of the same size, so the bug isn't dangerous) * we can delete useless variable group_cnt_max. Signed-off-by: Pavel V. Panteleev <pp_84@mail.ru> Signed-off-by: Tejun Heo <tj@kernel.org>
2010-06-17ALSA: asihpi - Get rid of incorrect "long" types and casts.Eliot Blennerhassett1-11/+11
These give incorrect results for index wrap on 64 bit. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-16ucc_geth: fix for RX skb buffers recyclingSergey Matyukevich1-0/+2
This patch implements a proper modification of RX skb buffers before recycling. Adjusting only skb->data is not enough because after that skb->tail and skb->len become incorrect. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16pcnet_cs: add new id (TOSHIBA Modem/LAN Card)Ken Kawasaki2-0/+2
pcnet_cs: serial_cs: add new id (TOSHIBA Modem/LAN Card) Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16gianfar: Fix oversized packets handlingAnton Vorontsov1-0/+4
Issuing the following command on host: $ ifconfig eth2 mtu 1600 ; ping 10.0.0.27 -s 1485 -c 1 Makes some boards (tested with MPC8315 rev 1.1 and MPC8313 rev 1.0) oops like this: skb_over_panic: text:c0195914 len:1537 put:1537 head:c79e4800 data:c79e4880 tail:0xc79e4e81 end:0xc79e4e80 dev:eth1 ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:127! Oops: Exception in kernel mode, sig: 5 [#1] MPC831x RDB last sysfs file: /sys/kernel/uevent_seqnum Modules linked in: NIP: c01c1840 LR: c01c1840 CTR: c016d918 [...] NIP [c01c1840] skb_over_panic+0x48/0x5c LR [c01c1840] skb_over_panic+0x48/0x5c Call Trace: [c0339d50] [c01c1840] skb_over_panic+0x48/0x5c (unreliable) [c0339d60] [c01c3020] skb_put+0x5c/0x60 [c0339d70] [c0195914] gfar_clean_rx_ring+0x25c/0x3d0 [c0339dc0] [c01976e8] gfar_poll+0x170/0x1bc Dumped buffer descriptors showed that eTSEC's length/truncation logic sometimes passes oversized packets, i.e. for the above ICMP packet the following two buffer descriptors may become ready: status=1400 length=1536 status=1800 length=1541 So, it seems that gianfar actually receives the whole big frame, and it tries to place the packet into two BDs. This situation confuses the driver, and so the skb_put() sanity check fails. This patch fixes the issue by adding an appropriate check, i.e. the driver should not try to process frames with buffer descriptor's length over rx_buffer_size (i.e. maxfrm and mrblr). Note that sometimes eTSEC works correctly, i.e. in the second (last) buffer descriptor bits 'truncated' and 'crcerr' are set, and so there's no oops. Though I couldn't find any logic when it works correctly and when not. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16ehea: Fix kernel deadlock in DLPAR-mem processingJan-Bernd Themann2-6/+4
Port reset operations and memory add/remove operations need to be serialized to avoid a kernel deadlock. The deadlock is caused by calling the napi_disable() function twice. Therefore we have to employ the dlpar_mem_lock in the ehea_reset_port function as well Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16ehea: fix delayed packet processingJan-Bernd Themann1-0/+1
In the eHEA poll function an rmb() is required. Without that some packets on the receive queue are not seen and thus delayed until the next interrupt is handled for the same receive queue. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16ixgbe: add comment on SFP+ ID for Active DADon Skidmore1-0/+2
These comments were forgotten in the initial patch to add this functionality. This patch corrects that. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16Clear IFF_XMIT_DST_RELEASE for teql interfacesTom Hughes1-0/+1
https://bugzilla.kernel.org/show_bug.cgi?id=16183 The sch_teql module, which can be used to load balance over a set of underlying interfaces, stopped working after 2.6.30 and has been broken in all kernels since then for any underlying interface which requires the addition of link level headers. The problem is that the transmit routine relies on being able to access the destination address in the skb in order to do address resolution once it has decided which underlying interface it is going to transmit through. In 2.6.31 the IFF_XMIT_DST_RELEASE flag was introduced, and set by default for all interfaces, which causes the destination address to be released before the transmit routine for the interface is called. The solution is to clear that flag for teql interfaces. Signed-off-by: Tom Hughes <tom@compton.nu> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16gianfar: Fix setup of RX time stampingManfred Rudigier1-4/+17
Previously the RCTRL_TS_ENABLE bit was set unconditionally. However, if the RCTRL_TS_ENABLE is set without TMR_CTRL[TE], the driver does not work properly on some boards (Anton had problems with the MPC8313ERDB and MPC8568EMDS). With this patch the bit will only be set if requested from user space with the SIOCSHWTSTAMP ioctl command, meaning that time stamping is disabled during normal operation. Users who are not interested in time stamps will not experience problems with buggy CPU revisions or performance drops any more. The setting of TMR_CTRL[TE] is still up to the user. This is considered safe because users wanting HW timestamps must initialize the eTSEC clock first anyway, e.g. with the recently submitted PTP clock driver. Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at> Reviewed-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-16Merge branch 'master' of ↵David S. Miller12-17/+56
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2010-06-16mac80211: fix warn, enum may be used uninitializedChristoph Fritz1-1/+1
regression introduced by b8d92c9c141ee3dc9b3537b1f0ffb4a54ea8d9b2 In function ‘ieee80211_work_rx_queued_mgmt’: warning: ‘rma’ may be used uninitialized in this function this re-adds default value WORK_ACT_NONE back to rma Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-16cifs: remove bogus first_time check in NTLMv2 session setup codeJeff Layton1-9/+1
This bug appears to be the result of a cut-and-paste mistake from the NTLMv1 code. The function to generate the MAC key was commented out, but not the conditional above it. The conditional then ended up causing the session setup key not to be copied to the buffer unless this was the first session on the socket, and that made all but the first NTLMv2 session setup fail. Fix this by removing the conditional and all of the commented clutter that made it difficult to see. Cc: Stable <stable@kernel.org> Reported-by: Gunther Deschner <gdeschne@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com>
2010-06-16cifs: don't call cifs_new_fileinfo unless cifs_open succeedsJeff Layton1-6/+11
It's currently possible for cifs_open to fail after it has already called cifs_new_fileinfo. In that situation, the new fileinfo will be leaked as the caller doesn't call fput. That in turn leads to a busy inodes after umount problem since the fileinfo holds an extra inode reference now. Shuffle cifs_open around a bit so that it only calls cifs_new_fileinfo if it's going to succeed. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-06-16cifs: don't ignore cifs_posix_open_inode_helper return valueSuresh Jayaraman1-2/+2
...and ensure that we propagate the error back to avoid any surprises. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Reviewed-and-Tested-by: Jeff Layton <jlayton@redhat.com>
2010-06-16cifs: clean up arguments to cifs_open_inode_helperJeff Layton1-16/+14
...which takes a ton of unneeded arguments and does a lot more pointer dereferencing than is really needed. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-06-16cifs: pass instantiated filp back after open callJeff Layton2-50/+29
The current scheme of sticking open files on a list and assuming that cifs_open will scoop them off of it is broken and leads to "Busy inodes after umount..." errors at unmount time. The problem is that there is no guarantee that cifs_open will always be called after a ->lookup or ->create operation. If there are permissions or other problems, then it's quite likely that it *won't* be called. Fix this by fully instantiating the filp whenever the file is created and pass that filp back to the VFS. If there is a problem, the VFS can clean up the references. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-06-16cifs: move cifs_new_fileinfo call out of cifs_posix_openJeff Layton3-31/+30
Having cifs_posix_open call cifs_new_fileinfo is problematic and inconsistent with how "regular" opens work. It's also buggy as cifs_reopen_file calls this function on a reconnect, which creates a new struct cifsFileInfo that just gets leaked. Push it out into the callers. This also allows us to get rid of the "mnt" arg to cifs_posix_open. Finally, in the event that a cifsFileInfo isn't or can't be created, we always want to close the filehandle out on the server as the client won't have a record of the filehandle and can't actually use it. Make sure that CIFSSMBClose is called in those cases. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-06-16Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6Steve French167-877/+1660
2010-06-15bridge: Fix OOM crash in deliver_cloneHerbert Xu1-2/+2
The bridge multicast patches introduced an OOM crash in the forward path, when deliver_clone fails to clone the skb. Reported-by: Mark Wagner <mwagner@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-15netxen: fix caching window registerAmit Kumar Salecha1-4/+0
CRB window register is not per pci-func for NX3031, so caching can result in incorrect values. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-15netxen: fix rcv buffer leakAmit Kumar Salecha1-3/+6
Rcv producer should be read in spin-lock. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-15netxen: fix memory leaks in error pathAmit Kumar Salecha2-3/+4
Fixes memory leak in error path when memory allocation for adapter data structures fails. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-15pcmcia: dev_node removal bugfixDominik Brodowski1-0/+1
Patch c7c2fa07 removed one line too much from smc91c92_cs.c. Reported-by: Komuro <komurojun-mbn@nifty.com> CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-15powerpc/5200: fix lite5200 ethernet phy addressDmitry Baryshkov1-2/+2
According to my schematics, on Lite5200 board ethernet phy uses address 0 (all ADDR lines are pulled down). With this change I can talk to onboard phy (LXT971) and correctly use autonegotiation. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-06-15powerpc/5200: Fix build error in sound code.Grant Likely1-1/+1
Compiling in the MPC5200 sound drivers results in the following build error: sound/soc/fsl/mpc5200_psc_ac97.o: In function `to_psc_dma_stream': mpc5200_psc_ac97.c:(.text+0x0): multiple definition of `to_psc_dma_stream' sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here sound/soc/fsl/efika-audio-fabric.o: In function `to_psc_dma_stream': efika-audio-fabric.c:(.text+0x0): multiple definition of `to_psc_dma_stream' sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here make[3]: *** [sound/soc/fsl/built-in.o] Error 1 make[2]: *** [sound/soc/fsl] Error 2 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 This patch fixes it by declaring the inline function in the header file to also be a static. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Jon Smirl <jonsmirl@gmail.com> Tested-by: John Hilmar Linkhorst <John.Linkhorst@rwth-aachen.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15powerpc/5200: fix oops during going to standbyDmitry Baryshkov1-1/+10
When going to standby mode mpc code maps the whole soc5200 node to access warious MBAR registers. However as of_iomap uses 'reg' property of device node, only small part of MBAR is getting mapped. Thus pm code gets oops when trying to access high parts of MBAR. As a way to overcome this, make mpc52xx_pm_prepare() explicitly map whole MBAR (0xc0000). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-06-15hostap: Protect against initialization interruptTim Gardner3-3/+27
Use an irq spinlock to hold off the IRQ handler until enough early card init is complete such that the handler can run without faulting. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-15Merge branch 'master' of ↵David S. Miller1-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
2010-06-15alpha: Fix de2104x driver failing to readout MAC address correctlyMorten H. Larsen1-2/+3
This patch fixes a missing read memory barrier that is needed for the driver to readout the MAC address correctly from the on-board ROM. Also it replaces the use of the deprecated functions readl()/writel(). Signed-off-by: Morten H. Larsen <m-larsen@post6.tele.dk> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-15alpha: Detect Super IO chip, no IDE on Avanti, enable EPP19Morten H. Larsen5-49/+155
This patch probes for the Super IO chip and reserves the IO range when found. It avoids enabling the IDE interface on the Avanti family, since none has IDE. It enables the Enhanced Parallel Port v1.9 feature. Signed-off-by: Morten H. Larsen <m-larsen@post6.tele.dk> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-15alpha: fix pci_mmap_resource API breakageMatt Turner1-2/+1
Caused by 2c3c8bea608866d8bd9dcf92657d57fdcac011c5 which was clearly not even compile tested. Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-15alpha: fix __arch_hweight32 typoMatt Turner1-1/+1
Typo in 1527bc8b928dd1399c3d3467dd47d9ede210978a renamed hweight32 to __arch_weight32. Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-15iwlwifi: cancel scan watchdog in iwl_bg_abort_scanJohn W. Linville1-0/+1
Avoids this: WARNING: at net/mac80211/scan.c:312 ieee80211_scan_completed+0x5f/0x1f1 [mac80211]() Hardware name: Latitude E5400 Modules linked in: aes_x86_64 aes_generic fuse ipt_MASQUERADE iptable_nat nf_nat rfcomm sco bridge stp llc bnep l2cap sunrpc cpufreq_ondemand acpi_cpufreq freq_table xt_physdev ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 kvm_intel kvm uinput arc4 ecb snd_hda_codec_intelhdmi snd_hda_codec_idt snd_hda_intel iwlagn snd_hda_codec snd_hwdep snd_seq snd_seq_device iwlcore snd_pcm dell_wmi sdhci_pci sdhci iTCO_wdt tg3 dell_laptop mmc_core i2c_i801 wmi mac80211 snd_timer iTCO_vendor_support btusb joydev dcdbas cfg80211 bluetooth snd soundcore microcode rfkill snd_page_alloc firewire_ohci firewire_core crc_itu_t yenta_socket rsrc_nonstatic i915 drm_kms_helper drm i2c_algo_bit i2c_core video output [last unloaded: scsi_wait_scan] Pid: 979, comm: iwlagn Tainted: G W 2.6.33.3-85.fc13.x86_64 #1 Call Trace: [<ffffffff8104b558>] warn_slowpath_common+0x77/0x8f [<ffffffff8104b57f>] warn_slowpath_null+0xf/0x11 [<ffffffffa01bb7d9>] ieee80211_scan_completed+0x5f/0x1f1 [mac80211] [<ffffffffa02a23f0>] iwl_bg_scan_completed+0xbb/0x17a [iwlcore] [<ffffffff81060d3d>] worker_thread+0x1a4/0x232 [<ffffffffa02a2335>] ? iwl_bg_scan_completed+0x0/0x17a [iwlcore] [<ffffffff81064817>] ? autoremove_wake_function+0x0/0x34 [<ffffffff81060b99>] ? worker_thread+0x0/0x232 [<ffffffff810643c7>] kthread+0x7a/0x82 [<ffffffff8100a924>] kernel_thread_helper+0x4/0x10 [<ffffffff8106434d>] ? kthread+0x0/0x82 [<ffffffff8100a920>] ? kernel_thread_helper+0x0/0x10 Reported here: https://bugzilla.redhat.com/show_bug.cgi?id=590436 Signed-off-by: John W. Linville <linville@tuxdriver.com> Reported-by: Mihai Harpau <mishu@piatafinanciara.ro> Cc: stable@kernel.org Acked-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-15ASoC: DaVinci: Fix McASP hardware FIFO configurationSudhakar Rajashekhara1-2/+0
On DA830/OMAP-L137 and DA850/OMAP-L138 SoCs, the McASP peripheral has FIFO support. This FIFO provides additional data buffering. It also provides tolerance to variation in host/DMA controller response times. More details of the FIFO operation can be found at http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprufm1&fileType=pdf Existing sequence of steps for audio playback/capture are: a. DMA configuration b. McASP configuration (configures and enables FIFO) c. Start DMA d. Start McASP (enables FIFO) During McASP configuration, while FIFO was being configured, FIFO was being enabled in davinci_hw_common_param() function of sound/soc/davinci/davinci-mcasp.c file. This generated a transmit DMA event, which gets serviced when DMA is started. https://patchwork.kernel.org/patch/84611/ patch clears the DMA events before starting DMA, which is the right thing to do. But this resulted in a state where DMA was waiting for an event from McASP (after step c above), but the event which was already there, has got cleared (because of step b above). The fix is not to enable the FIFO during McASP configuration as FIFO was being enabled as part of McASP start. Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15kbuild: fix LOCALVERSION handling to match descriptionAndy Whitcroft1-1/+1
In the commit below the version string handling was modified, adding a '+' where no other version information was supplied: commit 85a256d8e0116c8f5ad276730830f5d4d473344d Author: David Rientjes <rientjes@google.com> Date: Wed Jan 13 13:01:05 2010 -0800 From the commit the intent was as below: - when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the repository has been revised beyond a tagged commit and LOCALVERSION= was not passed to "make". However if the user supplies an empty LOCALVERSION on the command line the plus suffix is still added. This form is useful in the case where the build environment knows that the version as specified is correct and complete but does not correspond to a specific tag. This patch changes the implementation to match the documentation such that specifying LOCALVERSION= on the build line is sufficient to suppress any suffix. Signed-off-by: Andy Whitcroft <apw@canonical.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-15Merge branch 'fix/misc' into for-linusTakashi Iwai4-29/+110
2010-06-15Merge branch 'fix/hda' into for-linusTakashi Iwai1-17/+18
2010-06-15intel-iommu: Force-disable IOMMU for iGFX on broken Cantiga revisions.David Woodhouse1-1/+7
Certain revisions of this chipset appear to be broken. There is a shadow GTT which mirrors the real GTT but contains pre-translated physical addresses, for performance reasons. When a GTT update happens, the translations are done once and the resulting physical addresses written back to the shadow GTT. Except sometimes, the physical address is actually written back to the _real_ GTT, not the shadow GTT. Thus we start to see faults when that physical address is fed through translation again. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-06-15intel-iommu: Fix double lock in get_domain_for_dev()Jiri Slaby1-1/+2
stanse found the following double lock. In get_domain_for_dev: spin_lock_irqsave(&device_domain_lock, flags); domain_exit(domain); domain_remove_dev_info(domain); spin_lock_irqsave(&device_domain_lock, flags); spin_unlock_irqrestore(&device_domain_lock, flags); spin_unlock_irqrestore(&device_domain_lock, flags); This happens when the domain is created by another CPU at the same time as this function is creating one, and the other CPU wins the race to attach it to the device in question, so we have to destroy our own newly-created one. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-06-15intel-iommu: Fix reference by physical address in intel_iommu_attach_device()Sheng Yang1-1/+2
Commit a99c47a2 "intel-iommu: errors with smaller iommu widths" replace the dmar_domain->pgd with the first entry of page table when iommu's supported width is smaller than dmar_domain's. But it use physical address directly for new dmar_domain->pgd... This result in KVM oops with VT-d on some machines. Reported-by: Allen Kay <allen.m.kay@intel.com> Cc: Tom Lyon <pugs@cisco.com> Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-06-15OMAP: OMAPFB: fix rfbi.c compile errorTomi Valkeinen1-2/+3
The code in rfbi.c tried to get the omapdss platform_device via a static member defined in dispc.c, leading to a compile error. The same platform_device is available through rfbi-struct. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-06-15OMAPFB: LCDC: change update_mode to DISABLED when going suspendJanusz Krzysztofik1-12/+2
I was observing the following error messages on my OMAP1 based Amstrad Delta board when first changing from text to graphics mode or vice versa after the LCD display had been blanked: omapfb omapfb: timeout waiting for FRAME DONE with a followup error message while unblanking it back: omapfb omapfb: resetting (status 0xffffffb2,reset count 1) As a visible result, image pixels happened to be shifted by a few bits, giving wrong colors. Examining the code, I found that this problem occures when an OMAP1 internal LCD controller is disabled from omap_lcdc_suspend() and then a subsequent omap_lcdc_setup_plane() calls disable_controller() again. This potentially error provoking behaviour is triggered by the lcdc.update_mode flag being kept at OMAP_AUTO_UPDATE, regardless of the controller and panel being suspended. This patch tries to correct the problem by replacing both omap_lcdc_suspend() and omap_lcdc_resume() function bodies with single calls to omap_lcdc_set_update_mode() with a respective OMAP_UPDATE_DISABLE or OMAP_AUTO_UPDATE argument. As a result, exactly the same lower level operations are performed, with addition of changing the lcdc.update_mode flag to a value better suited for the controller state. This prevents any further calls to disable_controller() from omap_lcdc_setup_plane() while the display is suspended. Created against linux-2.6.34-rc7. Tested on Amstrad Delta. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-06-15cciss: set SCSI max cmd len to 16, as default is wrongStephen M. Cameron1-0/+1
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-15powerpc/5200: add lite5200 onboard I2C eeprom and flashDmitry Baryshkov2-0/+29
Add dts descriptions for onboard 256 byte I2C eeprom (pcf8582C-2) and 16MB NOR flash (am29lv652d). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> [grant.likely@secretlab.ca: added lite5200b eeprom and declared lite5200 gpios] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-06-14maintainers: Add git trees for SPI and device treeGrant Likely1-0/+2
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-06-15powerpc: Fix mpic_resume on early G5 macsAlastair Bridgewater1-1/+1
mpic_resume() on G5 macs blindly dereferences mpic->fixups, but it may legitimately be NULL (as on PowerMac7,2). Add an explicit check. This fixes suspend-to-disk with one processor (maxcpus=1) for me. Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15powerpc: rtas_flash needs to use rtas_data_bufMilton Miller1-18/+21
When trying to flash a machine via the update_flash command, Anton received the following error: Restarting system. FLASH: kernel bug...flash list header addr above 4GB The code in question has a comment that the flash list should be in the kernel data and therefore under 4GB: /* NOTE: the "first" block list is a global var with no data * blocks in the kernel data segment. We do this because * we want to ensure this block_list addr is under 4GB. */ Unfortunately the Kconfig option is marked tristate which means the variable may not be in the kernel data and could be above 4GB. Instead of relying on the data segment being below 4GB, use the static data buffer allocated by the kernel for use by rtas. Since we don't use the header struct directly anymore, convert it to a simple pointer. Reported-By: Anton Blanchard <anton@samba.org> Signed-Off-By: Milton Miller <miltonm@bga.com Tested-By: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15powerpc: Unconditionally enabled irq stacksChristoph Hellwig8-42/+0
Irq stacks provide an essential protection from stack overflows through external interrupts, at the cost of two additionals stacks per CPU. Enable them unconditionally to simplify the kernel build and prevent people from accidentally disabling them. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15powerpc/kexec: Wait for online/possible CPUs only.Matt Evans1-17/+1
kexec_perpare_cpus_wait() iterates i through NR_CPUS to check paca[i].kexec_state of each to make sure they have quiesced. However now we have dynamic PACA allocation, paca[NR_CPUS] is not necessarily valid and we overrun the array; spurious "cpu is not possible, ignoring" errors result. This patch iterates for_each_online_cpu so stays within the bounds of paca[] -- and every CPU is now 'possible'. Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15powerpc: Disable CONFIG_SYSFS_DEPRECATEDGrant Likely60-119/+59
Acked-by: Grant Likely <grant.likely@secretlab.ca> On 5 May 2010 21:33, "Anton Blanchard" <anton@samba.org> wrote: CONFIG_SYSFS_DEPRECATED can cause issues with newer distros and should not be required for any distro in the last 3 or 4 years, so disable it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15powerpc/boot: Remove addRamdisk.c since it is now unusedPaul Mackerras2-312/+1
It was used in the dim distant past for adding initrds to images for legacy iSeries, but it's not even used for that now that we have initramfs. So remove it. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15powerpc: Move kdump default base address to 64MB on 64bitAnton Blanchard1-1/+10
We are seeing boot fails on some System p machines when using the kdump crashkernel= boot option. The default kdump base address is 32MB, so if we reserve 256MB for kdump then we reserve all of the RMO except the first 32MB. We really want kdump to reserve some memory in the RMO and most of it elsewhere but that will require more significant changes. For now we can shift the default base address to 64MB when CONFIG_PPC64 and CONFIG_RELOCATABLE are set. This isn't quite correct since what we really care about is the kdump kernel is relocatable, but we already make the assumption that base kernel and kdump kernel have the same CONFIG_RELOCATABLE setting, eg: #ifndef CONFIG_RELOCATABLE if (crashk_res.start != KDUMP_KERNELBASE) printk("Crash kernel location must be 0x%x\n", KDUMP_KERNELBASE); ... RTAS is instantiated towards the top of our RMO, so if we were to go any higher we risk not having enough RMO memory for the kdump kernel on boxes with a 128MB RMO. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15powerpc: Remove dead CONFIG_HIGHPTEChristoph Egger1-4/+0
CONFIG_HIGHPTE doesn't exist in Kconfig, therefore removing all references for it from the source code. Signed-off-by: Christoph Egger <siccegge@cs.fau.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-06-15Merge commit 'kumar/merge' into mergeBenjamin Herrenschmidt0-0/+0
2010-06-15TPM: ReadPubEK output struct fixRajiv Andrade1-0/+1
This patch adds a missing element of the ReadPubEK command output, that prevents future overflow of this buffer when copying the TPM output result into it. Prevents a kernel panic in case the user tries to read the pubek from sysfs. Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
2010-06-14wireless: orphan ipw2x00 driversZhu Yi1-8/+2
Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-14p54pci: add Symbol AP-300 minipci adapters pciidJoerg Albert1-0/+2
Cc: stable@kernel.org Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-14libertas_tf: Fix warning in lbtf_rx for stats structPrarit Bhargava1-1/+1
Fixes linux-2.6 warning: drivers/net/wireless/libertas_tf/main.c: In function 'lbtf_rx': drivers/net/wireless/libertas_tf/main.c:578: warning: 'stats.antenna' is used uninitialized in this function drivers/net/wireless/libertas_tf/main.c:578: warning: 'stats.mactime' is used uninitialized in this function stats struct needs to be set to 0 before use. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-14iwlagn: verify flow id in compressed BA packetShanyu Zhao1-0/+5
The flow id (scd_flow) in a compressed BA packet should match the txq_id of the queue from which the aggregated packets were sent. However, in some hardware like the 1000 series, sometimes the flow id is 0 for the txq_id (10 to 19). This can cause the annoying message: [ 2213.306191] iwlagn 0000:01:00.0: Received BA when not expected [ 2213.310178] iwlagn 0000:01:00.0: Read index for DMA queue txq id (0), index 5, is out of range [0-256] 7 7. And even worse, if agg->wait_for_ba is true when the bad BA is arriving, this can cause system hang due to NULL pointer dereference because the code is operating in a wrong tx queue! Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Pradeep Kulkarni <pradeepx.kulkarni@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-14iwlwifi: serialize station management actionsReinette Chatre3-4/+17
We are seeing some race conditions between incoming station management requests (station add/remove) and the internal unassoc RXON command that modifies station table. Modify these flows to require the mutex to be held and thus serializing them. This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2207 Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-14cpqarray: fix two more wrong section typeJens Axboe1-2/+2
cpqarray_register_ctlr() and cpqarray_eisa_detect() also need to be marked as __devinit. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-14cpqarray: fix wrong __init type on pci probe functionJens Axboe1-1/+1
It needs to be __devinit, not __init. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-14Merge branch 'for-jens' of git://git.drbd.org/linux-2.6-drbd into for-linusJens Axboe50-243/+290
2010-06-14drbd: Fixed a race between disk-attach and unexpected state changesPhilipp Reisner3-3/+7
This was a very hard to trigger race condition. If we got a state packet from the peer, after drbd_nl_disk() has already changed the disk state to D_NEGOTIATING but after_state_ch() was not yet run by the worker, then receive_state() might called drbd_sync_handshake(), which in turn crashed when accessing p_uuid. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2010-06-14ALSA: hda - Fix line-in for mb5 model MacBook (Pro) 5,1 / 5,2Alex Murray1-7/+6
The line-in input is 0x7 not 0x2 for MacBook (Pro) 5,1 / 5,2 models Signed-off-by: Alex Murray <murray.alex@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>