Commit Graph

659680 Commits

Author SHA1 Message Date
Mauro (mdrjr) Ribeiro
1860bdd5a6 Merge tag 'v4.9.237' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-4.9.y
This is the 4.9.237 stable release

Change-Id: Id5bec581493205faec0772bd0fc7c2581f9fb0b4
2020-12-22 09:19:11 -03:00
Dongjin Kim
8ca47b68b0 ODROID: config: enable USB Serial Gadget driver as a module
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I442a5d9517dbbd5d1686731bddc2dbb993886d90
2020-12-22 14:45:14 +09:00
Mauro (mdrjr) Ribeiro
98163ef0bd Merge branch 'odroidg12-4.9.y'
Change-Id: Ibe642d3a57d6a9bce0ae01ee95316654900a67e5
4.9.236-63
2020-12-09 18:37:50 -03:00
Mauro (mdrjr) Ribeiro
562a677bc4 net: add wireguard 2020-12-09 18:35:12 -03:00
Mauro (mdrjr) Ribeiro
6599c1d834 ODROID-COMMON: config: enable transparent huge pages
Change-Id: Ib6649c28eaa673c652e8294371781d65ca704b38
2020-12-09 18:27:45 -03:00
Kees Cook
35ba5e79de timer: Prepare to change timer callback argument type
Modern kernel callback systems pass the structure associated with a
given callback to the callback function. The timer callback remains one
of the legacy cases where an arbitrary unsigned long argument continues
to be passed as the callback argument. This has several problems:

- This bloats the timer_list structure with a normally redundant
  .data field.

- No type checking is being performed, forcing callbacks to do
  explicit type casts of the unsigned long argument into the object
  that was passed, rather than using container_of(), as done in most
  of the other callback infrastructure.

- Neighboring buffer overflows can overwrite both the .function and
  the .data field, providing attackers with a way to elevate from a buffer
  overflow into a simplistic ROP-like mechanism that allows calling
  arbitrary functions with a controlled first argument.

- For future Control Flow Integrity work, this creates a unique function
  prototype for timer callbacks, instead of allowing them to continue to
  be clustered with other void functions that take a single unsigned long
  argument.

This adds a new timer initialization API, which will ultimately replace
the existing setup_timer(), setup_{deferrable,pinned,etc}_timer() family,
named timer_setup() (to mirror hrtimer_setup(), making instances of its
use much easier to grep for).

In order to support the migration of existing timers into the new
callback arguments, timer_setup() casts its arguments to the existing
legacy types, and explicitly passes the timer pointer as the legacy
data argument. Once all setup_*timer() callers have been replaced with
timer_setup(), the casts can be removed, and the data argument can be
dropped with the timer expiration code changed to just pass the timer
to the callback directly.

Since the regular pattern of using container_of() during local variable
declaration repeats the need for the variable type declaration
to be included, this adds a helper modeled after other from_*()
helpers that wrap container_of(), named from_timer(). This helper uses
typeof(*variable), removing the type redundancy and minimizing the need
for line wraps in forthcoming conversions from "unsigned data long" to
"struct timer_list *" in the timer callbacks:

-void callback(unsigned long data)
+void callback(struct timer_list *t)
{
-   struct some_data_structure *local = (struct some_data_structure *)data;
+   struct some_data_structure *local = from_timer(local, t, timer);

Finally, in order to support the handful of timer users that perform
open-coded assignments of the .function (and .data) fields, provide
cast macros (TIMER_FUNC_TYPE and TIMER_DATA_TYPE) that can be used
temporarily. Once conversion has been completed, these can be globally
trivially removed.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20170928133817.GA113410@beast
Change-Id: Ie5af397a7702c2ed9f9cda23e3dcc04708c057dc
2020-12-09 13:55:39 +09:00
Dongjin Kim
95086680ab ODROID-COMMON: config: add to enable GPIO-based Joystick support
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I45be7633cc23990e48f04231d158140ad808408a
2020-12-09 11:58:57 +09:00
Dongjin Kim
643b16ad28 ODROID-COMMON: config: disable 'CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR' to use soft cursor
This change affects to the OSD driver, drivers/amlogic/media/osd/osd_fb.c, to enable
soft cursor instead of OSD cursor.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Ic4af0037579b5b62c4df7b29a05d1cceec0cd9cf
4.9.236-106 4.9.236-60
2020-12-02 10:48:01 -03:00
Dongjin Kim
bf8d73f1f6 ODROID-COMMON: ARM64/dts: add GPIO-based joystick support device tree
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I54ebe56b09f5cc66f26718f4486f011fb50dcc0e
2020-12-02 13:20:47 +09:00
Dongjin Kim
937dcaf76f ODROID-COMMON: add drivers GPIO-based Joystick drivers
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I0856df4dec6a05f769b0e325ea8f8200f82b8058
2020-12-02 13:20:24 +09:00
Dongjin Kim
f2a1304b10 ODROID-HC4: enable eMMC to make SD as /dev/mmcblk1*
Change-Id: Id3b7050a0b81b5e53785991074b6d0285e11a6e8
2020-12-01 20:41:06 +09:00
Dongjin Kim
f6bcdb2b15 ODROID-COMMON: hwmon: (pwm-fan) add fan pwm1_enable attribute
This patch adds to new attribute 'pwm1_enable' to change the fan speed
control method as documented in 'Documentation/hwmon/sysfs-interface'.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I19094d60e928d6c3ce226d319e75a35ecbd3ae52
2020-11-26 04:45:43 +09:00
Dongjin Kim
327df05e63 ODROID-COMMON: thermal: amlogic_thermal: Add hwmon support
Expose Amlogic thermal as HWMON devices.

	$ sensors
	cpu_thermal-virtual-0
	Adapter: Virtual device
	temp1:        +32.2 C  (crit = +110.0 C)

	ddr_thermal-virtual-0
	Adapter: Virtual device
	temp1:        +33.4 C  (crit = +110.0 C)

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Icb1bf7cd7e4462f9923af5bcd72fa7c0c8e14cc9
2020-11-25 14:54:08 +09:00
ckkim
6ad97dceb7 ODROID-HC4:remove pwm-fan pinctrl(PWM_C : GPIOC_4 remove)
Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I36ddb1889cc1d181372c8925e58726d71a615d4e
4.9.236-51 4.9.236-104
2020-11-10 09:24:26 -03:00
Dongjin Kim
8fb70183bd Revert "ODROID-COMMON: osd: Adjust osd scaler and vout serve to fit in KODI"
This reverts commit 6f7138e3ac.

Change-Id: Ib57697cf7668460ab81bf951d0dee1e003adba44
4.9.236-50
2020-11-05 17:17:51 +09:00
Dongjin Kim
67281d47ea Revert "ODROID-COMMON:osd: Adjust osd scaler and vout serve to fit in KODI. Only works in S922(N2/N2+)."
This reverts commit 0427609dc9.

Change-Id: Idcf054d6da7a2602dbac904ae2a6ec6da0ee00bf
2020-11-05 17:17:48 +09:00
ckkim
800070774d ODROID-N2/N2+:no soundcard error fix.
Change-Id: I71319cf50a1fd07b9ec48edc62e2a0bbcf565ba9
4.9.236-103
2020-11-04 13:26:52 +09:00
Mauro Ribeiro
b865c9de61 Merge "ODROID-COMMON:osd: Adjust osd scaler and vout serve to fit in KODI. Only works in S922(N2/N2+)." into odroidg12-4.9.y 4.9.236-98 2020-10-30 22:39:19 +09:00
Deokgyu Yang
98774b1480 ODROID-COMMON: drivers/spi: Set the 64 bits per word by default
The existing force64b routine might not work properly under specific
conditions. This patch fixes that bug of 64 bits per word and forces
use that option. It will improve SPI performance significantly.

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I85a58d425303ea1765b7b83ee5dd5f0a7f4203fc
2020-10-30 16:09:06 +09:00
ckkim
0427609dc9 ODROID-COMMON:osd: Adjust osd scaler and vout serve to fit in KODI. Only works in S922(N2/N2+).
Change-Id: I7a16dd2cbde63d8b716aab17d85fb9dc1157e2ff
2020-10-29 18:28:25 +09:00
Luke go
3fb04f4ee0 ODROID-HC4: arm64/dtbs: overlay: Changed fanspeed.
- Because of noise, Changed the fan speed by adjust pwm frequency.

Change-Id: Ie12eb7f16cfbf1eeab01cb4694540b8260985a47
2020-10-22 09:53:12 +09:00
Dongjin Kim
bd5043c030 ODROID-HC4: arm64/dts: add PWM pinctrl for cooling fan
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I44e55ae09a1cbd6eb46b5636147f5f3f35ef28a8
2020-10-20 17:21:07 +09:00
Luke go
d615a4cadc ODROID-COMMON: arm64/dts: overlay: Add the PWM examples.
- pwmfan, pwm-backlight.

Change-Id: Id1cdbbebc80962f0ed51be05d95b771c1af6be30
2020-10-20 17:20:56 +09:00
Luke go
154309864d ODROID-COMMON: arm64/dts: overlay: Separate PWM and apply overlay.
- The PWM's configuration is difference between the n2 and c4. So
  separate configuration and placed to the device tree overlays.

Change-Id: Ia870ce6ea4404c8bc7028ae7f1cc72174406ed27
2020-10-20 17:19:11 +09:00
Luke go
5d32c14779 ODROID-C4/HC4: arm64/dts: overlay: Add overlay to run fully loaded fan
speed.

Change-Id: I56dd11c2cc88406ed695e1594301a759eedfc017
Signed-off-by: Luke go <sangch.go@gmail.com>
2020-10-16 16:01:25 +09:00
Luke Go
d136a8e5b6 ODROID: bt: Bugfix.
- power_low_level value is not applied correctly.

Change-Id: Id98d8e819e0502f7ec2ae27f972a926ac7c855d2
Signed-off-by: Luke Go <sangch.go@gmail.com>
2020-10-14 12:22:49 +09:00
Luke go
2da194b281 ODROID-C4: Add wifi/bt combo.
Change-Id: I7aee51cd8c8babcebf3b060f9b09cbd6f00212f1
2020-10-14 12:22:27 +09:00
Dongjin Kim
2ea1cdf417 ODROID-COMMON: clock: remove confusing kernel warning
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Ic13f009bc8221317e554921d3da2a420fce28c53
4.9.236-37
2020-10-12 14:23:13 +09:00
Dongjin Kim
e7fb2db2f4 ODROID-HC4: cpufreq: add to use kernel parameter to set max cpufreq
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I5ce9b4b69e4f436f183292764149950d74131900
2020-10-07 12:11:08 +09:00
Dongjin Kim
4c7f82cbfc ODROID-COMMON: config: add ATA drivers for ODROID-HC4
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Iaf336ea71095938d4da5a2abb0cbe9c61e43ee95
2020-10-07 12:11:08 +09:00
Dongjin Kim
5fb3d92bb2 ODROID-HC4: arm64/boot: add PWM based fan node entry
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I8cf61fe74f59411c92b7367099664cba6b5e576e
2020-10-07 12:11:08 +09:00
Dongjin Kim
aa5ce947c0 ODROID-HC4: arm64/dts: add SPI flash memory
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: If6ae6a414d1f27ab48c7a337aa8241603146376a
2020-10-07 12:11:08 +09:00
Dongjin Kim
a73de30e3b ODROID-HC4: arm64/dts: add USB host support on 'rev.20200512'
[1] GPIOAO_2 is tied to control USB 2.0 host power
[2] USB 3.0 PHY must be disabled exclusively for PCIe.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I340ca69f6da448a441ed75c506ea569947a581c4
2020-10-07 12:11:08 +09:00
Dongjin Kim
5068036653 ODROID-HC4: arch/arm64: Introduce new board 'ODROID-HC4'
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I8ba3c401aedacfcf1307049fac66ebb13bddfa6d
2020-10-07 12:11:08 +09:00
Dongjin Kim
d227b6e25e ODROID-C4: cpufreq: fix typo to set the default cpufreq
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Ie790225b30477ee0af821c55066df1f83c819b51
2020-10-07 12:11:08 +09:00
Luke go
b60f79adbc ODROID-C4: arm64/dts: overlay: Add sdio.
Change-Id: I87bf7ff7f68863b79826b5d10e8eb840c0e70c1e
2020-09-24 15:17:06 +09:00
Luke go
efe463052b ODROID-C4: wireless: esp8089: Support esp8089 driver.
- The esp8089 driver supports many esp's wifi modules. So it is imported.

Change-Id: If039882e183e454baff2c222bf7a1282b6705459
2020-09-24 15:14:34 +09:00
Joy Cho
cbb49c05e1 Merge "ODROID-COMMON: hdmitx: Adjust 2560x1600 timing to use lower pixel clock" into odroidg12-4.9.y 4.9.236-38 4.9.236-39 2020-09-24 10:35:13 +09:00
Greg Kroah-Hartman
4dd8bb0de5 Linux 4.9.237
Link: https://lore.kernel.org/lkml/20200921162035.136047591@linuxfoundation.org/
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:17 +02:00
Adam Borowski
a8ee54d729 x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y
commit 72a9c67363 upstream.

A spanking new machine I just got has all but one USB ports wired as 3.0.
Booting defconfig resulted in no keyboard or mouse, which was pretty
uncool.  Let's enable that -- USB3 is ubiquitous rather than an oddity.
As 'y' not 'm' -- recovering from initrd problems needs a keyboard.

Also add it to the 32-bit defconfig.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-usb@vger.kernel.org
Link: http://lkml.kernel.org/r/20181009062803.4332-1-kilobyte@angband.pl
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Alexey Kardashevskiy
5e35f49dd5 powerpc/dma: Fix dma_map_ops::get_required_mask
commit 437ef802e0 upstream.

There are 2 problems with it:
  1. "<" vs expected "<<"
  2. the shift number is an IOMMU page number mask, not an address
  mask as the IOMMU page shift is missing.

This did not hit us before f1565c24b5 ("powerpc: use the generic
dma_ops_bypass mode") because we had additional code to handle bypass
mask so this chunk (almost?) never executed.However there were
reports that aacraid does not work with "iommu=nobypass".

After f1565c24b5, aacraid (and probably others which call
dma_get_required_mask() before setting the mask) was unable to enable
64bit DMA and fall back to using IOMMU which was known not to work,
one of the problems is double free of an IOMMU page.

This fixes DMA for aacraid, both with and without "iommu=nobypass" in
the kernel command line. Verified with "stress-ng -d 4".

Fixes: 6a5c7be5e4 ("powerpc: Override dma_get_required_mask by platform hook and ops")
Cc: stable@vger.kernel.org # v3.2+
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200908015106.79661-1-aik@ozlabs.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Quentin Perret
faf8af4326 ehci-hcd: Move include to keep CRC stable
commit 29231826f3 upstream.

The CRC calculation done by genksyms is triggered when the parser hits
EXPORT_SYMBOL*() macros. At this point, genksyms recursively expands the
types of the function parameters, and uses that as the input for the CRC
calculation. In the case of forward-declared structs, the type expands
to 'UNKNOWN'. Following this, it appears that the result of the
expansion of each type is cached somewhere, and seems to be re-used
when/if the same type is seen again for another exported symbol in the
same C file.

Unfortunately, this can cause CRC 'stability' issues when a struct
definition becomes visible in the middle of a C file. For example, let's
assume code with the following pattern:

    struct foo;

    int bar(struct foo *arg)
    {
	/* Do work ... */
    }
    EXPORT_SYMBOL_GPL(bar);

    /* This contains struct foo's definition */
    #include "foo.h"

    int baz(struct foo *arg)
    {
	/* Do more work ... */
    }
    EXPORT_SYMBOL_GPL(baz);

Here, baz's CRC will be computed using the expansion of struct foo that
was cached after bar's CRC calculation ('UNKOWN' here). But if
EXPORT_SYMBOL_GPL(bar) is removed from the file (because of e.g. symbol
trimming using CONFIG_TRIM_UNUSED_KSYMS), struct foo will be expanded
late, during baz's CRC calculation, which now has visibility over the
full struct definition, hence resulting in a different CRC for baz.

The proper fix for this certainly is in genksyms, but that will take me
some time to get right. In the meantime, we have seen one occurrence of
this in the ehci-hcd code which hits this problem because of the way it
includes C files halfway through the code together with an unlucky mix
of symbol trimming.

In order to workaround this, move the include done in ehci-hub.c early
in ehci-hcd.c, hence making sure the struct definitions are visible to
the entire file. This improves CRC stability of the ehci-hcd exports
even when symbol trimming is enabled.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20200916171825.3228122-1-qperret@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Tobias Diedrich
68593a8e29 serial: 8250_pci: Add Realtek 816a and 816b
commit 3c5a87be17 upstream.

These serial ports are exposed by the OOB-management-engine on
RealManage-enabled network cards (e.g. AMD DASH enabled systems using
Realtek cards).

Because these have 3 BARs, they fail the "num_iomem <= 1" check in
serial_pci_guess_board.

I've manually checked the two IOMEM regions and BAR 2 doesn't seem to
respond to reads, but BAR 4 seems to be an MMIO version of the IO ports
(untested).

With this change, the ports are detected:
0000:02:00.1: ttyS0 at I/O 0x2200 (irq = 82, base_baud = 115200) is a 16550A
0000:02:00.2: ttyS1 at I/O 0x2100 (irq = 55, base_baud = 115200) is a 16550A

lspci output:
02:00.1 0700: 10ec:816a (rev 0e) (prog-if 02 [16550])
        Subsystem: 17aa:5082
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort+ <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin B routed to IRQ 82
        IOMMU group: 11
        Region 0: I/O ports at 2200 [size=256]
        Region 2: Memory at fd715000 (64-bit, non-prefetchable) [size=4K]
        Region 4: Memory at fd704000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v2) Endpoint, MSI 01
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s (ok), Width x1 (ok)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp- 10BitTagReq- OBFF Via message/WAKE#, ExtFmt- EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
                Vector table: BAR=4 offset=00000000
                PBA: BAR=4 offset=00000800
        Capabilities: [d0] Vital Product Data
                Not readable
        Capabilities: [100 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [160 v1] Device Serial Number 00-00-00-00-00-00-00-00
        Capabilities: [170 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Capabilities: [178 v1] L1 PM Substates
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                          PortCommonModeRestoreTime=150us PortTPowerOnTime=150us
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                           T_CommonMode=0us LTR1.2_Threshold=0ns
                L1SubCtl2: T_PwrOn=10us
02:00.2 0700: 10ec:816b (rev 0e)
[...same...]

Signed-off-by: Tobias Diedrich <tobiasdiedrich@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200914173628.GA22508@yamamaya.is-a-geek.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Hans de Goede
92af983a15 Input: i8042 - add Entroware Proteus EL07R4 to nomux and reset lists
commit c4440b8a45 upstream.

The keyboard drops keypresses early during boot unless both the nomux
and reset quirks are set. Add DMI table entries for this.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1806085
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200907095656.13155-1-hdegoede@redhat.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Oliver Neukum
11ecdfc83a usblp: fix race between disconnect() and read()
commit 9cdabcb3ef upstream.

read() needs to check whether the device has been
disconnected before it tries to talk to the device.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+be5b5f86a162a6c281e6@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200917103427.15740-1-oneukum@suse.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Oliver Neukum
e7fdd02038 USB: UAS: fix disconnect by unplugging a hub
commit 325b008723 upstream.

The SCSI layer can go into an ugly loop if you ignore that a device is
gone. You need to report an error in the command rather than in the
return value of the queue method.

We need to specifically check for ENODEV. The issue goes back to the
introduction of the driver.

Fixes: 115bb1ffa5 ("USB: Add UAS driver")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200916094026.30085-2-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Penghao
f33177db3c USB: quirks: Add USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for BYD zhaoxin notebook
commit bcea6dafee upstream.

Add a USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for the BYD zhaoxin notebook.
This notebook come with usb touchpad. And we would like to disable
touchpad wakeup on this notebook by default.

Signed-off-by: Penghao <penghao@uniontech.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200907023026.28189-1-penghao@uniontech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 08:46:16 +02:00
Yu Kuai
c0675a878a drm/mediatek: Add exception handing in mtk_drm_probe() if component init fail
[ Upstream commit 64c194c007 ]

mtk_ddp_comp_init() is called in a loop in mtk_drm_probe(), if it
fail, previous successive init component is not proccessed.

Thus uninitialize valid component and put their device if component
init failed.

Fixes: 119f517362 ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-23 08:46:16 +02:00
Thomas Bogendoerfer
ca070bbdf0 MIPS: SNI: Fix spurious interrupts
[ Upstream commit b959b97860 ]

On A20R machines the interrupt pending bits in cause register need to be
updated by requesting the chipset to do it. This needs to be done to
find the interrupt cause and after interrupt service. In
commit 0b888c7f3a ("MIPS: SNI: Convert to new irq_chip functions") the
function to do after service update got lost, which caused spurious
interrupts.

Fixes: 0b888c7f3a ("MIPS: SNI: Convert to new irq_chip functions")
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-23 08:46:15 +02:00
Tetsuo Handa
f9300df2f7 fbcon: Fix user font detection test at fbcon_resize().
[ Upstream commit ec0972adec ]

syzbot is reporting OOB read at fbcon_resize() [1], for
commit 39b3cffb8c ("fbcon: prevent user font height or width change
 from causing potential out-of-bounds access") is by error using
registered_fb[con2fb_map[vc->vc_num]]->fbcon_par->p->userfont (which was
set to non-zero) instead of fb_display[vc->vc_num].userfont (which remains
zero for that display).

We could remove tricky userfont flag [2], for we can determine it by
comparing address of the font data and addresses of built-in font data.
But since that commit is failing to fix the original OOB read [3], this
patch keeps the change minimal in case we decide to revert altogether.

[1] https://syzkaller.appspot.com/bug?id=ebcbbb6576958a496500fee9cf7aa83ea00b5920
[2] https://syzkaller.appspot.com/text?tag=Patch&x=14030853900000
[3] https://syzkaller.appspot.com/bug?id=6fba8c186d97cf1011ab17660e633b1cc4e080c9

Reported-by: syzbot <syzbot+b38b1ef6edf0c74a8d97@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: 39b3cffb8c ("fbcon: prevent user font height or width change from causing potential out-of-bounds access")
Cc: George Kennedy <george.kennedy@oracle.com>
Link: https://lore.kernel.org/r/f6e3e611-8704-1263-d163-f52c906a4f06@I-love.SAKURA.ne.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-23 08:46:15 +02:00