28 Sep, 2010

1 commit

  • The HW by default has RX coalescing on. For iWARP connections, this
    causes a 100ms delay in connection establishement due to the ingress
    MPA Start message being stalled in HW. So explicitly turn RX
    coalescing off when setting up iWARP connections.

    This was causing very bad performance for NP64 gather operations using
    Open MPI, due to the way it sets up connections on larger jobs.

    Signed-off-by: Steve Wise
    Cc:
    Signed-off-by: Roland Dreier

    Steve Wise
     

26 Sep, 2010

5 commits

  • rdusp() gives us the right value only for the current thread...

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • We want interrupts disabled on all paths leading to RESTORE_ALL;
    otherwise, we are risking an IRQ coming between the updates of
    alpha_mv->hae_cache and *alpha_mv->hae_register and set_hae()
    within the IRQ getting badly confused.

    RESTORE_ALL used to play with disabling IRQ itself, but that got
    removed back in 2002, without making sure we had them disabled
    on all paths. It's cheaper to make sure we have them disabled than
    to revert to original variant...

    Remove the detritus left from that commit back in 2002; we used to
    need a reload of $0 and $1 since swpipl would change those, but
    doing that had become pointless when we stopped doing swpipl in
    there...

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: prevent merges of discard and write requests

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: sound/pci/rme9652: prevent reading uninitialized stack memory
    ALSA: hda - Fix auto-parse of SPDIF input of Realtek codecs
    ASoC: Fix multi-componentism
    ASoC: Fix soc-cache buffer overflow bug
    ALSA: oxygen: fix analog capture on Claro halo cards
    ALSA: hda - Add Dell Latitude E6400 model quirk
    ASoC: fix clkdev API usage in sh/migor.c

    Linus Torvalds
     
  • Thomas Pollet noticed that the remap_file_pages() system call in
    fremap.c has a potential overflow in the first part of the if statement
    below, which could cause it to process bogus input parameters.
    Specifically the pgoff + size parameters could be wrap thereby
    preventing the system call from failing when it should.

    Reported-by: Thomas Pollet
    Signed-off-by: Larry Woodman
    Signed-off-by: Linus Torvalds

    Larry Woodman
     

25 Sep, 2010

34 commits

  • Takashi Iwai
     
  • Takashi Iwai
     
  • The SNDRV_HDSP_IOCTL_GET_CONFIG_INFO and
    SNDRV_HDSP_IOCTL_GET_CONFIG_INFO ioctls in hdspm.c and hdsp.c allow
    unprivileged users to read uninitialized kernel stack memory, because
    several fields of the hdsp{m}_config_info structs declared on the stack
    are not altered or zeroed before being copied back to the user. This
    patch takes care of it.

    Signed-off-by: Dan Rosenberg
    Cc:
    Signed-off-by: Takashi Iwai

    Dan Rosenberg
     
  • Add logic to prevent two I/O requests being merged if
    only one of them is a discard. Ditto secure discard.

    Without this fix, it is possible for write requests
    to transform into discard requests. For example:

    Submit bio 1 to discard 8 sectors from sector n
    Submit bio 2 to write 8 sectors from sector n + 16
    Submit bio 3 to write 8 sectors from sector n + 8

    Bio 1 becomes request 1. Bio 2 becomes request 2.
    Bio 3 is merged with request 2, and then subsequently
    request 2 is merged with request 1 resulting in just
    one I/O request which discards all 24 sectors.

    Signed-off-by: Adrian Hunter

    (Moved the checks above the position checks /Jens)

    Signed-off-by: Jens Axboe

    Adrian Hunter
     
  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
    x86/hwmon: pkgtemp has no dependency on PCI
    MAINTAINERS: Update hwmon entry
    x86/hwmon: register alternate sibling upon CPU removal
    x86/hwmon: fix initialization of pkgtemp
    x86/hwmon: fix initialization of coretemp
    x86/hwmon: don't leak device attribute file from pkgtemp_probe() and pkgtemp_remove()
    x86/hwmon: avoid deadlock on CPU removal in pkgtemp
    x86/hwmon: fix module init for hotplug-but-no-device-found case
    hwmon: (lis3) Fix Oops with NULL platform data

    Linus Torvalds
     
  • * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: remove dead code from intvec_32.S

    Linus Torvalds
     
  • This "bpt_code" instruction was killed off in our development line a while
    ago (the actual definition of bpt_code that is used is in kernel/traps.c)
    but I didn't push it for 2.6.36 because it seemed harmless and I didn't
    want to try to push more than absolutely necessary.

    However, we recently fixed a bug in our gcc that had been causing
    "-gdwarf2" not to be passed to the assembler, and passing this flag causes
    an erroneous assembler failure in the presence of code in a data section,
    sometimes. While we'd like to track down the bug in the assembler,
    we'd also like to make sure 2.6.36 builds with the current toolchain,
    so I'm removing this dead code as well.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Thomas Pollet points out that the 'end' variable is broken. It was
    computed based on start/size before they were page-aligned, and as such
    doesn't actually match any of the other actions we take. The overflow
    test on end was also redundant, since we had already tested it with the
    properly aligned version.

    So just get rid of it entirely. The one remaining use for that broken
    variable can just use 'start+size' like all the other cases already did.

    Reported-by: Thomas Pollet
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
    o2dlm: force free mles during dlm exit
    ocfs2: Sync inode flags with ext2.
    ocfs2: Move 'wanted' into parens of ocfs2_resmap_resv_bits.
    ocfs2: Use cpu_to_le16 for e_leaf_clusters in ocfs2_bg_discontig_add_extent.
    ocfs2: update ctime when changing the file's permission by setfacl
    ocfs2/net: fix uninitialized ret in o2net_send_message_vec()
    Ocfs2: Handle empty list in lockres_seq_start() for dlmdebug.c
    Ocfs2: Re-access the journal after ocfs2_insert_extent() in dxdir codes.
    ocfs2: Fix lockdep warning in reflink.
    ocfs2/lockdep: Move ip_xattr_sem out of ocfs2_xattr_get_nolock.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
    USB: update Kconfig help text for CONFIG_USB_SUSPEND
    usb: musb: gadget: restart request on clearing endpoint halt
    usb: musb: host: Issue a memory barrier before starting DMA
    usb: musb: gadget: fix dma length in txstate
    usb: musb: gadget: complete request only if data is transfered over
    usb: musb: gadget: fix DMA length for OUT transfer
    usb: musb: gadget: enable autoclear for OUT transfer in both DMA 0 and DMA 1
    usb: musb: gadget: fix bulk IN infinit hangs in double buffer case
    usb: musb: gadget: fix kernel panic if using out ep with FIFO_TXRX style
    USB: fix bug in initialization of interface minor numbers

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
    Staging: ti-st: remove st_get_plat_device

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    vgaarb: trivial fix
    drm: radeon cleanup fixes...
    drm: fix trivial coding errors
    drm: ttm sparse fixes.
    drm/nouveau: fix panels using straps-based mode detection
    drm/ttm: Clear the ghost cpu_writers flag on ttm_buffer_object_transfer.
    drm/radeon: don't allow device to be opened if powered down

    Linus Torvalds
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • It's a userland pointer; worse, an untrustable one since ptrace
    has just provided a chance to modify it.

    X-Roothole-Covering-Cabal: TINRCC
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • do_signal() should know about saved_mask for it to work...

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Other than coretemp, from which this code was apparently derived, there
    is no PCI specific code in this driver.

    Signed-off-by: Jan Beulich
    Cc: Fenghua Yu
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Just like pkgtemp registers another core of the same package when one
    gets removed, coretemp should register another hyperthread (if
    available) in that situation.

    As pointed out in the patch fixing the respective code in pkgtemp, the
    list protectng mutex must be dropped before calling
    coretemp_device_add(), and due to the restructured loop (including an
    explicit return) the "safe" variant of the list iterator isn't needed
    anymore.

    Signed-off-by: Jan Beulich
    Cc: Rudolf Marek
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • Feature availability should also be checked in the hotplug code path.

    Signed-off-by: Jan Beulich
    Cc: Fenghua Yu
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • Using cpuid_eax() to determine feature availability on other than
    the current CPU is invalid. And feature availability should also be
    checked in the hotplug code path.

    Signed-off-by: Jan Beulich
    Cc: Rudolf Marek
    Cc: Fenghua Yu
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • While apparently inherited from coretemp source, this particular error handling
    cleanup and exit path wasn't copied properly (or perhaps got discarded
    intermediately and not re-added properly later).

    Signed-off-by: Jan Beulich
    Cc: Fenghua Yu
    Signed-off-by: Guenter Roeck
    (added device file removal in pkgtemp_remove)

    Jan Beulich
     
  • pkgtemp_device_remove(), holding the list protecting mutex, calls
    pkgtemp_device_add(), which itself wants to acquire the same mutex.
    Holding the mutex over the entire loop body in pkgtemp_device_remove()
    isn't really necessary, as long as the loop gets exited after
    processing the matched CPU.

    Once exiting the loop after removing an eventual match, there's no
    need for using the "safe" list iterator anymore.

    Signed-off-by: Jan Beulich
    Cc: Fenghua Yu
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • In commit 0dca94baeab4a1a514841b0a4c8e3a51dfb4d5ae the call to
    platform_driver_unregister() was made conditional upon !HOTPLUG_CPU,
    but the return value from coretemp_init() was left to indicate an
    error. This isn't correct, as the negative return value indicates to
    the module loader that initialization failed, which isn't intended
    here and results in dangling pointers.

    Signed-off-by: Jan Beulich
    Cc: Chen Gong
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • The recent addition of threaded irq handler causes a NULL dereference
    when used with hp_accel driver, which has NULL pdata.

    Acked-by: Samu Onkalo
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Guenter Roeck

    Takashi Iwai
     
  • This patch (as1429) updates the Kconfig help text for
    CONFIG_USB_SUSPEND. The power/level file is now deprecated; we should
    tell people to use power/control instead.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Commit 46034dca515bc4ddca0399ae58106d1f5f0d809f (USB: musb_gadget_ep0: stop
    abusing musb_gadget_set_halt()) forgot to restart a queued request after
    clearing the endpoint halt feature. This results in a couple of USB resets
    while enumerating the file-backed storage gadget due to CSW packet not being
    sent for the MODE SENSE(10) command.

    Signed-off-by: Sergei Shtylyov
    Cc: stable@kernel.org
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Sergei Shtylyov
     
  • This patch fixes the issue which was observed while transfering
    a large file ( > 20MB) over USB (OMAP MUSB controller acts as USB host)
    to an attached USB thumb drive.

    It was found that CDB field of CBW packet was set to 0x0. This was
    due to missing a barrier before DMA engine starts transfer.
    This buffer is allocated using dma_alloc_coherent which gives
    non-cacheble but bufferable memory and hence needed a write
    memory barrier to flush the write buffer.

    More info on this thread is here:
    http://www.spinics.net/lists/linux-omap/msg33987.html

    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Maulik Mankad
    Cc: Russell King
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Santosh Shilimkar
     
  • DMA length should not go beyond the availabe space
    of request buffer, so fix it.

    Also set max_len of cppi dma channel as max size of
    int type, so make musb dma handling happier.

    Signed-off-by: Ming Lei
    Cc: David Brownell
    Cc: Anand Gadiyar
    Cc: Mike Frysinger
    Cc: Sergei Shtylyov
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • Complete the current request only if the data transfer is over.

    Signed-off-by: Ming Lei
    Cc: David Brownell
    Cc: Anand Gadiyar
    Cc: Mike Frysinger
    Cc: Sergei Shtylyov
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • DMA length should not go beyond the availabe space of request buffer,
    so fix it.

    Signed-off-by: Ming Lei
    Acked-by: Anand Gadiyar
    Cc: David Brownell
    Cc: Anand Gadiyar
    Cc: Mike Frysinger
    Cc: Sergei Shtylyov
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • This patch fixes one bugs of OUT transfer in double buffer case:

    -the current code only enable autoclear for dma mode 1, and not
    for dma mode 0

    Without this patch, test #5 of usbtest can't be passed if we
    configure musb as g_zero and use fifo mode 3 to enable double
    buffer mode.

    With this patch and the following patch(fix dma length),
    on my beagle B5, test#5(queued bulk out) may go beyond
    18Mbyte/s(seems dma mode 0 is quicker in double buffer case)
    if musb is configured as g_zero and fifo mode 3 is taken, follows
    the test command:

    #./testusb -D DEV_NAME -c 1024 -t 5 -s 32768 -g 8 [1]

    Also I have tested this patch can't make g_ether broken.

    [1],source of testusb : tools/usb/testusb.c under linux kernel;

    Signed-off-by: Ming Lei
    Cc: David Brownell
    Cc: Anand Gadiyar
    Cc: Mike Frysinger
    Cc: Sergei Shtylyov
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • This patch fixes one infinite hang of bulk IN transfer in double buffer
    case, the hang can be observed easily by test #6 of usbtest if musb is
    configured as g_zero and fifo mode 3 is taken to enable double fifo.

    In fact, the patch only removes the check for non-empty fifo before
    loading data from new request into fifo since the check is not correct:

    -in double buffer case, fifo may accommodate more than one packet,
    even though it has contained one packet already and is non-empty

    -since last DMA is completed before calling musb_g_tx, it is sure
    that fifo may accommodate at least one packet

    Without applying the patch, new requst enqueued from .complte may not
    have a chance to be loaded into fifo, then will never be completed and
    cause infinite hangs.

    With the patch, on my beagle B5, test#6(queued bulk in) can be passed and
    test result may go beyond 33Mbyte/s if musb is configured as g_zero and
    fifo mode 3 is taken, follows the test command:

    #testusb -D DEV_NAME -c 1024 -t 6 -s 32768 -g 8 [1]

    [1],
    -source of testusb : tools/usb/testusb.c under linux kernel;

    Signed-off-by: Ming Lei
    Acked-by: Anand Gadiyar
    Cc: David Brownell
    Cc: Anand Gadiyar
    Cc: Mike Frysinger
    Cc: Sergei Shtylyov
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei