21 Oct, 2010

3 commits

  • * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
    MIPS: O32 compat/N32: Fix to use compat syscall wrappers for AIO syscalls.
    MAINTAINERS: Change list for ioc_serial to linux-serial.
    SERIAL: ioc3_serial: Return -ENOMEM on memory allocation failure
    MIPS: jz4740: Fix Kbuild Platform file.
    MIPS: Repair Kbuild make clean breakage.

    Linus Torvalds
     
  • If the host is slow in reading data or doesn't read data at all,
    blocking write calls not only blocked the program that called write()
    but the entire guest itself.

    To overcome this, let's not block till the host signals it has given
    back the virtio ring element we passed it. Instead, send the buffer to
    the host and return to userspace. This operation then becomes similar
    to how non-blocking writes work, so let's use the existing code for this
    path as well.

    This code change also ensures blocking write calls do get blocked if
    there's not enough room in the virtio ring as well as they don't return
    -EAGAIN to userspace.

    Signed-off-by: Amit Shah
    Acked-by: Hans de Goede
    CC: stable@kernel.org
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Amit Shah
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] bsg: fix incorrect device_status value
    [SCSI] Fix VPD inquiry page wrapper

    Linus Torvalds
     

20 Oct, 2010

2 commits

  • In this code, 0 is returned on memory allocation failure, even though other
    failures return -ENOMEM or other similar values.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression ret;
    expression x,e1,e2,e3;
    @@

    ret = 0
    ... when != ret = e1
    *x = \(kmalloc\|kcalloc\|kzalloc\)(...)
    ... when != ret = e2
    if (x == NULL) { ... when != ret = e3
    return ret;
    }
    //

    Signed-off-by: Julia Lawall
    To: Pat Gefre
    Cc: kernel-janitors@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1704/
    Signed-off-by: Ralf Baechle

    Julia Lawall
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon/kms: avivo cursor workaround applies to evergreen as well

    Linus Torvalds
     

19 Oct, 2010

4 commits


18 Oct, 2010

5 commits

  • 448cd16 ("Input: evdev - rearrange ioctl handling") broke EVIOCSABS by
    checking for the wrong direction bit.

    Signed-off-by: Daniel Mack
    Reported-by: Sven Neumann
    Tested-by: Sven Neumann
    Signed-off-by: Dmitry Torokhov

    Daniel Mack
     
  • This fixes a regression introduced by the dynamic allocation of absinfo
    for input devices. We need to bail out early for input devices which
    don't have absolute axis.

    [ 929.664303] Pid: 2989, comm: input Not tainted 2.6.36-rc8+ #14 MS-7260/MS-7260
    [ 929.664318] EIP: 0060:[] EFLAGS: 00010246 CPU: 0
    [ 929.664331] EIP is at evdev_ioctl+0x4f8/0x59f
    [ 929.664341] EAX: 00000040 EBX: 00000000 ECX: 00000006 EDX: f45a1efc
    [ 929.664355] ESI: 00000000 EDI: f45a1efc EBP: f45a1f24 ESP: f45a1eb8
    [ 929.664369] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    [ 929.664402] f470da74 f6a30e78 f462c240 00000018 bfe4a260 00000000 f45b06fc 00000000
    [ 929.664429] 000000c4 b769d000 c3544620 f470da74 f45b06fc f45b06fc f45a1f38 c107dd1f
    [ 929.664458] f4710b74 000000c4 00000000 00000000 00000000 0000029d 00000a74 f4710b74
    [ 929.664500] [] ? handle_mm_fault+0x2be/0x59a
    [ 929.664513] [] ? evdev_ioctl+0x0/0x59f
    [ 929.664524] [] ? do_vfs_ioctl+0x494/0x4d9
    [ 929.664538] [] ? up_read+0x16/0x29
    [ 929.664550] [] ? do_page_fault+0x2ff/0x32d
    [ 929.664564] [] ? do_sys_open+0xc5/0xcf
    [ 929.664575] [] ? sys_ioctl+0x41/0x61
    [ 929.664587] [] ? sysenter_do_call+0x12/0x36
    [ 929.684570] ---[ end trace 11b83e923bd8f2bb ]---

    Signed-off-by: Daniel Mack
    Signed-off-by: Dmitry Torokhov

    Daniel Mack
     
  • The i2c_imx_trx_complete() function is using
    wait_event_interruptible_timeout() to wait for the I2C controller to
    signal that it has completed an I2C bus operation. If the process that
    causes the I2C operation receives a signal, the wait will be
    interrupted, returning an error. It is better to let the I2C operation
    finished before handling the signal (i.e. returning into userspace).

    It is safe to use wait_event_timeout() instead, because the timeout
    will allow the process to exit if the I2C bus hangs. It's also better
    to allow the I2C operation to finish, because unacknowledged I2C
    operations can cause the I2C bus to hang.

    Signed-off-by: Marc Kleine-Budde
    Reviewed-by: Wolfram Sang
    Signed-off-by: Ben Dooks

    Marc Kleine-Budde
     
  • This patch is an improvement to 4bba0fd8d1c6d405df666e2573e1a1f917098be0
    which got to mainline a little early.

    Sudhakar Rajashekhara explains that at least OMAP-L138 requires MDR mode
    settings before DXR for correct behaviour, so load MDR first with
    STT cleared and later load again with STT set.

    Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

    Signed-off-by: Jon Povey
    Acked-by: Troy Kisky
    Tested-by: Sudhakar Rajashekhara
    Acked-by: Kevin Hilman
    Signed-off-by: Ben Dooks

    Jon Povey
     
  • Fixes cursor corruption in certain cases.

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     

17 Oct, 2010

1 commit

  • Revert commit 54672386ccf36ffa21d1de8e75624af83f9b0eeb
    "firewire: ohci: fix up configuration of TI chips".
    It caused massive slow-down and data corruption with a TSB82AA2 based
    StarTech EC1394B2 ExpressCard and FireWire 800 harddisks.

    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/657081
    http://thread.gmane.org/gmane.linux.kernel.firewire.user/4013

    The fact that some card EEPROMs do not program these enhancements may be
    related to TSB81BA3 phy chip errata, if not to bugs of TSB82AA2 itself.
    We could re-add these configuration steps, but only conditional on a
    whitelist of cards on which these enhancements bring a proven positive
    effect.

    Reported-and-tested-by: Eric Shattow
    Cc: Clemens Ladisch
    Cc: 2.6.35
    Signed-off-by: Stefan Richter

    Stefan Richter
     

16 Oct, 2010

5 commits

  • The compat code for the VIDIOCSMICROCODE ioctl is totally buggered.
    It's only used by the VIDEO_STRADIS driver, and that one is scheduled to
    staging and eventually removed unless somebody steps up to maintain it
    (at which point it should use request_firmware() rather than some magic
    ioctl). So we'll get rid of it eventually.

    But in the meantime, the compatibility ioctl code is broken, and this
    tries to get it to at least limp along (even if Mauro suggested just
    deleting it entirely, which may be the right thing to do - I don't think
    the compatibility translation code has ever worked unless you were very
    lucky).

    Reported-by: Kees Cook
    Cc: Mauro Carvalho Chehab
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
    mmc: sdio: fix SDIO suspend/resume regression

    Linus Torvalds
     
  • Fix SDIO suspend/resume regression introduced by 4c2ef25fe0b "mmc: fix
    all hangs related to mmc/sd card insert/removal during suspend/resume":

    PM: Syncing filesystems ... done.
    Freezing user space processes ... (elapsed 0.01 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    Suspending console(s) (use no_console_suspend to debug)
    pm_op(): platform_pm_suspend+0x0/0x5c returns -38
    PM: Device pxa2xx-mci.0 failed to suspend: error -38
    PM: Some devices failed to suspend

    4c2ef25fe0b moved the card removal/insertion mechanism out of MMC's
    suspend/resume path and into pm notifiers (mmc_pm_notify), and that
    broke SDIO's expectation that mmc_suspend_host() will remove the card,
    and squash the error, in case -ENOSYS is returned from the bus suspend
    handler (mmc_sdio_suspend() in this case).

    mmc_sdio_suspend() is using this whenever at least one of the card's SDIO
    function drivers does not have suspend/resume handlers - in that case
    it is agreed to force removal of the entire card.

    This patch fixes this regression by trivially bringing back that part of
    mmc_suspend_host(), which was removed by 4c2ef25fe0b.

    Reported-and-tested-by: Sven Neumann
    Signed-off-by: Ohad Ben-Cohen
    Cc: Maxim Levitsky
    Cc:
    Acked-by: Nicolas Pitre
    Signed-off-by: Chris Ball

    Ohad Ben-Cohen
     
  • * 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: Add Cando touch screen 15.6-inch product id
    HID: Add MULTI_INPUT quirk for turbox/mosart touchscreen
    HID: hidraw, fix a NULL pointer dereference in hidraw_write
    HID: hidraw, fix a NULL pointer dereference in hidraw_ioctl

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    ubd: fix incorrect sector handling during request restart
    ps3disk: passing wrong variable to bvec_kunmap_irq()

    Linus Torvalds
     

15 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    ehea: Fix a checksum issue on the receive path
    net: allow FEC driver to use fixed PHY support
    tg3: restore rx_dropped accounting
    b44: fix carrier detection on bind
    net: clear heap allocations for privileged ethtool actions
    NET: wimax, fix use after free
    ATM: iphase, remove sleep-inside-atomic
    ATM: mpc, fix use after free
    ATM: solos-pci, remove use after free
    net/fec: carrier off initially to avoid root mount failure
    r8169: use device model DMA API
    r8169: allocate with GFP_KERNEL flag when able to sleep

    Linus Torvalds
     

14 Oct, 2010

5 commits

  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
    ioat2: fix performance regression

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon/kms: Silent spurious error message
    drm/radeon/kms: fix bad cast/shift in evergreen.c
    drm/radeon/kms: make TV/DFP table info less verbose
    drm/radeon/kms: leave certain CP int bits enabled
    drm/radeon/kms: avoid corner case issue with unmappable vram V2

    Linus Torvalds
     
  • Commit 0793448 "DMAENGINE: generic channel status v2" changed the interface for
    how dma channel progress is retrieved. It inadvertently exported an internal
    helper function ioat_tx_status() instead of ioat_dma_tx_status(). The latter
    polls the hardware to get the latest completion state, while the helper just
    evaluates the current state without touching hardware. The effect is that we
    end up waiting for completion timeouts or descriptor allocation errors before
    the completion state is updated.

    iperf (before fix):
    [SUM] 0.0-41.3 sec 364 MBytes 73.9 Mbits/sec

    iperf (after fix):
    [SUM] 0.0- 4.5 sec 499 MBytes 940 Mbits/sec

    This is a regression starting with 2.6.35.

    Cc:
    Cc: Dave Jiang
    Cc: Jesse Brandeburg
    Cc: Linus Walleij
    Cc: Maciej Sosnowski
    Reported-by: Richard Scobie
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Currently we set all skbs with CHECKSUM_UNNECESSARY, even
    those whose protocol we don't know. This patch just
    add the CHECKSUM_COMPLETE tag for non TCP/UDP packets.

    Reported-by: Eric Dumazet
    Signed-off-by: Breno Leitao
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Breno Leitao
     
  • At least one board using the FEC driver does not have a conventional
    PHY attached to it, it is directly connected to a somewhat simple
    ethernet switch (the board is the SnapGear/LITE, and the attached
    4-port ethernet switch is a RealTek RTL8305). This switch does not
    present the usual register interface of a PHY, it presents nothing.
    So a PHY scan will find nothing - it finds ID's of 0 for each PHY
    on the attached MII bus.

    After the FEC driver was changed to use phylib for supporting PHYs
    it no longer works on this particular board/switch setup.

    Add code support to use a fixed phy if no PHY is found on the MII bus.
    This is based on the way the cpmac.c driver solved this same problem.

    Signed-off-by: Greg Ungerer
    Signed-off-by: David S. Miller

    Greg Ungerer
     

13 Oct, 2010

2 commits


12 Oct, 2010

12 commits

  • I see the following error message in my kernel log from time to time:
    radeon 0000:07:00.0: ffff88007c334000 reserve failed for wait
    radeon 0000:07:00.0: ffff88007c334000 reserve failed for wait

    After investigation, it turns out that there's nothing to be afraid of
    and everything works as intended. So remove the spurious log message.

    Signed-off-by: Jean Delvare
    Reviewed-by: Jerome Glisse
    Signed-off-by: Dave Airlie

    Jean Delvare
     
  • Missing parens.

    fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=30718

    Reported-by: Dave Gilbert
    Signed-off-by: Alex Deucher
    Reviewed-by: Matt Turner
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Make TV standard and DFP table revisions debug only.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • These bits are used for internal communication and should
    be left enabled. This may fix s/r issues on some systems.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • We should not allocate any object into unmappable vram if we
    have no means to access them which on all GPU means having the
    CP running and on newer GPU having the blit utility working.

    This patch limit the vram allocation to visible vram until
    we have acceleration up and running.

    Note that it's more than unlikely that we run into any issue
    related to that as when acceleration is not woring userspace
    should allocate any object in vram beside front buffer which
    should fit in visible vram.

    V2 use real_vram_size as mc_vram_size could be bigger than
    the actual amount of vram

    [airlied: fixup r700_cp_stop case]

    Signed-off-by: Jerome Glisse
    Signed-off-by: Dave Airlie

    Jerome Glisse
     
  • This device generates ABS_Z and ABS_RX events, while it should be
    generating ABS_X and ABS_Y instead. Using the MULTI_INPUT quirk solves
    this issue.

    Reference: https://bugs.launchpad.net/ubuntu/+bug/620609/

    Signed-off-by: Pierre BAILLY
    Signed-off-by: Anisse Astier
    Signed-off-by: Jiri Kosina

    Pierre BAILLY
     
  • commit 511d22247be7 (tg3: 64 bit stats on all arches), overlooked the
    rx_dropped accounting.

    We use a full "struct rtnl_link_stats64" to hold rx_dropped value, but
    forgot to report it in tg3_get_stats64().

    Use an "unsigned long" instead to shrink "struct tg3" by 176 bytes, and
    report this value to stats readers.

    Increment rx_dropped counter for oversized frames.

    Signed-off-by: Eric Dumazet
    CC: Michael Chan
    CC: Matt Carlson
    Acked-by: Matt Carlson
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • For carrier detection to work properly when binding the driver with a cable
    unplugged, netif_carrier_off() should be called after register_netdev(),
    not before.

    Signed-off-by: Paul Fertser
    Signed-off-by: David S. Miller

    Paul Fertser
     
  • Stanse found that i2400m_rx frees skb, but still uses skb->len even
    though it has skb_len defined. So use skb_len properly in the code.

    And also define it unsinged int rather than size_t to solve
    compilation warnings.

    Signed-off-by: Jiri Slaby
    Cc: Inaky Perez-Gonzalez
    Cc: linux-wimax@intel.com
    Acked-by: Inaky Perez-Gonzalez
    Signed-off-by: David S. Miller

    Jiri Slaby
     
  • Stanse found that ia_init_one locks a spinlock and inside of that it
    calls ia_start which calls:
    * request_irq
    * tx_init which does kmalloc(GFP_KERNEL)

    Both of them can thus sleep and result in a deadlock. I don't see a
    reason to have a per-device spinlock there which is used only there
    and inited right before the lock location. So remove it completely.

    Signed-off-by: Jiri Slaby
    Cc: Chas Williams
    Signed-off-by: David S. Miller

    Jiri Slaby
     
  • Stanse found we do in console_show:
    kfree_skb(skb);
    return skb->len;
    which is not good. Fix that by remembering the len and use it in the
    function instead.

    Signed-off-by: Jiri Slaby
    Cc: Chas Williams
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Jiri Slaby
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
    IPS driver: Fix limit clamping when reducing CPU power
    [PATCH 2/2] IPS driver: disable CPU turbo
    IPS driver: apply BIOS provided CPU limit if different from default
    intel_ips -- ensure we do not enable gpu turbo mode without driver linkage
    intel_ips: Print MCP limit exceeded values.
    IPS driver: verify BIOS provided limits
    IPS driver: don't toggle CPU turbo on unsupported CPUs
    NULL pointer might be used in ips_monitor()
    Release symbol on error-handling path of ips_get_i915_syms()
    old_cpu_power is wrongly divided by 65535 in ips_monitor()
    seqno mask of THM_ITV register is 16bit

    Linus Torvalds