22 Jan, 2011

3 commits

  • * 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (101 commits)
    [media] staging/lirc: fix mem leaks and ptr err usage
    [media] hdpvr: reduce latency of i2c read/write w/recycled buffer
    [media] hdpvr: enable IR part
    [media] rc/mceusb: timeout should be in ns, not us
    [media] v4l2-device: fix 'use-after-freed' oops
    [media] v4l2-dev: don't memset video_device.dev
    [media] zoran: use video_device_alloc instead of kmalloc
    [media] w9966: zero device state after a detach
    [media] v4l: Fix a use-before-set in the control framework
    [media] v4l: Include linux/videodev2.h in media/v4l2-ctrls.h
    [media] DocBook/v4l: update V4L2 revision and update copyright years
    [media] DocBook/v4l: fix validation error in dev-rds.xml
    [media] v4l2-ctrls: queryctrl shouldn't attempt to replace V4L2_CID_PRIVATE_BASE IDs
    [media] v4l2-ctrls: fix missing 'read-only' check
    [media] pvrusb2: Provide more information about IR units to lirc_zilog and ir-kbd-i2c
    [media] ir-kbd-i2c: Add back defaults setting for Zilog Z8's at addr 0x71
    [media] lirc_zilog: Update TODO.lirc_zilog
    [media] lirc_zilog: Add Andy Walls to copyright notice and authors list
    [media] lirc_zilog: Remove useless struct i2c_driver.command function
    [media] lirc_zilog: Remove unneeded tests for existence of the IR Tx function
    ...

    Linus Torvalds
     
  • …git/ieee1394/linux1394-2.6

    * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
    firewire: core: fix unstable I/O with Canon camcorder

    * 'fwnet' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
    firewire: net: is not experimental anymore
    firewire: net: invalidate ARP entries of removed nodes

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits)
    powerpc/mpic: Fix mask/unmask timeout message
    powerpc/pseries: Add BNX2=m to defconfig
    powerpc: Enable 64kB pages and 1024 threads in pseries config
    powerpc: Disable mcount tracers in pseries defconfig
    powerpc/boot/dts: Install dts from the right directory
    powerpc: machine_check_generic is wrong on 64bit
    powerpc: Check RTAS extended log flag before checking length
    powerpc: Fix corruption when grabbing FWNMI data
    powerpc: Rework pseries machine check handler
    powerpc: Don't silently handle machine checks from userspace
    powerpc: Remove duplicate debugger hook in machine_check_exception
    powerpc: Never halt RTAS error logging after receiving an unrecoverable machine check
    powerpc: Don't force MSR_RI in machine_check_exception
    powerpc: Print 32 bits of DSISR in show_regs
    powerpc/kdump: Disable ftrace during kexec
    powerpc/kdump: Move crash_kexec_stop_spus to kdump crash handler
    powerpc/kexec: Remove empty ppc_md.machine_kexec_prepare
    powerpc/kexec: Don't initialise kexec hooks to default handlers
    powerpc/kdump: Remove ppc_md.machine_crash_shutdown
    powerpc/kexec: Remove ppc_md.machine_kexec
    ...

    Linus Torvalds
     

21 Jan, 2011

16 commits

  • Fix error test in fan_{read,write}_reg()

    Signed-off-by: Roel Kluin
    Signed-off-by: Benjamin Herrenschmidt

    roel kluin
     
  • It turns out that some device drivers map pages from the ACPI NVS region
    during resume using ioremap(), which conflicts with ioremap_cache() used
    for mapping those pages by the NVS save/restore code in nvs.c.

    Make the NVS pages mapped by the code in nvs.c be unmapped before device
    drivers' resume routines run.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Commit ca9b600be38c ("ACPI / PM: Make suspend_nvs_save() use
    acpi_os_map_memory()") attempted to prevent the code in osl.c and nvs.c
    from using different ioremap() variants by making the latter use
    acpi_os_map_memory() for mapping the NVS pages. However, that also
    requires acpi_os_unmap_memory() to be used for unmapping them, which
    causes synchronize_rcu() to be executed many times in a row
    unnecessarily and introduces substantial delays during resume on some
    systems.

    Instead of using acpi_os_map_memory() for mapping the NVS pages in nvs.c
    introduce acpi_os_ioremap() calling ioremap_cache() and make the code in
    both osl.c and nvs.c use it.

    Reported-by: Jeff Chua
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • * akpm:
    kernel/smp.c: consolidate writes in smp_call_function_interrupt()
    kernel/smp.c: fix smp_call_function_many() SMP race
    memcg: correctly order reading PCG_USED and pc->mem_cgroup
    backlight: fix 88pm860x_bl macro collision
    drivers/leds/ledtrig-gpio.c: make output match input, tighten input checking
    MAINTAINERS: update Atmel AT91 entry
    mm: fix truncate_setsize() comment
    memcg: fix rmdir, force_empty with THP
    memcg: fix LRU accounting with THP
    memcg: fix USED bit handling at uncharge in THP
    memcg: modify accounting function for supporting THP better
    fs/direct-io.c: don't try to allocate more than BIO_MAX_PAGES in a bio
    mm: compaction: prevent division-by-zero during user-requested compaction
    mm/vmscan.c: remove duplicate include of compaction.h
    memblock: fix memblock_is_region_memory()
    thp: keep highpte mapped until it is no longer needed
    kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT

    Linus Torvalds
     
  • Fix collision with kernel-supplied #define:

    drivers/video/backlight/88pm860x_bl.c:24:1: warning: "CURRENT_MASK" redefined
    arch/x86/include/asm/page_64_types.h:6:1: warning: this is the location of the previous definition

    Signed-off-by: Randy Dunlap
    Cc: Haojian Zhuang
    Cc: Richard Purdie
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Replicate changes made to drivers/leds/ledtrig-backlight.c.

    Cc: Paul Mundt
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Janusz Krzysztofik
     
  • The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
    is used to configure any non-standard kernel with a much larger scope than
    only small devices.

    This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
    references to the option throughout the kernel. A new CONFIG_EMBEDDED
    option is added that automatically selects CONFIG_EXPERT when enabled and
    can be used in the future to isolate options that should only be
    considered for embedded systems (RISC architectures, SLOB, etc).

    Calling the option "EXPERT" more accurately represents its intention: only
    expert users who understand the impact of the configuration changes they
    are making should enable it.

    Reviewed-by: Ingo Molnar
    Acked-by: David Woodhouse
    Signed-off-by: David Rientjes
    Cc: Greg KH
    Cc: "David S. Miller"
    Cc: Jens Axboe
    Cc: Arnd Bergmann
    Cc: Robin Holt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
    tty: update MAINTAINERS file due to driver movement
    tty: move drivers/serial/ to drivers/tty/serial/
    tty: move hvc drivers to drivers/tty/hvc/

    Linus Torvalds
     
  • * 'xen/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
    xenbus: Fix memory leak on release
    xenbus: avoid zero returns from read()
    xenbus: add missing wakeup in concurrent read/write
    xenbus: allow any xenbus command over /proc/xen/xenbus
    xenfs/xenbus: report partial reads/writes correctly

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
    virtio: remove virtio-pci root device
    LGUEST_GUEST: fix unmet direct dependencies (VIRTUALIZATION && VIRTIO)
    lguest: compile fixes
    lguest: Use this_cpu_ops
    lguest: document --rng in example Launcher
    lguest: example launcher to use guard pages, drop PROT_EXEC, fix limit logic
    lguest: --username and --chroot options

    Linus Torvalds
     
  • * 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPICA: Update version to 20110112
    ACPICA: Update all ACPICA copyrights and signons to 2011
    ACPICA: Fix issues/fault with automatic "serialized" method support
    ACPICA: Debugger: Lock namespace for duration of a namespace dump
    ACPICA: Fix namespace race condition
    ACPICA: Fix memory leak in acpi_ev_asynch_execute_gpe_method().

    Linus Torvalds
     
  • During system suspend, the "wait for ring buffer to empty" loop would
    always time out after three seconds, because the faster cached ring
    buffer head read would always return zero. Force the slow-and-careful
    PIO read on all but the first iterations of the loop to fix it.

    This also removes the unused (and useless) 'actual_head' variable that
    tried to approximate doing this, but did it incorrectly.

    Cc: Chris Wilson
    Cc: Rafael J. Wysocki
    Cc: Jesse Barnes
    Cc: Dave Airlie
    Cc: DRI mailing list
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • thanks to Clemens' and Maxim's fixes to firewire-ohci and -net in the
    last two kernel releases.

    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • This makes it possible to resume communication with a node that dropped
    off the bus for a brief period. Otherwise communication will only be
    possible after ARP cache entry timeouts.

    Signed-off-by: Maxim Levitsky
    Signed-off-by: Stefan Richter (rebased)

    Maxim Levitsky
     
  • Regression since commit 10389536742c, "firewire: core: check for 1394a
    compliant IRM, fix inaccessibility of Sony camcorder":

    The camcorder Canon MV5i generates lots of bus resets when asynchronous
    requests are sent to it (e.g. Config ROM read requests or FCP Command
    write requests) if the camcorder is not root node. This causes drop-
    outs in videos or makes the camcorder entirely inaccessible.
    https://bugzilla.redhat.com/show_bug.cgi?id=633260

    Fix this by allowing any Canon device, even if it is a pre-1394a IRM
    like MV5i are, to remain root node (if it is at least Cycle Master
    capable). With the FireWire controller cards that I tested, MV5i always
    becomes root node when plugged in and left to its own devices.

    Reported-by: Ralf Lange
    Signed-off-by: Stefan Richter
    Cc: # 2.6.32.y and newer

    Stefan Richter
     
  • This partially reverts commit da8aeb92d4853f37e281f11fddf61f9c7d84c3cd
    ("ACPI / Battery: Update information on info notification and resume"),
    which causes a hang on resume on at least some machines.

    This bug was bisected on an ASUS EeePC 901, which hangs at resume time
    if we do that "acpi_battery_refresh(battery)" in the battery resume
    function.

    Rafael suspects we'll still need to refresh the sysfs files upon resume,
    but that that can be done from a PM notifier (that will run after
    thawing user space).

    Bisected-and-tested-by: Linus Torvalds
    Cc: Matthew Garrett
    Cc: Len Brown
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 Jan, 2011

4 commits

  • We sometimes need to map between the virtio device and
    the given pci device. One such use is OS installer that
    gets the boot pci device from BIOS and needs to
    find the relevant block device. Since it can't,
    installation fails.

    Instead of creating a top-level devices/virtio-pci
    directory, create each device under the corresponding
    pci device node. Symlinks to all virtio-pci
    devices can be found under the pci driver link in
    bus/pci/drivers/virtio-pci/devices, and all virtio
    devices under drivers/bus/virtio/devices.

    Signed-off-by: Milton Miller
    Signed-off-by: Rusty Russell
    Acked-by: Michael S. Tsirkin
    Tested-by: Michael S. Tsirkin
    Acked-by: Gleb Natapov
    Tested-by: "Daniel P. Berrange"
    Cc: stable@kernel.org

    Milton Miller
     
  • arch/x86/lguest/boot.c: In function ‘lguest_init_IRQ’:
    arch/x86/lguest/boot.c:824: error: macro "__this_cpu_write" requires 2 arguments, but only 1 given
    arch/x86/lguest/boot.c:824: error: ‘__this_cpu_write’ undeclared (first use in this function)
    arch/x86/lguest/boot.c:824: error: (Each undeclared identifier is reported only once
    arch/x86/lguest/boot.c:824: error: for each function it appears in.)

    drivers/lguest/x86/core.c: In function ‘copy_in_guest_info’:
    drivers/lguest/x86/core.c:94: error: lvalue required as left operand of assignment

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Use this_cpu_ops in a couple of places in lguest.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Rusty Russell

    Christoph Lameter
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits)
    sctp: user perfect name for Delayed SACK Timer option
    net: fix can_checksum_protocol() arguments swap
    Revert "netlink: test for all flags of the NLM_F_DUMP composite"
    gianfar: Fix misleading indentation in startup_gfar()
    net/irda/sh_irda: return to RX mode when TX error
    net offloading: Do not mask out NETIF_F_HW_VLAN_TX for vlan.
    USB CDC NCM: tx_fixup() race condition fix
    ns83820: Avoid bad pointer deref in ns83820_init_one().
    ipv6: Silence privacy extensions initialization
    bnx2x: Update bnx2x version to 1.62.00-4
    bnx2x: Fix AER setting for BCM57712
    bnx2x: Fix BCM84823 LED behavior
    bnx2x: Mark full duplex on some external PHYs
    bnx2x: Fix BCM8073/BCM8727 microcode loading
    bnx2x: LED fix for BCM8727 over BCM57712
    bnx2x: Common init will be executed only once after POR
    bnx2x: Swap BCM8073 PHY polarity if required
    iwlwifi: fix valid chain reading from EEPROM
    ath5k: fix locking in tx_complete_poll_work
    ath9k_hw: do PA offset calibration only on longcal interval
    ...

    Linus Torvalds
     

19 Jan, 2011

17 commits

  • When the lirc drivers were converted over to using memdup_user, I
    mistakenly also removed corresponding calls to kfree. Add those back. I
    also screwed up on the allocation error check in lirc_serial, using if
    (PTR_ERR()) instead of if (IS_ERR()), which broke transmit.

    Reported-by: Jiri Fojtasek
    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     
  • The current hdpvr code kmalloc's a new buffer for every i2c read and
    write. Rather than do that, lets allocate a buffer in the driver's
    device struct and just use that every time.

    The size I've chosen for the buffer is the maximum size I could
    ascertain might be used by either ir-kbd-i2c or lirc_zilog, plus a bit
    of padding (lirc_zilog may use up to 100 bytes on tx, rounded that up
    to 128).

    Note that this might also remedy user reports of very sluggish behavior
    of IR receive with hdpvr hardware.

    v2: make sure (len i2c_buf)) [Jean Delvare]

    Reported-by: Jean Delvare
    Acked-by: Jean Delvare
    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     
  • A number of things going on here, but the end result is that the IR part
    on the hdpvr gets enabled, and can be used with ir-kbd-i2c and/or
    lirc_zilog.

    First up, there are some conditional build fixes that come into play
    whether i2c is built-in or modular. Second, we're swapping out
    i2c_new_probed_device() for i2c_new_device(), as in my testing, probing
    always fails, but we *know* that all hdpvr devices have a z8 chip at
    0x70 and 0x71. Third, we're poking at an i2c address directly without a
    client, and writing some magic bits to actually turn on this IR part
    (this could use some improvement in the future). Fourth, some of the
    i2c_adapter storage has been reworked, as the existing implementation
    used to lead to an oops following i2c changes c. 2.6.31.

    Earlier editions of this patch have been floating around the 'net for a
    while, including being patched into Fedora kernels, and they *do* work.
    This specific version isn't yet tested, beyond loading ir-kbd-i2c and
    confirming that it does bind to the RX address of the hdpvr.

    [mchehab@redhat.com: I2C_CLASS_TV_ANALOG is not defined. Fix compilation bug]
    Signed-off-by: Jarod Wilson
    Acked-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     
  • Fixes an egregious bug in mceusb driver, where the receiver was being
    put into idle mode far sooner than it should have, thanks to storing a
    timeout value that in us where it should be ns. Basically, the receiver
    kept going into idle mode before a trailing space had been fully
    received, which was causing problems for some protocols, most notably
    manifesting as lirc userspace never receiving a trailing space for any
    rc5 signals.

    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     
  • Fix a bug in v4l2_device_unregister where the sd pointer can be dereferenced
    after it was freed.

    Normally the i2c adapter is removed before this function is called. Removing
    the adapter will also unregister all subdevs on that adapter, so generally
    v4l2_device_unregister has nothing to do. However, in the case of a platform
    i2c bus that bus is generally not freed.

    In that case, after freeing the i2c subdevice the code will fall into the
    second block when it tests if the subdev is a SPI device. But by that time
    the subdev is already freed and the kernel oopses.

    The fix is trivial: continue with the loop after freeing the i2c or spi
    subdevice.

    Signed-off-by: Hans Verkuil
    Reported-by: Daniel Drake
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Zeroing video_device.dev causes a memory leak if video_set_drvdata
    was called before video_register_device was called. video_set_drvdata
    calls dev_set_drvdata which allocates video_device.dev.p.

    memsetting this will prevent freeing of that memory.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • After a detach zero the whole device state to ensure a clean slate
    on the next attach.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • v4l2_queryctrl sets the step value based on the control type. That would
    be fine if it used the control type stored in the V4L2 kernel control
    object, not the one stored in the userspace ioctl structure that has
    just been memset to 0. Fix this.

    Signed-off-by: Laurent Pinchart
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • When queryctrl is called with a V4L2_CID_PRIVATE_BASE control ID, then
    currently it is replaced by the real internal ID. This is not according to
    the spec so keep the V4L2_CID_PRIVATE_BASE ID in this case.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • VIDIOC_S_CTRL did not check against read-only controls. Even worse, for
    controls of type CTRL_CLASS it would cause a kernel oops since those controls
    do not have a s_ctrl op.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • When registering an IR Rx device with the I2C subsystem, provide more detailed
    information about the IR device and default remote configuration for the IR
    driver modules.

    Also explicitly register any IR Tx device with the I2C subsystem.

    Signed-off-by: Andy Walls
    Acked-by: Mike Isely
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • This reverts a portion of commit

    44243fc2ef99948bc9b046901880885616dd5e89

    A commit for which I errantly recommended that defaults for I2C address
    0x71 not be set by ir-kbd-i2c.c

    The pvrusb2 and bttv drivers currently rely on ir-kbd-i2c setting
    defaults for that address. Until I can get those bridge drivers fixed
    to properly send IR_i2c_init_data for boards with Zilog Z8 chips,
    just add back the default settings for I2C address 0x71.

    Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • The ir_command() function is a do-nothing stub; remove it.

    Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • The driver is now structured so that it must handle an IR Tx unit
    for a Z8 IR chip, or it refuses to handle that Z8 IR chip. This
    allows us to assume that ir->tx != NULL in a few places in the driver,
    and also allows us to always report Tx is available to userspace.
    Get rid of unneeded tests for ir->tx == NULL and always report that
    Tx is available.

    Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls