12 Jan, 2017

40 commits

  • commit 8456066a57940b3884aa080c58b166567dc9de39 upstream.

    Pass a task state as second argument to percpu_ida_alloc().

    Fixes: commit 5a3ee221b543 ("sbp-target: Conversion to percpu_ida tag pre-allocation")
    Signed-off-by: Bart Van Assche
    Cc: Chris Boot
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     
  • commit a91918cd3ea11f91c68e08e1e8ce1b560447a80e upstream.

    This iscsit_tpg_add_portal_group() function is only called from
    lio_target_tiqn_addtpg(). Both functions free the "tpg" pointer on
    error so it's a double free bug. The memory is allocated in the caller
    so it should be freed in the caller and not here.

    Fixes: e48354ce078c ("iscsi-target: Add iSCSI fabric support for target v4.1")
    Signed-off-by: Dan Carpenter
    Reviewed-by: David Disseldorp
    [ bvanassche: Added "Fix" at start of patch title ]
    Signed-off-by: Bart Van Assche
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit af15769ffab13d777e55fdef09d0762bf0c249c4 upstream.

    gcc-7 notices that the condition in mvs_94xx_command_active looks
    suspicious:

    drivers/scsi/mvsas/mv_94xx.c: In function 'mvs_94xx_command_active':
    drivers/scsi/mvsas/mv_94xx.c:671:15: error: '<
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     
  • commit 7b93ca43b7e21fbe6fb1a6f4ecce4a2f70f424a0 upstream.

    When a SW-configurable card is specified but not found, the driver
    releases wrong region, causing the following message in kernel log:
    Trying to free nonexistent resource

    Fix it by assigning base earlier.

    Signed-off-by: Ondrej Zary
    Fixes: a8cfbcaec0c1 ("scsi: g_NCR5380: Stop using scsi_module.c")
    Signed-off-by: Finn Thain
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Ondrej Zary
     
  • commit aec0e86172a79eb5e44aff1055bb953fe4d47c59 upstream.

    We met the DMAR fault both on hpsa P420i and P421 SmartArray controllers
    under kdump, it can be steadily reproduced on several different machines,
    the dmesg log is like:
    HP HPSA Driver (v 3.4.16-0)
    hpsa 0000:02:00.0: using doorbell to reset controller
    hpsa 0000:02:00.0: board ready after hard reset.
    hpsa 0000:02:00.0: Waiting for controller to respond to no-op
    DMAR: Setting identity map for device 0000:02:00.0 [0xe8000 - 0xe8fff]
    DMAR: Setting identity map for device 0000:02:00.0 [0xf4000 - 0xf4fff]
    DMAR: Setting identity map for device 0000:02:00.0 [0xbdf6e000 - 0xbdf6efff]
    DMAR: Setting identity map for device 0000:02:00.0 [0xbdf6f000 - 0xbdf7efff]
    DMAR: Setting identity map for device 0000:02:00.0 [0xbdf7f000 - 0xbdf82fff]
    DMAR: Setting identity map for device 0000:02:00.0 [0xbdf83000 - 0xbdf84fff]
    DMAR: DRHD: handling fault status reg 2
    DMAR: [DMA Read] Request device [02:00.0] fault addr fffff000 [fault reason 06] PTE Read access is not set
    hpsa 0000:02:00.0: controller message 03:00 timed out
    hpsa 0000:02:00.0: no-op failed; re-trying

    After some debugging, we found that the fault addr is from DMA initiated at
    the driver probe stage after reset(not in-flight DMA), and the corresponding
    pte entry value is correct, the fault is likely due to the old iommu caches
    of the in-flight DMA before it.

    Thus we need to flush the old cache after context mapping is setup for the
    device, where the device is supposed to finish reset at its driver probe
    stage and no in-flight DMA exists hereafter.

    I'm not sure if the hardware is responsible for invalidating all the related
    caches allocated in the iommu hardware before, but seems not the case for hpsa,
    actually many device drivers have problems in properly resetting the hardware.
    Anyway flushing (again) by software in kdump kernel when the device gets context
    mapped which is a quite infrequent operation does little harm.

    With this patch, the problematic machine can survive the kdump tests.

    CC: Myron Stowe
    CC: Joseph Szczypek
    CC: Don Brace
    CC: Baoquan He
    CC: Dave Young
    Fixes: 091d42e43d21 ("iommu/vt-d: Copy translation tables from old kernel")
    Fixes: dbcd861f252d ("iommu/vt-d: Do not re-use domain-ids from the old kernel")
    Fixes: cf484d0e6939 ("iommu/vt-d: Mark copied context entries")
    Signed-off-by: Xunlei Pang
    Tested-by: Don Brace
    Signed-off-by: Joerg Roedel
    Signed-off-by: Greg Kroah-Hartman

    Xunlei Pang
     
  • commit 65ca7f5f7d1cdde6c25172fe6107cd16902f826f upstream.

    Different encodings are used to represent supported PASID bits
    and number of PASID table entries.
    The current code assigns ecap_pss directly to extended context
    table entry PTS which is wrong and could result in writing
    non-zero bits to the reserved fields. IOMMU fault reason
    11 will be reported when reserved bits are nonzero.
    This patch converts ecap_pss to extend context entry pts encoding
    based on VT-d spec. Chapter 9.4 as follows:
    - number of PASID bits = ecap_pss + 1
    - number of PASID table entries = 2^(pts + 5)
    Software assigned limit of pasid_max value is also respected to
    match the allocation limitation of PASID table.

    cc: Mika Kuoppala
    cc: Ashok Raj
    Signed-off-by: Jacob Pan
    Tested-by: Mika Kuoppala
    Fixes: 2f26e0a9c9860 ('iommu/vt-d: Add basic SVM PASID support')
    Signed-off-by: Joerg Roedel
    Signed-off-by: Greg Kroah-Hartman

    Jacob Pan
     
  • commit 432abf68a79332282329286d190e21fe3ac02a31 upstream.

    The generic command buffer entry is 128 bits (16 bytes), so the offset
    of tail and head pointer should be 16 bytes aligned and increased with
    0x10 per command.

    When cmd buf is full, head = (tail + 0x10) % CMD_BUFFER_SIZE.

    So when left space of cmd buf should be able to store only two
    command, we should be issued one COMPLETE_WAIT additionally to wait
    all older commands completed. Then the left space should be increased
    after IOMMU fetching from cmd buf.

    So left check value should be left
    Fixes: ac0ea6e92b222 ('x86/amd-iommu: Improve handling of full command buffer')
    Signed-off-by: Joerg Roedel
    Signed-off-by: Greg Kroah-Hartman

    Huang Rui
     
  • commit 24c790fbf5d8f54c8c82979db11edea8855b74bf upstream.

    We should set "ret" to -EINVAL if iommu_group_get() fails.

    Fixes: 55c99a4dc50f ("iommu/amd: Use iommu_attach_group()")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Joerg Roedel
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit e2a33c34ddff22ee208d80abdd12b88a98d6cb60 upstream.

    The RZ/A1 is different than the other Renesas SOCs because the MSTP
    registers are 8-bit instead of 32-bit and if you try writing values as
    32-bit nothing happens...meaning this driver never worked for r7s72100.

    Fixes: b6face404f38 ("ARM: shmobile: r7s72100: add essential clock nodes to dtsi")
    Signed-off-by: Chris Brandt
    Reviewed-by: Geert Uytterhoeven
    Tested-by: Geert Uytterhoeven
    Acked-by: Kuninori Morimoto
    Signed-off-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Chris Brandt
     
  • commit bae203d58b7dce89664071b3fafe20cedaa3e4f6 upstream.

    Function mx31_clocks_init() is called during clock intialization on
    legacy boards with reference clock frequency passed as its input
    argument, this can be verified by examination of the function
    declaration found in arch/arm/mach-imx/common.h and actual function
    users which include that header file.

    Inside CCF driver the function ignores its input argument, by chance
    the used value in the function body is the same as input arguments on
    side of all callers.

    Fixes: d9388c843237 ("clk: imx31: Do not call mxc_timer_init twice when booting with DT")
    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Uwe Kleine-König
    Acked-by: Stephen Boyd
    Signed-off-by: Shawn Guo
    Signed-off-by: Greg Kroah-Hartman

    Vladimir Zapolskiy
     
  • commit 0f6f9302b819ca352cfd4f42c18ec08d521f9cae upstream.

    The audio module clocks are supposed to be set according to the sample
    rate of the audio stream. The audio PLL provides the clock signal for
    these module clocks, and only it is freely tunable.

    Set CLK_SET_RATE_PARENT for the audio module clocks so their users can
    properly tune the clock rate.

    Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks")
    Signed-off-by: Chen-Yu Tsai
    Signed-off-by: Maxime Ripard
    Signed-off-by: Greg Kroah-Hartman

    Chen-Yu Tsai
     
  • commit 937ff9ded8b6ebe8963ade55bdd77a61ded88075 upstream.

    The audio module clocks are supposed to be set according to the sample
    rate of the audio stream. The audio PLL provides the clock signal for
    these module clocks, and only it is freely tunable.

    Set CLK_SET_RATE_PARENT for the audio module clocks so their users can
    properly tune the clock rate.

    Fixes: 5690879d93e8 ("clk: sunxi-ng: Add A23 CCU")
    Signed-off-by: Chen-Yu Tsai
    Signed-off-by: Maxime Ripard
    Signed-off-by: Greg Kroah-Hartman

    Chen-Yu Tsai
     
  • commit f8d17344a60921c2387759fc0a85aa64299d1ec6 upstream.

    Prevent creating clk alias for non existing gmac_gmii_ref_clk_div clock and,
    this way, eliminate excessive error message during boot:

    "ti_dt_clocks_register: failed to lookup clock node gmac_gmii_ref_clk_div"

    Fixes: c097338ebd3f ("ARM: dts: dra7: cpsw: fix clocks tree")
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Grygorii Strashko
     
  • commit 20979202ee6e4c68dab7bcf408787225a656d18e upstream.

    Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188561. Function
    wm831x_clkout_is_prepared() returns "true" when it fails to read
    CLOCK_CONTROL_1. "true" means the device is already prepared. So
    return "true" on the read failure seems improper.

    Signed-off-by: Pan Bian
    Acked-by: Charles Keepax
    Fixes: f05259a6ffa4 ("clk: wm831x: Add initial WM831x clock driver")
    Signed-off-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Pan Bian
     
  • commit cbf2e548ca8ad4bb274d014e9a70bd841d29948e upstream.

    The clocks on these boards run at 25 MHz, not 19.2 and 27 like
    other platforms. Unfortunately I copy/pasted from other similar
    SoCs but forgot this one is different. Fix it.

    Fixes: a085f877a882 ("clk: qcom: Move cxo/pxo/xo into dt files")
    Signed-off-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Stephen Boyd
     
  • commit 792f497b22afd0563b94dd8fa129a05f762a2c25 upstream.

    We should unlock before returning on this error path.

    Fixes: 3a762dbd5347 ('[media] Input: synaptics-rmi4 - add support for F54 diagnostics')
    Signed-off-by: Dan Carpenter
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit e9572fdd13e299cfba03abbfd2786c84ac055249 upstream.

    Since commit commit eb1c8f4325d5 ("hwmon: (lm90) Convert to use new hwmon
    registration API") the temp1_max_alarm and temp1_crit_alarm attributes are
    mapped to the same alarm bit. Fix the typo.

    Fixes: eb1c8f4325d5 ("hwmon: (lm90) Convert to use new hwmon registration API")
    Signed-off-by: Micehael Walle
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Michael Walle
     
  • commit 4fccd4a1e8944033bcd7693ea4e8fb478cd2059a upstream.

    Fix overflows seen when writing into fan speed limit attributes.
    Also fix crash due to division by zero, seen when certain very
    large values (such as 2147483648, or 0x80000000) are written
    into fan speed limit attributes.

    Fixes: 594fbe713bf60 ("Add support for GMT G762/G763 PWM fan controllers")
    Cc: Arnaud Ebalard
    Reviewed-by: Jean Delvare
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     
  • commit c0d04e9112ad59d73f23f3b0f6726c5e798dfcbf upstream.

    Fix overflows seen when writing voltage and temperature limit attributes.

    The value passed to DIV_ROUND_CLOSEST() needs to be clamped, and the
    value parameter passed to nct7802_write_fan_min() is an unsigned long.

    Also, writing values larger than 2700000 into a fan limit attribute results
    in writing 0 into the chip's limit registers. The exact behavior when
    writing this value is unspecified. For consistency, report a limit of
    1350000 if the chip register reads 0. This may be wrong, and the chip
    behavior should be verified with the actual chip, but it is better than
    reporting a value of 0 (which, when written, results in writing a value
    of 0x1fff into the chip register).

    Fixes: 3434f3783580 ("hwmon: Driver for Nuvoton NCT7802Y")
    Reviewed-by: Jean Delvare
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     
  • commit e36ce99ee0815d7919a7b589bfb66f3de50b6bc7 upstream.

    Module test reports:

    temp1_max: Suspected overflow: [160000 vs. 0]
    temp1_min: Suspected overflow: [160000 vs. 0]

    This is seen because the values passed when writing temperature limits
    are unbound.

    Reviewed-by: Jean Delvare
    Fixes: 6099469805c2 ("hwmon: Support for Dallas Semiconductor DS620")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     
  • commit 4538bfbf2d9f1fc48c07ac0cc0ee58716fe7fe96 upstream.

    Converts the unsigned temperature values from the i2c read
    to be sign extended as defined in the datasheet so that
    negative temperatures are properly read.

    Fixes: 28e6274d8fa67 ("hwmon: (amc6821) Avoid forward declaration")
    Signed-off-by: Jared Bents
    Signed-off-by: Matt Weber
    [groeck: Dropped unnecessary continuation line]
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Jared Bents
     
  • commit 13edb767aa609b6efb7c0c2b57fbd72a6ded0eed upstream.

    If the driver is built as a module, autoload won't work because the module
    alias information is not filled. So user-space can't match the registered
    device with the corresponding module.

    Export the module alias information using the MODULE_DEVICE_TABLE() macro.

    Before this patch:

    $ modinfo drivers/hwmon/scpi-hwmon.ko | grep alias
    $

    After this patch:

    $ modinfo drivers/hwmon/scpi-hwmon.ko | grep alias
    alias: of:N*T*Carm,scpi-sensorsC*
    alias: of:N*T*Carm,scpi-sensors

    Signed-off-by: Javier Martinez Canillas
    Fixes: ea98b29a05e9c ("hwmon: Support sensors exported via ARM SCP interface")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Javier Martinez Canillas
     
  • commit a608a9d52fa4168efd478d684039ed545a69dbcd upstream.

    All LED-setting functions in fujitsu-laptop are currently assigned to
    the brightness_set callback, which is incorrect because they can sleep
    (due to their use of call_fext_func(), which in turn issues ACPI calls)
    and the documentation (in include/linux/leds.h) clearly states they must
    not. Assign them to brightness_set_blocking instead and change them to
    match the expected function prototype.

    This change makes it possible to use Fujitsu-specific LEDs with "heavy"
    triggers, like disk-activity or phy0rx.

    Fixes: 3a407086090b ("fujitsu-laptop: Add BL power, LED control and radio state information")
    Fixes: 4f62568c1fcf ("fujitsu-laptop: Support radio LED")
    Fixes: d6b88f64b0d4 ("fujitsu-laptop: Add support for eco LED")
    Signed-off-by: Michał Kępień
    Acked-by: Jonathan Woithe
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Greg Kroah-Hartman

    Micha? K?pie?
     
  • commit bc4725d9029e2c8205fbaf1105e193d1c4e463bb upstream.

    The intention was to enable the checks if debugging is enabled, not
    disabled.

    Fixes: f793d1e51705b276 ("clk: shmobile: Add new CPG/MSSR driver core")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     
  • commit a75dcb5848359f488c32c0aef8711d9bd37a77b8 upstream.

    We should return -ENOMEM here, instead of success.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
    Link: http://lkml.kernel.org/r/20161018143318.15673-9-matt@codeblueprint.co.uk
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit 31b239824ece321c09bdb8e61e1d14814eaba38b upstream.

    The word "background" contains 10 characters so the third argument of
    strncmp() need to be 10 in order to match this prefix correctly.

    Signed-off-by: Nicolas Iooss
    Fixes: 855aed1220d2 ("ath10k: add spectral scan feature")
    Signed-off-by: Kalle Valo
    Signed-off-by: Greg Kroah-Hartman

    Nicolas Iooss
     
  • commit 40a50f8b307de8d08f3fa37c312fc16a7dd233e5 upstream.

    TPS65217 IRQ domain should be removed and initialised as NULL when the
    module is unloaded for the next use. When tps65217.ko is loaded again,
    it causes the page fault. This patch fixes the error below.

    root@arm:~# lsmod | grep "tps"
    tps65217_charger 3538 0
    tps65218_pwrbutton 2974 0
    tps65217 6710 1 tps65217_charger

    root@arm:~# modprobe -r tps65217_charger

    root@arm:~# modprobe tps65217.ko
    [ 71.990277] Unable to handle kernel paging request at virtual address bf055944
    [ 71.998063] pgd = dd3a4000
    [ 72.000904] [bf055944] *pgd=9e6f7811, *pte=00000000, *ppte=00000000
    [ 72.007567] Internal error: Oops: 7 [#1] SMP ARM
    [ 72.012404] Modules linked in: tps65217(+) evdev musb_dsps musb_hdrc udc_core tps65218_pwrbutton usbcore phy_am335]
    [ 72.055700] CPU: 0 PID: 243 Comm: modprobe Not tainted 4.9.0-rc5-next-20161114 #3
    [ 72.063531] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 72.069899] task: de714380 task.stack: de7e6000
    [ 72.074655] PC is at irq_find_matching_fwspec+0x88/0x100
    [ 72.080211] LR is at 0xde7e79d8
    [ 72.083496] pc : [] lr : [] psr: 200e0013
    [ 72.083496] sp : de7e7a78 ip : 00000000 fp : dd138a68
    [ 72.095506] r10: c0ca04f8 r9 : 00000018 r8 : de7e7ab8
    [ 72.100973] r7 : 00000001 r6 : c0c4517c r5 : df963f68 r4 : de321980
    [ 72.107797] r3 : bf055940 r2 : de714380 r1 : 00000000 r0 : 00000000
    [ 72.114633] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    [ 72.122084] Control: 10c5387d Table: 9d3a4019 DAC: 00000051
    [ 72.128097] Process modprobe (pid: 243, stack limit = 0xde7e6218)
    [ 72.134489] Stack: (0xde7e7a78 to 0xde7e8000)
    [ 72.139060] 7a60: df963f68 de7e7ab8
    [ 72.147643] 7a80: 00000000 dd0e1000 dd491e20 c01a6ea0 600e0013 c01a5dc0 dd138a68 c0c45138
    [ 72.156216] 7aa0: df963f68 00000000 df963f68 dd0e1010 00000000 c01a71a4 df963f68 00000001
    [ 72.164800] 7ac0: 00000002 de7e7ac0 c80048b8 dd0adf00 df963f68 c0c4517c 00000000 de7e7b50
    [ 72.173369] 7ae0: 00000018 c0ca04f8 dd138a68 c01a5dc0 df963f68 dd0e1010 00000000 dd0e1000
    [ 72.181942] 7b00: dd491e20 c0653a70 df963f58 00000001 00000002 00000000 00000000 00000000
    [ 72.190522] 7b20: 600e0093 c0cbf8f0 c0c0512c c0193674 00000001 00000080 00000000 c0554984
    [ 72.199096] 7b40: 00000000 00000000 800e0013 c0553858 df963f68 00000000 00000000 00000000
    [ 72.207674] 7b60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 72.216239] 7b80: 00000000 00000000 00000000 00000000 00000000 00000000 dd0e1000 c0544d24
    [ 72.224816] 7ba0: dd491e10 dd0e1010 dd16e800 bf1d517c bf1d5620 dd0e1010 c1497ed4 bf1d5620
    [ 72.233398] 7bc0: dd0e1010 fffffdfb bf1d5620 bf1d5620 00000000 c054537c c0545330 dd0e1010
    [ 72.241967] 7be0: c1497ed4 00000000 bf1d5620 c05433ac 00000000 00000000 de7e7c28 c0543570
    [ 72.250537] 7c00: 00000001 c1497e90 00000000 c0541884 de080cd4 dd44b7d4 dd0e1010 dd0e1010
    [ 72.259109] 7c20: dd0e1044 c05430c8 dd0e1010 00000001 dd0e1010 dd0e1018 dd0e1010 c0c9e328
    [ 72.267676] 7c40: de5d4020 c0542760 dd0e1018 dd0e1010 00000000 c0540ba8 dd138a40 c048dec4
    [ 72.276253] 7c60: 00000000 dd0e1000 00000001 dd0e1000 dd0e1010 dd0e1000 bf233de0 dd138a40
    [ 72.284829] 7c80: dd0e1010 c05450a0 000000bf 00000000 dd138a60 00000001 dd0e1000 c0571240
    [ 72.293398] 7ca0: 00000000 dd1ce9c0 00000040 dd1ce9cc bf233de0 00000003 de5d4020 ffffffff
    [ 72.301969] 7cc0: 00000004 dd0adf00 00000000 c0571408 00000000 00000000 dd0adf00 de5d4020
    [ 72.310543] 7ce0: c057146c dd1ce9c0 bf233d14 de5d4020 de7fb3d0 00000004 bf233d14 ffffffff
    [ 72.319120] 7d00: 00000018 dd49bf30 c01cedc0 c05714d0 00000000 00000000 dd0adf00 de322810
    [ 72.327692] 7d20: de322810 00000000 dd033000 000000f0 00000001 bf2333fc 00000000 00000000
    [ 72.336269] 7d40: dd0adf00 de5d4020 000000b6 bf233e40 de5d4020 bf233968 de5d4004 de5d4000
    [ 72.344848] 7d60: bf233314 c06148ac de5d4020 c1497ed4 00000000 bf233e40 00000000 c05433ac
    [ 72.353422] 7d80: 00000000 de5d4020 bf233e40 de5d4054 00000000 bf236000 00000000 c0543538
    [ 72.362002] 7da0: 00000000 bf233e40 c0543484 c05417e4 de1442a4 de5d04d0 bf233e40 de321300
    [ 72.370582] 7dc0: c0caa5a4 c05429fc bf233be0 bf233e40 c0cbfa44 bf233e40 c0cbfa44 dd2f7740
    [ 72.379148] 7de0: bf233f00 c05442f0 bf233e8c bf233e24 c0cbfa44 c0615ae0 00000000 bf233f00
    [ 72.387718] 7e00: c0cbfa44 c010186c 200f0013 c0191650 de714380 00000000 600f0013 00000040
    [ 72.396286] 7e20: dd2f7740 c018f1ac 00000001 c0c8356c 024000c0 c01a8854 c0c56e0e c028225c
    [ 72.404863] 7e40: dd2f7740 c0191984 de714380 dd2f7740 00000001 bf233f00 bf233f00 c0cbfa44
    [ 72.413440] 7e60: dd2f7740 bf233f00 00000001 dd49bf08 dd49bf30 c0230998 00000001 c0c8356c
    [ 72.421997] 7e80: c0c4c536 c0cbfa44 c0c0512c c01d2070 bf233f0c 00007fff bf233f00 c01cf5b8
    [ 72.430570] 7ea0: 00000000 c1475134 c01cee34 bf23411c bf233f48 bf234054 bf234150 00000000
    [ 72.439144] 7ec0: 024002c2 de7fbf40 0009bc20 c02776ac ff800000 00000000 00000000 bf233670
    [ 72.447723] 7ee0: 00000004 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 72.456298] 7f00: 00000000 00000000 00000000 00000000 c01d2590 0000aa41 00000000 00000000
    [ 72.464862] 7f20: 000b2549 e12c3a41 00000051 de7e6000 0009bc20 c01d2630 00000530 e12b9000
    [ 72.473438] 7f40: 0000aa41 e12c1434 e12c1211 e12c336c 00001150 00001620 00000000 00000000
    [ 72.482003] 7f60: 00000000 000010fc 00000035 00000036 0000001d 0000001a 00000017 00000000
    [ 72.490564] 7f80: de7e6000 3ba39a00 0009b008 0009b718 00000080 c0107704 de7e6000 00000000
    [ 72.499141] 7fa0: 0009f609 c0107560 3ba39a00 0009b008 000a7b08 0000aa41 0009bc20 0000aa41
    [ 72.507717] 7fc0: 3ba39a00 0009b008 0009b718 00000080 00000001 00000008 0009ab14 0009f609
    [ 72.516290] 7fe0: bea31ab8 bea31aa8 0001e5eb b6e83b42 800f0030 000a7b08 0000ffff 0840ffff
    [ 72.524883] [] (irq_find_matching_fwspec) from [] (irq_create_fwspec_mapping+0x28/0x2e0)
    [ 72.535174] [] (irq_create_fwspec_mapping) from [] (irq_create_of_mapping+0x4c/0x54)
    [ 72.545115] [] (irq_create_of_mapping) from [] (of_irq_get+0x58/0x68)
    [ 72.553699] [] (of_irq_get) from [] (platform_get_irq+0x1c/0xec)
    [ 72.561828] [] (platform_get_irq) from [] (tps6521x_pb_probe+0xd0/0x1a8 [tps65218_pwrbutton])
    [ 72.572581] [] (tps6521x_pb_probe [tps65218_pwrbutton]) from [] (platform_drv_probe+0x4c/0xac)
    [ 72.583426] [] (platform_drv_probe) from [] (driver_probe_device+0x204/0x2dc)
    [ 72.592729] [] (driver_probe_device) from [] (bus_for_each_drv+0x58/0x8c)
    [ 72.601657] [] (bus_for_each_drv) from [] (__device_attach+0xb0/0x114)
    [ 72.610324] [] (__device_attach) from [] (bus_probe_device+0x88/0x90)
    [ 72.618898] [] (bus_probe_device) from [] (device_add+0x3b8/0x560)
    [ 72.627203] [] (device_add) from [] (platform_device_add+0xa8/0x208)
    [ 72.635693] [] (platform_device_add) from [] (mfd_add_device+0x240/0x338)
    [ 72.644634] [] (mfd_add_device) from [] (mfd_add_devices+0xa0/0x104)
    [ 72.653120] [] (mfd_add_devices) from [] (devm_mfd_add_devices+0x60/0xa8)
    [ 72.662077] [] (devm_mfd_add_devices) from [] (tps65217_probe+0xe8/0x2ec [tps65217])
    [ 72.672026] [] (tps65217_probe [tps65217]) from [] (i2c_device_probe+0x168/0x1f4)
    [ 72.681695] [] (i2c_device_probe) from [] (driver_probe_device+0x204/0x2dc)
    [ 72.690816] [] (driver_probe_device) from [] (__driver_attach+0xb4/0xb8)
    [ 72.699657] [] (__driver_attach) from [] (bus_for_each_dev+0x60/0x94)
    [ 72.708224] [] (bus_for_each_dev) from [] (bus_add_driver+0x18c/0x214)
    [ 72.716892] [] (bus_add_driver) from [] (driver_register+0x78/0xf8)
    [ 72.725280] [] (driver_register) from [] (i2c_register_driver+0x38/0x80)
    [ 72.734120] [] (i2c_register_driver) from [] (do_one_initcall+0x3c/0x178)
    [ 72.743055] [] (do_one_initcall) from [] (do_init_module+0x5c/0x1d0)
    [ 72.751537] [] (do_init_module) from [] (load_module+0x1d10/0x21c0)
    [ 72.759933] [] (load_module) from [] (SyS_init_module+0x110/0x154)
    [ 72.768242] [] (SyS_init_module) from [] (ret_fast_syscall+0x0/0x1c)
    [ 72.776725] Code: e5944000 e1540006 0a00001b e594300c (e593c004)
    [ 72.783181] ---[ end trace 0278ec325f4689b8 ]---

    Fixes: 6556bdacf646 ("mfd: tps65217: Add support for IRQs")
    Signed-off-by: Milo Kim
    Signed-off-by: Lee Jones
    Signed-off-by: Greg Kroah-Hartman

    Milo Kim
     
  • commit fcf7cf1551cae54e747a771f5808240f2a37708f upstream.

    This partially reverts 'commit 2cdce425aa33
    ("ath10k: Fix broken NULL func data frame status for 10.4")'
    Unfortunately this breaks sending NULL func and the existing
    issue of obtaining proper tx status for NULL function will be
    fixed. Also update the comments for feature flag added to be
    useless and not working

    Fixes: 2cdce425aa33 "ath10k: Fix broken NULL func data frame status for
    10.4"
    Signed-off-by: Mohammed Shafi Shajakhan
    Signed-off-by: Kalle Valo
    Signed-off-by: Greg Kroah-Hartman

    Mohammed Shafi Shajakhan
     
  • commit 2c57b18adb93fc070039538f1ce375d3d3e99bbb upstream.

    It's been unfixed since a while and no one is immediately working on
    this. And we have the FIXME already. And now also a task in the DP
    team's backlog.

    Cc: Linus Torvalds
    Cc: stable@vger.kernel.org
    Cc: Ville Syrjälä
    References: https://lists.freedesktop.org/archives/intel-gfx/2016-July/101951.html
    Acked-by: Ville Syrjälä
    [danvet: Adjust comment per Ville's feedback.]
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161213195414.28923-1-daniel.vetter@ffwll.ch
    Signed-off-by: Greg Kroah-Hartman

    (cherry picked from commit 2dd85aeb5bc99e3763dd192cdb95ff405a102c8a)
    Signed-off-by: Jani Nikula

    Daniel Vetter
     
  • commit d4cb3fd9b548b8bfe2a712ec920b9ebabd3547ab upstream.

    Currently it's entirely possible to go through the link training step
    without first determining the lane_count, which is silly since we end up
    doing a bunch of aux transfers of size = 0, as highlighted by
    WARN_ON(!msg->buffer != !msg->size), and can only ever result in a
    'failed to update link training' message. This can be observed during
    intel_dp_long_pulse where we can do the link training step, but before
    we have had a chance to set the link params. To avoid this we add an
    extra check for the lane_count in intel_dp_check_link_status, which
    should prevent us from doing the link training step prematurely.

    v2: add WARN_ON_ONCE and FIXME comment (Ville)

    References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
    Cc: Ville Syrjälä
    Cc: Mika Kahola
    Signed-off-by: Matthew Auld
    Link: http://patchwork.freedesktop.org/patch/msgid/1476912593-10019-1-git-send-email-matthew.auld@intel.com
    Signed-off-by: Ville Syrjälä
    Signed-off-by: Greg Kroah-Hartman

    Matthew Auld
     
  • commit d62145929992f331fdde924d5963ab49588ccc7d upstream.

    commit 0416e494ce7d ("usb: dwc3: ep0: correct cache
    sync issue in case of ep0_bounced") introduced a bug
    where we would leak DMA resources which would cause
    us to starve the system of them resulting in failing
    DMA transfers.

    Fix the bug by making sure that we always unmap EP0
    requests since those are *always* mapped.

    Fixes: 0416e494ce7d ("usb: dwc3: ep0: correct cache
    sync issue in case of ep0_bounced")
    Cc:
    Tested-by: Tomasz Medrek
    Reported-by: Janusz Dziedzic
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     
  • commit 19ec31230eb3084431bc2e565fd085f79f564274 upstream.

    Let's call dwc3_ep0_prepare_one_trb() explicitly
    because there are occasions where we will need more
    than one TRB to handle an EP0 transfer.

    A follow-up patch will fix one bug related to
    multiple-TRB Data Phases when it comes to
    mapping/unmapping requests for DMA.

    Reported-by: Janusz Dziedzic
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     
  • commit 7931ec86c1b738e4e90e58c6d95e5f720d45ee56 upstream.

    For now this is just a cleanup patch, no functional
    changes. We will be using the new function to fix a
    bug introduced long ago by commit 0416e494ce7d
    ("usb: dwc3: ep0: correct cache sync issue in case
    of ep0_bounced") and further worsened by commit
    c0bd5456a470 ("usb: dwc3: ep0: handle non maxpacket
    aligned transfers > 512")

    Reported-by: Janusz Dziedzic
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     
  • commit 65e4345c8ef8811bbb4860fe5f2df10646b7f2e1 upstream.

    The LIS3LV02 has a special bit that need to be set to get the
    read values left aligned. Before this patch we get gibberish
    like this:

    iio_generic_buffer -a -c10 -n lis3lv02dl_accel
    (...)
    0.000000 -0.010042 -0.642688 19155832931907
    0.000000 -0.010042 -0.642688 19155858751073

    Which is because we read a raw value for 1g as 64 which is
    the nominal 1024 for 1g shifted 4 bits to the left by being
    right-aligned rather than left aligned.

    Since all other sensors are left aligned, add some code to
    set the special DAS (data alignment setting) bit to 1 so that
    the right value is now read like this:

    iio_generic_buffer -a -c10 -n lis3lv02dl_accel
    (...)
    0.000000 -0.147095 -10.120135 24761614364956
    -0.029419 -0.176514 -10.120135 24761631624540

    The scaling was weird as well: we have a gain of 1000 for 1g
    and 3000 for 6g. I don't even remember how I came up with the
    old values but they are wrong.

    Fixes: 3acddf74f807 ("iio: st-sensors: add support for lis3lv02d accelerometer")
    Cc: Lorenzo Bianconi
    Cc: Giuseppe Barba
    Cc: Denis Ciocca
    Signed-off-by: Linus Walleij
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Linus Walleij
     
  • commit b321a38d2407c7e425c54bc09be909a34e49f740 upstream.

    The oversampling ratio is controlled using the oversampling pins,
    OS [2:0] with OS2 being the MSB control bit, and OS0 the LSB control
    bit.

    The gpio connected to the OS2 pin is not being set correctly, only OS0
    and OS1 pins are being set. Fix the typo to allow proper control of the
    oversampling pins.

    Signed-off-by: Eva Rachel Retuya
    Fixes: b9618c0 ("staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4")
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Eva Rachel Retuya
     
  • commit e09ee853c92011860a4bd2fbdf6126f60fc16bd3 upstream.

    The credentials handling was pushed to the write handlers
    but error handling wasn't done properly.
    Move write callbacks to completion queue to destroy them
    and to notify a blocked writer about the failure

    Fixes: 136698e535cd1 (mei: push credentials inside the irq write handler)
    Signed-off-by: Alexander Usyskin
    Signed-off-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    Alexander Usyskin
     
  • commit 5026c9cb0744a9cd40242743ca91a5d712f468c6 upstream.

    Adjust function name in KDoc.

    Fixes: d49dc5e76fc9 (mei: bus: use mei_cldev_ prefix for the API functions)
    Signed-off-by: Alexander Usyskin
    Signed-off-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    Alexander Usyskin
     
  • commit 967b274e02e18c9fbb4d19b96a89bd0afbc77b7a upstream.

    Parameter renaming to fop_type was not reflected in KDoc

    Fixes: 3030dc0564594 (mei: add wrapper for queuing control commands)
    Signed-off-by: Alexander Usyskin
    Signed-off-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    Alexander Usyskin
     
  • commit e35d6d7c4e6532a89732cf4bace0e910ee684c88 upstream.

    Bind to the interface, but do not register any ports, after having
    downloaded the firmware. The device will still disconnect and
    re-enumerate, but this way we avoid an error messages from being logged
    as part of the process:

    io_ti: probe of 1-1.3:1.0 failed with error -5

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit 1f5ecaf985c46889278f51fcb7bc143f60f4eb14 upstream.

    'buf' is malloced in dibusb_rc_query() and should be freed before
    leaving from the error handling cases, otherwise it will cause
    memory leak.

    Fixes: ff1c123545d7 ("[media] dibusb: handle error code on RC query")

    Signed-off-by: Wei Yongjun
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Wei Yongjun