07 Jan, 2012

16 commits

  • commit 3b6e3c73851a9a4b0e6ed9d378206341dd65e8a5 upstream.

    When getting a cmd irq during an ongoing data transfer
    with dma, the dma job were never terminated. This is now
    corrected.

    Tested-by: Linus Walleij
    Signed-off-by: Per Forlin
    Signed-off-by: Ulf Hansson
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Ulf Hansson
     
  • commit b63038d6f4ca5d1849ce01d9fc5bb9cb426dec73 upstream.

    The interrupt was previously enabled and then correctly cleared.
    Now we also handle it correctly.

    Tested-by: Linus Walleij
    Signed-off-by: Ulf Hansson
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Ulf Hansson
     
  • commit 78feb35b8161acd95c33a703ed6ab6f554d29387 upstream.

    My previous patch
    34a5b4b6af104cf18eb50748509528b9bdbc4036 iwlwifi: do not re-configure
    HT40 after associated

    Fix the case of HT40 after association on specified AP, but it break the
    association for some APs and cause not able to establish connection.
    We need to address HT40 before and after addociation.

    Reported-by: Andrej Gelenberg
    Signed-off-by: Wey-Yi Guy
    Tested-by: Andrej Gelenberg
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Wey-Yi Guy
     
  • commit 123877b80ed62c3b897c53357b622574c023b642 upstream.

    Check the IEEE80211_TX_CTL_ASSIGN_SEQ flag from mac80211, then decide how to
    set the TX_CMD_FLG_SEQ_CTL_MSK bit. Setting the wrong bit in BAR frame whill
    make the firmware to increment the sequence number which is incorrect and
    cause unknown behavior.

    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Wey-Yi Guy
     
  • commit 10636bc2d60942254bda149827b922c41f4cb4af upstream.

    The stations always chooses 1Mbps for all trasmitting frames,
    whenever the AP is configured to lock the supported rates.
    As the max phy rate is always set with the 4th from highest phy rate,
    this assumption might be wrong if we have less than that. Fix that.

    Cc: Paul Stewart
    Reported-by: Ajay Gummalla
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Rajkumar Manoharan
     
  • commit f83f71fda27650ae43558633be93652577dbc38c upstream.

    With 16-bit RGB565 colour format pixels are stored by the device in memory
    in the following order:

    | b3 | b2 | b1 | b0 |
    ~+-----+-----+-----+-----+
    | R5 G6 B5 | R5 G6 B5 |

    This corresponds to V4L2_PIX_FMT_RGB565 fourcc, not V4L2_PIX_FMT_RGB565X.
    This change is required to avoid trouble when setting up video pipeline
    with the s5p-tv devices, so the colour formats at both devices can be
    properly matched.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Sylwester Nawrocki
     
  • commit 8653be1afd60d6e8c36139b487e375b70357d9ef upstream.

    Check inuse variable before trying to access twl_map to prevent
    dereferencing of uninitialized variable.

    Signed-off-by: Ilya Yanok
    Signed-off-by: Samuel Ortiz
    Signed-off-by: Greg Kroah-Hartman

    Ilya Yanok
     
  • commit 61074287c2965edf0fc75b54ae8f4ce99f182669 upstream.

    You didn't mean this to be a bool.

    Signed-off-by: Rusty Russell
    Acked-by: Tony Olech
    Signed-off-by: Chris Ball
    Signed-off-by: Greg Kroah-Hartman

    Rusty Russell
     
  • commit 913050b91eb94f194392dd797b1ff3779f606ac0 upstream.

    If oprofilefs_ulong_from_user() is called with count equals
    zero, *val remains unchanged. Depending on the implementation it
    might be uninitialized.

    Change oprofilefs_ulong_from_user()'s interface to return count
    on success. Thus, we are able to return early if count equals
    zero which avoids using *val uninitialized. Fixing all users of
    oprofilefs_ulong_ from_user().

    This follows write syscall implementation when count is zero:
    "If count is zero ... [and if] no errors are detected, 0 will be
    returned without causing any other effect." (man 2 write)

    Reported-By: Mike Waychison
    Signed-off-by: Robert Richter
    Cc: Andrew Morton
    Cc: oprofile-list
    Link: http://lkml.kernel.org/r/20111219153830.GH16765@erda.amd.com
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Robert Richter
     
  • commit 8521478f67e95ada4e87970c7b41e504c724b2cf upstream.

    Synaptics touchpads on several Dell laptops, particularly Vostro V13
    systems, may not respond properly to PS/2 commands and queries immediately
    after resuming from suspend to RAM. This leads to unresponsive touchpad
    after suspend/resume cycle.

    Adding a 1-second delay after resetting the device allows touchpad to
    finish initializing (calibrating?) and start reacting properly.

    Reported-by: Daniel Manrique
    Tested-by: Daniel Manrique
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • commit 329456d1ffb416c220813725b7363cda9975c9aa upstream.

    This fixes a Data bus error on some SoCs. The first fix for this
    problem did not solve it on all devices.
    commit 6ae8ec27868bfdbb815287bee8146acbefaee867
    Author: Rafał Miłecki
    Date: Tue Jul 5 17:25:32 2011 +0200
    ssb: fix init regression of hostmode PCI core

    In ssb_pcicore_fix_sprom_core_index() the sprom on the PCI core is
    accessed, but the sprom only exists when the ssb bus is connected over
    a PCI bus to the rest of the system and not when the SSB Bus is the
    main system bus. SoCs sometimes have a PCI host controller and there
    this code will not be executed, but there are some old SoCs with an PCI
    controller in client mode around and ssb_pcicore_fix_sprom_core_index()
    should not be called on these devices too. The PCI controller on these
    devices are unused, but without this fix it results in an Data bus
    error when it gets initialized.

    Cc: Michael Buesch
    Cc: Rafał Miłecki
    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Hauke Mehrtens
     
  • commit 7e1e7ead88dff75b11b86ee0d5232c4591be1326 upstream.

    The error exit path leaks preempt count. Add the missing put_cpu().

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Yi Zou
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • commit f6a290b419a2675c4b77a6b0731cd2a64332365e upstream.

    _scsih_smart_predicted_fault is called in an interrupt and therefore
    must allocate memory using GFP_ATOMIC.

    Signed-off-by: Anton Blanchard
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Anton Blanchard
     
  • commit 44f747fff6e9f027a4866c1a6864e26ae7c510c8 upstream.

    zfcp_scsi_slave_destroy erroneously always tried to finish its task
    even if the corresponding previous zfcp_scsi_slave_alloc returned
    early. This can lead to kernel page faults on accessing uninitialized
    fields of struct zfcp_scsi_dev in zfcp_erp_lun_shutdown_wait. Take the
    port field of the struct to determine if slave_alloc returned early.

    This zfcp bug is exposed by 4e6c82b (in turn fixing f7c9c6b to be
    compatible with 21208ae) which can call slave_destroy for a
    corresponding previous slave_alloc that did not finish.

    This patch is based on James Bottomley's fix suggestion in
    http://www.spinics.net/lists/linux-scsi/msg55449.html.

    Signed-off-by: Steffen Maier
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Steffen Maier
     
  • commit 4ed0b577457eb6aeb7cdc7e7316576e63d15abb2 upstream.

    This prevents an in-kernel division by zero which happens when we are
    asking for i915_chipset_val too quickly, or within a race condition
    between the power monitoring thread and userspace accesses via debugfs.

    The issue can be reproduced easily via the following command:
    while ``; do cat /sys/kernel/debug/dri/0/i915_emon_status; done

    This is particularly dangerous because it can be triggered by
    a non-privileged user by just reading the debugfs entry.

    This issue was also found independently by Konstantin Belousov
    , who proposed a similar patch.

    Reported-by: Konstantin Belousov
    Acked-by: Jesse Barnes
    Acked-by: Keith Packard
    Reviewed-by: Chris Wilson
    Signed-off-by: Eugeni Dodonov
    Signed-off-by: Keith Packard
    Signed-off-by: Greg Kroah-Hartman

    Eugeni Dodonov
     
  • commit c3b79770e51ab1fd4201f3b54edf30113b9ce74f upstream.

    The m41t80 driver can read and set the alarm, but it doesn't
    seem to have a functional alarm irq.

    This causes failures when the generic core sees alarm functions,
    but then cannot use them properly for things like UIE mode.

    Disabling the alarm functions allows proper error reporting,
    and possible fallback to emulated modes. Once someone fixes
    the alarm irq functionality, this can be restored.

    CC: Matt Turner
    CC: Nico Macrionitis
    CC: Atsushi Nemoto
    Reported-by: Matt Turner
    Reported-by: Nico Macrionitis
    Tested-by: Nico Macrionitis
    Signed-off-by: John Stultz
    Signed-off-by: Greg Kroah-Hartman

    John Stultz
     

22 Dec, 2011

15 commits

  • commit 02a551c9755b799579e0a093bcc99b80b4dc1453 upstream.

    Huawei use the product code HUAWEI_PRODUCT_E353 (0x1506) for a
    number of different devices, which each can appear with a number
    of different descriptor sets. Different types of interfaces
    can be identified by looking at the subclass and protocol fields

    Subclass 1 protocol 8 is actually the data interface of a CDC
    ECM set, with subclass 1 protocol 9 as the control interface.
    Neither support serial data communcation, and cannot therefore
    be supported by this driver.

    At the same time, add a few other sets which appear if the
    device is configured in "Windows mode" using this modeswitch
    message:
    55534243000000000000000000000011060000000100000000000000000000

    Signed-off-by: Bjørn Mork
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Bjørn Mork
     
  • commit 414b591fd16655871e9f5592a55368b10a3ccc30 upstream.

    This patch adds the controlling interfaces for the Huawei E398.

    Thanks to Bjørn Mork for extracting the interface
    numbers from the windows driver.

    Signed-off-by: Alex Hermann
    Signed-off-by: Greg Kroah-Hartman

    Alex Hermann
     
  • commit 6abff5dc4d5a2c90e597137ce8987e7fd439259b upstream.

    Add USB IDs for Motorola H24 HSPA USB module.

    Signed-off-by: Krzysztof Hałasa
    Acked-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Krzysztof Hałasa
     
  • commit 935a9fee51c945b8942be2d7b4bae069167b4886 upstream.

    Found one system with UEFI/iBFT, kernel does not detect the iBFT during
    iscsi_ibft module loading.

    Root cause: on x86 (UEFI), we are calling of find_ibft_region() much earlier
    - specifically in setup_arch() before ACPI is enabled.

    Try to split acpi checking code out and call that later

    At that time ACPI iBFT already get permanent mapped with ioremap.
    So isa_virt_to_bus() will get wrong phys from right virt address.
    We could just skip that phys address printing.

    For legacy one, print the found address early.

    -v2: update comments and description according to Konrad.
    -v3: fix problem about module use case that is found by Konrad.
    -v4: use acpi_get_table() instead of acpi_table_parse() to handle module use case that is found by Konrad again..
    Signed-off-by: Yinghai Lu
    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: Greg Kroah-Hartman

    Yinghai Lu
     
  • commit c7caf4d4c56aee40b995f5858ccf1c814f3d2da2 upstream.

    Add USB ID for Sitecom WLA-2000 v1.001 WLAN.

    Reported-and-tested-by: Roland Gruber
    Signed-off-by: Larry Finger
    Signed-off-by: Greg Kroah-Hartman

    Larry Finger
     
  • commit 355840e7a7e56bb2834fd3b0da64da5465f8aeaa upstream.

    commit a847627709b3402163d99f7c6fda4a77bcd6b51b in linux-3.0.9
    attempted to backport this to 3.0 but only made one change were two
    were necessary. This add the second change.

    This bug was introduced in 415e72d034c50520ddb7ff79e7d1792c1306f0c9
    which was in 2.6.36.

    There is a small window of time between when a device fails and when
    it is removed from the array. During this time we might still read
    from it, but we won't write to it - so it is possible that we could
    read stale data.

    We didn't need the test of 'Faulty' before because the test on
    In_sync is sufficient. Since we started allowing reads from the early
    part of non-In_sync devices we need a test on Faulty too.

    This is suitable for any kernel from 2.6.36 onwards, though the patch
    might need a bit of tweaking in 3.0 and earlier.

    Signed-off-by: NeilBrown
    Signed-off-by: Greg Kroah-Hartman

    NeilBrown
     
  • This is for stable kernel branch 3.0 only. Previous and later versions
    have different code paths and are not affected by this bug.

    This is the same fix as "hwmon: (coretemp) Fix oops on driver load"
    but for the CPU offlining case. Sorry for missing it at first.

    Signed-off-by: Jean Delvare
    Cc: Durgadoss R
    Acked-by: Guenter Roeck
    Cc: Fenghua Yu
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • commit e58f516ff4730c4047c3f104b061f7a03e9a263c upstream.

    When we can't configure the dma channel we want to fall
    back to PIO. We do this by setting host->do_dma to zero.
    This does not work as do_dma is used to see whether dma
    can be used for the current transfer. Instead, we have
    to set host->dma to NULL.

    Signed-off-by: Sascha Hauer
    Signed-off-by: Chris Ball
    Signed-off-by: Greg Kroah-Hartman

    Sascha Hauer
     
  • commit 0b57d7602b68f7b2786b2f0e22da39cbd4139a95 upstream.

    wait_for_completion_interruptible_timeout() may return negative value.
    In this case, checking if (t > 0) will return true if t is unsigned.

    Signed-off-by: Axel Lin
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit 34a5b4b6af104cf18eb50748509528b9bdbc4036 upstream.

    The ht40 setting should not change after association unless channel switch

    This fix a problem we are seeing which cause uCode assert because driver
    sending invalid information and make uCode confuse

    Here is the firmware assert message:
    kernel: iwlagn 0000:03:00.0: Microcode SW error detected. Restarting 0x82000000.
    kernel: iwlagn 0000:03:00.0: Loaded firmware version: 17.168.5.3 build 42301
    kernel: iwlagn 0000:03:00.0: Start IWL Error Log Dump:
    kernel: iwlagn 0000:03:00.0: Status: 0x000512E4, count: 6
    kernel: iwlagn 0000:03:00.0: 0x00002078 | ADVANCED_SYSASSERT
    kernel: iwlagn 0000:03:00.0: 0x00009514 | uPc
    kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink1
    kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink2
    kernel: iwlagn 0000:03:00.0: 0x0000D1F2 | interruptlink1
    kernel: iwlagn 0000:03:00.0: 0x00000000 | interruptlink2
    kernel: iwlagn 0000:03:00.0: 0x01008035 | data1
    kernel: iwlagn 0000:03:00.0: 0x0000C90F | data2
    kernel: iwlagn 0000:03:00.0: 0x000005A7 | line
    kernel: iwlagn 0000:03:00.0: 0x5080B520 | beacon time
    kernel: iwlagn 0000:03:00.0: 0xCC515AE0 | tsf low
    kernel: iwlagn 0000:03:00.0: 0x00000003 | tsf hi
    kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp1
    kernel: iwlagn 0000:03:00.0: 0x29703BF0 | time gp2
    kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp3
    kernel: iwlagn 0000:03:00.0: 0x000111A8 | uCode version
    kernel: iwlagn 0000:03:00.0: 0x000000B0 | hw version
    kernel: iwlagn 0000:03:00.0: 0x00480303 | board version
    kernel: iwlagn 0000:03:00.0: 0x09E8004E | hcmd
    kernel: iwlagn 0000:03:00.0: CSR values:
    kernel: iwlagn 0000:03:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG)
    kernel: iwlagn 0000:03:00.0: CSR_HW_IF_CONFIG_REG: 0X00480303
    kernel: iwlagn 0000:03:00.0: CSR_INT_COALESCING: 0X0000ff40
    kernel: iwlagn 0000:03:00.0: CSR_INT: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_INT_MASK: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_FH_INT_STATUS: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_GPIO_IN: 0X00000030
    kernel: iwlagn 0000:03:00.0: CSR_RESET: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_GP_CNTRL: 0X080403c5
    kernel: iwlagn 0000:03:00.0: CSR_HW_REV: 0X000000b0
    kernel: iwlagn 0000:03:00.0: CSR_EEPROM_REG: 0X07d60ffd
    kernel: iwlagn 0000:03:00.0: CSR_EEPROM_GP: 0X90000001
    kernel: iwlagn 0000:03:00.0: CSR_OTP_GP_REG: 0X00030001
    kernel: iwlagn 0000:03:00.0: CSR_GIO_REG: 0X00080044
    kernel: iwlagn 0000:03:00.0: CSR_GP_UCODE_REG: 0X000093bb
    kernel: iwlagn 0000:03:00.0: CSR_GP_DRIVER_REG: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_UCODE_DRV_GP1: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_UCODE_DRV_GP2: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_LED_REG: 0X00000078
    kernel: iwlagn 0000:03:00.0: CSR_DRAM_INT_TBL_REG: 0X88214dd2
    kernel: iwlagn 0000:03:00.0: CSR_GIO_CHICKEN_BITS: 0X27800200
    kernel: iwlagn 0000:03:00.0: CSR_ANA_PLL_CFG: 0X00000000
    kernel: iwlagn 0000:03:00.0: CSR_HW_REV_WA_REG: 0X0001001a
    kernel: iwlagn 0000:03:00.0: CSR_DBG_HPET_MEM_REG: 0Xffff0010
    kernel: iwlagn 0000:03:00.0: FH register values:
    kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_STTS_WPTR_REG: 0X21316d00
    kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_RBDCB_BASE_REG: 0X021479c0
    kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_WPTR: 0X00000060
    kernel: iwlagn 0000:03:00.0: FH_MEM_RCSR_CHNL0_CONFIG_REG: 0X80819104
    kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_SHARED_CTRL_REG: 0X000000fc
    kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_RX_STATUS_REG: 0X07030000
    kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV: 0X00000000
    kernel: iwlagn 0000:03:00.0: FH_TSSR_TX_STATUS_REG: 0X07ff0001
    kernel: iwlagn 0000:03:00.0: FH_TSSR_TX_ERROR_REG: 0X00000000
    kernel: iwlagn 0000:03:00.0: Start IWL Event Log Dump: display last 20 entries
    kernel: ------------[ cut here ]------------
    WARNING: at net/mac80211/util.c:1208 ieee80211_reconfig+0x1f1/0x407()
    kernel: Hardware name: 4290W4H
    kernel: Pid: 1896, comm: kworker/0:0 Not tainted 3.1.0 #2
    kernel: Call Trace:
    kernel: [] ? warn_slowpath_common+0x73/0x87
    kernel: [] ? ieee80211_reconfig+0x1f1/0x407
    kernel: [] ? ieee80211_recalc_smps_work+0x32/0x32
    kernel: [] ? ieee80211_restart_work+0x7e/0x87
    kernel: [] ? process_one_work+0x1c8/0x2e3
    kernel: [] ? worker_thread+0x17a/0x23a
    kernel: [] ? manage_workers.clone.18+0x15b/0x15b
    kernel: [] ? manage_workers.clone.18+0x15b/0x15b
    kernel: [] ? kthread+0x7a/0x82
    kernel: [] ? kernel_thread_helper+0x4/0x10
    kernel: [] ? kthread_flush_work_fn+0x11/0x11
    kernel: [] ? gs_change+0xb/0xb

    Reported-by: Udo Steinberg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Wey-Yi Guy
     
  • commit 4399c8bf2b9093696fa8160d79712e7346989c46 upstream.

    If target_level == 0, current code breaks out of the while-loop if
    SUPERPAGE bit is set. We should also break out if PTE is not present.
    If we don't do this, KVM calls to iommu_iova_to_phys() will cause
    pfn_to_dma_pte() to create mapping for 4KiB pages.

    Signed-off-by: Allen Kay
    Signed-off-by: David Woodhouse
    Signed-off-by: Youquan Song
    Signed-off-by: Greg Kroah-Hartman

    Allen Kay
     
  • commit 8140a95d228efbcd64d84150e794761a32463947 upstream.

    set dmar->iommu_superpage field to the smallest common denominator
    of super page sizes supported by all active VT-d engines. Initialize
    this field in intel_iommu_domain_init() API so intel_iommu_map() API
    will be able to use iommu_superpage field to determine the appropriate
    super page size to use.

    Signed-off-by: Allen Kay
    Signed-off-by: David Woodhouse
    Signed-off-by: Youquan Song
    Signed-off-by: Greg Kroah-Hartman

    Allen Kay
     
  • commit 292827cb164ad00cc7689a21283b1261c0b6daed upstream.

    iommu_unmap() API expects IOMMU drivers to return the actual page order
    of the address being unmapped. Previous code was just returning page
    order passed in from the caller. This patch fixes this problem.

    Signed-off-by: Allen Kay
    Signed-off-by: David Woodhouse
    Signed-off-by: Youquan Song
    Signed-off-by: Greg Kroah-Hartman

    Allen Kay
     
  • commit 9b5cd7f37e1e018432111333e2a67f78ba41edfe upstream.

    SBC-3 says:

    A TRANSFER LENGTH field set to zero specifies that 256 logical
    blocks shall be written. Any other value specifies the number
    of logical blocks that shall be written.

    The old code was always just returning the value in the TRANSFER LENGTH
    byte. Fix this to return 256 if the byte is 0.

    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Roland Dreier
     
  • commit d68fb11c3dae75c8331538dcf083a65e697cc034 upstream.

    The clock_getres() function must return the resolution in the timespec
    argument and return 0 for success.

    Signed-off-by: Thomas Gleixner
    Acked-by: John Stultz
    Cc: Richard Cochran
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

10 Dec, 2011

9 commits

  • commit 87121ca504fd1d963a66b3fb0c72054b0fd9a177 upstream.

    Oprofile may crash in a KVM guest while unlaoding modules. This
    happens if oprofile_arch_init() fails and oprofile switches to the hr
    timer mode as a fallback. In this case oprofile_arch_exit() is called,
    but it never was initialized properly which causes the crash. This
    patch fixes this.

    oprofile: using timer interrupt.
    BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
    IP: [] unregister_syscore_ops+0x41/0x58
    PGD 41da3f067 PUD 41d80e067 PMD 0
    Oops: 0002 [#1] PREEMPT SMP
    CPU 5
    Modules linked in: oprofile(-)

    Pid: 2382, comm: modprobe Not tainted 3.1.0-rc7-00018-g709a39d #18 Advanced Micro Device Anaheim/Anaheim
    RIP: 0010:[] [] unregister_syscore_ops+0x41/0x58
    RSP: 0018:ffff88041de1de98 EFLAGS: 00010296
    RAX: 0000000000000000 RBX: ffffffffa00060e0 RCX: dead000000200200
    RDX: 0000000000000000 RSI: dead000000100100 RDI: ffffffff8178c620
    RBP: ffff88041de1dea8 R08: 0000000000000001 R09: 0000000000000082
    R10: 0000000000000000 R11: ffff88041de1dde8 R12: 0000000000000080
    R13: fffffffffffffff5 R14: 0000000000000001 R15: 0000000000610210
    FS: 00007f9ae5bef700(0000) GS:ffff88042fd40000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000008 CR3: 000000041ca44000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process modprobe (pid: 2382, threadinfo ffff88041de1c000, task ffff88042db6d040)
    Stack:
    ffff88041de1deb8 ffffffffa0006770 ffff88041de1deb8 ffffffffa000251e
    ffff88041de1dec8 ffffffffa00022c2 ffff88041de1ded8 ffffffffa0004993
    ffff88041de1df78 ffffffff81073115 656c69666f72706f 0000000000610200
    Call Trace:
    [] op_nmi_exit+0x15/0x17 [oprofile]
    [] oprofile_arch_exit+0xe/0x10 [oprofile]
    [] oprofile_exit+0x13/0x15 [oprofile]
    [] sys_delete_module+0x1c3/0x22f
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] system_call_fastpath+0x16/0x1b
    Code: 20 c6 78 81 e8 c5 cc 23 00 48 8b 13 48 8b 43 08 48 be 00 01 10 00 00 00 ad de 48 b9 00 02 20 00 00 00 ad de 48 c7 c7 20 c6 78 81
    89 42 08 48 89 10 48 89 33 48 89 4b 08 e8 a6 c0 23 00 5a 5b
    RIP [] unregister_syscore_ops+0x41/0x58
    RSP
    CR2: 0000000000000008
    ---[ end trace 06d4e95b6aa3b437 ]---

    Signed-off-by: Robert Richter
    Signed-off-by: Greg Kroah-Hartman

    Robert Richter
     
  • commit c0afabd3d553c521e003779c127143ffde55a16f upstream.

    Currently, the RTC code does not disable the alarm in the hardware.

    This means that after a sequence such as the one below (the files are in the
    RTC sysfs), the box will boot up after 2 minutes even though we've
    asked for the alarm to be turned off.

    # echo $((`cat since_epoch`)+120) > wakealarm
    # echo 0 > wakealarm
    # poweroff

    Fix this by disabling the alarm when there are no timers to run.

    Cc: John Stultz
    Signed-off-by: Rabin Vincent
    Signed-off-by: John Stultz
    Signed-off-by: Greg Kroah-Hartman

    Rabin Vincent
     
  • commit 158886cd2cf4599e04f9b7e10cb767f5f39b14f1 upstream.

    When system enters suspend, xHCI driver clears command ring by writing zero
    to all the TRBs. However, this also writes zero to the Link TRB, and the ring
    is mangled. This may cause driver accesses wrong memory address and the
    result is unpredicted.

    When clear the command ring, keep the last Link TRB intact, only clear its
    cycle bit. This should fix the "command ring full" issue reported by Oliver
    Neukum.

    This should be backported to stable kernels as old as 2.6.37, since the
    commit 89821320 "xhci: Fix command ring replay after resume" is merged.

    Signed-off-by: Andiry Xu
    Signed-off-by: Sarah Sharp
    Reported-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Andiry Xu
     
  • commit e3420901eba65b1c46bed86d360e3a8685d20734 upstream.

    Fix a regression that was introduced by commit
    811c926c538f7e8d3c08b630dd5844efd7e000f6 (USB: EHCI: fix HUB TT scheduling
    issue with iso transfer).

    We detect an error if next == start, but this means uframe 0 can't be allocated
    anymore for iso transfer...

    Reported-by: Sander Eikelenboom
    Signed-off-by: Matthieu CASTET
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Matthieu CASTET
     
  • commit 811c926c538f7e8d3c08b630dd5844efd7e000f6 upstream.

    The current TT scheduling doesn't allow to play and then record on a
    full-speed device connected to a high speed hub.

    The IN iso stream can only start on the first uframe (0-2 for a 165 us)
    because of CSPLIT transactions.
    For the OUT iso stream there no such restriction. uframe 0-5 are possible.

    The idea of this patch is that the first uframe are precious (for IN TT iso
    stream) and we should allocate the last uframes first if possible.

    For that we reverse the order of uframe allocation (last uframe first).

    Here an example :

    hid interrupt stream
    ----------------------------------------------------------------------
    uframe | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
    ----------------------------------------------------------------------
    max_tt_usecs | 125 | 125 | 125 | 125 | 125 | 125 | 30 | 0 |
    ----------------------------------------------------------------------
    used usecs on a frame | 13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
    ----------------------------------------------------------------------

    iso OUT stream
    ----------------------------------------------------------------------
    uframe | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
    ----------------------------------------------------------------------
    max_tt_usecs | 125 | 125 | 125 | 125 | 125 | 125 | 30 | 0 |
    ----------------------------------------------------------------------
    used usecs on a frame | 13 | 125 | 39 | 0 | 0 | 0 | 0 | 0 |
    ----------------------------------------------------------------------

    There no place for iso IN stream (uframe 0-2 are used) and we got "cannot
    submit datapipe for urb 0, error -28: not enough bandwidth" error.

    With the patch this become.

    iso OUT stream
    ----------------------------------------------------------------------
    uframe | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
    ----------------------------------------------------------------------
    max_tt_usecs | 125 | 125 | 125 | 125 | 125 | 125 | 30 | 0 |
    ----------------------------------------------------------------------
    used usecs on a frame | 13 | 0 | 0 | 0 | 125 | 39 | 0 | 0 |
    ----------------------------------------------------------------------

    iso IN stream
    ----------------------------------------------------------------------
    uframe | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
    ----------------------------------------------------------------------
    max_tt_usecs | 125 | 125 | 125 | 125 | 125 | 125 | 30 | 0 |
    ----------------------------------------------------------------------
    used usecs on a frame | 13 | 0 | 125 | 40 | 125 | 39 | 0 | 0 |
    ----------------------------------------------------------------------

    Signed-off-by: Matthieu Castet
    Signed-off-by: Thomas Poussevin
    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Thomas Poussevin
     
  • commit cec28a5428793b6bc64e56687fb239759d6da74e upstream.

    Kingston DT 101 G2 replies a wrong tag while transporting, add an
    unusal_devs entry to ignore the tag validation.

    Signed-off-by: Qinglin Ye
    Signed-off-by: Greg Kroah-Hartman

    Qinglin Ye
     
  • commit ec0cd94d881ca89cc9fb61d00d0f4b2b52e605b3 upstream.

    Tested with SIM5218EVB-KIT evaluation kit.

    Signed-off-by: Veli-Pekka Peltola
    Signed-off-by: Greg Kroah-Hartman

    Veli-Pekka Peltola
     
  • commit 46b1848360c8e634e0b063932a1261062fa0f7d6 upstream.

    This patch creates the missing controlling devices for the Huawei E353
    HSPA+ stick.

    Signed-off-by: Dirk Nehring
    Signed-off-by: Greg Kroah-Hartman

    Dirk Nehring
     
  • commit 307369b0ca06b27b511b61714e335ddfccf19c4f upstream.

    Signed-off-by: Marcin Kościelnicki
    Signed-off-by: Greg Kroah-Hartman

    Marcin Kościelnicki