31 Mar, 2020

4 commits

  • Pull locking updates from Ingo Molnar:
    "The main changes in this cycle were:

    - Continued user-access cleanups in the futex code.

    - percpu-rwsem rewrite that uses its own waitqueue and atomic_t
    instead of an embedded rwsem. This addresses a couple of
    weaknesses, but the primary motivation was complications on the -rt
    kernel.

    - Introduce raw lock nesting detection on lockdep
    (CONFIG_PROVE_RAW_LOCK_NESTING=y), document the raw_lock vs. normal
    lock differences. This too originates from -rt.

    - Reuse lockdep zapped chain_hlocks entries, to conserve RAM
    footprint on distro-ish kernels running into the "BUG:
    MAX_LOCKDEP_CHAIN_HLOCKS too low!" depletion of the lockdep
    chain-entries pool.

    - Misc cleanups, smaller fixes and enhancements - see the changelog
    for details"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (55 commits)
    fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t
    thermal/x86_pkg_temp: Make pkg_temp_lock a raw_spinlock_t
    Documentation/locking/locktypes: Minor copy editor fixes
    Documentation/locking/locktypes: Further clarifications and wordsmithing
    m68knommu: Remove mm.h include from uaccess_no.h
    x86: get rid of user_atomic_cmpxchg_inatomic()
    generic arch_futex_atomic_op_inuser() doesn't need access_ok()
    x86: don't reload after cmpxchg in unsafe_atomic_op2() loop
    x86: convert arch_futex_atomic_op_inuser() to user_access_begin/user_access_end()
    objtool: whitelist __sanitizer_cov_trace_switch()
    [parisc, s390, sparc64] no need for access_ok() in futex handling
    sh: no need of access_ok() in arch_futex_atomic_op_inuser()
    futex: arch_futex_atomic_op_inuser() calling conventions change
    completion: Use lockdep_assert_RT_in_threaded_ctx() in complete_all()
    lockdep: Add posixtimer context tracing bits
    lockdep: Annotate irq_work
    lockdep: Add hrtimer context tracing bits
    lockdep: Introduce wait-type checks
    completion: Use simple wait queues
    sched/swait: Prepare usage in completions
    ...

    Linus Torvalds
     
  • Pull power management updates from Rafael Wysocki:
    "These clean up and rework the PM QoS API, address a suspend-to-idle
    wakeup regression on some ACPI-based platforms, clean up and extend a
    few cpuidle drivers, update multiple cpufreq drivers and cpufreq
    documentation, and fix a number of issues in devfreq and several other
    things all over.

    Specifics:

    - Clean up and rework the PM QoS API to simplify the code and reduce
    the size of it (Rafael Wysocki).

    - Fix a suspend-to-idle wakeup regression on Dell XPS13 9370 and
    similar platforms where the USB plug/unplug events are handled by
    the EC (Rafael Wysocki).

    - CLean up the intel_idle and PSCI cpuidle drivers (Rafael Wysocki,
    Ulf Hansson).

    - Extend the haltpoll cpuidle driver so that it can be forced to run
    on some systems where it refused to load (Maciej Szmigiero).

    - Convert several cpufreq documents to the .rst format and move the
    legacy driver documentation into one common file (Mauro Carvalho
    Chehab, Rafael Wysocki).

    - Update several cpufreq drivers:

    * Extend and fix the imx-cpufreq-dt driver (Anson Huang).

    * Improve the -EPROBE_DEFER handling and fix unwanted CPU
    overclocking on i.MX6ULL in imx6q-cpufreq (Anson Huang,
    Christoph Niedermaier).

    * Add support for Krait based SoCs to the qcom driver (Ansuel
    Smith).

    * Add support for OPP_PLUS to ti-cpufreq (Lokesh Vutla).

    * Add platform specific intermediate callbacks support to
    cpufreq-dt and update the imx6q driver (Peng Fan).

    * Simplify and consolidate some pieces of the intel_pstate
    driver and update its documentation (Rafael Wysocki, Alex
    Hung).

    - Fix several devfreq issues:

    * Remove unneeded extern keyword from a devfreq header file and
    use the DEVFREQ_GOV_UPDATE_INTERNAL event name instead of
    DEVFREQ_GOV_INTERNAL (Chanwoo Choi).

    * Fix the handling of dev_pm_qos_remove_request() result
    (Leonard Crestez).

    * Use constant name for userspace governor (Pierre Kuo).

    * Get rid of doc warnings and fix a typo (Christophe JAILLET).

    - Use built-in RCU list checking in some places in the PM core to
    avoid false-positive RCU usage warnings (Madhuparna Bhowmik).

    - Add explicit READ_ONCE()/WRITE_ONCE() annotations to low-level PM
    QoS routines (Qian Cai).

    - Fix removal of wakeup sources to avoid NULL pointer dereferences in
    a corner case (Neeraj Upadhyay).

    - Clean up the handling of hibernate compat ioctls and fix the
    related documentation (Eric Biggers).

    - Update the idle_inject power capping driver to use variable-length
    arrays instead of zero-length arrays (Gustavo Silva).

    - Fix list format in a PM QoS document (Randy Dunlap).

    - Make the cpufreq stats module use scnprintf() to avoid potential
    buffer overflows (Takashi Iwai).

    - Add pm_runtime_get_if_active() to PM-runtime API (Sakari Ailus).

    - Allow no domain-idle-states DT property in generic PM domains (Ulf
    Hansson).

    - Fix a broken y-axis scale in the intel_pstate_tracer utility (Doug
    Smythies)"

    * tag 'pm-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (78 commits)
    cpufreq: intel_pstate: Simplify intel_pstate_cpu_init()
    tools/power/x86/intel_pstate_tracer: fix a broken y-axis scale
    ACPI: PM: s2idle: Refine active GPEs check
    ACPICA: Allow acpi_any_gpe_status_set() to skip one GPE
    PM: sleep: wakeup: Skip wakeup_source_sysfs_remove() if device is not there
    PM / devfreq: Get rid of some doc warnings
    PM / devfreq: Fix handling dev_pm_qos_remove_request result
    PM / devfreq: Fix a typo in a comment
    PM / devfreq: Change to DEVFREQ_GOV_UPDATE_INTERVAL event name
    PM / devfreq: Remove unneeded extern keyword
    PM / devfreq: Use constant name of userspace governor
    ACPI: PM: s2idle: Fix comment in acpi_s2idle_prepare_late()
    cpufreq: qcom: Add support for krait based socs
    cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling
    cpufreq: Use scnprintf() for avoiding potential buffer overflow
    cpuidle: psci: Split psci_dt_cpu_init_idle()
    PM / Domains: Allow no domain-idle-states DT property in genpd when parsing
    PM / hibernate: Remove unnecessary compat ioctl overrides
    PM: hibernate: fix docs for ioctls that return loff_t via pointer
    Documentation: intel_pstate: update links for references
    ...

    Linus Torvalds
     
  • Pull USB / PHY updates from Greg KH:
    "Here are the big set of USB and PHY driver patches for 5.7-rc1.

    Nothing huge here, some new PHY drivers, loads of USB gadget fixes and
    updates, xhci updates, usb-serial driver updates and new device ids,
    and other minor things. Full details in the shortlog.

    All have been in linux-next for a while with no reported issues"

    * tag 'usb-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (239 commits)
    USB: cdc-acm: restore capability check order
    usb: cdns3: make signed 1 bit bitfields unsigned
    usb: gadget: fsl: remove unused variable 'driver_desc'
    usb: gadget: f_fs: Fix use after free issue as part of queue failure
    usb: typec: Correct the documentation for typec_cable_put()
    USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
    USB: serial: option: add Wistron Neweb D19Q1
    USB: serial: option: add BroadMobi BM806U
    USB: serial: option: add support for ASKEY WWHC050
    usb: core: Add ACPI support for USB interface devices
    driver core: platform: Reimplement devm_platform_ioremap_resource
    usb: dwc2: convert to devm_platform_get_and_ioremap_resource
    usb: host: hisilicon: convert to devm_platform_get_and_ioremap_resource
    usb: host: xhci-plat: convert to devm_platform_get_and_ioremap_resource
    drivers: provide devm_platform_get_and_ioremap_resource()
    phy: qcom-qusb2: Add new overriding tuning parameters in QUSB2 V2 PHY
    phy: qcom-qusb2: Add support for overriding tuning parameters in QUSB2 V2 PHY
    dt-bindings: phy: qcom-qusb2: Add support for overriding Phy tuning parameters
    phy: qcom-qusb2: Add generic QUSB2 V2 PHY support
    dt-bindings: phy: qcom,qusb2: Add compatibles for QUSB2 V2 phy and SC7180
    ...

    Linus Torvalds
     
  • Pull media updates from Mauro Carvalho Chehab:

    - New sensor driver: imx219

    - Support for some new pixelformats

    - Support for Sun8i SoC

    - Added more codecs to meson vdec driver

    - Prepare for removing the legacy usbvision driver by moving it to
    staging. This driver has issues and use legacy core APIs. If nobody
    steps up to address those, it is time for its retirement.

    - Several cleanups and improvements on drivers, with the addition of
    new supported boards

    * tag 'media/v5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (236 commits)
    media: venus: firmware: Ignore secure call error on first resume
    media: mtk-vpu: load vpu firmware from the new location
    media: i2c: video-i2c: fix build errors due to 'imply hwmon'
    media: MAINTAINERS: add myself to co-maintain Hantro G1/G2 for i.MX8MQ
    media: hantro: add initial i.MX8MQ support
    media: dt-bindings: Document i.MX8MQ VPU bindings
    media: vivid: fix incorrect PA assignment to HDMI outputs
    media: hantro: Add linux-rockchip mailing list to MAINTAINERS
    media: cedrus: h264: Fix 4K decoding on H6
    media: siano: Use scnprintf() for avoiding potential buffer overflow
    media: rc: Use scnprintf() for avoiding potential buffer overflow
    media: allegro: create new struct for channel parameters
    media: allegro: move mail definitions to separate file
    media: allegro: pass buffers through firmware
    media: allegro: verify source and destination buffer in VCU response
    media: allegro: handle dependency of bitrate and bitrate_peak
    media: allegro: read bitrate mode directly from control
    media: allegro: make QP configurable
    media: allegro: make frame rate configurable
    media: allegro: skip filler data if possible
    ...

    Linus Torvalds
     

30 Mar, 2020

1 commit

  • * pm-qos: (30 commits)
    PM: QoS: annotate data races in pm_qos_*_value()
    Documentation: power: fix pm_qos_interface.rst format warning
    PM: QoS: Make CPU latency QoS depend on CONFIG_CPU_IDLE
    Documentation: PM: QoS: Update to reflect previous code changes
    PM: QoS: Update file information comments
    PM: QoS: Drop PM_QOS_CPU_DMA_LATENCY and rename related functions
    sound: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: usb: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: tty: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: spi: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: net: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: mmc: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: media: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: hsi: Call cpu_latency_qos_*() instead of pm_qos_*()
    drm: i915: Call cpu_latency_qos_*() instead of pm_qos_*()
    x86: platform: iosf_mbi: Call cpu_latency_qos_*() instead of pm_qos_*()
    cpuidle: Call cpu_latency_qos_limit() instead of pm_qos_request()
    PM: QoS: Add CPU latency QoS API wrappers
    PM: QoS: Adjust pm_qos_request() signature and reorder pm_qos.h
    PM: QoS: Simplify definitions of CPU latency QoS trace events
    ...

    Rafael J. Wysocki
     

27 Mar, 2020

1 commit

  • commit b401f8c4f492c ("USB: cdc-acm: fix rounding error in TIOCSSERIAL")
    introduced a regression by changing the order of capability and close
    settings change checks. When running with CAP_SYS_ADMIN setting the
    close settings to the values already set resulted in -EOPNOTSUPP.

    Fix this by changing the check order back to how it was before.

    Fixes: b401f8c4f492c ("USB: cdc-acm: fix rounding error in TIOCSSERIAL")
    Cc: Anthony Mallet
    Cc: stable
    Cc: Oliver Neukum
    Signed-off-by: Matthias Reichl
    Link: https://lore.kernel.org/r/20200327150350.3657-1-hias@horus.com
    Signed-off-by: Greg Kroah-Hartman

    Matthias Reichl
     

26 Mar, 2020

6 commits

  • The signed 1 bit bitfields should be unsigned, so make them unsigned.

    Signed-off-by: Colin Ian King
    Reviewed-by: Peter Chen
    Link: https://lore.kernel.org/r/20200325125041.94769-1-colin.king@canonical.com
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     
  • drivers/usb/gadget/udc/fsl_udc_core.c:56:19:
    warning: 'driver_desc' defined but not used [-Wunused-const-variable=]

    It is never used, so remove it.

    Reported-by: Hulk Robot
    Signed-off-by: YueHaibing
    Reviewed-by: Peter Chen
    Link: https://lore.kernel.org/r/20200326071419.19240-1-yuehaibing@huawei.com
    Signed-off-by: Greg Kroah-Hartman

    YueHaibing
     
  • In AIO case, the request is freed up if ep_queue fails.
    However, io_data->req still has the reference to this freed
    request. In the case of this failure if there is aio_cancel
    call on this io_data it will lead to an invalid dequeue
    operation and a potential use after free issue.
    Fix this by setting the io_data->req to NULL when the request
    is freed as part of queue failure.

    Fixes: 2e4c7553cd6f ("usb: gadget: f_fs: add aio support")
    Signed-off-by: Sriharsha Allenki
    CC: stable
    Reviewed-by: Peter Chen
    Link: https://lore.kernel.org/r/20200326115620.12571-1-sallenki@codeaurora.org
    Signed-off-by: Greg Kroah-Hartman

    Sriharsha Allenki
     
  • typec_cable_put() function had typec_cable_get in it's documentation.
    Change it to reflect the correct name.

    Signed-off-by: Azhar Shaikh
    Link: https://lore.kernel.org/r/20200326134633.26780-1-azhar.shaikh@intel.com
    Signed-off-by: Greg Kroah-Hartman

    Azhar Shaikh
     
  • …t/johan/usb-serial into usb-next

    Johan writes:

    USB-serial updates for 5.7-rc1

    Here are the USB-serial updates for 5.7-rc1, including:

    - support for a new family of Fintek devices
    - fix for an io-edgeport slab-out-of-bounds access
    - fixes for a couple of kernel-doc issues

    Included are also various clean ups and some new modem device ids.

    All but the io-edgeport fix have been in linux-next with no reported
    issues.

    * tag 'usb-serial-5.7-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
    USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
    USB: serial: option: add Wistron Neweb D19Q1
    USB: serial: option: add BroadMobi BM806U
    USB: serial: option: add support for ASKEY WWHC050
    USB: serial: f81232: add control driver for F81534A
    USB: serial: fix tty cleanup-op kernel-doc
    USB: serial: clean up carrier-detect helper
    USB: serial: f81232: set F81534A serial port with RS232 mode
    USB: serial: f81232: add F81534A support
    USB: serial: f81232: use devm_kzalloc for port data
    USB: serial: f81232: add tx_empty function
    USB: serial: f81232: extract LSR handler
    USB: serial: digi_acceleport: remove redundant assignment to pointer priv
    USB: serial: relax unthrottle memory barrier

    Greg Kroah-Hartman
     
  • Fix slab-out-of-bounds read in the interrupt-URB completion handler.

    The boundary condition should be (length - 1) as we access
    data[position + 1].

    Reported-and-tested-by: syzbot+37ba33391ad5f3935bbd@syzkaller.appspotmail.com
    Signed-off-by: Qiujun Huang
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Cc: stable
    Signed-off-by: Johan Hovold

    Qiujun Huang
     

25 Mar, 2020

3 commits

  • This modem is embedded on dlink dwr-960 router.
    The oem configuration states:

    T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
    D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=1435 ProdID=d191 Rev=ff.ff
    S: Manufacturer=Android
    S: Product=Android
    S: SerialNumber=0123456789ABCDEF
    C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
    I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
    E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
    E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
    E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

    Tested on openwrt distribution

    Signed-off-by: Pawel Dembicki
    Cc: stable
    Signed-off-by: Johan Hovold

    Pawel Dembicki
     
  • BroadMobi BM806U is an Qualcomm MDM9225 based 3G/4G modem.
    Tested hardware BM806U is mounted on D-Link DWR-921-C3 router.

    T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
    D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=2020 ProdID=2033 Rev= 2.28
    S: Manufacturer=Mobile Connect
    S: Product=Mobile Connect
    S: SerialNumber=f842866cfd5a
    C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
    I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
    E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

    Co-developed-by: Cezary Jackiewicz
    Signed-off-by: Cezary Jackiewicz
    Signed-off-by: Pawel Dembicki
    Cc: stable
    Signed-off-by: Johan Hovold

    Pawel Dembicki
     
  • ASKEY WWHC050 is a mcie LTE modem.
    The oem configuration states:

    T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
    D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=1690 ProdID=7588 Rev=ff.ff
    S: Manufacturer=Android
    S: Product=Android
    S: SerialNumber=813f0eef6e6e
    C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
    I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
    E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
    E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

    Tested on openwrt distribution.

    Co-developed-by: Cezary Jackiewicz
    Signed-off-by: Cezary Jackiewicz
    Signed-off-by: Pawel Dembicki
    Cc: stable
    Signed-off-by: Johan Hovold

    Pawel Dembicki
     

24 Mar, 2020

4 commits

  • Currently on ACPI-enabled systems the USB interface device has no link to
    the actual firmware node and thus drivers may not parse additional information
    given in the table. The new feature, proposed here, allows to pass properties
    or other information to the drivers.

    The ACPI companion of the device has to be set for USB interface devices
    to achieve above. Use ACPI_COMPANION_SET macro to set this.

    Note, OF already does link of_node and this is the same for ACPI case.

    Signed-off-by: Andy Shevchenko
    Reviewed-by: Rafael J. Wysocki
    Link: https://lore.kernel.org/r/20200324100923.8332-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     
  • Use devm_platform_get_and_ioremap_resource() to simplify code, which
    contains platform_get_resource() and devm_ioremap_resource(), it also
    get the resource for use by the following code.

    Reviewed-by: Geert Uytterhoeven
    Acked-by: Minas Harutyunyan
    Signed-off-by: Dejin Zheng
    Link: https://lore.kernel.org/r/20200323160612.17277-5-zhengdejin5@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Dejin Zheng
     
  • Use devm_platform_get_and_ioremap_resource() to simplify code, which
    contains platform_get_resource() and devm_ioremap_resource(), it also
    get the resource for use by the following code.

    Reviewed-by: Geert Uytterhoeven
    Acked-by: Mathias Nyman
    Signed-off-by: Dejin Zheng
    Link: https://lore.kernel.org/r/20200323160612.17277-4-zhengdejin5@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Dejin Zheng
     
  • Use devm_platform_get_and_ioremap_resource() to simplify code, which
    contains platform_get_resource() and devm_ioremap_resource(), it also
    get the resource for use by the following code.

    Reviewed-by: Geert Uytterhoeven
    Acked-by: Mathias Nyman
    Signed-off-by: Dejin Zheng
    Link: https://lore.kernel.org/r/20200323160612.17277-3-zhengdejin5@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Dejin Zheng
     

23 Mar, 2020

1 commit


21 Mar, 2020

2 commits

  • completion uses a wait_queue_head_t to enqueue waiters.

    wait_queue_head_t contains a spinlock_t to protect the list of waiters
    which excludes it from being used in truly atomic context on a PREEMPT_RT
    enabled kernel.

    The spinlock in the wait queue head cannot be replaced by a raw_spinlock
    because:

    - wait queues can have custom wakeup callbacks, which acquire other
    spinlock_t locks and have potentially long execution times

    - wake_up() walks an unbounded number of list entries during the wake up
    and may wake an unbounded number of waiters.

    For simplicity and performance reasons complete() should be usable on
    PREEMPT_RT enabled kernels.

    completions do not use custom wakeup callbacks and are usually single
    waiter, except for a few corner cases.

    Replace the wait queue in the completion with a simple wait queue (swait),
    which uses a raw_spinlock_t for protecting the waiter list and therefore is
    safe to use inside truly atomic regions on PREEMPT_RT.

    There is no semantical or functional change:

    - completions use the exclusive wait mode which is what swait provides

    - complete() wakes one exclusive waiter

    - complete_all() wakes all waiters while holding the lock which protects
    the wait queue against newly incoming waiters. The conversion to swait
    preserves this behaviour.

    complete_all() might cause unbound latencies with a large number of waiters
    being woken at once, but most complete_all() usage sites are either in
    testing or initialization code or have only a really small number of
    concurrent waiters which for now does not cause a latency problem. Keep it
    simple for now.

    The fixup of the warning check in the USB gadget driver is just a straight
    forward conversion of the lockless waiter check from one waitqueue type to
    the other.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Greg Kroah-Hartman
    Reviewed-by: Davidlohr Bueso
    Reviewed-by: Joel Fernandes (Google)
    Acked-by: Linus Torvalds
    Link: https://lkml.kernel.org/r/20200321113242.317954042@linutronix.de

    Thomas Gleixner
     
  • ep_io() uses a completion on stack and open codes the waiting with:

    wait_event_interruptible (done.wait, done.done);
    and
    wait_event (done.wait, done.done);

    This waits in non-exclusive mode for complete(), but there is no reason to
    do so because the completion can only be waited for by the task itself and
    complete() wakes exactly one exlusive waiter.

    Replace the open coded implementation with the corresponding
    wait_for_completion*() functions.

    No functional change.

    Reported-by: Sebastian Andrzej Siewior
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Greg Kroah-Hartman
    Link: https://lkml.kernel.org/r/20200321113241.043380271@linutronix.de

    Thomas Gleixner
     

19 Mar, 2020

7 commits

  • …t/tegra/linux into usb-next

    Thierry writes:

    usb: tegra: Changes for v5.7-rc1

    These changes add USB OTG support for the XUSB host and XUSB device
    controllers found on NVIDIA Tegra SoCs.

    * tag 'tegra-for-5.7-usb-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
    usb: gadget: tegra-xudc: Support multiple device modes
    usb: gadget: tegra-xudc: Use phy_set_mode() to set/unset device mode
    usb: gadget: tegra-xudc: Add usb-phy support
    usb: gadget: tegra-xudc: Remove usb-role-switch support
    usb: xhci-tegra: Add OTG support
    phy: tegra: Select USB_PHY
    phy: tegra: Don't use device-managed API to allocate ports
    phy: tegra: Fix regulator leak
    phy: tegra: Print -EPROBE_DEFER error message at debug level
    phy: tegra: xusb: Don't warn on probe defer
    phy: tegra: xusb: Add Tegra194 support
    phy: tegra: xusb: Protect Tegra186 soc with config
    phy: tegra: xusb: Add set_mode support for UTMI phy on Tegra186
    phy: tegra: xusb: Add set_mode support for USB 2 phy on Tegra210
    phy: tegra: xusb: Add support to get companion USB 3 port
    phy: tegra: xusb: Add usb-phy support
    phy: tegra: xusb: Add usb-role-switch support

    Greg Kroah-Hartman
     
  • There is a spelling mistake in the module description. Fix it.

    Signed-off-by: Colin Ian King
    Link: https://lore.kernel.org/r/20200318160108.267403-1-colin.king@canonical.com
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     
  • This change supports limited multiple device modes by:
    - At most 4 ports contains OTG/Device capability.
    - One port run as device mode at a time.

    Signed-off-by: Nagarjuna Kristam
    Acked-by: Felipe Balbi
    Signed-off-by: Thierry Reding

    Nagarjuna Kristam
     
  • When device mode is set/unset, VBUS override activity is done via
    exported functions from padctl driver. Use phy_set_mode() instead.

    Signed-off-by: Nagarjuna Kristam
    Acked-by: Felipe Balbi
    Signed-off-by: Thierry Reding

    Nagarjuna Kristam
     
  • usb-phy is used to get notified on the USB role changes. Get usb-phy from
    the UTMI PHY.

    Signed-off-by: Nagarjuna Kristam
    Acked-by: Felipe Balbi
    Signed-off-by: Thierry Reding

    Nagarjuna Kristam
     
  • Padctl driver will act as a central driver to receive USB role changes via
    usb-role-switch. This is updated to corresponding host, device drivers.
    Hence remove usb-role-switch from XUDC driver.

    Signed-off-by: Nagarjuna Kristam
    Acked-by: Felipe Balbi
    [treding@nvidia.com: rebase onto Greg's usb-next branch]
    Signed-off-by: Thierry Reding

    Nagarjuna Kristam
     
  • Get usb-phy's for availbale USB 2 phys. Register id notifiers for available
    usb-phy's to receive role change notifications. Perform PP for the received
    role change usb ports.

    Signed-off-by: Nagarjuna Kristam
    [treding@nvidia.com: rebase onto Greg's usb-next branch]
    Signed-off-by: Thierry Reding

    Nagarjuna Kristam
     

18 Mar, 2020

11 commits

  • The Fintek F81534A series contains 1 HUB, 1 GPIO device and n UARTs. The
    UARTs are disabled by default and need to be enabled by the GPIO device
    (2c42:16F8).

    When F81534A plug to host, we can only see 1 HUB and 1 GPIO device and
    we write 0x8fff to GPIO device register F81534A_CTRL_CMD_ENABLE_PORT
    (116h) to enable all available serial ports.

    Signed-off-by: Ji-Ze Hong (Peter Hong)
    [johan: reword commit message and an error message slightly]
    Signed-off-by: Johan Hovold

    Ji-Ze Hong (Peter Hong)
     
  • …t/johan/usb-serial into usb-linus

    Johan writes:

    USB-serial fixes for 5.6-rc7

    Here are a couple of new device ids for 5.6-rc.

    All have been in linux-next with no reported issues.

    * tag 'usb-serial-5.6-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
    USB: serial: pl2303: add device-id for HP LD381
    USB: serial: option: add ME910G1 ECM composition 0x110b

    Greg Kroah-Hartman
     
  • By default, tty_port_init() initializes those parameters to a multiple
    of HZ. For instance in line 69 of tty_port.c:
    port->close_delay = (50 * HZ) / 100;
    https://github.com/torvalds/linux/blob/master/drivers/tty/tty_port.c#L69

    With e.g. CONFIG_HZ = 250 (as this is the case for Ubuntu 18.04
    linux-image-4.15.0-37-generic), the default setting for close_delay is
    thus 125.

    When ioctl(fd, TIOCGSERIAL, &s) is executed, the setting returned in
    user space is '12' (125/10). When ioctl(fd, TIOCSSERIAL, &s) is then
    executed with the same setting '12', the value is interpreted as '120'
    which is different from the current setting and a EPERM error may be
    raised by set_serial_info() if !CAP_SYS_ADMIN.
    https://github.com/torvalds/linux/blob/master/drivers/usb/class/cdc-acm.c#L919

    Fixes: ba2d8ce9db0a6 ("cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)")
    Signed-off-by: Anthony Mallet
    Cc: stable
    Link: https://lore.kernel.org/r/20200312133101.7096-2-anthony.mallet@laas.fr
    Signed-off-by: Greg Kroah-Hartman

    Anthony Mallet
     
  • close_delay and closing_wait are specified in hundredth of a second but stored
    internally in jiffies. Use the jiffies_to_msecs() and msecs_to_jiffies()
    functions to convert from each other.

    Signed-off-by: Anthony Mallet
    Cc: stable
    Link: https://lore.kernel.org/r/20200312133101.7096-1-anthony.mallet@laas.fr
    Signed-off-by: Greg Kroah-Hartman

    Anthony Mallet
     
  • We have been receiving bug reports that ethernet connections over
    RTL8153 based ethernet adapters stops working after a while with
    errors like these showing up in dmesg when the ethernet stops working:

    [12696.189484] r8152 6-1:1.0 enp10s0u1: Tx timeout
    [12702.333456] r8152 6-1:1.0 enp10s0u1: Tx timeout
    [12707.965422] r8152 6-1:1.0 enp10s0u1: Tx timeout

    This has been reported on Dell WD15 docks, Belkin USB-C Express Dock 3.1
    docks and with generic USB to ethernet dongles using the RTL8153
    chipsets. Some users have tried adding usbcore.quirks=0bda:8153:k to
    the kernel commandline and all users who have tried this report that
    this fixes this.

    Also note that we already have an existing NO_LPM quirk for the RTL8153
    used in the Microsoft Surface Dock (where it uses a different usb-id).

    This commit adds a NO_LPM quirk for the generic Realtek RTL8153
    0bda:8153 usb-id, fixing the Tx timeout errors on these devices.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198931
    Cc: stable@vger.kernel.org
    Cc: russianneuromancer@ya.ru
    Signed-off-by: Hans de Goede
    Link: https://lore.kernel.org/r/20200313120708.100339-1-hdegoede@redhat.com
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • The code calls pm_runtime_get_sync with irq disabled, it causes below
    warning:

    BUG: sleeping function called from invalid context at
    wer/runtime.c:1075
    in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid:
    er/u8:1
    CPU: 1 PID: 37 Comm: kworker/u8:1 Not tainted
    20200304-00181-gbebfd2a5be98 #1588
    Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
    Workqueue: ci_otg ci_otg_work
    [] (unwind_backtrace) from []
    1/0x14)
    [] (show_stack) from []
    5/0x94)
    [] (dump_stack) from []
    +0xeb/0x118)
    [] (___might_sleep) from []
    esume+0x75/0x78)
    [] (__pm_runtime_resume) from []
    0x23/0x74)
    [] (ci_udc_pullup) from []
    nect+0x2b/0xcc)
    [] (usb_gadget_connect) from []
    _connect+0x59/0x104)
    [] (ci_hdrc_gadget_connect) from []
    ssion+0x43/0x48)
    [] (ci_udc_vbus_session) from []
    s_connect+0x17/0x9c)
    [] (usb_gadget_vbus_connect) from []
    bd/0x128)
    [] (ci_otg_work) from []
    rk+0x149/0x404)
    [] (process_one_work) from []
    0xf7/0x3bc)
    [] (worker_thread) from []
    x118)
    [] (kthread) from []
    (ret_from_fork+0x11/0x34)

    Tested-by: Dmitry Osipenko
    Cc: #v5.5
    Fixes: 72dc8df7920f ("usb: chipidea: udc: protect usb interrupt enable")
    Reported-by: Dmitry Osipenko
    Signed-off-by: Peter Chen
    Link: https://lore.kernel.org/r/20200316031034.17847-2-peter.chen@kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Peter Chen
     
  • This patch corrects the SPDX License Identifier style in
    header files related to Cypress C67X00 USB Controller.
    For C header files Documentation/process/license-rules.rst
    mandates C-like comments (opposed to C source files where
    C++ style should be used).

    Changes made by using a script provided by Joe Perches here:
    https://lkml.org/lkml/2019/2/7/46.

    Suggested-by: Joe Perches
    Signed-off-by: Nishad Kamdar
    Link: https://lore.kernel.org/r/20200315104022.GA3998@nishad
    Signed-off-by: Greg Kroah-Hartman

    Nishad Kamdar
     
  • This patch corrects the SPDX License Identifier style in
    header file related to USB DSL modem support drivers.
    For C header files Documentation/process/license-rules.rst
    mandates C-like comments (opposed to C source files where
    C++ style should be used).

    Changes made by using a script provided by Joe Perches here:
    https://lkml.org/lkml/2019/2/7/46.

    Suggested-by: Joe Perches
    Signed-off-by: Nishad Kamdar
    Link: https://lore.kernel.org/r/20200315102844.GA3460@nishad
    Signed-off-by: Greg Kroah-Hartman

    Nishad Kamdar
     
  • Replace "unsigned" to "u32" for checkpatch fix to tusb_writeb().

    Signed-off-by: Macpaul Lin
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-9-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Macpaul Lin
     
  • When handling a PIO bulk transfer with highmem buffer, a temporary
    mapping is assigned to urb->transfer_buffer. After the transfer is
    complete, an invalid address is left behind in this pointer. This is
    not ordinarily a problem since nothing touches that buffer before the
    urb is released. However, when usbmon is active, usbmon_urb_complete()
    calls (indirectly) mon_bin_get_data() which does access the transfer
    buffer if it is set. To prevent an invalid memory access here, reset
    urb->transfer_buffer to NULL when finished (musb_host_rx()), or do not
    set it at all (musb_host_tx()).

    Fixes: 8e8a55165469 ("usb: musb: host: Handle highmem in PIO mode")
    Signed-off-by: Mans Rullgard
    Cc: stable@vger.kernel.org
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-8-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Mans Rullgard
     
  • Add support for probing the jz4740-musb driver on the JZ4770 SoC.

    The USB IP in the JZ4770 works the same Inventra IP as for the JZ4740,
    but it features more endpoints, and officially supports OTG.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-7-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil