1. 03 May, 2019 20 commits
    • Douglas Anderson's avatar
      ARM: dts: rockchip: Hook resets up to USB PHYs on rk3288. · d17aa2d2
      Douglas Anderson authored
      Let's hook up the resets to the three USB PHYs on rk3288 as per the
      bindings.  This is in preparation for a future patch that will set the
      "snps,reset-phy-on-wake" on the host port.
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      d17aa2d2
    • Douglas Anderson's avatar
      usb: dwc2: optionally assert phy reset when waking up · c40cf770
      Douglas Anderson authored
      On the rk3288 USB host-only port (the one that's not the OTG-enabled
      port) the PHY can get into a bad state when a wakeup is asserted (not
      just a wakeup from full system suspend but also a wakeup from
      autosuspend).
      
      We can get the PHY out of its bad state by asserting its "port reset",
      but unfortunately that seems to assert a reset onto the USB bus so it
      could confuse things if we don't actually deenumerate / reenumerate the
      device.
      
      We can also get the PHY out of its bad state by fully resetting it using
      the reset from the CRU (clock reset unit), which does a more full
      reset.  The CRU-based reset appears to actually cause devices on the bus
      to be removed and reinserted, which fixes the problem (albeit in a hacky
      way).
      
      It's unfortunate that we need to do a full re-enumeration of devices at
      wakeup time, but this is better than alternative of letting the bus get
      wedged.
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarYunzhi Li <lyz@rock-chips.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      c40cf770
    • Douglas Anderson's avatar
      dt-bindings: usb: dwc2: Document quirk to reset PHY upon wakeup · cc389eaa
      Douglas Anderson authored
      On Rockchip rk3288 there's a hardware quirk where we need to assert
      the reset signal to the PHY when we get a remote wakeup on one of the
      two ports.  Document this quirk in the bindings.
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      cc389eaa
    • Martin Blumenstingl's avatar
      dt-bindings: usb: dwc2: document the vbus-supply property · 86847dca
      Martin Blumenstingl authored
      Various boards have an external VBUS supply regulator. This regulator
      depends on the current mode of the controller which is defined as:
      - dr_mode set to either "host" or "peripheral" (fixed value)
      - dr_mode set to "otg", based on the OTG status the dwc2 controller
        internally switches between "host" and "peripheral" mode (selection
        happens at runtime)
      
      Based on the current mode the regulator has to be enabled or disabled:
      - host: provide power to the connected USB device, thus the regulator
        has to be enabled
      - peripheral: the host device to which the controller is connected
        provides power, thus the regulator has to be disabled
      
      Add the dt-bindings documentation for this property so .dts authors know
      that this property exists and how it behaves.
      
      Fixes: 531ef5eb ("usb: dwc2: add support for host mode external vbus supply")
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      86847dca
    • Alan Stern's avatar
      USB: UDC: net22{80,72}: remove mistaken test of req->zero · de497f63
      Alan Stern authored
      The net2280 UDC driver (and also net2272, probably via copy-and-paste)
      incorrectly checks the req->zero flag during OUT transfers, after
      copying data from the UDC's FIFO into memory.  This makes no sense at
      all; the "zero" flag indicates that an extra zero-length packet should
      be appended to an IN transfer if the length is an even multiple of the
      maxpacket size.  It has nothing to do with OUT transfers.
      
      In practice this doesn't cause any problems because gadget drivers
      never set req->zero for OUT transfers anyway.  Still, it is an error
      and unnecessary code, so this patch removes the check.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      de497f63
    • Alan Stern's avatar
      USB: UDC: net2280: Remove redundant "if" condition · 6574abe6
      Alan Stern authored
      The net2280 driver includes an unnecessary test for an endpoint's
      queue being empty.  The test is redundant; it sits inside a
      conditional block of an "if" statement which already tests the
      endpoint's queue.
      
      This patch removes the redundant test.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      6574abe6
    • Arnd Bergmann's avatar
      usb: gadget: fsl: fix link error against usb-gadget module · 2100e3ca
      Arnd Bergmann authored
      The dependency to ensure this driver links correctly fails since
      it can not be a loadable module:
      
      drivers/usb/phy/phy-fsl-usb.o: In function `fsl_otg_set_peripheral':
      phy-fsl-usb.c:(.text+0x2224): undefined reference to `usb_gadget_vbus_disconnect'
      
      Make the option 'tristate' so it can work correctly.
      
      Fixes: 5a8d651a ("usb: gadget: move gadget API functions to udc-core")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      2100e3ca
    • Romain Izard's avatar
      usb: gadget: f_ncm: Add OS descriptor support · 79340929
      Romain Izard authored
      To be able to use the default USB class drivers available in Microsoft
      Windows, we need to add OS descriptors to the exported USB gadget to
      tell the OS that we are compatible with the built-in drivers.
      
      Copy the OS descriptor support from f_rndis into f_ncm. As a result,
      using the WINNCM compatible ID, the UsbNcm driver is loaded on
      enumeration without the need for a custom driver or inf file.
      Signed-off-by: default avatarRomain Izard <romain.izard.pro@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      79340929
    • Romain Izard's avatar
      usb: gadget: f_ncm: Fix NTP-32 support · 550eef0c
      Romain Izard authored
      When connecting a CDC-NCM gadget to an host that uses the NTP-32 mode,
      or that relies on the default CRC setting, the current implementation gets
      confused, and does not expect the correct signature for its packets.
      
      Fix this, by ensuring that the ndp_sign member in the f_ncm structure
      always contain a valid value.
      Signed-off-by: default avatarRomain Izard <romain.izard.pro@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      550eef0c
    • Chunfeng Yun's avatar
      usb: dwc2: get optional clock by devm_clk_get_optional() · 60722c4e
      Chunfeng Yun authored
      When the driver tries to get optional clock, it ignores all errors,
      but if only ignores -ENOENT, it will cover some real errors, such as
      -EPROBE_DEFER, so use devm_clk_get_optional() to get optional clock.
      
      Cc: Minas Harutyunyan <hminas@synopsys.com>
      Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
      Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      60722c4e
    • Minas Harutyunyan's avatar
      usb: dwc2: gadget: Reject LPM token during Control transfers · 46637565
      Minas Harutyunyan authored
      Avoiding switch to L1 state in any stage of control transfers.
      Send NYET handshake to LPM token.
      
      Renamed GLPMCFG_LPM_ACCEPT_CTRL_ISOC to GLPMCFG_LPM_REJECT_CTRL_CONTROL
      because by setting this bit core reject LPM token.
      Signed-off-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      46637565
    • Douglas Anderson's avatar
      USB: Export usb_wakeup_enabled_descendants() · 7a6127e3
      Douglas Anderson authored
      In (e583d9db USB: global suspend and remote wakeup don't mix) we
      introduced wakeup_enabled_descendants() as a static function.  We'd
      like to use this function in USB controller drivers to know if we
      should keep the controller on during suspend time, since doing so has
      a power impact.
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      7a6127e3
    • Douglas Anderson's avatar
      usb: dwc2: bus suspend/resume for hosts with DWC2_POWER_DOWN_PARAM_NONE · 6f6d7059
      Douglas Anderson authored
      This is an attempt to rehash commit 0cf884e8 ("usb: dwc2: add bus
      suspend/resume for dwc2") on ToT.  That commit was reverted in commit
      b0bb9bb6 ("Revert "usb: dwc2: add bus suspend/resume for dwc2"")
      because apparently it broke the Altera SOCFPGA.
      
      With all the changes that have happened to dwc2 in the meantime, it's
      possible that the Altera SOCFPGA will just magically work with this
      change now.  ...and it would be good to get bus suspend/resume
      implemented.
      
      This change is a forward port of one that's been living in the Chrome
      OS 3.14 kernel tree.
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      6f6d7059
    • Neil Armstrong's avatar
      usb: dwc3: Add Amlogic G12A DWC3 glue · c9999337
      Neil Armstrong authored
      Adds support for Amlogic G12A USB Control Glue HW.
      
      The Amlogic G12A SoC Family embeds 2 USB Controllers :
      - a DWC3 IP configured as Host for USB2 and USB3
      - a DWC2 IP configured as Peripheral USB2 Only
      
      A glue connects these both controllers to 2 USB2 PHYs, and optionnally
      to an USB3+PCIE Combo PHY shared with the PCIE controller.
      
      The Glue configures the UTMI 8bit interfaces for the USB2 PHYs, including
      routing of the OTG PHY between the DWC3 and DWC2 controllers, and
      setups the on-chip OTG mode selection for this PHY.
      
      This drivers supports the on-probe setup of the OTG mode, and manually
      via a debugfs interface. The IRQ mode change detect is yet to be added
      in a future patchset, mainly due to lack of hardware to validate on.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      c9999337
    • Neil Armstrong's avatar
      usb: dwc2: Add Amlogic G12A DWC2 Params · fc4e326e
      Neil Armstrong authored
      This patchs sets the params for the DWC2 Controller found in the
      Amlogic G12A SoC family.
      
      It mainly sets the settings reported incorrect by the driver,
      leaving the remaining detected automatically by the driver and
      provided by the DT node.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      fc4e326e
    • Neil Armstrong's avatar
      dt-bindings: usb: dwc3: Add Amlogic G12A DWC3 Glue Bindings · e8c77fa0
      Neil Armstrong authored
      Adds the bindings for the Amlogic G12A USB Glue HW.
      
      The Amlogic G12A SoC Family embeds 2 USB Controllers :
      - a DWC3 IP configured as Host for USB2 and USB3
      - a DWC2 IP configured as Peripheral USB2 Only
      
      A glue connects these both controllers to 2 USB2 PHYs,
      and optionnally to an USB3+PCIE Combo PHY shared with the PCIE controller.
      
      The Glue configures the UTMI 8bit interfaces for the USB2 PHYs, including
      routing of the OTG PHY between the DWC3 and DWC2 controllers, and
      setups the on-chip OTG mode selection for this PHY.
      
      The PHYs phandles are passed  to the Glue node since the Glue controls the
      interface with the PHY, not the DWC3 controller.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      e8c77fa0
    • Neil Armstrong's avatar
      dt-bindings: usb: dwc2: Add Amlogic G12A DWC2 Compatible · 7a76b973
      Neil Armstrong authored
      Adds the specific compatible string for the DWC2 IP found in the
      Amlogic G12A SoC Family.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      7a76b973
    • Alan Stern's avatar
      USB: dummy-hcd: Fix failure to give back unlinked URBs · 50896c41
      Alan Stern authored
      The syzkaller USB fuzzer identified a failure mode in which dummy-hcd
      would never give back an unlinked URB.  This causes usb_kill_urb() to
      hang, leading to WARNINGs and unkillable threads.
      
      In dummy-hcd, all URBs are given back by the dummy_timer() routine as
      it scans through the list of pending URBS.  Failure to give back URBs
      can be caused by failure to start or early exit from the scanning
      loop.  The code currently has two such pathways: One is triggered when
      an unsupported bus transfer speed is encountered, and the other by
      exhausting the simulated bandwidth for USB transfers during a frame.
      
      This patch removes those two paths, thereby allowing all unlinked URBs
      to be given back in a timely manner.  It adds a check for the bus
      speed when the gadget first starts running, so that dummy_timer() will
      never thereafter encounter an unsupported speed.  And it prevents the
      loop from exiting as soon as the total bandwidth has been used up (the
      scanning loop continues, giving back unlinked URBs as they are found,
      but not transferring any more data).
      
      Thanks to Andrey Konovalov for manually running the syzkaller fuzzer
      to help track down the source of the bug.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: syzbot+d919b0f29d7b5a4994b9@syzkaller.appspotmail.com
      CC: <stable@vger.kernel.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      50896c41
    • Marc Gonzalez's avatar
      usb: dwc3: Allow building USB_DWC3_QCOM without EXTCON · 67130830
      Marc Gonzalez authored
      Keep EXTCON support optional, as some platforms do not need it.
      
      Do the same for USB_DWC3_OMAP while we're at it.
      
      Fixes: 3def4031 ("usb: dwc3: add EXTCON dependency for qcom")
      Signed-off-by: default avatarMarc Gonzalez <marc.w.gonzalez@free.fr>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      67130830
    • Fei Yang's avatar
      usb: gadget: f_fs: don't free buffer prematurely · 73103c7f
      Fei Yang authored
      The following kernel panic happens due to the io_data buffer gets deallocated
      before the async io is completed. Add a check for the case where io_data buffer
      should be deallocated by ffs_user_copy_worker.
      
      [   41.663334] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
      [   41.672099] #PF error: [normal kernel read fault]
      [   41.677356] PGD 20c974067 P4D 20c974067 PUD 20c973067 PMD 0
      [   41.683687] Oops: 0000 [#1] PREEMPT SMP
      [   41.687976] CPU: 1 PID: 7 Comm: kworker/u8:0 Tainted: G     U            5.0.0-quilt-2e5dc0ac-00790-gd8c79f2-dirty #2
      [   41.705309] Workqueue: adb ffs_user_copy_worker
      [   41.705316] RIP: 0010:__vunmap+0x2a/0xc0
      [   41.705318] Code: 0f 1f 44 00 00 48 85 ff 0f 84 87 00 00 00 55 f7 c7 ff 0f 00 00 48 89 e5 41 55 41 89 f5 41 54 53 48 89 fb 75 71 e8 56 d7 ff ff <4c> 8b 60 48 4d 85 e4 74 76 48 89 df e8 25 ff ff ff 45 85 ed 74 46
      [   41.705320] RSP: 0018:ffffbc3a40053df0 EFLAGS: 00010286
      [   41.705322] RAX: 0000000000000000 RBX: ffffbc3a406f1000 RCX: 0000000000000000
      [   41.705323] RDX: 0000000000000001 RSI: 0000000000000001 RDI: 00000000ffffffff
      [   41.705324] RBP: ffffbc3a40053e08 R08: 000000000001fb79 R09: 0000000000000037
      [   41.705325] R10: ffffbc3a40053b68 R11: ffffbc3a40053cad R12: fffffffffffffff2
      [   41.705326] R13: 0000000000000001 R14: 0000000000000000 R15: ffffffffffffffff
      [   41.705328] FS:  0000000000000000(0000) GS:ffff9e2977a80000(0000) knlGS:0000000000000000
      [   41.705329] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   41.705330] CR2: 0000000000000048 CR3: 000000020c994000 CR4: 00000000003406e0
      [   41.705331] Call Trace:
      [   41.705338]  vfree+0x50/0xb0
      [   41.705341]  ffs_user_copy_worker+0xe9/0x1c0
      [   41.705344]  process_one_work+0x19f/0x3e0
      [   41.705348]  worker_thread+0x3f/0x3b0
      [   41.829766]  kthread+0x12b/0x150
      [   41.833371]  ? process_one_work+0x3e0/0x3e0
      [   41.838045]  ? kthread_create_worker_on_cpu+0x70/0x70
      [   41.843695]  ret_from_fork+0x3a/0x50
      [   41.847689] Modules linked in: hci_uart bluetooth ecdh_generic rfkill_gpio dwc3_pci dwc3 snd_usb_audio mei_me tpm_crb snd_usbmidi_lib xhci_pci xhci_hcd mei tpm snd_hwdep cfg80211 snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_hda_core videobuf2_dma_sg crlmodule
      [   41.876880] CR2: 0000000000000048
      [   41.880584] ---[ end trace 2bc4addff0f2e673 ]---
      [   41.891346] RIP: 0010:__vunmap+0x2a/0xc0
      [   41.895734] Code: 0f 1f 44 00 00 48 85 ff 0f 84 87 00 00 00 55 f7 c7 ff 0f 00 00 48 89 e5 41 55 41 89 f5 41 54 53 48 89 fb 75 71 e8 56 d7 ff ff <4c> 8b 60 48 4d 85 e4 74 76 48 89 df e8 25 ff ff ff 45 85 ed 74 46
      [   41.916740] RSP: 0018:ffffbc3a40053df0 EFLAGS: 00010286
      [   41.922583] RAX: 0000000000000000 RBX: ffffbc3a406f1000 RCX: 0000000000000000
      [   41.930563] RDX: 0000000000000001 RSI: 0000000000000001 RDI: 00000000ffffffff
      [   41.938540] RBP: ffffbc3a40053e08 R08: 000000000001fb79 R09: 0000000000000037
      [   41.946520] R10: ffffbc3a40053b68 R11: ffffbc3a40053cad R12: fffffffffffffff2
      [   41.954502] R13: 0000000000000001 R14: 0000000000000000 R15: ffffffffffffffff
      [   41.962482] FS:  0000000000000000(0000) GS:ffff9e2977a80000(0000) knlGS:0000000000000000
      [   41.971536] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   41.977960] CR2: 0000000000000048 CR3: 000000020c994000 CR4: 00000000003406e0
      [   41.985930] Kernel panic - not syncing: Fatal exception
      [   41.991817] Kernel Offset: 0x16000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
      [   42.009525] Rebooting in 10 seconds..
      [   52.014376] ACPI MEMORY or I/O RESET_REG.
      
      Fixes: 772a7a72 ("usb: gadget: f_fs: Allow scatter-gather buffers")
      Signed-off-by: default avatarFei Yang <fei.yang@intel.com>
      Reviewed-by: default avatarManu Gautam <mgautam@codeaurora.org>
      Tested-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      73103c7f
  2. 21 Apr, 2019 1 commit
  3. 20 Apr, 2019 11 commits
  4. 19 Apr, 2019 8 commits
    • Linus Torvalds's avatar
      Merge branch 'for-5.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu · 4c3f49ae
      Linus Torvalds authored
      Pull percpu fixlet from Dennis Zhou:
       "This stops printing the base address of percpu memory on
        initialization"
      
      * 'for-5.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
        percpu: stop printing kernel addresses
      4c3f49ae
    • Linus Torvalds's avatar
      Merge tag 'tty-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 55e3a6ba
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are five small fixes for some tty/serial/vt issues that have been
        reported.
      
        The vt one has been around for a while, it is good to finally get that
        resolved. The others fix a build warning that showed up in 5.1-rc1,
        and resolve a problem in the sh-sci driver.
      
        Note, the second patch for build warning fix for the sc16is7xx driver
        was just applied to the tree, as it resolves a problem with the
        previous patch to try to solve the issue. It has not shown up in
        linux-next yet, unlike all of the other patches, but it has passed
        0-day testing and everyone seems to agree that it is correct"
      
      * tag 'tty-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        sc16is7xx: put err_spi and err_i2c into correct #ifdef
        vt: fix cursor when clearing the screen
        sc16is7xx: move label 'err_spi' to correct section
        serial: sh-sci: Fix HSCIF RX sampling point adjustment
        serial: sh-sci: Fix HSCIF RX sampling point calculation
      55e3a6ba
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 3ecafda9
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "16 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
        mm/kmemleak.c: fix unused-function warning
        init: initialize jump labels before command line option parsing
        kernel/watchdog_hld.c: hard lockup message should end with a newline
        kcov: improve CONFIG_ARCH_HAS_KCOV help text
        mm: fix inactive list balancing between NUMA nodes and cgroups
        mm/hotplug: treat CMA pages as unmovable
        proc: fixup proc-pid-vm test
        proc: fix map_files test on F29
        mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
        mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock
        mm: swapoff: shmem_unuse() stop eviction without igrab()
        mm: swapoff: take notice of completion sooner
        mm: swapoff: remove too limiting SWAP_UNUSE_MAX_TRIES
        mm: swapoff: shmem_find_swap_entries() filter out other types
        slab: store tagged freelist for off-slab slabmgmt
      3ecafda9
    • Linus Torvalds's avatar
      Merge tag 'staging-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · b222e9af
      Linus Torvalds authored
      Pull staging and IIO fixes from Greg KH:
       "Here is a bunch of IIO driver fixes, and some smaller staging driver
        fixes, for 5.1-rc6. The IIO fixes were delayed due to my vacation, but
        all resolve a number of reported issues and have been in linux-next
        for a few weeks with no reported issues.
      
        The other staging driver fixes are all tiny, resolving some reported
        issues in the comedi and most drivers, as well as some erofs fixes.
      
        All of these patches have been in linux-next with no reported issues"
      
      * tag 'staging-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (24 commits)
        staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf
        staging: comedi: ni_usb6501: Fix use of uninitialized mutex
        staging: erofs: fix unexpected out-of-bound data access
        staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf
        staging: comedi: vmk80xx: Fix use of uninitialized semaphore
        staging: most: core: use device description as name
        iio: core: fix a possible circular locking dependency
        iio: ad_sigma_delta: select channel when reading register
        iio: pms7003: select IIO_TRIGGERED_BUFFER
        iio: cros_ec: Fix the maths for gyro scale calculation
        iio: adc: xilinx: prevent touching unclocked h/w on remove
        iio: adc: xilinx: fix potential use-after-free on probe
        iio: adc: xilinx: fix potential use-after-free on remove
        iio: dac: mcp4725: add missing powerdown bits in store eeprom
        io: accel: kxcjk1013: restore the range after resume.
        iio:chemical:bme680: Fix SPI read interface
        iio:chemical:bme680: Fix, report temperature in millidegrees
        iio: chemical: fix missing Kconfig block for sgp30
        iio: adc: at91: disable adc channel interrupt in timeout case
        iio: gyro: mpu3050: fix chip ID reading
        ...
      b222e9af
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · f9764dd4
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are four small misc driver fixes for 5.1-rc6.
      
        Nothing major at all, they fix up a Kconfig issues, a SPDX invalid
        license tag, and two tiny bugfixes.
      
        All have been in linux-next for a while with no reported issues"
      
      * tag 'char-misc-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        drivers: power: supply: goldfish_battery: Fix bogus SPDX identifier
        extcon: ptn5150: fix COMPILE_TEST dependencies
        misc: fastrpc: add checked value for dma_set_mask
        habanalabs: remove low credit limit of DMA #0
      f9764dd4
    • Ming Lei's avatar
      block: make sure that bvec length can't be overflow · 6bedf00e
      Ming Lei authored
      bvec->bv_offset may be bigger than PAGE_SIZE sometimes, such as,
      when one bio is splitted in the middle of one bvec via bio_split(),
      and bi_iter.bi_bvec_done is used to build offset of the 1st bvec of
      remained bio. And the remained bio's bvec may be re-submitted to fs
      layer via ITER_IBVEC, such as loop and nvme-loop.
      
      So we have to make sure that every bvec's offset is less than
      PAGE_SIZE from bio_for_each_segment_all() because some drivers(loop,
      nvme-loop) passes the splitted bvec to fs layer via ITER_BVEC.
      
      This patch fixes this issue reported by Zhang Yi When running nvme/011.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yi Zhang <yi.zhang@redhat.com>
      Reported-by: default avatarYi Zhang <yi.zhang@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Fixes: 6dc4f100 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      6bedf00e
    • Hou Tao's avatar
      block: kill all_q_node in request_queue · b40fabc0
      Hou Tao authored
      all_q_node has not been used since commit 4b855ad3 ("blk-mq: Create
      hctx for each present CPU"), so remove it.
      Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarHou Tao <houtao1@huawei.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      b40fabc0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 240206fc
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - several new key mappings for HID
      
       - a host of new ACPI IDs used to identify Elan touchpads in Lenovo
         laptops
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ
        HID: input: add mapping for "Toggle Display" key
        HID: input: add mapping for "Full Screen" key
        HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys
        HID: input: add mapping for Expose/Overview key
        HID: input: fix mapping of aspect ratio key
        [media] doc-rst: switch to new names for Full Screen/Aspect keys
        Input: document meanings of KEY_SCREEN and KEY_ZOOM
        Input: elan_i2c - add hardware ID for multiple Lenovo laptops
      240206fc