4.14.155-stable review
Subsystems (6)
Greg Kroah-Hartman
maintainercover 4.14.155-stable review
This is the start of the stable review cycle for the 4.14.155 release. There are 239 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.155-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.14.155-rc1
zhong jiang <[email protected]>
memfd: Use radix_tree_deref_slot_protected to avoid the warning.
Arnd Bergmann <[email protected]>
net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused
Israel Rukshin <[email protected]>
IB/iser: Fix possible NULL deref at iser_inv_desc()
Kirill Tkhai <[email protected]>
fuse: use READ_ONCE on congestion_threshold and max_background
Chunfeng Yun <[email protected]>
usb: xhci-mtk: fix ISOC error when interval is zero
Tan Hu <[email protected]>
netfilter: masquerade: don't flush all conntracks if only one address deleted on device
Alexandre Belloni <[email protected]>
rtc: armada38x: fix possible race condition
Heiko Stuebner <[email protected]>
arm64: dts: rockchip: enable display nodes on rk3328-rock64
Rob Herring <[email protected]>
ARM: dts: lpc32xx: Fix SPI controller node names
Rob Herring <[email protected]>
arm64: dts: lg: Fix SPI controller node names
Rob Herring <[email protected]>
arm64: dts: amd: Fix SPI bus warnings
Finn Thain <[email protected]>
scsi: NCR5380: Check for bus reset
Finn Thain <[email protected]>
scsi: NCR5380: Handle BUS FREE during reselection
Finn Thain <[email protected]>
scsi: NCR5380: Don't call dsprintk() following reselection interrupt
Finn Thain <[email protected]>
scsi: NCR5380: Don't clear busy flag when abort fails
Finn Thain <[email protected]>
scsi: NCR5380: Check for invalid reselection target
Finn Thain <[email protected]>
scsi: NCR5380: Use DRIVER_SENSE to indicate valid sense data
Finn Thain <[email protected]>
scsi: NCR5380: Withhold disconnect privilege for REQUEST SENSE
Finn Thain <[email protected]>
scsi: NCR5380: Have NCR5380_select() return a bool
Hannes Reinecke <[email protected]>
scsi: NCR5380: Clear all unissued commands on host reset
Ilan Peer <[email protected]>
iwlwifi: mvm: Allow TKIP for AP mode
Johannes Berg <[email protected]>
iwlwifi: api: annotate compressed BA notif array sizes
Emmanuel Grumbach <[email protected]>
iwlwifi: dbg: don't crash if the firmware crashes in the middle of a debug dump
Dan Aloni <[email protected]>
crypto: fix a memory leak in rsa-kcs1pad's encryption mode
Christoph Manszewski <[email protected]>
crypto: s5p-sss: Fix Fix argument list alignment
Dexuan Cui <[email protected]>
x86/hyperv: Suppress "PCI: Fatal: No config space access function found"
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS
Balakrishna Godavarthi <[email protected]>
Bluetooth: hci_serdev: clear HCI_UART_PROTO_READY to avoid closing proto races
Stuart Hayes <[email protected]>
firmware: dell_rbu: Make payload memory uncachable
Rob Herring <[email protected]>
ARM: dts: realview: Fix SPI controller node names
Justin Ernst <[email protected]>
EDAC: Raise the maximum number of memory controllers
Chao Yu <[email protected]>
f2fs: mark inode dirty explicitly in recover_inode()
Chao Yu <[email protected]>
f2fs: fix to recover inode's project id during POR
YueHaibing <[email protected]>
net: faraday: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: smsc: fix return type of ndo_start_xmit function
Marc Dietrich <[email protected]>
ARM: dts: paz00: fix wakeup gpio keycode
Marcel Ziswiler <[email protected]>
ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
Marcel Ziswiler <[email protected]>
ARM: dts: tegra30: fix xcvr-setup-use-fuses
Hauke Mehrtens <[email protected]>
phy: lantiq: Fix compile warning
Jason Yan <[email protected]>
scsi: libsas: always unregister the old device if going to discover new
Alex Williamson <[email protected]>
vfio/pci: Mask buggy SR-IOV VF INTx support
Li Qiang <[email protected]>
vfio/pci: Fix potential memory leak in vfio_msi_cap_len
zhong jiang <[email protected]>
misc: genwqe: should return proper error value.
Laura Abbott <[email protected]>
misc: kgdbts: Fix restrict error
Leo Yan <[email protected]>
coresight: tmc: Fix byte-address alignment for RRP
Tomasz Nowicki <[email protected]>
coresight: etm4x: Configure EL2 exception level when kernel is running in HYP
Suzuki K Poulose <[email protected]>
coresight: perf: Disable trace path upon source error
Suzuki K Poulose <[email protected]>
coresight: perf: Fix per cpu path management
Suzuki K Poulose <[email protected]>
coresight: Fix handling of sinks
Laurent Pinchart <[email protected]>
usb: gadget: uvc: Only halt video streaming endpoint in bulk mode
Laurent Pinchart <[email protected]>
usb: gadget: uvc: Factor out video USB request queueing
Andreas Kemnade <[email protected]>
phy: phy-twl4030-usb: fix denied runtime access
Yoshihiro Shimoda <[email protected]>
phy: renesas: rcar-gen3-usb2: fix vbus_ctrl for role sysfs
Florian Fainelli <[email protected]>
phy: brcm-sata: allow PHY_BRCM_SATA driver to be built for DSL SoCs
Brendan Higgins <[email protected]>
i2c: aspeed: fix invalid clock parameters for very large divisors
Joel Pepper <[email protected]>
usb: gadget: uvc: configfs: Prevent format changes after linking header
Laurent Pinchart <[email protected]>
usb: gadget: uvc: configfs: Drop leaked references to config items
Heiko Stuebner <[email protected]>
ARM: dts: rockchip: explicitly set vcc_sd0 pin to gpio on rk3188-radxarock
Nathan Chancellor <[email protected]>
media: davinci: Fix implicit enum conversion warning
Brad Love <[email protected]>
media: au0828: Fix incorrect error messages
Jia-Ju Bai <[email protected]>
media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
Vicente Bergas <[email protected]>
arm64: dts: rockchip: Fix microSD in rk3399 sapphire board
Dengcheng Zhu <[email protected]>
MIPS: kexec: Relax memory restriction
Matthew Whitehead <[email protected]>
x86/CPU: Change query logic so CPUID is enabled before testing
Matthew Whitehead <[email protected]>
x86/CPU: Use correct macros for Cyrix calls
YueHaibing <[email protected]>
net: freescale: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: micrel: fix return type of ndo_start_xmit function
Florian Fainelli <[email protected]>
net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider
Prashant Bhole <[email protected]>
samples/bpf: fix compilation failure
Shahed Shaikh <[email protected]>
bnx2x: Ignore bandwidth attention in single function mode
Baruch Siach <[email protected]>
ARM: dts: clearfog: fix sdhci supply property name
Borislav Petkov <[email protected]>
x86/mce-inject: Reset injection struct after injection
Rob Herring <[email protected]>
ARM: dts: marvell: Fix SPI and I2C bus warnings
Stefan Agner <[email protected]>
crypto: arm/crc32 - avoid warning when compiling with Clang
Stefan Agner <[email protected]>
cpufeature: avoid warning when compiling with clang
Nathan Chancellor <[email protected]>
spi: pic32: Use proper enum in dmaengine_prep_slave_rg
Rob Herring <[email protected]>
ARM: dts: ste: Fix SPI controller node names
Linus Walleij <[email protected]>
ARM: dts: ux500: Fix LCDA clock line muxing
Geert Uytterhoeven <[email protected]>
ARM: dts: ux500: Correct SCU unit address
Chao Yu <[email protected]>
f2fs: fix to recover inode's uid/gid during POR
Grygorii Strashko <[email protected]>
ARM: dts: am335x-evm: fix number of cpsw
Petr Machata <[email protected]>
mlxsw: spectrum: Init shaper for TCs 8..15
Loic Poulain <[email protected]>
usb: chipidea: Fix otg event handler
Nicolas Adell <[email protected]>
usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started
Jakub Kicinski <[email protected]>
nfp: provide a better warning when ring allocation fails
Jian Shen <[email protected]>
net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg()
Fuyun Liang <[email protected]>
net: hns3: Fix for setting speed for phy failed problem
YueHaibing <[email protected]>
net: sun: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: amd: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: broadcom: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: xilinx: fix return type of ndo_start_xmit function
YueHaibing <[email protected]>
net: toshiba: fix return type of ndo_start_xmit function
Andreas Kemnade <[email protected]>
power: supply: twl4030_charger: disable eoc interrupt on linear charge
Andreas Kemnade <[email protected]>
power: supply: twl4030_charger: fix charging current out-of-bounds
Rob Herring <[email protected]>
libfdt: Ensure INT_MAX is defined in libfdt_env.h
Viresh Kumar <[email protected]>
OPP: Protect dev_list with opp_table lock
Håkon Bugge <[email protected]>
RDMA/i40iw: Fix incorrect iterator type
Anton Blanchard <[email protected]>
powerpc: Fix duplicate const clang warning in user access code
Nathan Fontenot <[email protected]>
powerpc/pseries: Disable CPU hotplug across migrations
Nicholas Piggin <[email protected]>
powerpc/64s/hash: Fix stab_rr off by one initialization
Breno Leitao <[email protected]>
powerpc/iommu: Avoid derefence before pointer check
YueHaibing <[email protected]>
net: hns3: fix return type of ndo_start_xmit function
Corey Minyard <[email protected]>
ipmi:dmi: Ignore IPMI SMBIOS entries with a zero base address
Peter Shih <[email protected]>
spi: mediatek: Don't modify spi_transfer when transfer.
Yonghong Song <[email protected]>
samples/bpf: fix a compilation failure
Anton Vasilyev <[email protected]>
serial: mxs-auart: Fix potential infinite loop
Marek Szyprowski <[email protected]>
serial: samsung: Enable baud clock for UART reset procedure in resume
Nava kishore Manne <[email protected]>
serial: uartps: Fix suspend functionality
Sinan Kaya <[email protected]>
PCI/ACPI: Correct error message for ASPM disabling
Julian Wiedmann <[email protected]>
s390/qeth: invoke softirqs after napi_schedule()
Dan Carpenter <[email protected]>
ath9k: Fix a locking bug in ath9k_add_interface()
Hans de Goede <[email protected]>
ACPI / LPSS: Exclude I2C busses shared with PUNIT from pmc_atom_d3_mask
Rob Herring <[email protected]>
ARM: dts: rockchip: Fix erroneous SPI bus dtc warnings on rk3036
Haishuang Yan <[email protected]>
ip_gre: fix parsing gre header in ipgre_err
Bernd Edlinger <[email protected]>
kernfs: Fix range checks in kernfs_get_target_path
Banajit Goswami <[email protected]>
component: fix loop condition to call unbind() if bind() fails
Tomasz Figa <[email protected]>
power: supply: max8998-charger: Fix platform data retrieval
Claudiu Beznea <[email protected]>
power: reset: at91-poweroff: do not procede if at91_shdwc is allocated
Dan Carpenter <[email protected]>
power: supply: ab8500_fg: silence uninitialized variable warnings
Rob Herring <[email protected]>
arm64: dts: meson: Fix erroneous SPI bus warnings
Paolo Valente <[email protected]>
blok, bfq: do not plug I/O if all queues are weight-raised
Ganesh Goudar <[email protected]>
cxgb4: Fix endianness issue in t4_fwcache()
Ludovic Desroches <[email protected]>
pinctrl: at91: don't use the same irqchip with multiple gpiochips
Dinh Nguyen <[email protected]>
ARM: dts: socfpga: Fix I2C bus unit-address error
Alan Modra <[email protected]>
powerpc/vdso: Correct call frame information
Niklas Cassel <[email protected]>
soc: qcom: wcnss_ctrl: Avoid string overflow
Christian Lamparter <[email protected]>
ARM: dts: qcom: ipq4019: fix cpu0's qcom,saw2 reg value
Cong Wang <[email protected]>
llc: avoid blocking in llc_sap_close()
Dan Carpenter <[email protected]>
pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
Takashi Iwai <[email protected]>
ALSA: intel8x0m: Register irq handler after register initializations
Jerome Brunet <[email protected]>
arm64: dts: meson: libretech: update board model
Arnd Bergmann <[email protected]>
media: dvb: fix compat ioctl translation
Lao Wei <[email protected]>
media: fix: media: pci: meye: validate offset to avoid arbitrary access
Geert Uytterhoeven <[email protected]>
media: dt-bindings: adv748x: Fix decimal unit addresses
Srinivas Kandagatla <[email protected]>
nvmem: core: return error code instead of NULL from nvmem_device_get
Michael Kelley <[email protected]>
Drivers: hv: vmbus: Fix synic per-cpu context initialization
Masami Hiramatsu <[email protected]>
kprobes: Don't call BUG_ON() if there is a kprobe in use on free list
Deepak Ukey <[email protected]>
scsi: pm80xx: Fixed system hang issue during kexec boot
Deepak Ukey <[email protected]>
scsi: pm80xx: Corrected dma_unmap_sg() parameter
Oleksij Rempel <[email protected]>
ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
George Kennedy <[email protected]>
scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
James Smart <[email protected]>
scsi: lpfc: Fix errors in log messages.
Quinn Tran <[email protected]>
scsi: qla2xxx: Fix dropped srb resource.
Quinn Tran <[email protected]>
scsi: qla2xxx: Defer chip reset until target mode is enabled
Quinn Tran <[email protected]>
scsi: qla2xxx: Fix iIDMA error
Chao Yu <[email protected]>
f2fs: fix memory leak of percpu counter in fill_super()
Eric W. Biederman <[email protected]>
signal: Properly deliver SIGSEGV from x86 uprobes
Eric W. Biederman <[email protected]>
signal: Properly deliver SIGILL from uprobes
Eric W. Biederman <[email protected]>
signal: Always ignore SIGKILL and SIGSTOP sent to the global init
Michael J. Ruhl <[email protected]>
IB/hfi1: Missing return value in error path for user sdma
Felix Fietkau <[email protected]>
ath9k: add back support for using active monitor interfaces for tx99
Alexandre Belloni <[email protected]>
rtc: pl030: fix possible race condition
Alexandre Belloni <[email protected]>
rtc: mt6397: fix possible race condition
Qiuxu Zhuo <[email protected]>
EDAC, sb_edac: Return early on ADDRV bit and address type test
Daniel Silsby <[email protected]>
dmaengine: dma-jz4780: Further residue status fix
Paul Cercueil <[email protected]>
dmaengine: dma-jz4780: Don't depend on MACH_JZ4780
Vicente Bergas <[email protected]>
arm64: dts: rockchip: Fix VCC5V0_HOST_EN on rk3399-sapphire
Uwe Kleine-König <[email protected]>
sched/debug: Use symbolic names for task state constants
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: keep vpll2 always on
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: fix touchscreen tsc2007
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: tvout: enable as display1 alias
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: fixes for tvout / venc
H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
Rob Herring <[email protected]>
of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
Yong Zhi <[email protected]>
ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation
Ding Xiang <[email protected]>
mips: txx9: fix iounmap related issue
Parav Pandit <[email protected]>
RDMA/core: Follow correct unregister order between sysfs and cgroup
Parav Pandit <[email protected]>
RDMA/core: Rate limit MAD error messages
Muhammad Sammar <[email protected]>
IB/ipoib: Ensure that MTU isn't less than minimum permitted
Erik Stromdahl <[email protected]>
ath10k: wmi: disable softirq's while calling ieee80211_rx
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMIC
Colin Ian King <[email protected]>
ASoC: sgtl5000: avoid division by zero if lo_vag is zero
Stefan Wahren <[email protected]>
net: lan78xx: Bail out if lan78xx_get_endpoints fails
Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: fix the clock controller register size
Martin Blumenstingl <[email protected]>
ARM: dts: meson8: fix the clock controller register size
Quentin Schulz <[email protected]>
net: phy: mscc: read 'vsc8531, edge-slowdown' as an u32
Quentin Schulz <[email protected]>
net: phy: mscc: read 'vsc8531,vddmac' as an u32
Jiada Wang <[email protected]>
ASoC: rsnd: ssi: Fix issue in dma data address assignment
Sven Schmitt <[email protected]>
soc: imx: gpc: fix PDN delay
Larry Finger <[email protected]>
rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
Marcel Ziswiler <[email protected]>
ARM: dts: pxa: fix power i2c base address
Robert Jarzmik <[email protected]>
ARM: dts: pxa: fix the rtc controller
Sara Sharon <[email protected]>
iwlwifi: mvm: avoid sending too many BARs
Johannes Berg <[email protected]>
iwlwifi: don't WARN on trying to dump dead firmware
Vijay Immanuel <[email protected]>
IB/rxe: fixes for rdma read retry
Patryk Małek <[email protected]>
i40e: Prevent deleting MAC address from VF when set by PF
Patryk Małek <[email protected]>
i40e: hold the rtnl lock on clearing interrupt scheme
Mitch Williams <[email protected]>
i40e: use correct length for strncpy
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks
Rick Farrington <[email protected]>
liquidio: fix race condition in instruction completion processing
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
Tuomas Tynkkynen <[email protected]>
MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
Paul Cercueil <[email protected]>
pinctrl: ingenic: Probe driver at subsys_initcall
Charles Keepax <[email protected]>
ASoC: dpcm: Properly initialise hw->rate_max
Bob Peterson <[email protected]>
gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated
Sven Eckelmann <[email protected]>
ath10k: limit available channels via DT ieee80211-freq-limit
Felix Fietkau <[email protected]>
ath9k: fix tx99 with monitor mode interface
Takashi Iwai <[email protected]>
ALSA: seq: Do error checks at creating system ports
Rajeev Kumar Sirasanagandla <[email protected]>
cfg80211: Avoid regulatory restore when COUNTRY_IE_IGNORE is set
Andy Shevchenko <[email protected]>
extcon: cht-wc: Return from default case to avoid warnings
Bjorn Andersson <[email protected]>
remoteproc/davinci: Use %zx for formating size_t
Alexandre Belloni <[email protected]>
rtc: rv8803: fix the rv8803 id in the OF table
Jay Foster <[email protected]>
ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
Aapo Vienamo <[email protected]>
arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply
Dan Carpenter <[email protected]>
ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
Andre Przywara <[email protected]>
arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage
Andre Przywara <[email protected]>
arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage
Marcus Folkesson <[email protected]>
iio: dac: mcp4922: fix error handling in mcp4922_write_raw
Tamizh chelvam <[email protected]>
ath10k: fix kernel panic by moving pci flush after napi_disable
Ard Biesheuvel <[email protected]>
tee: optee: take DT status property into account
Stefan Agner <[email protected]>
iio: adc: max9611: explicitly cast gain_selectors
Eugen Hristev <[email protected]>
mmc: sdhci-of-at91: fix quirk2 overwrite
Roman Gushchin <[email protected]>
mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
Roman Gushchin <[email protected]>
mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
Eric Auger <[email protected]>
iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
Al Viro <[email protected]>
ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
Al Viro <[email protected]>
ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
Kai-Heng Feng <[email protected]>
x86/quirks: Disable HPET on Intel Coffe Lake platforms
Hans de Goede <[email protected]>
i2c: acpi: Force bus speed to 400KHz if a Silead touchscreen is present
James Erwin <[email protected]>
IB/hfi1: Ensure full Gen3 speed in a Gen4 system
Chuhong Yuan <[email protected]>
Input: synaptics-rmi4 - destroy F54 poller workqueue when removing
Lucas Stach <[email protected]>
Input: synaptics-rmi4 - clear IRQ enables for F54
Andrew Duggan <[email protected]>
Input: synaptics-rmi4 - do not consume more data than we have (F11, F12)
Andrew Duggan <[email protected]>
Input: synaptics-rmi4 - disable the relative position IRQ in the F12 driver
Lucas Stach <[email protected]>
Input: synaptics-rmi4 - fix video buffer size
Oliver Neukum <[email protected]>
Input: ff-memless - kill timer in destroy()
Henry Lin <[email protected]>
ALSA: usb-audio: not submit urb for stopped endpoint
Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix missing error check at mixer resolution test
Jouni Hogander <[email protected]>
slip: Fix memory leak in slip_open error path
Aleksander Morgado <[email protected]>
net: usb: qmi_wwan: add support for Foxconn T77W968 LTE modules
Oliver Neukum <[email protected]>
ax88172a: fix information leak on short answers
Anju T Sudhakar <[email protected]>
powerpc/perf: Fix kfree memory allocated for nest pmus
Madhavan Srinivasan <[email protected]>
powerpc/perf: Fix IMC_MAX_PMU macro
Evan Green <[email protected]>
Revert "Input: synaptics-rmi4 - avoid processing unknown IRQs"
Michael Schmitz <[email protected]>
scsi: core: Handle drivers which set sg_tablesize to zero
Jonas Gorski <[email protected]>
MIPS: BCM63XX: fix switch core reset on BCM6368
Paolo Bonzini <[email protected]>
KVM: x86: introduce is_pae_paging
Junaid Shahid <[email protected]>
kvm: mmu: Don't read PDPTEs when paging is not enabled
-------------
Diffstat:
.../devicetree/bindings/media/i2c/adv748x.txt | 4 +- .../devicetree/bindings/net/brcm,unimac-mdio.txt | 3 + Makefile | 4 +- arch/arm/boot/compressed/libfdt_env.h | 2 + arch/arm/boot/dts/am335x-evm.dts | 12 +- arch/arm/boot/dts/arm-realview-eb.dtsi | 2 +- arch/arm/boot/dts/arm-realview-pb1176.dts | 2 +- arch/arm/boot/dts/arm-realview-pb11mp.dts | 2 +- arch/arm/boot/dts/arm-realview-pbx.dtsi | 2 +- arch/arm/boot/dts/armada-388-clearfog.dtsi | 2 +- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- arch/arm/boot/dts/dove-cubox.dts | 2 +- arch/arm/boot/dts/dove.dtsi | 6 +- arch/arm/boot/dts/exynos5250-arndale.dts | 9 ++ arch/arm/boot/dts/exynos5250-snow-rev5.dts | 11 ++ arch/arm/boot/dts/exynos5420-peach-pit.dts | 3 + arch/arm/boot/dts/exynos5800-peach-pi.dts | 3 + arch/arm/boot/dts/lpc32xx.dtsi | 4 +- arch/arm/boot/dts/meson8.dtsi | 2 +- arch/arm/boot/dts/meson8b.dtsi | 2 +- arch/arm/boot/dts/omap3-gta04.dtsi | 49 +++++-- arch/arm/boot/dts/orion5x-linkstation.dtsi | 2 +- arch/arm/boot/dts/pxa25x.dtsi | 4 + arch/arm/boot/dts/pxa27x.dtsi | 6 +- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +- arch/arm/boot/dts/rk3036.dtsi | 2 +- arch/arm/boot/dts/rk3188-radxarock.dts | 8 ++ arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +- arch/arm/boot/dts/ste-dbx5x0.dtsi | 6 +- arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | 8 +- arch/arm/boot/dts/ste-hrefprev60.dtsi | 2 +- arch/arm/boot/dts/ste-snowball.dts | 2 +- arch/arm/boot/dts/ste-u300.dts | 2 +- arch/arm/boot/dts/tegra20-paz00.dts | 6 +- arch/arm/boot/dts/tegra30-apalis.dtsi | 6 +- arch/arm/boot/dts/tegra30.dtsi | 6 +- arch/arm/boot/dts/versatile-ab.dts | 2 +- arch/arm/crypto/crc32-ce-glue.c | 2 +- arch/arm/mach-imx/pm-imx6.c | 25 ++++ .../boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 6 +- .../boot/dts/allwinner/sun50i-a64-olinuxino.dts | 8 +- arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 4 +- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 +- .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +- arch/arm64/boot/dts/lg/lg1312.dtsi | 4 +- arch/arm64/boot/dts/lg/lg1313.dtsi | 4 +- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 16 +++ arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 26 +++- arch/mips/bcm47xx/workarounds.c | 8 +- arch/mips/bcm63xx/reset.c | 2 +- arch/mips/include/asm/kexec.h | 6 +- arch/mips/txx9/generic/setup.c | 5 +- arch/powerpc/boot/libfdt_env.h | 2 + arch/powerpc/include/asm/imc-pmu.h | 6 +- arch/powerpc/include/asm/uaccess.h | 6 +- arch/powerpc/kernel/iommu.c | 2 +- arch/powerpc/kernel/rtas.c | 2 + arch/powerpc/kernel/vdso32/datapage.S | 1 + arch/powerpc/kernel/vdso32/gettimeofday.S | 1 + arch/powerpc/kernel/vdso64/datapage.S | 1 + arch/powerpc/kernel/vdso64/gettimeofday.S | 1 + arch/powerpc/mm/slb.c | 2 +- arch/powerpc/perf/imc-pmu.c | 17 ++- arch/powerpc/platforms/powernv/opal-imc.c | 16 +++ arch/x86/hyperv/hv_init.c | 19 +++ arch/x86/kernel/cpu/common.c | 4 +- arch/x86/kernel/cpu/cyrix.c | 2 +- arch/x86/kernel/cpu/mcheck/mce-inject.c | 6 + arch/x86/kernel/early-quirks.c | 2 + arch/x86/kernel/uprobes.c | 2 +- arch/x86/kvm/vmx.c | 7 +- arch/x86/kvm/x86.c | 8 +- arch/x86/kvm/x86.h | 5 + block/bfq-iosched.c | 10 +- crypto/rsa-pkcs1pad.c | 9 -- drivers/acpi/acpi_lpss.c | 22 ++- drivers/acpi/pci_root.c | 5 +- drivers/base/component.c | 6 +- drivers/base/power/opp/core.c | 21 ++- drivers/base/power/opp/cpu.c | 2 + drivers/base/power/opp/opp.h | 2 +- drivers/bluetooth/hci_serdev.c | 1 + drivers/char/ipmi/ipmi_dmi.c | 4 + drivers/crypto/s5p-sss.c | 4 +- drivers/dma/Kconfig | 2 +- drivers/dma/dma-jz4780.c | 2 +- drivers/edac/sb_edac.c | 68 ++++----- drivers/extcon/extcon-intel-cht-wc.c | 2 +- drivers/firmware/dell_rbu.c | 8 ++ drivers/hv/hv.c | 15 +- drivers/hwtracing/coresight/coresight-etm-perf.c | 59 +++++--- drivers/hwtracing/coresight/coresight-etm4x.c | 40 +++--- drivers/hwtracing/coresight/coresight-tmc-etf.c | 4 +- drivers/hwtracing/coresight/coresight.c | 22 ++- drivers/i2c/busses/i2c-aspeed.c | 65 ++++++--- drivers/i2c/i2c-core-acpi.c | 28 +++- drivers/iio/adc/max9611.c | 2 +- drivers/iio/dac/mcp4922.c | 11 +- drivers/infiniband/core/device.c | 2 +- drivers/infiniband/core/mad.c | 72 +++++----- drivers/infiniband/hw/hfi1/pcie.c | 4 +- drivers/infiniband/hw/hfi1/user_sdma.c | 4 +- drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- drivers/infiniband/sw/rxe/rxe_comp.c | 21 ++- drivers/infiniband/sw/rxe/rxe_req.c | 15 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +- drivers/infiniband/ulp/iser/iser_initiator.c | 18 ++- drivers/input/ff-memless.c | 9 ++ drivers/input/rmi4/rmi_driver.c | 6 +- drivers/input/rmi4/rmi_f11.c | 4 +- drivers/input/rmi4/rmi_f12.c | 32 ++++- drivers/input/rmi4/rmi_f54.c | 5 +- drivers/media/pci/ivtv/ivtv-yuv.c | 2 +- drivers/media/pci/meye/meye.c | 2 +- drivers/media/platform/davinci/vpbe_display.c | 2 +- drivers/media/usb/au0828/au0828-core.c | 4 +- drivers/misc/genwqe/card_utils.c | 13 +- drivers/misc/kgdbts.c | 16 +-- drivers/mmc/host/sdhci-of-at91.c | 2 +- drivers/net/ethernet/amd/am79c961a.c | 2 +- drivers/net/ethernet/amd/atarilance.c | 6 +- drivers/net/ethernet/amd/declance.c | 2 +- drivers/net/ethernet/amd/sun3lance.c | 6 +- drivers/net/ethernet/amd/sunlance.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 4 +- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++ drivers/net/ethernet/broadcom/sb1250-mac.c | 4 +- .../net/ethernet/cavium/liquidio/octeon_device.c | 5 +- drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 + .../net/ethernet/cavium/liquidio/request_manager.c | 2 + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- drivers/net/ethernet/faraday/ftgmac100.c | 4 +- drivers/net/ethernet/faraday/ftmac100.c | 7 +- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 +- drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 +- .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 +- drivers/net/ethernet/freescale/gianfar.c | 4 +- drivers/net/ethernet/freescale/ucc_geth.c | 3 +- drivers/net/ethernet/hisilicon/hip04_eth.c | 3 +- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++ drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 7 + drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 16 ++- drivers/net/ethernet/smsc/smc911x.c | 3 +- drivers/net/ethernet/smsc/smc91x.c | 3 +- drivers/net/ethernet/smsc/smsc911x.c | 3 +- drivers/net/ethernet/sun/ldmvsw.c | 2 +- drivers/net/ethernet/sun/sunbmac.c | 3 +- drivers/net/ethernet/sun/sunqe.c | 2 +- drivers/net/ethernet/sun/sunvnet.c | 2 +- drivers/net/ethernet/sun/sunvnet_common.c | 14 +- drivers/net/ethernet/sun/sunvnet_common.h | 7 +- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 4 +- drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +- drivers/net/ethernet/toshiba/spider_net.c | 4 +- drivers/net/ethernet/toshiba/tc35815.c | 6 +- drivers/net/ethernet/xilinx/ll_temac_main.c | 3 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 +- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 9 +- drivers/net/phy/mdio-bcm-unimac.c | 83 ++++++++++- drivers/net/phy/mscc.c | 11 +- drivers/net/slip/slip.c | 1 + drivers/net/usb/ax88172a.c | 2 +- drivers/net/usb/lan78xx.c | 5 + drivers/net/usb/qmi_wwan.c | 2 + drivers/net/wireless/ath/ath10k/ahb.c | 4 +- drivers/net/wireless/ath/ath10k/mac.c | 2 + drivers/net/wireless/ath/ath10k/pci.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 3 +- drivers/net/wireless/ath/ath9k/main.c | 1 - drivers/net/wireless/ath/ath9k/tx99.c | 10 +- drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 6 +- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 9 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 - drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++ .../net/wireless/realtek/rtl818x/rtl8187/leds.c | 2 +- drivers/nvmem/core.c | 2 +- drivers/of/base.c | 2 +- drivers/phy/broadcom/Kconfig | 3 +- drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 1 - drivers/phy/renesas/phy-rcar-gen3-usb2.c | 2 +- drivers/phy/ti/phy-twl4030-usb.c | 29 ++++ drivers/pinctrl/pinctrl-at91-pio4.c | 8 +- drivers/pinctrl/pinctrl-at91.c | 28 ++-- drivers/pinctrl/pinctrl-ingenic.c | 2 +- drivers/power/reset/at91-sama5d2_shdwc.c | 3 + drivers/power/supply/ab8500_fg.c | 31 ++-- drivers/power/supply/max8998_charger.c | 2 +- drivers/power/supply/twl4030_charger.c | 30 +++- drivers/remoteproc/da8xx_remoteproc.c | 2 +- drivers/rtc/rtc-armada38x.c | 22 +-- drivers/rtc/rtc-mt6397.c | 13 +- drivers/rtc/rtc-pl030.c | 15 +- drivers/rtc/rtc-rv8803.c | 2 +- drivers/s390/net/qeth_l2_main.c | 3 + drivers/s390/net/qeth_l3_main.c | 3 + drivers/scsi/NCR5380.c | 156 ++++++++++++--------- drivers/scsi/NCR5380.h | 2 +- drivers/scsi/libsas/sas_expander.c | 13 +- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 7 +- drivers/scsi/pm8001/pm8001_hwi.c | 6 + drivers/scsi/pm8001/pm8001_sas.c | 9 +- drivers/scsi/pm8001/pm8001_sas.h | 1 + drivers/scsi/pm8001/pm80xx_hwi.c | 80 ++++++++++- drivers/scsi/pm8001/pm80xx_hwi.h | 3 + drivers/scsi/qla2xxx/qla_gs.c | 4 +- drivers/scsi/qla2xxx/qla_isr.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 28 +++- drivers/scsi/scsi_lib.c | 3 +- drivers/scsi/sym53c8xx_2/sym_hipd.c | 15 +- drivers/soc/imx/gpc.c | 2 +- drivers/soc/qcom/wcnss_ctrl.c | 2 +- drivers/spi/spi-mt65xx.c | 37 ++--- drivers/spi/spi-pic32.c | 4 +- drivers/tee/optee/core.c | 2 +- drivers/tty/serial/mxs-auart.c | 3 +- drivers/tty/serial/samsung.c | 8 ++ drivers/tty/serial/xilinx_uartps.c | 41 ++---- drivers/usb/chipidea/otg.c | 9 +- drivers/usb/chipidea/usbmisc_imx.c | 2 + drivers/usb/gadget/function/uvc_configfs.c | 7 + drivers/usb/gadget/function/uvc_video.c | 32 +++-- drivers/usb/host/xhci-mtk-sch.c | 4 +- drivers/vfio/pci/vfio_pci.c | 8 +- drivers/vfio/pci/vfio_pci_config.c | 31 +++- fs/compat_ioctl.c | 10 +- fs/ecryptfs/inode.c | 19 ++- fs/f2fs/recovery.c | 17 +++ fs/f2fs/super.c | 6 +- fs/fuse/control.c | 4 +- fs/gfs2/rgrp.c | 2 +- fs/kernfs/symlink.c | 5 +- include/linux/cpufeature.h | 2 +- include/linux/edac.h | 3 +- include/linux/intel-iommu.h | 6 +- include/linux/libfdt_env.h | 1 + include/net/llc.h | 1 + include/trace/events/sched.h | 11 +- kernel/events/uprobes.c | 4 +- kernel/kprobes.c | 8 +- kernel/signal.c | 4 + mm/hugetlb_cgroup.c | 2 +- mm/memcontrol.c | 2 +- mm/shmem.c | 2 +- net/bluetooth/l2cap_core.c | 10 ++ net/ipv4/gre_demux.c | 7 +- net/ipv4/ip_gre.c | 9 +- net/ipv4/netfilter/nf_nat_masquerade_ipv4.c | 22 ++- net/ipv6/netfilter/nf_nat_masquerade_ipv6.c | 19 ++- net/llc/llc_core.c | 4 +- net/wireless/reg.c | 46 ++++++ samples/bpf/sockex2_kern.c | 11 +- samples/bpf/sockex3_kern.c | 8 +- samples/bpf/sockex3_user.c | 4 +- sound/core/oss/pcm_plugin.c | 4 +- sound/core/seq/seq_system.c | 18 ++- sound/pci/intel8x0m.c | 20 +-- sound/soc/codecs/hdac_hdmi.c | 6 + sound/soc/codecs/sgtl5000.c | 2 +- sound/soc/sh/rcar/rsnd.h | 1 + sound/soc/sh/rcar/ssi.c | 4 +- sound/soc/soc-pcm.c | 2 +- sound/usb/endpoint.c | 3 + sound/usb/mixer.c | 4 +- 274 files changed, 1733 insertions(+), 750 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/239 kvm: mmu: Dont read PDPTEs when paging is not enabled
From: Junaid Shahid <[email protected]>
[ Upstream commit d35b34a9a70edae7ef923f100e51b8b5ae9fe899 ]
kvm should not attempt to read guest PDPTEs when CR0.PG = 0 and CR4.PAE = 1.
--- arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/x86.c +2 -2
@@ -620,7 +620,7 @@ bool pdptrs_changed(struct kvm_vcpu *vcpu)gfn_t gfn;int r; -if (is_long_mode (vcpu) || !is_pae (vcpu)) +if (is_long_mode (vcpu) || !is_pae (vcpu) || !is_paging (vcpu))return false; if (!test_bit(VCPU_EXREG_PDPTR,
@@ -7787,7 +7787,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,kvm_update_cpuid (vcpu); idx =srcu_read_lock (&vcpu->kvm->srcu); -if (!is_long_mode (vcpu) &&is_pae (vcpu)) { +if (!is_long_mode (vcpu) &&is_pae (vcpu) &&is_paging (vcpu)) {load_pdptrs (vcpu, vcpu->arch.walk_mmu,kvm_read_cr3 (vcpu)); mmu_reset_needed =1 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 2/239 KVM: x86: introduce is_pae_paging
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
[ Upstream commit bf03d4f9334728bf7c8ffc7de787df48abd6340e ]
Checking for 32-bit PAE is quite common around code that fiddles with the PDPTRs. Add a function to compress all checks into a single invocation.
Moving to the common helper also fixes a subtle bug in kvm_set_cr3() where it fails to check is_long_mode() and results in KVM incorrectly attempting to load PDPTRs for a 64-bit guest.
--- arch/x86/kvm/vmx.c | 7 +++---- arch/x86/kvm/x86.c | 8 ++++---- arch/x86/kvm/x86.h | 5 +++++ 3 files changed, 12 insertions(+), 8 deletions(-)
arch/x86/kvm/vmx.c +3 -4
@@ -4468,7 +4468,7 @@ static void ept_load_pdptrs(struct kvm_vcpu *vcpu) (unsigned long *)&vcpu->arch.regs_dirty))return ; -if (is_paging (vcpu) &&is_pae (vcpu) && !is_long_mode (vcpu)) { +if (is_pae_paging (vcpu)) {vmcs_write64 (GUEST_PDPTR0 , mmu->pdptrs[0 ]);vmcs_write64 (GUEST_PDPTR1 , mmu->pdptrs[1 ]);vmcs_write64 (GUEST_PDPTR2 , mmu->pdptrs[2 ]);
@@ -4480,7 +4480,7 @@ static void ept_save_pdptrs(struct kvm_vcpu *vcpu) {struct kvm_mmu *mmu = vcpu->arch.walk_mmu; -if (is_paging (vcpu) &&is_pae (vcpu) && !is_long_mode (vcpu)) { +if (is_pae_paging (vcpu)) { mmu->pdptrs[0 ] =vmcs_read64 (GUEST_PDPTR0 ); mmu->pdptrs[1 ] =vmcs_read64 (GUEST_PDPTR1 ); mmu->pdptrs[2 ] =vmcs_read64 (GUEST_PDPTR2 );
@@ -10906,8 +10906,7 @@ static int nested_vmx_load_cr3(struct kvm_vcpu *vcpu, unsigned long cr3, bool ne* If PAE paging and EPT are both on, CR3 is not used by the CPU and * must not be dereferenced. */ -if (!is_long_mode (vcpu) &&is_pae (vcpu) &&is_paging (vcpu) && - !nested_ept) { +if (is_pae_paging (vcpu) && !nested_ept) {if (!load_pdptrs (vcpu, vcpu->arch.walk_mmu, cr3)) { *entry_failure_code =ENTRY_FAIL_PDPTE ;return 1 ;
arch/x86/kvm/x86.c +4 -4
@@ -620,7 +620,7 @@ bool pdptrs_changed(struct kvm_vcpu *vcpu)gfn_t gfn;int r; -if (is_long_mode (vcpu) || !is_pae (vcpu) || !is_paging (vcpu)) +if (!is_pae_paging (vcpu))return false; if (!test_bit(VCPU_EXREG_PDPTR,
@@ -849,8 +849,8 @@ int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)if (is_long_mode (vcpu) && (cr3 &rsvd_bits (cpuid_maxphyaddr (vcpu),63 )))return 1 ; -else if (is_pae (vcpu) &&is_paging (vcpu) && - !load_pdptrs (vcpu, vcpu->arch.walk_mmu, cr3)) +else if (is_pae_paging (vcpu) && + !load_pdptrs (vcpu, vcpu->arch.walk_mmu, cr3))return 1 ; vcpu->arch.cr3 = cr3;
@@ -7787,7 +7787,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,kvm_update_cpuid (vcpu); idx =srcu_read_lock (&vcpu->kvm->srcu); -if (!is_long_mode (vcpu) &&is_pae (vcpu) &&is_paging (vcpu)) { +if (is_pae_paging (vcpu)) {load_pdptrs (vcpu, vcpu->arch.walk_mmu,kvm_read_cr3 (vcpu)); mmu_reset_needed =1 ; }
arch/x86/kvm/x86.h +5 -0
@@ -94,6 +94,11 @@ static inline int is_paging(struct kvm_vcpu *vcpu)return likely (kvm_read_cr0_bits (vcpu,X86_CR0_PG )); } +static inline bool is_pae_paging (struct kvm_vcpu *vcpu) +{ +return !is_long_mode (vcpu) &&is_pae (vcpu) &&is_paging (vcpu); +} +static inline u32 bit (int bitno) {return 1 << (bitno &31 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 3/239 MIPS: BCM63XX: fix switch core reset on BCM6368
In reply to Greg Kroah-HartmanFrom: Jonas Gorski <[email protected]>
commit 8a38dacf87180738d42b058334c951eba15d2d47 upstream.
The Ethernet Switch core mask was set to 0, causing the switch core to be not reset on BCM6368 on boot. Provide the proper mask so the switch core gets reset to a known good state.
--- arch/mips/bcm63xx/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/bcm63xx/reset.c +1 -1
@@ -120,7 +120,7 @@#define BCM6368_RESET_DSL 0#define BCM6368_RESET_SAR SOFTRESET_6368_SAR_MASK#define BCM6368_RESET_EPHY SOFTRESET_6368_EPHY_MASK -#define BCM6368_RESET_ENETSW 0 +#define BCM6368_RESET_ENETSW SOFTRESET_6368_ENETSW_MASK#define BCM6368_RESET_PCM SOFTRESET_6368_PCM_MASK#define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK#define BCM6368_RESET_PCIE 0
Greg Kroah-Hartman
maintainerPATCH 4/239 scsi: core: Handle drivers which set sg_tablesize to zero
In reply to Greg Kroah-HartmanFrom: Michael Schmitz <[email protected]>
commit 9393c8de628cf0968d81a17cc11841e42191e041 upstream.
In scsi_mq_setup_tags(), cmd_size is calculated based on zero size for the scatter-gather list in case the low level driver uses SG_NONE in its host template.
cmd_size is passed on to the block layer for calculation of the request size, and we've seen NULL pointer dereference errors from the block layer in drivers where SG_NONE is used and a mq IO scheduler is active, apparently as a consequence of this (see commit 68ab2d76e4be ("scsi:
cxlflash: Set sg_tablesize to 1 instead of SG_NONE"), and a recent patch by Finn Thain converting the three m68k NFR5380 drivers to avoid setting SG_NONE).
Try to avoid these errors by accounting for at least one sg list entry when calculating cmd_size, regardless of whether the low level driver set a zero sg_tablesize.
Tested on 030 m68k with the atari_scsi driver - setting sg_tablesize to SG_NONE no longer results in a crash when loading this driver.
--- drivers/scsi/scsi_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/scsi_lib.c +2 -1
@@ -2277,7 +2277,8 @@ int scsi_mq_setup_tags(struct Scsi_Host {unsigned int cmd_size, sgl_size; - sgl_size =scsi_mq_sgl_size (shost); + sgl_size = max_t(unsigned int, sizeof(struct scatterlist), +scsi_mq_sgl_size (shost)); cmd_size =sizeof (struct scsi_cmnd ) + shost->hostt->cmd_size + sgl_size;if (scsi_host_get_prot (shost)) cmd_size +=sizeof (struct scsi_data_buffer ) + sgl_size;
Greg Kroah-Hartman
maintainerPATCH 5/239 Revert "Input: synaptics-rmi4 - avoid processing unknown IRQs"
In reply to Greg Kroah-HartmanFrom: Evan Green <[email protected]>
This reverts commit 7b9f7a928255a232012be55cb95db30e963b83a7.
That change should have had a fixes tag for
commit 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain"). The conversion to irq_domain introduced the issue being fixed by this commit.
In older kernels the bitmap IRQ accounting is done differently, and it doesn't suffer from the same issue of calling handle_nested_irq(0). Keeping this commit on kernels 4.14 and older causes problems with touchpads due to the different semantics of the IRQ bitmasks.
--- drivers/input/rmi4/rmi_driver.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/input/rmi4/rmi_driver.c +1 -5
@@ -165,7 +165,7 @@ static int rmi_process_interrupt_request }mutex_lock (&data->irq_mutex); -bitmap_and (data->irq_status, data->irq_status, data->fn_irq_bits, +bitmap_and (data->irq_status, data->irq_status, data->current_irq_mask, data->irq_count);/* * At this point, irq_status has all bits that are set in the
@@ -412,8 +412,6 @@ static int rmi_driver_set_irq_bits(strucbitmap_copy (data->current_irq_mask, data->new_irq_mask, data->num_of_irq_regs); -bitmap_or (data->fn_irq_bits, data->fn_irq_bits, mask, data->irq_count); - error_unlock:mutex_unlock (&data->irq_mutex);return error;
@@ -427,8 +425,6 @@ static int rmi_driver_clear_irq_bits(strstruct device *dev = &rmi_dev->dev;mutex_lock (&data->irq_mutex); -bitmap_andnot (data->fn_irq_bits, - data->fn_irq_bits, mask, data->irq_count);bitmap_andnot (data->new_irq_mask, data->current_irq_mask, mask, data->irq_count);
Greg Kroah-Hartman
maintainerPATCH 6/239 powerpc/perf: Fix IMC_MAX_PMU macro
In reply to Greg Kroah-HartmanFrom: Madhavan Srinivasan <[email protected]>
commit 73ce9aec65b17433e18163d07eb5cb6bf114bd6c upstream.
IMC_MAX_PMU is used for static storage (per_nest_pmu_arr) which holds nest pmu information. Current value for the macro is 32 based on the initial number of nest pmu units supported by the nest microcode. But going forward, microcode could support more nest units. Instead of static storage, patch to fix the code to dynamically allocate an array based on the number of nest imc units found in the device tree.
--- arch/powerpc/include/asm/imc-pmu.h | 6 +----- arch/powerpc/perf/imc-pmu.c | 15 ++++++++++++--- arch/powerpc/platforms/powernv/opal-imc.c | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-)
arch/powerpc/include/asm/imc-pmu.h +1 -5
@@ -21,11 +21,6 @@#include <asm/opal.h> /* -* For static allocation of some of the structures. -*/ -#define IMC_MAX_PMUS 32 - -/* * Compatibility macros for IMC devices */ #define IMC_DTB_COMPAT "ibm,opal-in-memory-counters"
@@ -125,4 +120,5 @@ enum {extern int init_imc_pmu (struct device_node *parent,struct imc_pmu *pmu_ptr,int pmu_id);extern void thread_imc_disable (void ); +extern int get_max_nest_dev (void );#endif /* __ASM_POWERPC_IMC_PMU_H */
arch/powerpc/perf/imc-pmu.c +12 -3
@@ -26,7 +26,7 @@*/ static DEFINE_MUTEX (nest_init_lock); static DEFINE_PER_CPU(struct imc_pmu_ref *, local_nest_imc_refc); -static struct imc_pmu *per_nest_pmu_arr[IMC_MAX_PMUS ]; +static struct imc_pmu **per_nest_pmu_arr;static cpumask_t nest_imc_cpumask;struct imc_pmu_ref *nest_imc_refc;static int nest_pmus;
@@ -286,13 +286,14 @@ static struct imc_pmu_ref *get_nest_pmu_static void nest_change_cpu_context (int old_cpu,int new_cpu) {struct imc_pmu **pn = per_nest_pmu_arr; -int i;if (old_cpu <0 || new_cpu <0 )return ; -for (i =0 ; *pn && i <IMC_MAX_PMUS ; i++, pn++) +while (*pn) {perf_pmu_migrate_context (&(*pn)->pmu, old_cpu, new_cpu); + pn++; + } }static int ppc_nest_imc_cpu_offline (unsigned int cpu)
@@ -1212,6 +1213,7 @@ static void imc_common_cpuhp_mem_free(stkfree (pmu_ptr->attr_groups[IMC_EVENT_ATTR ]->attrs);kfree (pmu_ptr->attr_groups[IMC_EVENT_ATTR ]);kfree (pmu_ptr); +kfree (per_nest_pmu_arr);return ; }
@@ -1236,6 +1238,13 @@ static int imc_mem_init(struct imc_pmu *return -ENOMEM ;/* Needed for hotplug/migration */ +if (!per_nest_pmu_arr) { + per_nest_pmu_arr =kcalloc (get_max_nest_dev () +1 , +sizeof (struct imc_pmu *), +GFP_KERNEL ); +if (!per_nest_pmu_arr) +return -ENOMEM ; + } per_nest_pmu_arr[pmu_index] = pmu_ptr;break ;case IMC_DOMAIN_CORE :
arch/powerpc/platforms/powernv/opal-imc.c +16 -0
@@ -159,6 +159,22 @@ static void disable_core_pmu_counters(voput_online_cpus (); } +int get_max_nest_dev (void ) +{ +struct device_node *node; +u32 pmu_units =0 , type; + +for_each_compatible_node (node,NULL ,IMC_DTB_UNIT_COMPAT ) { +if (of_property_read_u32 (node,"type" , &type)) +continue ; + +if (type ==IMC_TYPE_CHIP ) + pmu_units++; + } + +return pmu_units; +} +static int opal_imc_counters_probe (struct platform_device *pdev) {struct device_node *imc_dev = pdev->dev.of_node;
Greg Kroah-Hartman
maintainerPATCH 7/239 powerpc/perf: Fix kfree memory allocated for nest pmus
In reply to Greg Kroah-HartmanFrom: Anju T Sudhakar <[email protected]>
commit 110df8bd3e418b3476cae80babe8add48a8ea523 upstream.
imc_common_cpuhp_mem_free() is the common function for all IMC (In-memory Collection counters) domains to unregister cpuhotplug callback and free memory. Since kfree of memory allocated for nest-imc (per_nest_pmu_arr) is in the common code, all domains (core/nest/thread) can do the kfree in the failure case.
This could potentially create a call trace as shown below, where core(/thread/nest) imc pmu initialization fails and in the failure path imc_common_cpuhp_mem_free() free the memory(per_nest_pmu_arr), which is allocated by successfully registered nest units.
The call trace is generated in a scenario where core-imc initialization is made to fail and a cpuhotplug is performed in a p9 system. During cpuhotplug ppc_nest_imc_cpu_offline() tries to access per_nest_pmu_arr, which is already freed by core-imc.
NIP [c000000000cb6a94] mutex_lock+0x34/0x90
LR [c000000000cb6a88] mutex_lock+0x28/0x90
Call Trace:
mutex_lock+0x28/0x90 (unreliable)
perf_pmu_migrate_context+0x90/0x3a0
ppc_nest_imc_cpu_offline+0x190/0x1f0
cpuhp_invoke_callback+0x160/0x820
cpuhp_thread_fun+0x1bc/0x270
smpboot_thread_fn+0x250/0x290
kthread+0x1a8/0x1b0
ret_from_kernel_thread+0x5c/0x74To address this scenario do the kfree(per_nest_pmu_arr) only in case of nest-imc initialization failure, and when there is no other nest units registered.
--- arch/powerpc/perf/imc-pmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/perf/imc-pmu.c +3 -1
@@ -1189,6 +1189,7 @@ static void imc_common_cpuhp_mem_free(stif (nest_pmus ==1 ) {cpuhp_remove_state (CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE );kfree (nest_imc_refc); +kfree (per_nest_pmu_arr); }if (nest_pmus >0 )
@@ -1213,7 +1214,6 @@ static void imc_common_cpuhp_mem_free(stkfree (pmu_ptr->attr_groups[IMC_EVENT_ATTR ]->attrs);kfree (pmu_ptr->attr_groups[IMC_EVENT_ATTR ]);kfree (pmu_ptr); -kfree (per_nest_pmu_arr);return ; }
@@ -1327,6 +1327,8 @@ int init_imc_pmu(struct device_node *par ret =nest_pmu_cpumask_init ();if (ret) {mutex_unlock (&nest_init_lock); +kfree (nest_imc_refc); +kfree (per_nest_pmu_arr); goto err_free; } }
Greg Kroah-Hartman
maintainerPATCH 8/239 ax88172a: fix information leak on short answers
In reply to Greg Kroah-HartmanFrom: Oliver Neukum <[email protected]>
[ Upstream commit a9a51bd727d141a67b589f375fe69d0e54c4fe22 ]
If a malicious device gives a short MAC it can elicit up to 5 bytes of leaked memory out of the driver. We need to check for ETH_ALEN instead.
--- drivers/net/usb/ax88172a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/ax88172a.c +1 -1
@@ -208,7 +208,7 @@ static int ax88172a_bind(struct usbnet */* Get the MAC address */ ret =asix_read_cmd (dev,AX_CMD_READ_NODE_ID ,0 ,0 ,ETH_ALEN , buf,0 ); -if (ret <0 ) { +if (ret <ETH_ALEN ) {netdev_err (dev->net,"Failed to read MAC address: %d\n" , ret); goto free; }
Greg Kroah-Hartman
maintainerPATCH 9/239 net: usb: qmi_wwan: add support for Foxconn T77W968 LTE modules
In reply to Greg Kroah-HartmanFrom: Aleksander Morgado <[email protected]>
[ Upstream commit 802753cb0b141cf5170ab97fe7e79f5ca10d06b0 ]
These are the Foxconn-branded variants of the Dell DW5821e modules, same USB layout as those.
The QMI interface is exposed in USB configuration #1:
P: Vendor=0489 ProdID=e0b4 Rev=03.18 S: Manufacturer=FII S: Product=T77W968 LTE S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
--- drivers/net/usb/qmi_wwan.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/usb/qmi_wwan.c +2 -0
@@ -1295,6 +1295,8 @@ static const struct usb_device_id produc {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */ {QMI_QUIRK_SET_DTR(0x2cb7, 0x0104, 4)}, /* Fibocom NL678 series */ + {QMI_FIXED_INTF(0x0489, 0xe0b4, 0)}, /* Foxconn T77W968 LTE */ + {QMI_FIXED_INTF(0x0489, 0xe0b5, 0)}, /* Foxconn T77W968 LTE with eSIM support*//* 4. Gobi 1000 devices */ {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
Greg Kroah-Hartman
maintainerPATCH 10/239 slip: Fix memory leak in slip_open error path
In reply to Greg Kroah-HartmanFrom: Jouni Hogander <[email protected]>
[ Upstream commit 3b5a39979dafea9d0cd69c7ae06088f7a84cdafa ]
Driver/net/can/slcan.c is derived from slip.c. Memory leak was detected by Syzkaller in slcan. Same issue exists in slip.c and this patch is addressing the leak in slip.c.
Here is the slcan memory leak trace reported by Syzkaller:
BUG: memory leak unreferenced object 0xffff888067f65500 (size 4096):
comm "syz-executor043", pid 454, jiffies 4294759719 (age 11.930s)
hex dump (first 32 bytes):
73 6c 63 61 6e 30 00 00 00 00 00 00 00 00 00 00 slcan0..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000a06eec0d>] __kmalloc+0x18b/0x2c0
[<0000000083306e66>] kvmalloc_node+0x3a/0xc0
[<000000006ac27f87>] alloc_netdev_mqs+0x17a/0x1080
[<0000000061a996c9>] slcan_open+0x3ae/0x9a0
[<000000001226f0f9>] tty_ldisc_open.isra.1+0x76/0xc0
[<0000000019289631>] tty_set_ldisc+0x28c/0x5f0
[<000000004de5a617>] tty_ioctl+0x48d/0x1590
[<00000000daef496f>] do_vfs_ioctl+0x1c7/0x1510
[<0000000059068dbc>] ksys_ioctl+0x99/0xb0
[<000000009a6eb334>] __x64_sys_ioctl+0x78/0xb0
[<0000000053d0332e>] do_syscall_64+0x16f/0x580
[<0000000021b83b99>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<000000008ea75434>] 0xfffffffffffffff--- drivers/net/slip/slip.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/slip/slip.c +1 -0
@@ -859,6 +859,7 @@ err_free_chan: sl->tty =NULL ; tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags); +free_netdev (sl->dev); err_exit:rtnl_unlock ();
Greg Kroah-Hartman
maintainerPATCH 11/239 ALSA: usb-audio: Fix missing error check at mixer resolution test
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 167beb1756791e0806365a3f86a0da10d7a327ee upstream.
A check of the return value from get_cur_mix_raw() is missing at the resolution test code in get_min_max_with_quirks(), which may leave the variable untouched, leading to a random uninitialized value, as detected by syzkaller fuzzer.
Add the missing return error check for fixing that.
--- sound/usb/mixer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/usb/mixer.c +3 -1
@@ -1052,7 +1052,8 @@ static int get_min_max_with_quirks(strucif (cval->min + cval->res < cval->max) {int last_valid_res = cval->res;int saved, test, check; -get_cur_mix_raw (cval, minchn, &saved); +if (get_cur_mix_raw (cval, minchn, &saved) <0 ) + goto no_res_check;for (;;) { test = saved;if (test < cval->max)
@@ -1072,6 +1073,7 @@ static int get_min_max_with_quirks(strucsnd_usb_set_cur_mix_value (cval, minchn,0 , saved); } +no_res_check: cval->initialized =1 ; }
Greg Kroah-Hartman
maintainerPATCH 12/239 ALSA: usb-audio: not submit urb for stopped endpoint
In reply to Greg Kroah-HartmanFrom: Henry Lin <[email protected]>
commit 528699317dd6dc722dccc11b68800cf945109390 upstream.
While output urb's snd_complete_urb() is executing, calling prepare_outbound_urb() may cause endpoint stopped before prepare_outbound_urb() returns and result in next urb submitted to stopped endpoint. usb-audio driver cannot re-use it afterwards as the urb is still hold by usb stack.
This change checks EP_FLAG_RUNNING flag after prepare_outbound_urb() again to let snd_complete_urb() know the endpoint already stopped and does not submit next urb. Below kind of error will be fixed:
[ 213.153103] usb 1-2: timeout: still 1 active urbs on EP #1 [ 213.164121] usb 1-2: cannot submit urb 0, error -16: unknown error
--- sound/usb/endpoint.c | 3 +++ 1 file changed, 3 insertions(+)
sound/usb/endpoint.c +3 -0
@@ -403,6 +403,9 @@ static void snd_complete_urb(struct urb }prepare_outbound_urb (ep, ctx); +/* can be stopped during prepare callback */ +if (unlikely (!test_bit (EP_FLAG_RUNNING , &ep->flags))) + goto exit_clear; }else {retire_inbound_urb (ep, ctx);/* can be stopped during retire callback */
Greg Kroah-Hartman
maintainerPATCH 13/239 Input: ff-memless - kill timer in destroy()
In reply to Greg Kroah-HartmanFrom: Oliver Neukum <[email protected]>
commit fa3a5a1880c91bb92594ad42dfe9eedad7996b86 upstream.
No timer must be left running when the device goes away.
--- drivers/input/ff-memless.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/input/ff-memless.c +9 -0
@@ -501,6 +501,15 @@ static void ml_ff_destroy(struct ff_devi {struct ml_device *ml = ff->private; +/* +* Even though we stop all playing effects when tearing down +* an input device (via input_device_flush() that calls into +* input_ff_flush() that stops and erases all effects), we +* do not actually stop the timer, and therefore we should +* do it here. +*/ +del_timer_sync (&ml->timer); +kfree (ml->private); }
Greg Kroah-Hartman
maintainerPATCH 14/239 Input: synaptics-rmi4 - fix video buffer size
In reply to Greg Kroah-HartmanFrom: Lucas Stach <[email protected]>
commit 003f01c780020daa9a06dea1db495b553a868c29 upstream.
The video buffer used by the queue is a vb2_v4l2_buffer, not a plain vb2_buffer. Using the wrong type causes the allocation of the buffer storage to be too small, causing a out of bounds write when __init_vb2_v4l2_buffer initializes the buffer.
--- drivers/input/rmi4/rmi_f54.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/rmi4/rmi_f54.c +1 -1
@@ -362,7 +362,7 @@ static const struct vb2_ops rmi_f54_queustatic const struct vb2_queue rmi_f54_queue = { .type =V4L2_BUF_TYPE_VIDEO_CAPTURE , .io_modes =VB2_MMAP |VB2_USERPTR |VB2_DMABUF |VB2_READ , - .buf_struct_size =sizeof (struct vb2_buffer ), + .buf_struct_size =sizeof (struct vb2_v4l2_buffer ), .ops = &rmi_f54_queue_ops, .mem_ops = &vb2_vmalloc_memops, .timestamp_flags =V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC ,
Greg Kroah-Hartman
maintainerPATCH 15/239 Input: synaptics-rmi4 - disable the relative position IRQ in the F12 driver
In reply to Greg Kroah-HartmanFrom: Andrew Duggan <[email protected]>
commit f6aabe1ff1d9d7bad0879253011216438bdb2530 upstream.
This patch fixes an issue seen on HID touchpads which report finger positions using RMI4 Function 12. The issue manifests itself as spurious button presses as described in:
https://www.spinics.net/lists/linux-input/msg58618.html
Commit 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain") switched the RMI4 driver to using an irq_domain to handle RMI4 function interrupts. Functions with more then one interrupt now have each interrupt mapped to their own IRQ and IRQ handler. The result of this change is that the F12 IRQ handler was now getting called twice. Once for the absolute data interrupt and once for the relative data interrupt. For HID devices, calling rmi_f12_attention() a second time causes the attn_data data pointer and size to be set incorrectly. When the touchpad button is pressed, F30 will generate an interrupt and attempt to read the F30 data from the invalid attn_data data pointer and report incorrect button events.
This patch disables the F12 relative interrupt which prevents rmi_f12_attention() from being called twice.
--- drivers/input/rmi4/rmi_f12.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
drivers/input/rmi4/rmi_f12.c +26 -2
@@ -58,6 +58,9 @@ struct f12_data {const struct rmi_register_desc_item *data15;u16 data15_offset; + +unsigned long *abs_mask; +unsigned long *rel_mask; };static int rmi_f12_read_sensor_tuning (struct f12_data *f12)
@@ -296,9 +299,18 @@ static int rmi_f12_write_control_regs(ststatic int rmi_f12_config (struct rmi_function *fn) {struct rmi_driver *drv = fn->rmi_dev->driver; +struct f12_data *f12 =dev_get_drvdata (&fn->dev); +struct rmi_2d_sensor *sensor;int ret; - drv->set_irq_bits (fn->rmi_dev, fn->irq_mask); + sensor = &f12->sensor; + +if (!sensor->report_abs) + drv->clear_irq_bits (fn->rmi_dev, f12->abs_mask); +else + drv->set_irq_bits (fn->rmi_dev, f12->abs_mask); + + drv->clear_irq_bits (fn->rmi_dev, f12->rel_mask); ret =rmi_f12_write_control_regs (fn);if (ret)
@@ -320,9 +332,12 @@ static int rmi_f12_probe(struct rmi_funcstruct rmi_device_platform_data *pdata =rmi_get_platform_data (rmi_dev);struct rmi_driver_data *drvdata =dev_get_drvdata (&rmi_dev->dev);u16 data_offset =0 ; +int mask_size;rmi_dbg (RMI_DEBUG_FN , &fn->dev,"%s\n" , __func__); + mask_size =BITS_TO_LONGS (drvdata->irq_count) *sizeof (unsigned long ); + ret =rmi_read (fn->rmi_dev, query_addr, &buf);if (ret <0 ) { dev_err(&fn->dev, "Failed to read general info register: %d\n",
@@ -337,10 +352,19 @@ static int rmi_f12_probe(struct rmi_funcreturn -ENODEV ; } - f12 =devm_kzalloc (&fn->dev,sizeof (struct f12_data ),GFP_KERNEL ); + f12 =devm_kzalloc (&fn->dev,sizeof (struct f12_data ) + mask_size *2 , +GFP_KERNEL );if (!f12)return -ENOMEM ; + f12->abs_mask = (unsigned long *)((char *)f12 + +sizeof (struct f12_data )); + f12->rel_mask = (unsigned long *)((char *)f12 + +sizeof (struct f12_data ) + mask_size); + +set_bit (fn->irq_pos, f12->abs_mask); +set_bit (fn->irq_pos +1 , f12->rel_mask); + f12->has_dribble = !!(buf &BIT (3 ));if (fn->dev.of_node) {
Greg Kroah-Hartman
maintainerPATCH 16/239 Input: synaptics-rmi4 - do not consume more data than we have (F11, F12)
In reply to Greg Kroah-HartmanFrom: Andrew Duggan <[email protected]>
commit 5d40d95e7e64756cc30606c2ba169271704d47cb upstream.
Currently, rmi_f11_attention() and rmi_f12_attention() functions update the attn_data data pointer and size based on the size of the expected size of the attention data. However, if the actual valid data in the attn buffer is less then the expected value then the updated data pointer will point to memory beyond the end of the attn buffer. Using the calculated valid_bytes instead will prevent this from happening.
--- drivers/input/rmi4/rmi_f11.c | 4 ++-- drivers/input/rmi4/rmi_f12.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/rmi4/rmi_f11.c +2 -2
@@ -1295,8 +1295,8 @@ static int rmi_f11_attention(struct rmi_ valid_bytes = f11->sensor.attn_size;memcpy (f11->sensor.data_pkt, drvdata->attn_data.data, valid_bytes); - drvdata->attn_data.data += f11->sensor.attn_size; - drvdata->attn_data.size -= f11->sensor.attn_size; + drvdata->attn_data.data += valid_bytes; + drvdata->attn_data.size -= valid_bytes; }else { error = rmi_read_block(rmi_dev, data_base_addr, f11->sensor.data_pkt,
drivers/input/rmi4/rmi_f12.c +2 -2
@@ -217,8 +217,8 @@ static int rmi_f12_attention(struct rmi_ valid_bytes = sensor->attn_size;memcpy (sensor->data_pkt, drvdata->attn_data.data, valid_bytes); - drvdata->attn_data.data += sensor->attn_size; - drvdata->attn_data.size -= sensor->attn_size; + drvdata->attn_data.data += valid_bytes; + drvdata->attn_data.size -= valid_bytes; }else { retval =rmi_read_block (rmi_dev, f12->data_addr, sensor->data_pkt, sensor->pkt_size);
Greg Kroah-Hartman
maintainerPATCH 17/239 Input: synaptics-rmi4 - clear IRQ enables for F54
In reply to Greg Kroah-HartmanFrom: Lucas Stach <[email protected]>
commit 549766ac2ac1f6c8bb85906bbcea759541bb19a2 upstream.
The driver for F54 just polls the status and doesn't even have a IRQ handler registered. Make sure to disable all F54 IRQs, so we don't crash the kernel on a nonexistent handler.
--- drivers/input/rmi4/rmi_f54.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/rmi4/rmi_f54.c +1 -1
@@ -619,7 +619,7 @@ static int rmi_f54_config(struct rmi_fun {struct rmi_driver *drv = fn->rmi_dev->driver; - drv->set_irq_bits (fn->rmi_dev, fn->irq_mask); + drv->clear_irq_bits (fn->rmi_dev, fn->irq_mask);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 18/239 Input: synaptics-rmi4 - destroy F54 poller workqueue when removing
In reply to Greg Kroah-HartmanFrom: Chuhong Yuan <[email protected]>
commit ba60cf9f78f0d7c8e73c7390608f7f818ee68aa0 upstream.
The driver forgets to destroy workqueue in remove() similarly to what is done when probe() fails. Add a call to destroy_workqueue() to fix it.
Since unregistration will wait for the work to finish, we do not need to cancel/flush the work instance in remove().
--- drivers/input/rmi4/rmi_f54.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/rmi4/rmi_f54.c +1 -0
@@ -747,6 +747,7 @@ static void rmi_f54_remove(struct rmi_fuvideo_unregister_device (&f54->vdev);v4l2_device_unregister (&f54->v4l2); +destroy_workqueue (f54->workqueue); }struct rmi_function_handler rmi_f54_handler = {
Greg Kroah-Hartman
maintainerPATCH 19/239 IB/hfi1: Ensure full Gen3 speed in a Gen4 system
In reply to Greg Kroah-HartmanFrom: James Erwin <[email protected]>
commit a9c3c4c597704b3a1a2b9bef990e7d8a881f6533 upstream.
If an hfi1 card is inserted in a Gen4 systems, the driver will avoid the gen3 speed bump and the card will operate at half speed.
This is because the driver avoids the gen3 speed bump when the parent bus speed isn't identical to gen3, 8.0GT/s. This is not compatible with gen4 and newer speeds.
Fix by relaxing the test to explicitly look for the lower capability speeds which inherently allows for gen4 and all future speeds.
--- drivers/infiniband/hw/hfi1/pcie.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/pcie.c +3 -1
@@ -327,7 +327,9 @@ int pcie_speeds(struct hfi1_devdata *dd)/* * bus->max_bus_speed is set from the bridge's linkcap Max Link Speed */ -if (parent && dd->pcidev->bus->max_bus_speed !=PCIE_SPEED_8_0GT ) { +if (parent && + (dd->pcidev->bus->max_bus_speed ==PCIE_SPEED_2_5GT || + dd->pcidev->bus->max_bus_speed ==PCIE_SPEED_5_0GT )) {dd_dev_info (dd,"Parent PCIe bridge does not support Gen3\n" ); dd->link_gen3_capable =0 ; }
Greg Kroah-Hartman
maintainerPATCH 20/239 i2c: acpi: Force bus speed to 400KHz if a Silead touchscreen is present
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit 7574c0db2e68c4d0bae9d415a683bdd8b2a761e9 upstream.
Many cheap devices use Silead touchscreen controllers. Testing has shown repeatedly that these touchscreen controllers work fine at 400KHz, but for unknown reasons do not work properly at 100KHz. This has been seen on both ARM and x86 devices using totally different i2c controllers.
On some devices the ACPI tables list another device at the same I2C-bus as only being capable of 100KHz, testing has shown that these other devices work fine at 400KHz (as can be expected of any recent I2C hw).
This commit makes i2c_acpi_find_bus_speed() always return 400KHz if a Silead touchscreen controller is present, fixing the touchscreen not working on devices which ACPI tables' wrongly list another device on the same bus as only being capable of 100KHz.
Specifically this fixes the touchscreen on the Jumper EZpad 6 m4 not working.
--- drivers/i2c/i2c-core-acpi.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
drivers/i2c/i2c-core-acpi.c +27 -1
@@ -43,6 +43,7 @@ struct i2c_acpi_lookup {int index;u32 speed;u32 min_speed; +u32 force_speed; };static int i2c_acpi_fill_info (struct acpi_resource *ares,void *data)
@@ -240,6 +241,19 @@ i2c_acpi_match_device(const struct acpi_return acpi_match_device (matches, &client->dev); } +static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = { +/* +* These Silead touchscreen controllers only work at 400KHz, for +* some reason they do not work at 100KHz. On some devices the ACPI +* tables list another device at their bus as only being capable +* of 100KHz, testing has shown that these other devices work fine +* at 400KHz (as can be expected of any recent i2c hw) so we force +* the speed of the bus to 400 KHz if a Silead device is present. +*/ + {"MSSL1680" ,0 }, + {} +}; +static acpi_status i2c_acpi_lookup_speed (acpi_handle handle,u32 level,void *data,void **return_value) {
@@ -258,6 +272,9 @@ static acpi_status i2c_acpi_lookup_speedif (lookup->speed <= lookup->min_speed) lookup->min_speed = lookup->speed; +if (acpi_match_device_ids (adev, i2c_acpi_force_400khz_device_ids) ==0 ) + lookup->force_speed =400000 ; +return AE_OK ; }
@@ -295,7 +312,16 @@ u32 i2c_acpi_find_bus_speed(struct devicreturn 0 ; } -return lookup.min_speed !=UINT_MAX ? lookup.min_speed :0 ; +if (lookup.force_speed) { +if (lookup.force_speed != lookup.min_speed) +dev_warn (dev,FW_BUG "DSDT uses known not-working I2C bus speed %d, forcing it to %d\n" , + lookup.min_speed, lookup.force_speed); +return lookup.force_speed; + }else if (lookup.min_speed !=UINT_MAX ) { +return lookup.min_speed; + }else { +return 0 ; + } }EXPORT_SYMBOL_GPL (i2c_acpi_find_bus_speed);
Greg Kroah-Hartman
maintainerPATCH 21/239 x86/quirks: Disable HPET on Intel Coffe Lake platforms
In reply to Greg Kroah-HartmanFrom: Kai-Heng Feng <[email protected]>
commit fc5db58539b49351e76f19817ed1102bf7c712d0 upstream.
Some Coffee Lake platforms have a skewed HPET timer once the SoCs entered PC10, which in consequence marks TSC as unstable because HPET is used as watchdog clocksource for TSC.
Harry Pan tried to work around it in the clocksource watchdog code [1] thereby creating a circular dependency between HPET and TSC. This also ignores the fact, that HPET is not only unsuitable as watchdog clocksource on these systems, it becomes unusable in general.
Disable HPET on affected platforms.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203183
--- arch/x86/kernel/early-quirks.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/kernel/early-quirks.c +2 -0
@@ -681,6 +681,8 @@ static struct chipset early_qrk[] __init*/ {PCI_VENDOR_ID_INTEL ,0x0f00 , PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, + { PCI_VENDOR_ID_INTEL, 0x3ec4, + PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, { PCI_VENDOR_ID_BROADCOM, 0x4331, PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset}, {}
Greg Kroah-Hartman
maintainerPATCH 22/239 ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
In reply to Greg Kroah-HartmanFrom: Al Viro <[email protected]>
commit e72b9dd6a5f17d0fb51f16f8685f3004361e83d0 upstream.
lower_dentry can't go from positive to negative (we have it pinned), but it *can* go from negative to positive. So fetching ->d_inode into a local variable, doing a blocking allocation, checking that now ->d_inode is non-NULL and feeding the value we'd fetched earlier to a function that won't accept NULL is not a good idea.
--- fs/ecryptfs/inode.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
fs/ecryptfs/inode.c +10 -2
@@ -326,7 +326,7 @@ static int ecryptfs_i_size_read(struct dstatic struct dentry *ecryptfs_lookup_interpose (struct dentry *dentry,struct dentry *lower_dentry) { -struct inode *inode, *lower_inode =d_inode (lower_dentry); +struct inode *inode, *lower_inode;struct ecryptfs_dentry_info *dentry_info;struct vfsmount *lower_mnt;int rc =0 ;
@@ -349,7 +349,15 @@ static struct dentry *ecryptfs_lookup_in dentry_info->lower_path.mnt = lower_mnt; dentry_info->lower_path.dentry = lower_dentry; -if (d_really_is_negative (lower_dentry)) { +/* +* negative dentry can go positive under us here - its parent is not +* locked. That's OK and that could happen just as we return from +* ecryptfs_lookup() anyway. Just need to be careful and fetch +* ->d_inode only once - it's not stable here. +*/ + lower_inode =READ_ONCE (lower_dentry->d_inode); + +if (!lower_inode) {/* We want to add because we couldn't find in lower */ d_add (dentry,NULL );return NULL ;
Greg Kroah-Hartman
maintainerPATCH 23/239 ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
In reply to Greg Kroah-HartmanFrom: Al Viro <[email protected]>
commit 762c69685ff7ad5ad7fee0656671e20a0c9c864d upstream.
We need to get the underlying dentry of parent; sure, absent the races it is the parent of underlying dentry, but there's nothing to prevent losing a timeslice to preemtion in the middle of evaluation of lower_dentry->d_parent->d_inode, having another process move lower_dentry around and have its (ex)parent not pinned anymore and freed on memory pressure. Then we regain CPU and try to fetch ->d_inode from memory that is freed by that point.
dentry->d_parent *is* stable here - it's an argument of ->lookup() and we are guaranteed that it won't be moved anywhere until we feed it to d_add/d_splice_alias. So we safely go that way to get to its underlying dentry.
--- fs/ecryptfs/inode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
fs/ecryptfs/inode.c +3 -4
@@ -326,9 +326,9 @@ static int ecryptfs_i_size_read(struct dstatic struct dentry *ecryptfs_lookup_interpose (struct dentry *dentry,struct dentry *lower_dentry) { +struct path *path =ecryptfs_dentry_to_lower_path (dentry->d_parent);struct inode *inode, *lower_inode;struct ecryptfs_dentry_info *dentry_info; -struct vfsmount *lower_mnt;int rc =0 ; dentry_info =kmem_cache_alloc (ecryptfs_dentry_info_cache,GFP_KERNEL );
@@ -340,13 +340,12 @@ static struct dentry *ecryptfs_lookup_inreturn ERR_PTR (-ENOMEM ); } - lower_mnt =mntget (ecryptfs_dentry_to_lower_mnt (dentry->d_parent));fsstack_copy_attr_atime (d_inode (dentry->d_parent), -d_inode (lower_dentry->d_parent)); +d_inode (path->dentry));BUG_ON (!d_count (lower_dentry));ecryptfs_set_dentry_private (dentry, dentry_info); - dentry_info->lower_path.mnt = lower_mnt; + dentry_info->lower_path.mnt =mntget (path->mnt); dentry_info->lower_path.dentry = lower_dentry;/*
Greg Kroah-Hartman
maintainerPATCH 24/239 iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
In reply to Greg Kroah-HartmanFrom: Eric Auger <[email protected]>
commit 4e7120d79edb31e4ee68e6f8421448e4603be1e9 upstream.
For both PASID-based-Device-TLB Invalidate Descriptor and Device-TLB Invalidate Descriptor, the Physical Function Source-ID value is split according to this layout:
PFSID[3:0] is set at offset 12 and PFSID[15:4] is put at offset 52. Fix the part laid out at offset 52.
--- include/linux/intel-iommu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
include/linux/intel-iommu.h +4 -2
@@ -282,7 +282,8 @@ enum {#define QI_DEV_IOTLB_SID (sid) ((u64)((sid) & 0xffff) << 32)#define QI_DEV_IOTLB_QDEP (qdep) (((qdep) & 0x1f) << 16)#define QI_DEV_IOTLB_ADDR (addr) ((u64)(addr) & VTD_PAGE_MASK) -#define QI_DEV_IOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52)) +#define QI_DEV_IOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | \ + ((u64)((pfsid >> 4) & 0xfff) << 52))#define QI_DEV_IOTLB_SIZE 1#define QI_DEV_IOTLB_MAX_INVS 32
@@ -307,7 +308,8 @@ enum {#define QI_DEV_EIOTLB_PASID (p) (((u64)p) << 32)#define QI_DEV_EIOTLB_SID (sid) ((u64)((sid) & 0xffff) << 16)#define QI_DEV_EIOTLB_QDEP (qd) ((u64)((qd) & 0x1f) << 4) -#define QI_DEV_EIOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52)) +#define QI_DEV_EIOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | \ + ((u64)((pfsid >> 4) & 0xfff) << 52))#define QI_DEV_EIOTLB_MAX_INVS 32#define QI_PGRP_IDX (idx) (((u64)(idx)) << 55)
Greg Kroah-Hartman
maintainerPATCH 25/239 mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
In reply to Greg Kroah-HartmanFrom: Roman Gushchin <[email protected]>
commit 00d484f354d85845991b40141d40ba9e5eb60faf upstream.
We've encountered a rcu stall in get_mem_cgroup_from_mm():
rcu: INFO: rcu_sched self-detected stall on CPU rcu: 33-....: (21000 ticks this GP) idle=6c6/1/0x4000000000000002 softirq=35441/35441 fqs=5017 (t=21031 jiffies g=324821 q=95837) NMI backtrace for cpu 33 <...> RIP: 0010:get_mem_cgroup_from_mm+0x2f/0x90 <...> __memcg_kmem_charge+0x55/0x140 __alloc_pages_nodemask+0x267/0x320 pipe_write+0x1ad/0x400 new_sync_write+0x127/0x1c0 __kernel_write+0x4f/0xf0 dump_emit+0x91/0xc0 writenote+0xa0/0xc0 elf_core_dump+0x11af/0x1430 do_coredump+0xc65/0xee0 get_signal+0x132/0x7c0 do_signal+0x36/0x640 exit_to_usermode_loop+0x61/0xd0 do_syscall_64+0xd4/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9
The problem is caused by an exiting task which is associated with an offline memcg. We're iterating over and over in the do {} while (!css_tryget_online()) loop, but obviously the memcg won't become online and the exiting task won't be migrated to a live memcg.
Let's fix it by switching from css_tryget_online() to css_tryget().
As css_tryget_online() cannot guarantee that the memcg won't go offline, the check is usually useless, except some rare cases when for example it determines if something should be presented to a user.
A similar problem is described by commit 18fa84a2db0e ("cgroup: Use css_tryget() instead of css_tryget_online() in task_get_css()").
Johannes:
: The bug aside, it doesn't matter whether the cgroup is online for the : callers. It used to matter when offlining needed to evacuate all charges : from the memcg, and so needed to prevent new ones from showing up, but we : don't care now.
--- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +1 -1
@@ -725,7 +725,7 @@ static struct mem_cgroup *get_mem_cgroupif (unlikely (!memcg)) memcg = root_mem_cgroup; } - }while (!css_tryget_online (&memcg->css)); + }while (!css_tryget (&memcg->css));rcu_read_unlock ();return memcg; }
Greg Kroah-Hartman
maintainerPATCH 26/239 mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
In reply to Greg Kroah-HartmanFrom: Roman Gushchin <[email protected]>
commit 0362f326d86c645b5e96b7dbc3ee515986ed019d upstream.
An exiting task might belong to an offline cgroup. In this case an attempt to grab a cgroup reference from the task can end up with an infinite loop in hugetlb_cgroup_charge_cgroup(), because neither the cgroup will become online, neither the task will be migrated to a live cgroup.
Fix this by switching over to css_tryget(). As css_tryget_online() can't guarantee that the cgroup won't go offline, in most cases the check doesn't make sense. In this particular case users of hugetlb_cgroup_charge_cgroup() are not affected by this change.
A similar problem is described by commit 18fa84a2db0e ("cgroup: Use css_tryget() instead of css_tryget_online() in task_get_css()").
--- mm/hugetlb_cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/hugetlb_cgroup.c +1 -1
@@ -196,7 +196,7 @@ int hugetlb_cgroup_charge_cgroup(int idx again:rcu_read_lock (); h_cg =hugetlb_cgroup_from_task (current); -if (!css_tryget_online (&h_cg->css)) { +if (!css_tryget (&h_cg->css)) {rcu_read_unlock (); goto again; }
Greg Kroah-Hartman
maintainerPATCH 27/239 mmc: sdhci-of-at91: fix quirk2 overwrite
In reply to Greg Kroah-HartmanFrom: Eugen Hristev <[email protected]>
commit fed23c5829ecab4ddc712d7b0046e59610ca3ba4 upstream.
The quirks2 are parsed and set (e.g. from DT) before the quirk for broken HS200 is set in the driver.
The driver needs to enable just this flag, not rewrite the whole quirk set.
--- drivers/mmc/host/sdhci-of-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-of-at91.c +1 -1
@@ -365,7 +365,7 @@ static int sdhci_at91_probe(struct platfpm_runtime_use_autosuspend (&pdev->dev);/* HS200 is broken at this moment */ - host->quirks2 =SDHCI_QUIRK2_BROKEN_HS200 ; + host->quirks2 |=SDHCI_QUIRK2_BROKEN_HS200 ; ret =sdhci_add_host (host);if (ret)
Greg Kroah-Hartman
maintainerPATCH 28/239 iio: adc: max9611: explicitly cast gain_selectors
In reply to Greg Kroah-HartmanFrom: Stefan Agner <[email protected]>
[ Upstream commit b1ec0802503820ccbc894aadfd2a44da20232f5e ]
After finding a reasonable gain, the function converts the configured gain to a gain configuration option selector enum max9611_csa_gain. Make the conversion clearly visible by using an explicit cast. This also avoids a warning seen with clang:
drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from
enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion]
*csa_gain = gain_selectors[i];
~ ^~~~~~~~~~~~~~~~~
--- drivers/iio/adc/max9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/max9611.c +1 -1
@@ -289,7 +289,7 @@ static int max9611_read_csa_voltage(struct max9611_dev *max9611,return ret;if (*adc_raw >0 ) { - *csa_gain = gain_selectors[i]; + *csa_gain = (enum max9611_csa_gain )gain_selectors[i];return 0 ; } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 29/239 tee: optee: take DT status property into account
In reply to Greg Kroah-HartmanFrom: Ard Biesheuvel <[email protected]>
[ Upstream commit db878f76b9ff7487da9bb0f686153f81829f1230 ]
DT nodes may have a 'status' property which, if set to anything other than 'ok' or 'okay', indicates to the OS that the DT node should be treated as if it was not present. So add that missing logic to the OP-TEE driver.
--- drivers/tee/optee/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tee/optee/core.c +1 -1
@@ -590,7 +590,7 @@ static int __init optee_driver_init(void)return -ENODEV ; np =of_find_matching_node (fw_np, optee_match); -if (!np) +if (!np || !of_device_is_available (np))return -ENODEV ; optee =optee_probe (np);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 30/239 ath10k: fix kernel panic by moving pci flush after napi_disable
In reply to Greg Kroah-HartmanFrom: Tamizh chelvam <[email protected]>
[ Upstream commit bd1d395070cca4f42a93e520b0597274789274a4 ]
When continuously running wifi up/down sequence, the napi poll can be scheduled after the CE buffers being freed by ath10k_pci_flush
Steps:
In a certain condition, during wifi down below scenario might occur.
ath10k_stop->ath10k_hif_stop->napi_schedule->ath10k_pci_flush->napi_poll(napi_synchronize).
In the above scenario, CE buffer entries will be freed up and become NULL in ath10k_pci_flush. And the napi_poll has been invoked after the flush process and it will try to get the skb from the CE buffer entry and perform some action on that. Since the CE buffer already cleaned by pci flush this action will create NULL pointer dereference and trigger below kernel panic.
Unable to handle kernel NULL pointer dereference at virtual address 0000005c PC is at ath10k_pci_htt_rx_cb+0x64/0x3ec [ath10k_pci]
ath10k_pci_htt_rx_cb [ath10k_pci] ath10k_ce_per_engine_service+0x74/0xc4 [ath10k_pci] ath10k_ce_per_engine_service [ath10k_pci] ath10k_ce_per_engine_service_any+0x74/0x80 [ath10k_pci] ath10k_ce_per_engine_service_any [ath10k_pci] ath10k_pci_napi_poll+0x48/0xec [ath10k_pci] ath10k_pci_napi_poll [ath10k_pci] net_rx_action+0xac/0x160net_rx_action__do_softirq+0xdc/0x208__do_softirqirq_exit+0x84/0xe0irq_exit__handle_domain_irq+0x80/0xa0 __handle_domain_irqgic_handle_irq+0x38/0x5cgic_handle_irq__irq_usr+0x44/0x60
Tested on QCA4019 and firmware version 10.4.3.2.1.1-00010
--- drivers/net/wireless/ath/ath10k/ahb.c | 4 ++-- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/ahb.c +2 -2
@@ -663,10 +663,10 @@ static void ath10k_ahb_hif_stop(struct ath10k *ar)ath10k_ahb_irq_disable (ar);synchronize_irq (ar_ahb->irq); -ath10k_pci_flush (ar); -napi_synchronize (&ar->napi);napi_disable (&ar->napi); + +ath10k_pci_flush (ar); }static int ath10k_ahb_hif_power_up (struct ath10k *ar)
drivers/net/wireless/ath/ath10k/pci.c +1 -1
@@ -1787,9 +1787,9 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)ath10k_pci_irq_disable (ar);ath10k_pci_irq_sync (ar); -ath10k_pci_flush (ar);napi_synchronize (&ar->napi);napi_disable (&ar->napi); +ath10k_pci_flush (ar);spin_lock_irqsave (&ar_pci->ps_lock, flags);WARN_ON (ar_pci->ps_wake_refcount >0 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 31/239 iio: dac: mcp4922: fix error handling in mcp4922_write_raw
In reply to Greg Kroah-HartmanFrom: Marcus Folkesson <[email protected]>
[ Upstream commit 0833627fc3f757a0dca11e2a9c46c96335a900ee ]
Do not try to write negative values and make sure that the write goes well.
--- drivers/iio/dac/mcp4922.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/iio/dac/mcp4922.c +8 -3
@@ -94,17 +94,22 @@ static int mcp4922_write_raw(struct iio_dev *indio_dev, long mask) {struct mcp4922_state *state =iio_priv (indio_dev); +int ret;if (val2 !=0 )return -EINVAL ;switch (mask) {case IIO_CHAN_INFO_RAW : -if (val >GENMASK (chan->scan_type.realbits-1 ,0 )) +if (val <0 || val >GENMASK (chan->scan_type.realbits -1 ,0 ))return -EINVAL ; val <<= chan->scan_type.shift; - state->value[chan->channel] = val; -return mcp4922_spi_write (state, chan->channel, val); + + ret =mcp4922_spi_write (state, chan->channel, val); +if (!ret) + state->value[chan->channel] = val; +return ret; +default :return -EINVAL ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 32/239 arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage
In reply to Greg Kroah-HartmanFrom: Andre Przywara <[email protected]>
[ Upstream commit 93366b49a35f3a190052734b3f32c8fe2535b53f ]
The Olinuxino board uses DDR3L chips which are supposed to be driven with 1.35V. The reset default of the AXP is properly set to 1.36V.
While technically the chips can also run at 1.5 volts, changing the voltage on the fly while booting Linux is asking for trouble. Also running at a lower voltage saves power.
So fix the DCDC5 value to match the actual board design.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +6 -2
@@ -120,10 +120,14 @@ /* DCDC3 is polyphased with DCDC2 */ +/* + * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal + * 1.35V that the PMIC can drive. + */ ®_dcdc5 { regulator-always-on; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; + regulator-min-microvolt = <1360000>; + regulator-max-microvolt = <1360000>; regulator-name = "vcc-ddr3"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 33/239 arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage
In reply to Greg Kroah-HartmanFrom: Andre Przywara <[email protected]>
[ Upstream commit 480f58cdbe392d4387a2193b6131a277e0111dd0 ]
According to the NanoPi-A64 schematics, DCDC1 is connected to a voltage rail named "VDD_SYS_3.3V". All users seem to expect 3.3V here: the Ethernet PHY, the uSD card slot, the camera interface and the GPIO pins on the headers.
Fix up the voltage on the regulator to lift it up to 3.3V.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts +3 -3
@@ -126,9 +126,9 @@ ®_dcdc1 { regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-3v"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; }; ®_dcdc2 {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 34/239 ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 6f128fa41f310e1f39ebcea9621d2905549ecf52 ]
The "frames" variable is unsigned so the error handling doesn't work properly.
--- sound/core/oss/pcm_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/oss/pcm_plugin.c +2 -2
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->next) {if (plugin->dst_frames) frames = plugin->dst_frames (plugin, frames); -if (snd_BUG_ON (frames <=0 )) +if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 ))return -ENXIO ; plugin = plugin->next; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->prev) {if (plugin->src_frames) frames = plugin->src_frames (plugin, frames); -if (snd_BUG_ON (frames <=0 )) +if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 ))return -ENXIO ; plugin = plugin->prev; err =snd_pcm_plugin_alloc (plugin, frames);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 35/239 arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply
In reply to Greg Kroah-HartmanFrom: Aapo Vienamo <[email protected]>
[ Upstream commit 6ff7705da8806de45ca1490194f0b4eb07725804 ]
On p2180 sdmmc4 is powered from a fixed 1.8 V regulator.
--- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi +1 -0
@@ -282,6 +282,7 @@ status = "okay"; bus-width = <8>; non-removable; + vqmmc-supply = <&vdd_1v8>; }; clocks {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 36/239 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
In reply to Greg Kroah-HartmanFrom: Jay Foster <[email protected]>
[ Upstream commit 10af10db8c76fa5b9bf1f52a895c1cb2c0ac24da ]
Fix a typo. No functional change made by this patch.
--- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91sam9g45.dtsi +1 -1
@@ -566,7 +566,7 @@ }; }; - uart1 { + usart1 { pinctrl_usart1: usart1-0 { atmel,pins = <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 37/239 rtc: rv8803: fix the rv8803 id in the OF table
In reply to Greg Kroah-HartmanFrom: Alexandre Belloni <[email protected]>
[ Upstream commit c856618d20662695fcdb47bf4d560dc457662aec ]
The ID for RV8803 must be rv_8803
--- drivers/rtc/rtc-rv8803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rv8803.c +1 -1
@@ -622,7 +622,7 @@ MODULE_DEVICE_TABLE(i2c, rv8803_id);static const struct of_device_id rv8803_of_match[] = { { .compatible ="microcrystal,rv8803" , - .data = (void *)rx_8900 + .data = (void *)rv_8803 }, { .compatible ="epson,rx8900" ,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 38/239 remoteproc/davinci: Use %zx for formating size_t
In reply to Greg Kroah-HartmanFrom: Bjorn Andersson <[email protected]>
[ Upstream commit 1e28dbbeced6152b9ea7c417ff8cef3f7dcf0f19 ]
da8xx_rproc_mem size is of type size_t, so use %zx to format the debug print of it to avoid a compile warning.
--- drivers/remoteproc/da8xx_remoteproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/da8xx_remoteproc.c +1 -1
@@ -207,7 +207,7 @@ static int da8xx_rproc_get_internal_memories(struct platform_device *pdev, res->start &DA8XX_RPROC_LOCAL_ADDRESS_MASK ; drproc->mem[i].size =resource_size (res); -dev_dbg (dev,"memory %8s: bus addr %pa size 0x%x va %p da 0x%x\n" , +dev_dbg (dev,"memory %8s: bus addr %pa size 0x%zx va %p da 0x%x\n" , mem_names[i], &drproc->mem[i].bus_addr, drproc->mem[i].size, drproc->mem[i].cpu_addr, drproc->mem[i].dev_addr);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 39/239 extcon: cht-wc: Return from default case to avoid warnings
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
[ Upstream commit 962341b54b99965ebec5f70c8d39f1c382eea833 ]
When we have first case to fall through it's not enough to put single comment there to satisfy compiler. Instead of doing that, return fall back value directly from default case.
This to avoid following warnings:
drivers/extcon/extcon-intel-cht-wc.c: In function ‘cht_wc_extcon_get_charger’:include/linux/device.h:1420:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/extcon/extcon-intel-cht-wc.c:148:3: note: in expansion of macro ‘dev_warn’
dev_warn(ext->dev,
^~~~~~~~drivers/extcon/extcon-intel-cht-wc.c:152:2: note: here
case CHT_WC_USBSRC_TYPE_SDP:
^~~~
--- drivers/extcon/extcon-intel-cht-wc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-intel-cht-wc.c +1 -1
@@ -155,7 +155,7 @@ static int cht_wc_extcon_get_charger(struct cht_wc_extcon_data *ext,dev_warn (ext->dev,"Unhandled charger type %d, defaulting to SDP\n" , ret); -/* Fall through, treat as SDP */ +return EXTCON_CHG_USB_SDP ;case CHT_WC_USBSRC_TYPE_SDP :case CHT_WC_USBSRC_TYPE_FLOAT_DP_DN :case CHT_WC_USBSRC_TYPE_OTHER :
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 40/239 cfg80211: Avoid regulatory restore when COUNTRY_IE_IGNORE is set
In reply to Greg Kroah-HartmanFrom: Rajeev Kumar Sirasanagandla <[email protected]>
[ Upstream commit 7417844b63d4b0dc8ab23f88259bf95de7d09b57 ]
When REGULATORY_COUNTRY_IE_IGNORE is set, __reg_process_hint_country_ie() ignores the country code change request from __cfg80211_connect_result() via regulatory_hint_country_ie().
After Disconnect, similar to above, country code should not be reset to world when country IE ignore is set. But this is violated and restore of regulatory settings is invoked by cfg80211_disconnect_work via regulatory_hint_disconnect().
To address this, avoid regulatory restore from regulatory_hint_disconnect() when COUNTRY_IE_IGNORE is set.
Note: Currently, restore_regulatory_settings() takes care of clearing beacon hints. But in the proposed change, regulatory restore is avoided. Therefore, explicitly clear beacon hints when DISABLE_BEACON_HINTS is not set.
--- net/wireless/reg.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
net/wireless/reg.c +46 -0
@@ -2703,8 +2703,54 @@ static void restore_regulatory_settings(bool reset_user)schedule_work (®_work); } +static bool is_wiphy_all_set_reg_flag (enum ieee80211_regulatory_flags flag) +{ +struct cfg80211_registered_device *rdev; +struct wireless_dev *wdev; + +list_for_each_entry (rdev, &cfg80211_rdev_list, list) { +list_for_each_entry (wdev, &rdev->wiphy.wdev_list, list) { +wdev_lock (wdev); +if (!(wdev->wiphy->regulatory_flags & flag)) { +wdev_unlock (wdev); +return false; + } +wdev_unlock (wdev); + } + } + +return true; +} +void regulatory_hint_disconnect (void ) { +/* Restore of regulatory settings is not required when wiphy(s) +* ignore IE from connected access point but clearance of beacon hints +* is required when wiphy(s) supports beacon hints. +*/ +if (is_wiphy_all_set_reg_flag (REGULATORY_COUNTRY_IE_IGNORE )) { +struct reg_beacon *reg_beacon, *btmp; + +if (is_wiphy_all_set_reg_flag (REGULATORY_DISABLE_BEACON_HINTS )) +return ; + +spin_lock_bh (®_pending_beacons_lock); +list_for_each_entry_safe (reg_beacon, btmp, + ®_pending_beacons, list) { +list_del (®_beacon->list); +kfree (reg_beacon); + } +spin_unlock_bh (®_pending_beacons_lock); + +list_for_each_entry_safe (reg_beacon, btmp, + ®_beacon_list, list) { +list_del (®_beacon->list); +kfree (reg_beacon); + } + +return ; + } +pr_debug ("All devices are disconnected, going to restore regulatory settings\n" );restore_regulatory_settings (false); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 41/239 ALSA: seq: Do error checks at creating system ports
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit b8e131542b47b81236ecf6768c923128e1f5db6e ]
snd_seq_system_client_init() doesn't check the errors returned from its port creations. Let's do it properly and handle the error paths.
--- sound/core/seq/seq_system.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
sound/core/seq/seq_system.c +15 -3
@@ -123,6 +123,7 @@ int __init snd_seq_system_client_init(void) {struct snd_seq_port_callback pcallbacks;struct snd_seq_port_info *port; +int err; port =kzalloc (sizeof (*port),GFP_KERNEL );if (!port)
@@ -144,7 +145,10 @@ int __init snd_seq_system_client_init(void) port->flags =SNDRV_SEQ_PORT_FLG_GIVEN_PORT ; port->addr.client = sysclient; port->addr.port =SNDRV_SEQ_PORT_SYSTEM_TIMER ; -snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , port); + err =snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , + port); +if (err <0 ) + goto error_port;/* register announcement port */ strcpy (port->name,"Announce" );
@@ -154,16 +158,24 @@ int __init snd_seq_system_client_init(void) port->flags =SNDRV_SEQ_PORT_FLG_GIVEN_PORT ; port->addr.client = sysclient; port->addr.port =SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE ; -snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , port); + err =snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , + port); +if (err <0 ) + goto error_port; announce_port = port->addr.port;kfree (port);return 0 ; + + error_port: +snd_seq_system_client_done (); +kfree (port); +return err; }/* unregister our internal client */ -void __exit snd_seq_system_client_done(void) +void snd_seq_system_client_done (void ) {int oldsysclient = sysclient;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 42/239 ath9k: fix tx99 with monitor mode interface
In reply to Greg Kroah-HartmanFrom: Felix Fietkau <[email protected]>
[ Upstream commit d9c52fd17cb483bd8a470398afcb79f86c1b77c8 ]
Tx99 is typically configured via a monitor mode interface, which does not get added to the driver as a vif. Since the code currently expects a configured virtual interface for tx99, enabling tx99 via debugfs fails. Since the vif is not needed anyway, remove all checks for it.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 1 - drivers/net/wireless/ath/ath9k/main.c | 12 +++--------- drivers/net/wireless/ath/ath9k/tx99.c | 9 --------- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- 4 files changed, 4 insertions(+), 20 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +0 -1
@@ -1074,7 +1074,6 @@ struct ath_softc {struct ath_spec_scan_priv spec_priv; -struct ieee80211_vif *tx99_vif;struct sk_buff *tx99_skb;bool tx99_state;s16 tx99_power;
drivers/net/wireless/ath/ath9k/main.c +3 -9
@@ -1250,15 +1250,10 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,struct ath_vif *avp = (void *)vif->drv_priv;struct ath_node *an = &avp->mcast_node; -mutex_lock (&sc->mutex); +if (IS_ENABLED (CONFIG_ATH9K_TX99 )) +return -EOPNOTSUPP ; -if (IS_ENABLED (CONFIG_ATH9K_TX99 )) { -if (sc->cur_chan->nvifs >=1 ) { -mutex_unlock (&sc->mutex); -return -EOPNOTSUPP ; - } - sc->tx99_vif = vif; - } +mutex_lock (&sc->mutex);ath_dbg (common,CONFIG ,"Attach a VIF of type: %d\n" , vif->type); sc->cur_chan->nvifs++;
@@ -1341,7 +1336,6 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,ath9k_p2p_remove_vif (sc, vif); sc->cur_chan->nvifs--; - sc->tx99_vif =NULL ;if (!ath9k_is_chanctx_enabled ())list_del (&avp->list);
drivers/net/wireless/ath/ath9k/tx99.c +0 -9
@@ -54,12 +54,6 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)struct ieee80211_hdr *hdr;struct ieee80211_tx_info *tx_info;struct sk_buff *skb; -struct ath_vif *avp; - -if (!sc->tx99_vif) -return NULL ; - - avp = (struct ath_vif *)sc->tx99_vif->drv_priv; skb =alloc_skb (len,GFP_KERNEL );if (!skb)
@@ -77,14 +71,11 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)memcpy (hdr->addr2, hw->wiphy->perm_addr,ETH_ALEN );memcpy (hdr->addr3, hw->wiphy->perm_addr,ETH_ALEN ); - hdr->seq_ctrl |=cpu_to_le16 (avp->seq_no); - tx_info =IEEE80211_SKB_CB (skb);memset (tx_info,0 ,sizeof (*tx_info)); rate = &tx_info->control.rates[0 ]; tx_info->band = sc->cur_chan->chandef.chan->band; tx_info->flags =IEEE80211_TX_CTL_NO_ACK ; - tx_info->control.vif = sc->tx99_vif; rate->count =1 ;if (ah->curchan &&IS_CHAN_HT (ah->curchan)) { rate->flags |=IEEE80211_TX_RC_MCS ;
drivers/net/wireless/ath/ath9k/xmit.c +1 -1
@@ -2952,7 +2952,7 @@ int ath9k_tx99_send(struct ath_softc *sc, struct sk_buff *skb,return -EINVAL ; } -ath_set_rates (sc->tx99_vif,NULL , bf); +ath_set_rates (NULL ,NULL , bf);ath9k_hw_set_desc_link (sc->sc_ah, bf->bf_desc, bf->bf_daddr);ath9k_hw_tx99_start (sc->sc_ah, txctl->txq->axq_qnum);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 43/239 ath10k: limit available channels via DT ieee80211-freq-limit
In reply to Greg Kroah-HartmanFrom: Sven Eckelmann <[email protected]>
[ Upstream commit 34d5629d2ca89d847b7040762b87964c696c14da ]
Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in the RX and TX path. These filtered channel can in theory still be used by the hardware but the signal strength is reduced so much that it makes no sense.
There is already a DT property to limit the available channels but ath10k has to manually call this functionality to limit the currrently set wiphy channels further.
--- drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +2 -0
@@ -17,6 +17,7 @@#include "mac.h" +#include <net/cfg80211.h> #include <net/mac80211.h> #include <linux/etherdevice.h> #include <linux/acpi.h>
@@ -8174,6 +8175,7 @@ int ath10k_mac_register(struct ath10k *ar) ar->hw->wiphy->bands[NL80211_BAND_5GHZ ] = band; } +wiphy_read_of_freq_limits (ar->hw->wiphy);ath10k_mac_setup_ht_vht_cap (ar); ar->hw->wiphy->interface_modes =
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 44/239 gfs2: Dont set GFS2_RDF_UPTODATE when the lvb is updated
In reply to Greg Kroah-HartmanFrom: Bob Peterson <[email protected]>
[ Upstream commit 4f36cb36c9d14340bb200d2ad9117b03ce992cfe ]
The GFS2_RDF_UPTODATE flag in the rgrp is used to determine when a rgrp buffer is valid. It's cleared when the glock is invalidated, signifying that the buffer data is now invalid. But before this patch, function update_rgrp_lvb was setting the flag when it determined it had a valid lvb. But that's an invalid assumption:
just because you have a valid lvb doesn't mean you have valid buffers. After all, another node may have made the lvb valid, and this node just fetched it from the glock via dlm.
Consider this scenario:
1. The file system is mounted with RGRPLVB option.
2. In gfs2_inplace_reserve it locks the rgrp glock EX, but thanks to GL_SKIP, it skips the gfs2_rgrp_bh_get.
3. Since loops == 0 and the allocation target (ap->target) is bigger than the largest known chunk of blocks in the rgrp (rs->rs_rbm.rgd->rd_extfail_pt) it skips that rgrp and bypasses the call to gfs2_rgrp_bh_get there as well.
4. update_rgrp_lvb sees the lvb MAGIC number is valid, so bypasses gfs2_rgrp_bh_get, but it still sets sets GFS2_RDF_UPTODATE due to this invalid assumption.
5. The next time update_rgrp_lvb is called, it sees the bit is set and just returns 0, assuming both the lvb and rgrp are both uptodate. But since this is a smaller allocation, or space has been freed by another node, thus adjusting the lvb values, it decides to use the rgrp for allocations, with invalid rd_free due to the fact it was never updated.
This patch changes update_rgrp_lvb so it doesn't set the UPTODATE flag anymore. That way, it has no choice but to fetch the latest values.
--- fs/gfs2/rgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/rgrp.c +1 -1
@@ -1201,7 +1201,7 @@ static int update_rgrp_lvb(struct gfs2_rgrpd *rgd) rl_flags =be32_to_cpu (rgd->rd_rgl->rl_flags); rl_flags &= ~GFS2_RDF_MASK ; rgd->rd_flags &=GFS2_RDF_MASK ; - rgd->rd_flags |= (rl_flags |GFS2_RDF_UPTODATE |GFS2_RDF_CHECK ); + rgd->rd_flags |= (rl_flags |GFS2_RDF_CHECK );if (rgd->rd_rgl->rl_unlinked ==0 ) rgd->rd_flags &= ~GFS2_RDF_CHECK ; rgd->rd_free =be32_to_cpu (rgd->rd_rgl->rl_free);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 45/239 ASoC: dpcm: Properly initialise hw->rate_max
In reply to Greg Kroah-HartmanFrom: Charles Keepax <[email protected]>
[ Upstream commit e33ffbd9cd39da09831ce62c11025d830bf78d9e ]
If the CPU DAI does not initialise rate_max, say if using using KNOT or CONTINUOUS, then the rate_max field will be initialised to 0. A value of zero in the rate_max field of the hardware runtime will cause the sound card to support no sample rates at all. Obviously this is not desired, just a different mechanism is being used to apply the constraints. As such update the setting of rate_max in dpcm_init_runtime_hw to be consistent with the non-DPCM cases and set rate_max to UINT_MAX if nothing is defined on the CPU DAI.
--- sound/soc/soc-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-pcm.c +1 -1
@@ -1578,7 +1578,7 @@ static void dpcm_init_runtime_hw(struct snd_pcm_runtime *runtime, u64 formats) { runtime->hw.rate_min = stream->rate_min; - runtime->hw.rate_max = stream->rate_max; + runtime->hw.rate_max =min_not_zero (stream->rate_max,UINT_MAX ); runtime->hw.channels_min = stream->channels_min; runtime->hw.channels_max = stream->channels_max;if (runtime->hw.formats)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 46/239 pinctrl: ingenic: Probe driver at subsys_initcall
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
[ Upstream commit 556a36a71ed80e17ade49225b58513ea3c9e4558 ]
Using postcore_initcall() makes the driver try to initialize way too early.
--- drivers/pinctrl/pinctrl-ingenic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-ingenic.c +1 -1
@@ -849,4 +849,4 @@ static int __init ingenic_pinctrl_drv_register(void) {return platform_driver_register (&ingenic_pinctrl_driver); } -postcore_initcall (ingenic_pinctrl_drv_register); +subsys_initcall (ingenic_pinctrl_drv_register);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 47/239 MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
In reply to Greg Kroah-HartmanFrom: Tuomas Tynkkynen <[email protected]>
[ Upstream commit feef7918667b84f9d5653c501542dd8d84ae32af ]
Setting GPIO 21 high seems to be required to enable power to USB ports on the WNDR3400v3. As there is already similar code for WNR3500L, make the existing USB power GPIO code generic and use that.
Patchwork: https://patchwork.linux-mips.org/patch/20259/
--- arch/mips/bcm47xx/workarounds.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
arch/mips/bcm47xx/workarounds.c +5 -3
@@ -5,9 +5,8 @@#include <bcm47xx_board.h> #include <bcm47xx.h> -static void __init bcm47xx_workarounds_netgear_wnr3500l (void ) +static void __init bcm47xx_workarounds_enable_usb_power (int usb_power) { -const int usb_power =12 ;int err; err =gpio_request_one (usb_power,GPIOF_OUT_INIT_HIGH ,"usb_power" );
@@ -23,7 +22,10 @@ void __init bcm47xx_workarounds(void)switch (board) {case BCM47XX_BOARD_NETGEAR_WNR3500L : -bcm47xx_workarounds_netgear_wnr3500l (); +bcm47xx_workarounds_enable_usb_power (12 ); +break ; +case BCM47XX_BOARD_NETGEAR_WNDR3400_V3 : +bcm47xx_workarounds_enable_usb_power (21 );break ;default :/* No workaround(s) needed */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 48/239 ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit 64858773d78e820003a94e5a7179d368213655d6 ]
This patch adds missing properties to the CODEC and sound nodes, so the audio will work also on Snow rev5 Chromebook. This patch is an extension to the commit e9eefc3f8ce0 ("ARM: dts: exynos: Add missing clock and DAI properties to the max98095 node in Snow Chromebook")
and commit 6ab569936d60 ("ARM: dts: exynos: Enable HDMI audio on Snow Chromebook"). It has been reported that such changes work fine on the rev5 board too.
--- arch/arm/boot/dts/exynos5250-snow-rev5.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/exynos5250-snow-rev5.dts +11 -0
@@ -23,6 +23,14 @@ samsung,model = "Snow-I2S-MAX98090"; samsung,audio-codec = <&max98090>; + + cpu { + sound-dai = <&i2s0 0>; + }; + + codec { + sound-dai = <&max98090 0>, <&hdmi>; + }; }; };
@@ -34,6 +42,9 @@ interrupt-parent = <&gpx0>; pinctrl-names = "default"; pinctrl-0 = <&max98090_irq>; + clocks = <&pmu_system_controller 0>; + clock-names = "mclk"; + #sound-dai-cells = <1>; }; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 49/239 liquidio: fix race condition in instruction completion processing
In reply to Greg Kroah-HartmanFrom: Rick Farrington <[email protected]>
[ Upstream commit b943f17e06493fd2c7fd00743093ad5dcdb90e7f ]
In lio_enable_irq, the pkt_in_done count register was being cleared to zero. However, there could be some completed instructions which were not yet processed due to budget and limit constraints.
So, only write this register with the number of actual completions that were processed.
--- drivers/net/ethernet/cavium/liquidio/octeon_device.c | 5 +++-- drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 ++ drivers/net/ethernet/cavium/liquidio/request_manager.c | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/cavium/liquidio/octeon_device.c +3 -2
@@ -1444,8 +1444,9 @@ void lio_enable_irq(struct octeon_droq *droq, struct octeon_instr_queue *iq) }if (iq) {spin_lock_bh (&iq->lock); -writel (iq->pkt_in_done, iq->inst_cnt_reg); - iq->pkt_in_done =0 ; +writel (iq->pkts_processed, iq->inst_cnt_reg); + iq->pkt_in_done -= iq->pkts_processed; + iq->pkts_processed =0 ;/* this write needs to be flushed before we release the lock */ mmiowb ();spin_unlock_bh (&iq->lock);
drivers/net/ethernet/cavium/liquidio/octeon_iq.h +2 -0
@@ -84,6 +84,8 @@ struct octeon_instr_queue {u32 pkt_in_done; +u32 pkts_processed; +/** A spinlock to protect access to the input ring.*/ spinlock_t iq_flush_running_lock;
drivers/net/ethernet/cavium/liquidio/request_manager.c +2 -0
@@ -122,6 +122,7 @@ int octeon_init_instr_queue(struct octeon_device *oct, iq->do_auto_flush =1 ; iq->db_timeout = (u32 )conf->db_timeout;atomic_set (&iq->instr_pending,0 ); + iq->pkts_processed =0 ;/* Initialize the spinlock for this instruction queue */ spin_lock_init (&iq->lock);
@@ -474,6 +475,7 @@ octeon_flush_iq(struct octeon_device *oct, struct octeon_instr_queue *iq,lio_process_iq_request_list (oct, iq,0 );if (inst_processed) { + iq->pkts_processed += inst_processed;atomic_sub (inst_processed, &iq->instr_pending); iq->stats.instr_processed += inst_processed; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 50/239 ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit f8f3b7fc21b1cb59385b780acd9b9a26d04cb7b2 ]
Regulators, which are marked as 'on-in-suspend' seems to be critical for board operation, thus they must not be disabled anytime. This can be only assured by marking them as 'always-on', because otherwise some actions of their clients might result in turning them off. This patch restores suspend/resume operation on Peach-Pit Chromebook board. It partially reverts 'always-on' property removal done by the commit mentioned in the Fixes tag.
--- arch/arm/boot/dts/exynos5420-peach-pit.dts | 3 +++ arch/arm/boot/dts/exynos5800-peach-pi.dts | 3 +++ 2 files changed, 6 insertions(+)
arch/arm/boot/dts/exynos5420-peach-pit.dts +3 -0
@@ -301,6 +301,7 @@ regulator-name = "vdd_1v35"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -322,6 +323,7 @@ regulator-name = "vdd_2v"; regulator-min-microvolt = <2000000>; regulator-max-microvolt = <2000000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -332,6 +334,7 @@ regulator-name = "vdd_1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
arch/arm/boot/dts/exynos5800-peach-pi.dts +3 -0
@@ -301,6 +301,7 @@ regulator-name = "vdd_1v35"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -322,6 +323,7 @@ regulator-name = "vdd_2v"; regulator-min-microvolt = <2000000>; regulator-max-microvolt = <2000000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -332,6 +334,7 @@ regulator-name = "vdd_1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 51/239 i40e: use correct length for strncpy
In reply to Greg Kroah-HartmanFrom: Mitch Williams <[email protected]>
[ Upstream commit 7eb74ff891b4e94b8bac48f648a21e4b94ddee64 ]
Caught by GCC 8. When we provide a length for strncpy, we should not include the terminating null. So we must tell it one less than the size of the destination buffer.
--- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_ptp.c +2 -1
@@ -704,7 +704,8 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)if (!IS_ERR_OR_NULL (pf->ptp_clock))return 0 ; -strncpy (pf->ptp_caps.name, i40e_driver_name,sizeof (pf->ptp_caps.name)); +strncpy (pf->ptp_caps.name, i40e_driver_name, +sizeof (pf->ptp_caps.name) -1 ); pf->ptp_caps.owner =THIS_MODULE ; pf->ptp_caps.max_adj =999999999 ; pf->ptp_caps.n_ext_ts =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 52/239 i40e: hold the rtnl lock on clearing interrupt scheme
In reply to Greg Kroah-HartmanFrom: Patryk Małek <[email protected]>
[ Upstream commit 5cba17b14182696d6bb0ec83a1d087933f252241 ]
Hold the rtnl lock when we're clearing interrupt scheme in i40e_shutdown and in i40e_remove.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +8 -0
@@ -11885,6 +11885,7 @@ static void i40e_remove(struct pci_dev *pdev)mutex_destroy (&hw->aq.asq_mutex);/* Clear all dynamic memory lists of rings, q_vectors, and VSIs */ +rtnl_lock ();i40e_clear_interrupt_scheme (pf);for (i =0 ; i < pf->num_alloc_vsi; i++) {if (pf->vsi[i]) {
@@ -11893,6 +11894,7 @@ static void i40e_remove(struct pci_dev *pdev) pf->vsi[i] =NULL ; } } +rtnl_unlock ();for (i =0 ; i <I40E_MAX_VEB ; i++) {kfree (pf->veb[i]);
@@ -12086,7 +12088,13 @@ static void i40e_shutdown(struct pci_dev *pdev)wr32 (hw,I40E_PFPM_WUFC , (pf->wol_en ?I40E_PFPM_WUFC_MAG_MASK :0 )); +/* Since we're going to destroy queues during the +* i40e_clear_interrupt_scheme() we should hold the RTNL lock for this +* whole section +*/ +rtnl_lock ();i40e_clear_interrupt_scheme (pf); +rtnl_unlock ();if (system_state ==SYSTEM_POWER_OFF ) {pci_wake_from_d3 (pdev, pf->wol_en);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 53/239 i40e: Prevent deleting MAC address from VF when set by PF
In reply to Greg Kroah-HartmanFrom: Patryk Małek <[email protected]>
[ Upstream commit 5907cf6c5bbe78be2ed18b875b316c6028b20634 ]
To prevent VF from deleting MAC address that was assigned by the PF we need to check for that scenario when we try to delete a MAC address from a VF.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +10 -0
@@ -2177,6 +2177,16 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) ret =I40E_ERR_INVALID_MAC_ADDR ; goto error_param; } + +if (vf->pf_set_mac && +ether_addr_equal (al->list[i].addr, + vf->default_lan_addr.addr)) { +dev_err (&pf->pdev->dev, +"MAC addr %pM has been set by PF, cannot delete it for VF %d, reset VF to change MAC addr\n" , + vf->default_lan_addr.addr, vf->vf_id); + ret =I40E_ERR_PARAM ; + goto error_param; + } } vsi = pf->vsi[vf->lan_vsi_idx];
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 54/239 IB/rxe: fixes for rdma read retry
In reply to Greg Kroah-HartmanFrom: Vijay Immanuel <[email protected]>
[ Upstream commit 030e46e495af855a13964a0aab9753ea82a96edc ]
When a read request is retried for the remaining partial data, the response may restart from read response first or read response only. So support those cases.
Do not advance the comp psn beyond the current wqe's last_psn as that could skip over an entire read wqe and will cause the req_retry() logic to set an incorrect req psn.
An example sequence is as follows:
Write PSN 40 -- this is the current WQE.
Read request PSN 41
Write PSN 42
Receive ACK PSN 42 -- this will complete the current WQE for PSN 40, and set the comp psn to 42 which is a problem because the read request at PSN 41 has been skipped over. So when req_retry() tries to retransmit the read request, it sets the req psn to 42 which is incorrect.
When retrying a read request, calculate the number of psns completed based on the dma resid instead of the wqe first_psn. The wqe first_psn could have moved if the read request was retried multiple times.
Set the reth length to the dma resid to handle read retries for the remaining partial data.
--- drivers/infiniband/sw/rxe/rxe_comp.c | 21 ++++++++++++++++----- drivers/infiniband/sw/rxe/rxe_req.c | 15 +++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-)
drivers/infiniband/sw/rxe/rxe_comp.c +16 -5
@@ -253,6 +253,17 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE :if (pkt->opcode !=IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE && pkt->opcode !=IB_OPCODE_RC_RDMA_READ_RESPONSE_LAST ) { +/* read retries of partial data may restart from +* read response first or response only. +*/ +if ((pkt->psn == wqe->first_psn && + pkt->opcode == +IB_OPCODE_RC_RDMA_READ_RESPONSE_FIRST ) || + (wqe->first_psn == wqe->last_psn && + pkt->opcode == +IB_OPCODE_RC_RDMA_READ_RESPONSE_ONLY )) +break ; +return COMPST_ERROR ; }break ;
@@ -501,11 +512,11 @@ static inline enum comp_state complete_wqe(struct rxe_qp *qp, struct rxe_pkt_info *pkt, struct rxe_send_wqe *wqe) { - qp->comp.opcode = -1; - -if (pkt) { -if (psn_compare (pkt->psn, qp->comp.psn) >=0 ) - qp->comp.psn = (pkt->psn +1 ) &BTH_PSN_MASK ; +if (pkt && wqe->state == wqe_state_pending) { +if (psn_compare (wqe->last_psn, qp->comp.psn) >=0 ) { + qp->comp.psn = (wqe->last_psn +1 ) &BTH_PSN_MASK ; + qp->comp.opcode =-1 ; + }if (qp->req.wait_psn) { qp->req.wait_psn =0 ;
drivers/infiniband/sw/rxe/rxe_req.c +9 -6
@@ -73,9 +73,6 @@ static void req_retry(struct rxe_qp *qp)int npsn;int first =1 ; - wqe =queue_head (qp->sq.queue); - npsn = (qp->comp.psn - wqe->first_psn) &BTH_PSN_MASK ; - qp->req.wqe_index =consumer_index (qp->sq.queue); qp->req.psn = qp->comp.psn; qp->req.opcode =-1 ;
@@ -107,11 +104,17 @@ static void req_retry(struct rxe_qp *qp)if (first) { first =0 ; -if (mask &WR_WRITE_OR_SEND_MASK ) +if (mask &WR_WRITE_OR_SEND_MASK ) { + npsn = (qp->comp.psn - wqe->first_psn) & +BTH_PSN_MASK ;retry_first_write_send (qp, wqe, mask, npsn); + } -if (mask &WR_READ_MASK ) +if (mask &WR_READ_MASK ) { + npsn = (wqe->dma.length - wqe->dma.resid) / + qp->mtu; wqe->iova += npsn * qp->mtu; + } } wqe->state = wqe_state_posted;
@@ -435,7 +438,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,if (pkt->mask &RXE_RETH_MASK ) {reth_set_rkey (pkt, ibwr->wr.rdma.rkey);reth_set_va (pkt, wqe->iova); -reth_set_len (pkt, wqe->dma.length); +reth_set_len (pkt, wqe->dma.resid); }if (pkt->mask &RXE_IMMDT_MASK )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 55/239 iwlwifi: dont WARN on trying to dump dead firmware
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 84f260251ed8153e84c64eb2c5278ab18d3ddef6 ]
There's no point in warning here, the user will just get an error back to the debugfs file write, and warning just makes it seem like there's an internal consistency problem when in reality the user just happened to hit this at a bad time. Remove the warning.
--- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/dbg.c +3 -4
@@ -954,7 +954,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,* If the loading of the FW completed successfully, the next step is to * get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non * zero, the FW was already loaded successully. If the state is "NO_FW" -* in such a case - WARN and exit, since FW may be dead. Otherwise, we +* in such a case - exit, since FW may be dead. Otherwise, we * can try to collect the data, since FW might just not be fully * loaded (no "ALIVE" yet), and the debug data is accessible. *
@@ -962,9 +962,8 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,* config. In such a case, due to HW access problems, we might * collect garbage. */ -if (WARN ((fwrt->trans->state ==IWL_TRANS_NO_FW ) && - fwrt->smem_cfg.num_lmacs, -"Can't collect dbg data when FW isn't alive\n" )) +if (fwrt->trans->state ==IWL_TRANS_NO_FW && + fwrt->smem_cfg.num_lmacs)return -EIO ;if (test_and_set_bit (IWL_FWRT_STATUS_DUMPING , &fwrt->status))
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 56/239 iwlwifi: mvm: avoid sending too many BARs
In reply to Greg Kroah-HartmanFrom: Sara Sharon <[email protected]>
[ Upstream commit 1a19c139be18ed4d6d681049cc48586fae070120 ]
When we receive TX response, we may release a few packets due to a hole that was closed in the transmission window.
However, if that frame failed, we will mark all the released frames as failed and will send multiple BARs.
This affects statistics badly, and cause unnecessary frames transmission.
Instead, mark all the following packets as success, with the desired result of sending a bar for the failed frame only.
--- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +8 -0
@@ -1378,6 +1378,14 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,break ; } +/* +* If we are freeing multiple frames, mark all the frames +* but the first one as acked, since they were acknowledged +* before +* */ +if (skb_freed >1 ) + info->flags |=IEEE80211_TX_STAT_ACK ; +iwl_mvm_tx_status_check_trigger (mvm, status); info->status.rates[0 ].count = tx_resp->failure_frame +1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 57/239 ARM: dts: pxa: fix the rtc controller
In reply to Greg Kroah-HartmanFrom: Robert Jarzmik <[email protected]>
[ Upstream commit 24a610eba32a80ed778ea79680b600c3fe73d7de ]
The RTC controller is fed by an external fixed 32kHz clock. Yet the driver wants to acquire this clock, even though it doesn't make any use of it, ie. doesn't get the rate to make calculation.
Therefore, use the exported 32.768kHz clock in the PXA clock tree to make the driver happy and working.
--- arch/arm/boot/dts/pxa25x.dtsi | 4 ++++ arch/arm/boot/dts/pxa27x.dtsi | 4 ++++ 2 files changed, 8 insertions(+)
arch/arm/boot/dts/pxa25x.dtsi +4 -0
@@ -80,6 +80,10 @@ #pwm-cells = <1>; clocks = <&clks CLK_PWM1>; }; + + rtc@40900000 { + clocks = <&clks CLK_OSC32k768>; + }; }; timer@40a00000 {
arch/arm/boot/dts/pxa27x.dtsi +4 -0
@@ -113,6 +113,10 @@ status = "disabled"; }; + + rtc@40900000 { + clocks = <&clks CLK_OSC32k768>; + }; }; clocks {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 58/239 ARM: dts: pxa: fix power i2c base address
In reply to Greg Kroah-HartmanFrom: Marcel Ziswiler <[email protected]>
[ Upstream commit 8a1ecc01a473b75ab97be9b36f623e4551a6e9ae ]
There is one too many zeroes in the Power I2C base address. Fix this.
--- arch/arm/boot/dts/pxa27x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/pxa27x.dtsi +1 -1
@@ -71,7 +71,7 @@ clocks = <&clks CLK_PWM1>; }; - pwri2c: i2c@40f000180 { + pwri2c: i2c@40f00180 { compatible = "mrvl,pxa-i2c"; reg = <0x40f00180 0x24>; interrupts = <6>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 59/239 rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
In reply to Greg Kroah-HartmanFrom: Larry Finger <[email protected]>
[ Upstream commit 199ba9faca909e77ac533449ecd1248123ce89e7 ]
In gcc8, when the 3rd argument (size) of a call to strncpy() matches the length of the first argument, the compiler warns of the possibility of an unterminated string. Using strlcpy() forces a null at the end.
--- drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c +1 -1
@@ -146,7 +146,7 @@ static int rtl8187_register_led(struct ieee80211_hw *dev, led->dev = dev; led->ledpin = ledpin; led->is_radio = is_radio; -strncpy (led->name, name,sizeof (led->name)); +strlcpy (led->name, name,sizeof (led->name)); led->led_dev.name = led->name; led->led_dev.default_trigger = default_trigger;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 60/239 soc: imx: gpc: fix PDN delay
In reply to Greg Kroah-HartmanFrom: Sven Schmitt <[email protected]>
[ Upstream commit 9f4d61d531e0efc9c3283963ae5ef7e314579191 ]
imx6_pm_domain_power_off() reads iso and iso2sw from GPC_PGC_PUPSCR_OFFS which stores the power up delays.
So use GPC_PGC_PDNSCR_OFFS for the correct delays.
--- drivers/soc/imx/gpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/imx/gpc.c +1 -1
@@ -73,7 +73,7 @@ static int imx6_pm_domain_power_off(struct generic_pm_domain *genpd)return -EBUSY ;/* Read ISO and ISO2SW power down delays */ -regmap_read (pd->regmap, pd->reg_offs +GPC_PGC_PUPSCR_OFFS , &val); +regmap_read (pd->regmap, pd->reg_offs +GPC_PGC_PDNSCR_OFFS , &val); iso = val &0x3f ; iso2sw = (val >>8 ) &0x3f ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 61/239 ASoC: rsnd: ssi: Fix issue in dma data address assignment
In reply to Greg Kroah-HartmanFrom: Jiada Wang <[email protected]>
[ Upstream commit 0e289012b47a2de1f029a6b61c75998e2f159dd9 ]
Same SSI device may be used in different dai links, by only having one dma struct in rsnd_ssi, after the first instance's dma config be initilized, the following instances can no longer configure dma, this causes issue, when their dma data address are different from the first instance.
--- sound/soc/sh/rcar/rsnd.h | 1 + sound/soc/sh/rcar/ssi.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
sound/soc/sh/rcar/rsnd.h +1 -0
@@ -432,6 +432,7 @@ struct rsnd_dai_stream {char name[RSND_DAI_NAME_SIZE ];struct snd_pcm_substream *substream;struct rsnd_mod *mod[RSND_MOD_MAX ]; +struct rsnd_mod *dma;struct rsnd_dai *rdai;u32 parent_ssi_status; };
sound/soc/sh/rcar/ssi.c +1 -3
@@ -66,7 +66,6 @@struct rsnd_ssi {struct rsnd_mod mod; -struct rsnd_mod *dma;u32 flags;u32 cr_own;
@@ -868,7 +867,6 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,struct rsnd_dai_stream *io, struct rsnd_priv *priv) { - struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); int ret;/*
@@ -883,7 +881,7 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,return ret;/* SSI probe might be called many times in MUX multi path */ - ret =rsnd_dma_attach (io, mod, &ssi->dma); + ret =rsnd_dma_attach (io, mod, &io->dma);return ret; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 62/239 net: phy: mscc: read vsc8531,vddmac as an u32
In reply to Greg Kroah-HartmanFrom: Quentin Schulz <[email protected]>
[ Upstream commit a993e0f583c7925adaa7721226ccd7a41e7e63d1 ]
In the DT binding, it is specified nowhere that 'vsc8531,vddmac' is an u16, even though it's read as an u16 in the driver.
Let's update the driver to take into consideration that the 'vsc8531,vddmac' property is of the default type u32.
--- drivers/net/phy/mscc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/phy/mscc.c +3 -3
@@ -111,7 +111,7 @@ struct vsc8531_private {#ifdef CONFIG_OF_MDIO struct vsc8531_edge_rate_table { -u16 vddmac; +u32 vddmac;u8 slowdown[8 ]; };
@@ -376,7 +376,7 @@ out_unlock:static int vsc85xx_edge_rate_magic_get (struct phy_device *phydev) {u8 sd; -u16 vdd; +u32 vdd;int rc, i, j;struct device *dev = &phydev->mdio.dev;struct device_node *of_node = dev->of_node;
@@ -385,7 +385,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)if (!of_node)return -ENODEV ; - rc =of_property_read_u16 (of_node,"vsc8531,vddmac" , &vdd); + rc =of_property_read_u32 (of_node,"vsc8531,vddmac" , &vdd);if (rc !=0 ) vdd =MSCC_VDDMAC_3300 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 63/239 net: phy: mscc: read vsc8531, edge-slowdown as an u32
In reply to Greg Kroah-HartmanFrom: Quentin Schulz <[email protected]>
[ Upstream commit 36c53cf0f46526b898390659b125155939f67892 ]
In the DT binding, it is specified nowhere that 'vsc8531,edge-slowdown' is an u8, even though it's read as an u8 in the driver.
Let's update the driver to take into consideration that the 'vsc8531,edge-slowdown' property is of the default type u32.
--- drivers/net/phy/mscc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/phy/mscc.c +3 -4
@@ -112,7 +112,7 @@ struct vsc8531_private {#ifdef CONFIG_OF_MDIO struct vsc8531_edge_rate_table {u32 vddmac; -u8 slowdown[8 ]; +u32 slowdown[8 ]; }; static const struct vsc8531_edge_rate_table edge_table[] = {
@@ -375,8 +375,7 @@ out_unlock:#ifdef CONFIG_OF_MDIO static int vsc85xx_edge_rate_magic_get (struct phy_device *phydev) { -u8 sd; -u32 vdd; +u32 vdd, sd;int rc, i, j;struct device *dev = &phydev->mdio.dev;struct device_node *of_node = dev->of_node;
@@ -389,7 +388,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)if (rc !=0 ) vdd =MSCC_VDDMAC_3300 ; - rc =of_property_read_u8 (of_node,"vsc8531,edge-slowdown" , &sd); + rc =of_property_read_u32 (of_node,"vsc8531,edge-slowdown" , &sd);if (rc !=0 ) sd =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 64/239 ARM: dts: meson8: fix the clock controller register size
In reply to Greg Kroah-HartmanFrom: Martin Blumenstingl <[email protected]>
[ Upstream commit f7f9da89bc4f61e33f7b9f5c75c4efdc1f0455d8 ]
The clock controller registers are not 0x460 wide because the reset controller starts at CBUS 0x4404. This currently overlaps with the clock controller (which is at CBUS 0x4000).
There is no public documentation available on the actual size of the clock controller's register area (also called "HHI"). However, in Amlogic's GPL kernel sources the last "HHI" register is HHI_HDMI_PHY_CNTL2 at CBUS + 0x43a8. 0x400 was chosen because that size doesn't seem unlikely.
--- arch/arm/boot/dts/meson8.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/meson8.dtsi +1 -1
@@ -170,7 +170,7 @@ #clock-cells = <1>; #reset-cells = <1>; compatible = "amlogic,meson8-clkc"; - reg = <0x8000 0x4>, <0x4000 0x460>; + reg = <0x8000 0x4>, <0x4000 0x400>; }; pwm_ef: pwm@86c0 {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 65/239 ARM: dts: meson8b: fix the clock controller register size
In reply to Greg Kroah-HartmanFrom: Martin Blumenstingl <[email protected]>
[ Upstream commit f31094fe8c16fbd2ca47921acf93b744b045aace ]
The clock controller registers are not 0x460 wide because the reset controller starts at CBUS 0x4404. This currently overlaps with the clock controller (which is at CBUS 0x4000).
There is no public documentation available on the actual size of the clock controller's register area (also called "HHI"). However, in Amlogic's GPL kernel sources the last "HHI" register is HHI_HDMI_PHY_CNTL2 at CBUS + 0x43a8. 0x400 was chosen because that size doesn't seem unlikely.
--- arch/arm/boot/dts/meson8b.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/meson8b.dtsi +1 -1
@@ -121,7 +121,7 @@ #clock-cells = <1>; #reset-cells = <1>; compatible = "amlogic,meson8b-clkc"; - reg = <0x8000 0x4>, <0x4000 0x460>; + reg = <0x8000 0x4>, <0x4000 0x400>; }; reset: reset-controller@4404 {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 66/239 net: lan78xx: Bail out if lan78xx_get_endpoints fails
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
[ Upstream commit fa8cd98c06407b5798b927cd7fd14d30f360ed02 ]
We need to bail out if lan78xx_get_endpoints() fails, otherwise the result is overwritten.
--- drivers/net/usb/lan78xx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/usb/lan78xx.c +5 -0
@@ -2818,6 +2818,11 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)int i; ret =lan78xx_get_endpoints (dev, intf); +if (ret) { +netdev_warn (dev->net,"lan78xx_get_endpoints failed: %d\n" , + ret); +return ret; + } dev->data[0 ] = (unsigned long )kzalloc (sizeof (*pdata),GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 67/239 ASoC: sgtl5000: avoid division by zero if lo_vag is zero
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 9ab708aef61f5620113269a9d1bdb1543d1207d0 ]
In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag is set to zero and later vol_quot is computed by dividing by lo_vag causing a division by zero error. Fix this by avoiding a zero division and set vol_quot to zero in this specific case so that the lowest setting for i is correctly set.
--- sound/soc/codecs/sgtl5000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sgtl5000.c +1 -1
@@ -1314,7 +1314,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)* Searching for a suitable index solving this formula: * idx = 40 * log10(vag_val / lo_cagcntrl) + 15 */ - vol_quot = (vag *100 ) / lo_vag; + vol_quot = lo_vag ? (vag *100 ) / lo_vag :0 ; lo_vol =0 ;for (i =0 ; i <ARRAY_SIZE (vol_quot_table); i++) {if (vol_quot >= vol_quot_table[i])
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 68/239 ARM: dts: exynos: Disable pull control for S5M8767 PMIC
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit ef2ecab9af5feae97c47b7f61cdd96f7f49b2c23 ]
S5M8767 PMIC interrupt line on Exynos5250-based Arndale board has external pull-up resistors, so disable any pull control for it in in controller node. This fixes support for S5M8767 interrupts and enables operation of wakeup from S5M8767 RTC alarm.
--- arch/arm/boot/dts/exynos5250-arndale.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos5250-arndale.dts +9 -0
@@ -169,6 +169,8 @@ reg = <0x66>; interrupt-parent = <&gpx3>; interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&s5m8767_irq>; vinb1-supply = <&main_dc_reg>; vinb2-supply = <&main_dc_reg>;
@@ -544,6 +546,13 @@ cap-sd-highspeed; }; +&pinctrl_0 { + s5m8767_irq: s5m8767-irq { + samsung,pins = "gpx3-2"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; +}; + &rtc { status = "okay"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 69/239 ath10k: wmi: disable softirqs while calling ieee80211_rx
In reply to Greg Kroah-HartmanFrom: Erik Stromdahl <[email protected]>
[ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ]
This is done in order not to trig the below warning in ieee80211_rx_napi:
WARN_ON_ONCE(softirq_count() == 0);
ieee80211_rx_napi requires that softirq's are disabled during execution.
The High latency bus drivers (SDIO and USB) sometimes call the wmi ep_rx_complete callback from non softirq context, resulting in a trigger of the above warning.
Calling ieee80211_rx_ni with softirq's already disabled (e.g., from softirq context) should be safe as the local_bh_disable and local_bh_enable functions (called from ieee80211_rx_ni) are fully reentrant.
--- drivers/net/wireless/ath/ath10k/wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/wmi.c +2 -1
@@ -2414,7 +2414,8 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) status->freq, status->band, status->signal, status->rate_idx); -ieee80211_rx (ar->hw, skb); +ieee80211_rx_ni (ar->hw, skb); +return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 70/239 IB/ipoib: Ensure that MTU isnt less than minimum permitted
In reply to Greg Kroah-HartmanFrom: Muhammad Sammar <[email protected]>
[ Upstream commit 142a9c287613560edf5a03c8d142c8b6ebc1995b ]
It is illegal to change MTU to a value lower than the minimum MTU stated in ethernet spec. In addition to that we need to add 4 bytes for encapsulation header (IPOIB_ENCAP_LEN).
Before "ifconfig ib0 mtu 0" command, succeeds while it obviously shouldn't.
--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/ulp/ipoib/ipoib_main.c +2 -1
@@ -249,7 +249,8 @@ static int ipoib_change_mtu(struct net_device *dev, int new_mtu)return 0 ; } -if (new_mtu >IPOIB_UD_MTU (priv->max_ib_mtu)) +if (new_mtu < (ETH_MIN_MTU +IPOIB_ENCAP_LEN ) || + new_mtu >IPOIB_UD_MTU (priv->max_ib_mtu))return -EINVAL ; priv->admin_mtu = new_mtu;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 71/239 RDMA/core: Rate limit MAD error messages
In reply to Greg Kroah-HartmanFrom: Parav Pandit <[email protected]>
[ Upstream commit f9d08f1e1939ad4d92e38bd3dee6842512f5bee6 ]
While registering a mad agent, a user space can trigger various errors and flood the logs.
Therefore, decrease verbosity and rate limit such error messages. While we are at it, use __func__ to print function name.
--- drivers/infiniband/core/mad.c | 72 ++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 35 deletions(-)
drivers/infiniband/core/mad.c +37 -35
@@ -217,30 +217,30 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,/* Validate parameters */ qpn =get_spl_qp_index (qp_type);if (qpn ==-1 ) { -dev_notice (&device->dev, -"ib_register_mad_agent: invalid QP Type %d\n" , - qp_type); +dev_dbg_ratelimited (&device->dev,"%s: invalid QP Type %d\n" , + __func__, qp_type); goto error1; }if (rmpp_version && rmpp_version !=IB_MGMT_RMPP_VERSION ) { -dev_notice (&device->dev, -"ib_register_mad_agent: invalid RMPP Version %u\n" , - rmpp_version); +dev_dbg_ratelimited (&device->dev, +"%s: invalid RMPP Version %u\n" , + __func__, rmpp_version); goto error1; }/* Validate MAD registration request if supplied */ if (mad_reg_req) {if (mad_reg_req->mgmt_class_version >=MAX_MGMT_VERSION ) { -dev_notice (&device->dev, -"ib_register_mad_agent: invalid Class Version %u\n" , - mad_reg_req->mgmt_class_version); +dev_dbg_ratelimited (&device->dev, +"%s: invalid Class Version %u\n" , + __func__, + mad_reg_req->mgmt_class_version); goto error1; }if (!recv_handler) { -dev_notice (&device->dev, -"ib_register_mad_agent: no recv_handler\n" ); +dev_dbg_ratelimited (&device->dev, +"%s: no recv_handler\n" , __func__); goto error1; }if (mad_reg_req->mgmt_class >=MAX_MGMT_CLASS ) {
@@ -250,9 +250,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,*/ if (mad_reg_req->mgmt_class !=IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid Mgmt Class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid Mgmt Class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }else if (mad_reg_req->mgmt_class ==0 ) {
@@ -260,8 +260,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,* Class 0 is reserved in IBA and is used for * aliasing of IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE */ -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid Mgmt Class 0\n" ); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid Mgmt Class 0\n" , + __func__); goto error1; }else if (is_vendor_class (mad_reg_req->mgmt_class)) {/*
@@ -269,18 +270,19 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,* ensure supplied OUI is not zero */ if (!is_vendor_oui (mad_reg_req->oui)) { -dev_notice (&device->dev, -"ib_register_mad_agent: No OUI specified for class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: No OUI specified for class 0x%x\n" , + __func__, + mad_reg_req->mgmt_class); goto error1; } }/* Make sure class supplied is consistent with RMPP */ if (!ib_is_mad_class_rmpp (mad_reg_req->mgmt_class)) {if (rmpp_version) { -dev_notice (&device->dev, -"ib_register_mad_agent: RMPP version for non-RMPP class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: RMPP version for non-RMPP class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }
@@ -291,9 +293,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, IB_MGMT_CLASS_SUBN_LID_ROUTED) && (mad_reg_req->mgmt_class != IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid SM QP type: class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid SM QP type: class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }else {
@@ -301,9 +303,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, IB_MGMT_CLASS_SUBN_LID_ROUTED) || (mad_reg_req->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid GS QP type: class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid GS QP type: class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }
@@ -318,18 +320,18 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,/* Validate device and port */ port_priv =ib_get_mad_port (device, port_num);if (!port_priv) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid port %d\n" , - port_num); +dev_dbg_ratelimited (&device->dev,"%s: Invalid port %d\n" , + __func__, port_num); ret =ERR_PTR (-ENODEV ); goto error1; } -/* Verify the QP requested is supported. For example, Ethernet devices -* will not have QP0 */ +/* Verify the QP requested is supported. For example, Ethernet devices +* will not have QP0. +*/ if (!port_priv->qp_info[qpn].qp) { -dev_notice (&device->dev, -"ib_register_mad_agent: QP %d not supported\n" , qpn); +dev_dbg_ratelimited (&device->dev,"%s: QP %d not supported\n" , + __func__, qpn); ret =ERR_PTR (-EPROTONOSUPPORT ); goto error1; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 72/239 RDMA/core: Follow correct unregister order between sysfs and cgroup
In reply to Greg Kroah-HartmanFrom: Parav Pandit <[email protected]>
[ Upstream commit c715a39541bb399eb03d728a996b224d90ce1336 ]
During register_device() init sequence is,
(a) register with rdma cgroup followed by
(b) register with sysfs
Therefore, unregister_device() sequence should follow the reverse order.
--- drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/device.c +1 -1
@@ -599,8 +599,8 @@ void ib_unregister_device(struct ib_device *device) }up_read (&lists_rwsem); -ib_device_unregister_rdmacg (device);ib_device_unregister_sysfs (device); +ib_device_unregister_rdmacg (device);mutex_unlock (&device_mutex);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 73/239 mips: txx9: fix iounmap related issue
In reply to Greg Kroah-HartmanFrom: Ding Xiang <[email protected]>
[ Upstream commit c6e1241a82e6e74d1ae5cc34581dab2ffd6022d0 ]
if device_register return error, iounmap should be called, also iounmap need to call before put_device.
Patchwork: https://patchwork.linux-mips.org/patch/20476/
--- arch/mips/txx9/generic/setup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/mips/txx9/generic/setup.c +2 -3
@@ -959,12 +959,11 @@ void __init txx9_sramc_init(struct resource *r) goto exit_put; err =sysfs_create_bin_file (&dev->dev.kobj, &dev->bindata_attr);if (err) { -device_unregister (&dev->dev);iounmap (dev->base); -kfree (dev); +device_unregister (&dev->dev); }return ; exit_put: +iounmap (dev->base);put_device (&dev->dev); -return ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 74/239 ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation
In reply to Greg Kroah-HartmanFrom: Yong Zhi <[email protected]>
[ Upstream commit 3b857472f34faa7d11001afa5e158833812c98d7 ]
Playback of 44.1Khz contents with HDMI plugged returns "Invalid pipe config" because HDMI paths in the FW topology are configured to operate at 48Khz.
This patch filters out sampling rates not supported at hdac_hdmi_create_dais() to let user space SRC to do the converting.
--- sound/soc/codecs/hdac_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/soc/codecs/hdac_hdmi.c +6 -0
@@ -1408,6 +1408,12 @@ static int hdac_hdmi_create_dais(struct hdac_device *hdac,if (ret)return ret; +/* Filter out 44.1, 88.2 and 176.4Khz */ + rates &= ~(SNDRV_PCM_RATE_44100 |SNDRV_PCM_RATE_88200 | +SNDRV_PCM_RATE_176400 ); +if (!rates) +return -EINVAL ; +sprintf (dai_name,"intel-hdmi-hifi%d" , i+1 ); hdmi_dais[i].name =devm_kstrdup (&hdac->dev, dai_name,GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 75/239 of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit f6707fd6241e483f6fea2caae82d876e422bb11a ]
Cache nodes under the cpu node(s) is PowerMac specific according to the comment above, so make the code enforce that.
--- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/base.c +1 -1
@@ -1837,7 +1837,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)/* OF on pmac has nodes instead of properties named "l2-cache" * beneath CPU nodes. */ -if (!strcmp (np->type,"cpu" )) +if (IS_ENABLED (CONFIG_PPC_PMAC ) && !strcmp (np->type,"cpu" ))for_each_child_of_node (np, child)if (!strcmp (child->type,"cache" ))return child;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 76/239 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit fa0d7dc355c890725b6178dab0cc11b194203afa ]
needed for device variants based on GTA04 board but with different display panel (driver).
--- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -1
@@ -71,7 +71,7 @@ #sound-dai-cells = <0>; }; - spi_lcd { + spi_lcd: spi_lcd { compatible = "spi-gpio"; #address-cells = <0x1>; #size-cells = <0x0>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 77/239 ARM: dts: omap3-gta04: fixes for tvout / venc
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit f6591391373dbff2c0200e1055d4ff86191578d2 ]
* fix connector compatibility (composite)
* add comment for gpio1 23
* add proper #address-cells
* we use only one venc_out channel for composite
--- arch/arm/boot/dts/omap3-gta04.dtsi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +7 -3
@@ -123,7 +123,7 @@ }; tv0: connector { - compatible = "svideo-connector"; + compatible = "composite-video-connector"; label = "tv"; port {
@@ -135,7 +135,7 @@ tv_amp: opa362 { compatible = "ti,opa362"; - enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; /* GPIO_23 to enable video out amplifier */ ports { #address-cells = <1>;
@@ -540,10 +540,14 @@ vdda-supply = <&vdac>; + #address-cells = <1>; + #size-cells = <0>; + port { + reg = <0>; venc_out: endpoint { remote-endpoint = <&opa_in>; - ti,channels = <2>; + ti,channels = <1>; ti,invert-polarity; }; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 78/239 ARM: dts: omap3-gta04: tvout: enable as display1 alias
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit 8905592b6e50cec905e6c6035bbd36201a3bfac1 ]
The omap dss susbystem takes the display aliases to find out which displays exist. To enable tv-out we must define an alias.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -0
@@ -28,6 +28,7 @@ aliases { display0 = &lcd; + display1 = &tv0; }; gpio-keys {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 79/239 ARM: dts: omap3-gta04: fix touchscreen tsc2007
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit 7384a24248eda140a234d356b6c840701ee9f055 ]
we fix penirq polarity, add penirq pinmux and touchscreen properties.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +17 -1
@@ -275,6 +275,13 @@ OMAP3_CORE1_IOPAD(0x2134, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio112 */ >; }; + + penirq_pins: pinmux_penirq_pins { + pinctrl-single,pins = < + /* here we could enable to wakeup the cpu from suspend by a pen touch */ + OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio160 */ + >; + }; }; &omap3_pmx_core2 {
@@ -412,10 +419,19 @@ tsc2007@48 { compatible = "ti,tsc2007"; reg = <0x48>; + pinctrl-names = "default"; + pinctrl-0 = <&penirq_pins>; interrupt-parent = <&gpio6>; interrupts = <0 IRQ_TYPE_EDGE_FALLING>; /* GPIO_160 */ - gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; + gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* GPIO_160 */ ti,x-plate-ohms = <600>; + touchscreen-size-x = <480>; + touchscreen-size-y = <640>; + touchscreen-max-pressure = <1000>; + touchscreen-fuzz-x = <3>; + touchscreen-fuzz-y = <8>; + touchscreen-fuzz-pressure = <10>; + touchscreen-inverted-y; }; /* RFID EEPROM */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 80/239 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit fa99c21ecb3cd4021a60d0e8bf880e78b5bd0729 ]
Vendor defined U-Boot has changed the partition scheme a while ago:
* kernel partition 6MB
* file system partition uses the remainder up to end of the NAND
* increased size of the environment partition (to get an OneNAND compatible base address)
* shrink the U-Boot partition
Let's be compatible (e.g. Debian kernel built from upstream).
--- arch/arm/boot/dts/omap3-gta04.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -6
@@ -608,22 +608,22 @@ bootloaders@80000 { label = "U-Boot"; - reg = <0x80000 0x1e0000>; + reg = <0x80000 0x1c0000>; }; - bootloaders_env@260000 { + bootloaders_env@240000 { label = "U-Boot Env"; - reg = <0x260000 0x20000>; + reg = <0x240000 0x40000>; }; kernel@280000 { label = "Kernel"; - reg = <0x280000 0x400000>; + reg = <0x280000 0x600000>; }; - filesystem@680000 { + filesystem@880000 { label = "File System"; - reg = <0x680000 0xf980000>; + reg = <0x880000 0>; /* 0 = MTDPART_SIZ_FULL */ }; }; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 81/239 ARM: dts: omap3-gta04: keep vpll2 always on
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit 1ae00833e30c9b4af5cbfda65d75b1de12f74013 ]
This is needed to make the display and venc work properly. Compare to omap3-beagle.dts.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -0
@@ -537,6 +537,12 @@ regulator-max-microvolt = <3150000>; }; +/* Needed to power the DPI pins */ + +&vpll2 { + regulator-always-on; +}; + &dss { pinctrl-names = "default"; pinctrl-0 = < &dss_dpi_pins >;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 82/239 sched/debug: Use symbolic names for task state constants
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit ff28915fd31ccafc0d38e6f84b66df280ed9e86a ]
include/trace/events/sched.h includes <linux/sched.h> (via <linux/sched/numa_balancing.h>) and so knows about the TASK_* constants used to interpret .prev_state. So instead of duplicating the magic numbers make use of the defined macros to ease understanding the mapping from state bits to letters which isn't completely intuitive for an outsider.
--- include/trace/events/sched.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
include/trace/events/sched.h +8 -3
@@ -169,9 +169,14 @@ TRACE_EVENT(sched_switch, (__entry->prev_state & (TASK_REPORT_MAX -1 )) ?__print_flags (__entry->prev_state & (TASK_REPORT_MAX -1 ),"|" , - { 0x01, "S" }, { 0x02, "D" }, { 0x04, "T" }, - { 0x08, "t" }, { 0x10, "X" }, { 0x20, "Z" }, - { 0x40, "P" }, { 0x80, "I" }) : + { TASK_INTERRUPTIBLE, "S" }, + { TASK_UNINTERRUPTIBLE, "D" }, + { __TASK_STOPPED, "T" }, + { __TASK_TRACED, "t" }, + { EXIT_DEAD, "X" }, + { EXIT_ZOMBIE, "Z" }, + { TASK_PARKED, "P" }, + { TASK_DEAD, "I" }) :"R" , __entry->prev_state & TASK_REPORT_MAX ? "+" : "",
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 83/239 arm64: dts: rockchip: Fix VCC5V0_HOST_EN on rk3399-sapphire
In reply to Greg Kroah-HartmanFrom: Vicente Bergas <[email protected]>
[ Upstream commit bcdb578a5f5b4aea79441606ab7f0a2e076b4474 ]
The pin is GPIO4-D1 not GPIO1-D1, see schematic, page 15 for reference.
--- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -1
@@ -136,7 +136,7 @@ vcc5v0_host: vcc5v0-host-regulator { compatible = "regulator-fixed"; enable-active-high; - gpio = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>; + gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_host_en>; regulator-name = "vcc5v0_host";
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 84/239 dmaengine: dma-jz4780: Dont depend on MACH_JZ4780
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
[ Upstream commit c558ecd21c852c97ff98dc6c61f715ba420ec251 ]
If we make this driver depend on MACH_JZ4780, that means it can be enabled only if we're building a kernel specially crafted for a JZ4780-based board, while most GNU/Linux distributions will want one generic MIPS kernel that works on multiple boards.
--- drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/Kconfig +1 -1
@@ -143,7 +143,7 @@ config DMA_JZ4740 config DMA_JZ4780 tristate "JZ4780 DMA support" - depends on MACH_JZ4780 || COMPILE_TEST + depends on MIPS || COMPILE_TEST select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 85/239 dmaengine: dma-jz4780: Further residue status fix
In reply to Greg Kroah-HartmanFrom: Daniel Silsby <[email protected]>
[ Upstream commit 83ef4fb7556b6a673f755da670cbacab7e2c7f1b ]
Func jz4780_dma_desc_residue() expects the index to the next hw descriptor as its last parameter. Caller func jz4780_dma_tx_status(), however, applied modulus before passing it. When the current hw descriptor was last in the list, the index passed became zero.
The resulting excess of reported residue especially caused problems with cyclic DMA transfer clients, i.e. ALSA AIC audio output, which rely on this for determining current DMA location within buffer.
Combined with the recent and related residue-reporting fixes, spurious ALSA audio underruns on jz4770 hardware are now fixed.
--- drivers/dma/dma-jz4780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/dma-jz4780.c +1 -1
@@ -580,7 +580,7 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan, to_jz4780_dma_desc(vdesc), 0); }else if (cookie == jzchan->desc->vdesc.tx.cookie) { txstate->residue =jz4780_dma_desc_residue (jzchan, jzchan->desc, - (jzchan->curr_hwdesc +1 ) % jzchan->desc->count); + jzchan->curr_hwdesc +1 ); }else txstate->residue =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 86/239 EDAC, sb_edac: Return early on ADDRV bit and address type test
In reply to Greg Kroah-HartmanFrom: Qiuxu Zhuo <[email protected]>
[ Upstream commit dcc960b225ceb2bd66c45e0845d03e577f7010f9 ]
Users of the mce_register_decode_chain() are called for every logged error. EDAC drivers should check:
1) Is this a memory error? [bit 7 in status register]
2) Is there a valid address? [bit 58 in status register]
3) Is the address a system address? [bitfield 8:6 in misc register]
The sb_edac driver performed test "1" twice. Waited far too long to perform check "2". Didn't do check "3" at all.
Fix it by moving the test for valid address from sbridge_mce_output_error() into sbridge_mce_check_error() and add a test for the type immediately after. Delete the redundant check for the type of the error from sbridge_mce_output_error().
--- drivers/edac/sb_edac.c | 68 ++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 33 deletions(-)
drivers/edac/sb_edac.c +35 -33
@@ -2915,35 +2915,27 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,* cccc = channel * If the mask doesn't match, report an error to the parsing logic */ -if (! ((errcode &0xef80 ) ==0x80 )) { - optype ="Can't parse: it is not a mem" ; - }else { -switch (optypenum) { -case 0 : - optype ="generic undef request error" ; -break ; -case 1 : - optype ="memory read error" ; -break ; -case 2 : - optype ="memory write error" ; -break ; -case 3 : - optype ="addr/cmd error" ; -break ; -case 4 : - optype ="memory scrubbing error" ; -break ; -default : - optype ="reserved" ; -break ; - } +switch (optypenum) { +case 0 : + optype ="generic undef request error" ; +break ; +case 1 : + optype ="memory read error" ; +break ; +case 2 : + optype ="memory write error" ; +break ; +case 3 : + optype ="addr/cmd error" ; +break ; +case 4 : + optype ="memory scrubbing error" ; +break ; +default : + optype ="reserved" ; +break ; } -/* Only decode errors with an valid address (ADDRV) */ -if (!GET_BITFIELD (m->status,58 ,58 )) -return ; -if (pvt->info.type ==KNIGHTS_LANDING ) {if (channel ==14 ) { edac_dbg(0, "%s%s err_code:%04x:%04x EDRAM bank %d\n",
@@ -3049,17 +3041,11 @@ static int sbridge_mce_check_error(struct notifier_block *nb, unsigned long val, {struct mce *mce = (struct mce *)data;struct mem_ctl_info *mci; -struct sbridge_pvt *pvt;char *type;if (edac_get_report_status () ==EDAC_REPORTING_DISABLED )return NOTIFY_DONE ; - mci =get_mci_for_node_id (mce->socketid,IMC0 ); -if (!mci) -return NOTIFY_DONE ; - pvt = mci->pvt_info; -/* * Just let mcelog handle it if the error is * outside the memory controller. A memory error
@@ -3069,6 +3055,22 @@ static int sbridge_mce_check_error(struct notifier_block *nb, unsigned long val,if ((mce->status &0xefff ) >>7 !=1 )return NOTIFY_DONE ; +/* Check ADDRV bit in STATUS */ +if (!GET_BITFIELD (mce->status,58 ,58 )) +return NOTIFY_DONE ; + +/* Check MISCV bit in STATUS */ +if (!GET_BITFIELD (mce->status,59 ,59 )) +return NOTIFY_DONE ; + +/* Check address type in MISC (physical address only) */ +if (GET_BITFIELD (mce->misc,6 ,8 ) !=2 ) +return NOTIFY_DONE ; + + mci =get_mci_for_node_id (mce->socketid,IMC0 ); +if (!mci) +return NOTIFY_DONE ; +if (mce->mcgstatus &MCG_STATUS_MCIP ) type ="Exception" ;else
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 87/239 rtc: mt6397: fix possible race condition
In reply to Greg Kroah-HartmanFrom: Alexandre Belloni <[email protected]>
[ Upstream commit babab2f86440352d24e76118fdd7d40cab5fd7bf ]
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference.
Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ.
--- drivers/rtc/rtc-mt6397.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/rtc/rtc-mt6397.c +8 -5
@@ -333,6 +333,10 @@ static int mtk_rtc_probe(struct platform_device *pdev)platform_set_drvdata (pdev, rtc); + rtc->rtc_dev =devm_rtc_allocate_device (rtc->dev); +if (IS_ERR (rtc->rtc_dev)) +return PTR_ERR (rtc->rtc_dev); + ret = request_threaded_irq(rtc->irq, NULL, mtk_rtc_irq_handler_thread, IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
@@ -345,11 +349,11 @@ static int mtk_rtc_probe(struct platform_device *pdev)device_init_wakeup (&pdev->dev,1 ); - rtc->rtc_dev =rtc_device_register ("mt6397-rtc" , &pdev->dev, - &mtk_rtc_ops,THIS_MODULE ); -if (IS_ERR (rtc->rtc_dev)) { + rtc->rtc_dev->ops = &mtk_rtc_ops; + + ret =rtc_register_device (rtc->rtc_dev); +if (ret) {dev_err (&pdev->dev,"register rtc device failed\n" ); - ret =PTR_ERR (rtc->rtc_dev); goto out_free_irq; }
@@ -366,7 +370,6 @@ static int mtk_rtc_remove(struct platform_device *pdev) {struct mt6397_rtc *rtc =platform_get_drvdata (pdev); -rtc_device_unregister (rtc->rtc_dev);free_irq (rtc->irq, rtc->rtc_dev);irq_dispose_mapping (rtc->irq);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 88/239 rtc: pl030: fix possible race condition
In reply to Greg Kroah-HartmanFrom: Alexandre Belloni <[email protected]>
[ Upstream commit c778ec85825dc895936940072aea9fe9037db684 ]
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference.
Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ.
--- drivers/rtc/rtc-pl030.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/rtc/rtc-pl030.c +9 -6
@@ -112,6 +112,13 @@ static int pl030_probe(struct amba_device *dev, const struct amba_id *id) goto err_rtc; } + rtc->rtc =devm_rtc_allocate_device (&dev->dev); +if (IS_ERR (rtc->rtc)) { + ret =PTR_ERR (rtc->rtc); + goto err_rtc; + } + + rtc->rtc->ops = &pl030_ops; rtc->base =ioremap (dev->res.start,resource_size (&dev->res));if (!rtc->base) { ret = -ENOMEM ;
@@ -128,12 +135,9 @@ static int pl030_probe(struct amba_device *dev, const struct amba_id *id)if (ret) goto err_irq; - rtc->rtc =rtc_device_register ("pl030" , &dev->dev, &pl030_ops, -THIS_MODULE ); -if (IS_ERR (rtc->rtc)) { - ret =PTR_ERR (rtc->rtc); + ret =rtc_register_device (rtc->rtc); +if (ret) goto err_reg; - }return 0 ;
@@ -154,7 +158,6 @@ static int pl030_remove(struct amba_device *dev)writel (0 , rtc->base +RTC_CR );free_irq (dev->irq[0 ], rtc); -rtc_device_unregister (rtc->rtc);iounmap (rtc->base);amba_release_regions (dev);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 89/239 ath9k: add back support for using active monitor interfaces for tx99
In reply to Greg Kroah-HartmanFrom: Felix Fietkau <[email protected]>
[ Upstream commit 6df0580be8bc30803c4d8b2ed9c2230a2740c795 ]
Various documented examples on how to set up tx99 with ath9k rely on setting up a regular monitor interface for setting the channel. My previous patch "ath9k: fix tx99 with monitor mode interface" made it possible to set it up this way again. However, it was removing support for using an active monitor interface, which is required for controlling the bitrate as well, since the bitrate is not passed down with a regular monitor interface.
This patch partially reverts the previous one, but keeps support for using a regular monitor interface to keep documented steps working in cases where the bitrate does not matter
--- drivers/net/wireless/ath/ath9k/ath9k.h | 1 + drivers/net/wireless/ath/ath9k/main.c | 10 ++++++++-- drivers/net/wireless/ath/ath9k/tx99.c | 7 +++++++ drivers/net/wireless/ath/ath9k/xmit.c | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +1 -0
@@ -1074,6 +1074,7 @@ struct ath_softc {struct ath_spec_scan_priv spec_priv; +struct ieee80211_vif *tx99_vif;struct sk_buff *tx99_skb;bool tx99_state;s16 tx99_power;
drivers/net/wireless/ath/ath9k/main.c +8 -2
@@ -1250,8 +1250,13 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,struct ath_vif *avp = (void *)vif->drv_priv;struct ath_node *an = &avp->mcast_node; -if (IS_ENABLED (CONFIG_ATH9K_TX99 )) -return -EOPNOTSUPP ; +if (IS_ENABLED (CONFIG_ATH9K_TX99 )) { +if (sc->cur_chan->nvifs >=1 ) { +mutex_unlock (&sc->mutex); +return -EOPNOTSUPP ; + } + sc->tx99_vif = vif; + }mutex_lock (&sc->mutex);
@@ -1336,6 +1341,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,ath9k_p2p_remove_vif (sc, vif); sc->cur_chan->nvifs--; + sc->tx99_vif =NULL ;if (!ath9k_is_chanctx_enabled ())list_del (&avp->list);
drivers/net/wireless/ath/ath9k/tx99.c +7 -0
@@ -54,6 +54,7 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)struct ieee80211_hdr *hdr;struct ieee80211_tx_info *tx_info;struct sk_buff *skb; +struct ath_vif *avp; skb =alloc_skb (len,GFP_KERNEL );if (!skb)
@@ -71,11 +72,17 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)memcpy (hdr->addr2, hw->wiphy->perm_addr,ETH_ALEN );memcpy (hdr->addr3, hw->wiphy->perm_addr,ETH_ALEN ); +if (sc->tx99_vif) { + avp = (struct ath_vif *) sc->tx99_vif->drv_priv; + hdr->seq_ctrl |=cpu_to_le16 (avp->seq_no); + } + tx_info =IEEE80211_SKB_CB (skb);memset (tx_info,0 ,sizeof (*tx_info)); rate = &tx_info->control.rates[0 ]; tx_info->band = sc->cur_chan->chandef.chan->band; tx_info->flags =IEEE80211_TX_CTL_NO_ACK ; + tx_info->control.vif = sc->tx99_vif; rate->count =1 ;if (ah->curchan &&IS_CHAN_HT (ah->curchan)) { rate->flags |=IEEE80211_TX_RC_MCS ;
drivers/net/wireless/ath/ath9k/xmit.c +1 -1
@@ -2952,7 +2952,7 @@ int ath9k_tx99_send(struct ath_softc *sc, struct sk_buff *skb,return -EINVAL ; } -ath_set_rates (NULL ,NULL , bf); +ath_set_rates (sc->tx99_vif,NULL , bf);ath9k_hw_set_desc_link (sc->sc_ah, bf->bf_desc, bf->bf_daddr);ath9k_hw_tx99_start (sc->sc_ah, txctl->txq->axq_qnum);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 90/239 IB/hfi1: Missing return value in error path for user sdma
In reply to Greg Kroah-HartmanFrom: Michael J. Ruhl <[email protected]>
[ Upstream commit 2bf4b33f83dfe521c4c7c407b6b150aeec04d69c ]
If the set_txreq_header_agh() function returns an error, the exit path is chosen.
In this path, the code fails to set the return value. This will cause the caller to not realize an error has occurred.
Set the return value correctly in the error path.
--- drivers/infiniband/hw/hfi1/user_sdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/user_sdma.c +3 -1
@@ -856,8 +856,10 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, unsigned maxpkts) changes =set_txreq_header_ahg (req, tx, datalen); -if (changes <0 ) +if (changes <0 ) { + ret = changes; goto free_tx; + } } }else { ret = sdma_txinit(&tx->txreq, 0, sizeof(req->hdr) +
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 91/239 signal: Always ignore SIGKILL and SIGSTOP sent to the global init
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
[ Upstream commit 86989c41b5ea08776c450cb759592532314a4ed6 ]
If the first process started (aka /sbin/init) receives a SIGKILL it will panic the system if it is delivered. Making the system unusable and undebugable. It isn't much better if the first process started receives SIGSTOP.
So always ignore SIGSTOP and SIGKILL sent to init.
This is done in a separate clause in sig_task_ignored as force_sig_info can clear SIG_UNKILLABLE and this protection should work even then.
--- kernel/signal.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/signal.c +4 -0
@@ -77,6 +77,10 @@ static int sig_task_ignored(struct task_struct *t, int sig, bool force) handler =sig_handler (t, sig); +/* SIGKILL and SIGSTOP may not be sent to the global init */ +if (unlikely (is_global_init (t) &&sig_kernel_only (sig))) +return true; +if (unlikely (t->signal->flags &SIGNAL_UNKILLABLE ) && handler ==SIG_DFL && !(force &&sig_kernel_only (sig)))return 1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 92/239 signal: Properly deliver SIGILL from uprobes
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
[ Upstream commit 55a3235fc71bf34303e34a95eeee235b2d2a35dd ]
For userspace to tell the difference between a random signal and an exception, the exception must include siginfo information.
Using SEND_SIG_FORCED for SIGILL is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver.
Therefore replace force_sig_info(SIGILL, SEND_SIG_FORCE, current) with force_sig(SIG_ILL, current) which gets this right and is shorter and easier to type.
--- kernel/events/uprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/events/uprobes.c +2 -2
@@ -1854,7 +1854,7 @@ static void handle_trampoline(struct pt_regs *regs) sigill:uprobe_warn (current,"handle uretprobe, sending SIGILL." ); -force_sig_info (SIGILL ,SEND_SIG_FORCED , current); +force_sig (SIGILL , current); }
@@ -1970,7 +1970,7 @@ static void handle_singlestep(struct uprobe_task *utask, struct pt_regs *regs)if (unlikely (err)) {uprobe_warn (current,"execute the probed insn, sending SIGILL." ); -force_sig_info (SIGILL ,SEND_SIG_FORCED , current); +force_sig (SIGILL , current); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 93/239 signal: Properly deliver SIGSEGV from x86 uprobes
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
[ Upstream commit 4a63c1ffd384ebdce40aac9c997dab68379137be ]
For userspace to tell the difference between an random signal and an exception, the exception must include siginfo information.
Using SEND_SIG_FORCED for SIGSEGV is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver.
Therefore replace force_sig_info(SIGSEGV, SEND_SIG_FORCE, current) with force_sig(SIG_SEGV, current) which gets this right and is shorter and easier to type.
--- arch/x86/kernel/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/uprobes.c +1 -1
@@ -987,7 +987,7 @@ arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regspr_err ("uprobe: return address clobbered: pid=%d, %%sp=%#lx, " "%%ip=%#lx\n" , current->pid, regs->sp, regs->ip); -force_sig_info (SIGSEGV ,SEND_SIG_FORCED , current); +force_sig (SIGSEGV , current); }return -1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 94/239 f2fs: fix memory leak of percpu counter in fill_super()
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
[ Upstream commit 4a70e255449c9a13eed7a6eeecc85a1ea63cef76 ]
In fill_super -> init_percpu_info, we should destroy percpu counter in error path, otherwise memory allcoated for percpu counter will leak.
--- fs/f2fs/super.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/f2fs/super.c +5 -1
@@ -2123,8 +2123,12 @@ static int init_percpu_info(struct f2fs_sb_info *sbi)if (err)return err; -return percpu_counter_init (&sbi->total_valid_inode_count,0 , + err =percpu_counter_init (&sbi->total_valid_inode_count,0 ,GFP_KERNEL ); +if (err) +percpu_counter_destroy (&sbi->alloc_valid_block_count); + +return err; }#ifdef CONFIG_BLK_DEV_ZONED
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 95/239 scsi: qla2xxx: Fix iIDMA error
In reply to Greg Kroah-HartmanFrom: Quinn Tran <[email protected]>
[ Upstream commit 8d9bf0a9a268f7ca0b811d6e6a1fc783afa5c746 ]
When switch responds with error for Get Port Speed Command (GPSC), driver should not proceed with telling FW about the speed of the remote port.
--- drivers/scsi/qla2xxx/qla_gs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_gs.c +2 -2
@@ -3033,7 +3033,7 @@ static void qla24xx_async_gpsc_sp_done(void *s, int res)ql_dbg (ql_dbg_disc, vha,0x2019 ,"GPSC command unsupported, disabling query.\n" ); ha->flags.gpsc_supported =0 ; - res =QLA_SUCCESS ; + goto done; } }else {switch (be16_to_cpu (ct_rsp->rsp.gpsc.speed)) {
@@ -3066,13 +3066,13 @@ static void qla24xx_async_gpsc_sp_done(void *s, int res)be16_to_cpu (ct_rsp->rsp.gpsc.speeds), be16_to_cpu(ct_rsp->rsp.gpsc.speed)); } -done:memset (&ea,0 ,sizeof (ea)); ea.event =FCME_GPSC_DONE ; ea.rc = res; ea.fcport = fcport;qla2x00_fcport_event_handler (vha, &ea); +done: sp->free (sp); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 96/239 scsi: qla2xxx: Defer chip reset until target mode is enabled
In reply to Greg Kroah-HartmanFrom: Quinn Tran <[email protected]>
[ Upstream commit 93eca6135183f7a71e36acd47655a085ed11bcdc ]
For target mode, any chip reset triggered before target mode is enabled will be held off until user is ready to enable. This prevents the chip from starting or running before it is intended.
--- drivers/scsi/qla2xxx/qla_os.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +21 -7
@@ -5801,12 +5801,27 @@ qla2x00_do_dpc(void *data)if (test_and_clear_bit (ISP_ABORT_NEEDED , &base_vha->dpc_flags) && !test_bit (UNLOADING , &base_vha->dpc_flags)) { +bool do_reset = true; + +switch (ql2x_ini_mode) { +case QLA2XXX_INI_MODE_ENABLED : +break ; +case QLA2XXX_INI_MODE_DISABLED : +if (!qla_tgt_mode_enabled (base_vha)) + do_reset = false; +break ; +case QLA2XXX_INI_MODE_DUAL : +if (!qla_dual_mode_enabled (base_vha)) + do_reset = false; +break ; +default : +break ; + } -ql_dbg (ql_dbg_dpc, base_vha,0x4007 , -"ISP abort scheduled.\n" ); -if (!(test_and_set_bit (ABORT_ISP_ACTIVE , +if (do_reset && !(test_and_set_bit (ABORT_ISP_ACTIVE , &base_vha->dpc_flags))) { - +ql_dbg (ql_dbg_dpc, base_vha,0x4007 , +"ISP abort scheduled.\n" );if (ha->isp_ops->abort_isp (base_vha)) {/* failed. retry later */ set_bit(ISP_ABORT_NEEDED,
@@ -5814,10 +5829,9 @@ qla2x00_do_dpc(void *data) }clear_bit (ABORT_ISP_ACTIVE , &base_vha->dpc_flags); +ql_dbg (ql_dbg_dpc, base_vha,0x4008 , +"ISP abort end.\n" ); } - -ql_dbg (ql_dbg_dpc, base_vha,0x4008 , -"ISP abort end.\n" ); } if (test_and_clear_bit(FCPORT_UPDATE_NEEDED,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 97/239 scsi: qla2xxx: Fix dropped srb resource.
In reply to Greg Kroah-HartmanFrom: Quinn Tran <[email protected]>
[ Upstream commit 527b8ae3948bb59c13ebaa7d657ced56ea25ab05 ]
When FW rejects a command due to "entry_status" error (malform IOCB), the srb resource needs to be returned back for cleanup. The filter to catch this is in the wrong location.
--- drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_isr.c +1 -1
@@ -2792,6 +2792,7 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)case ELS_IOCB_TYPE :case ABORT_IOCB_TYPE :case MBX_IOCB_TYPE : +default : sp =qla2x00_get_sp_from_handle (vha, func, req, pkt);if (sp) { sp->done (sp, res);
@@ -2802,7 +2803,6 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)case ABTS_RESP_24XX :case CTIO_TYPE7 :case CTIO_CRC2 : -default :return 1 ; } fatal:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 98/239 scsi: lpfc: Fix errors in log messages.
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 2879265f514b1f4154288243c91438ddbedb3ed4 ]
Message 6408 is displayed for each entry in an array, but the cpu and queue numbers were incorrect for the entry. Message 6001 includes an extraneous character.
Resolve both issues
--- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/scsi/lpfc/lpfc_nvme.c +1 -1
@@ -144,7 +144,7 @@ lpfc_nvme_delete_queue(struct nvme_fc_local_port *pnvme_lport, vport = lport->vport;lpfc_printf_vlog (vport,KERN_INFO ,LOG_NVME , -"6001 ENTER. lpfc_pnvme %p, qidx x%xi qhandle %p\n" , +"6001 ENTER. lpfc_pnvme %p, qidx x%x qhandle %p\n" , lport, qidx, handle);kfree (handle); }
drivers/scsi/lpfc/lpfc_nvmet.c +3 -4
@@ -1078,15 +1078,14 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) idx =0 ; } - infop = phba->sli4_hba.nvmet_ctx_info; -for (j =0 ; j < phba->cfg_nvmet_mrq; j++) { -for (i =0 ; i < phba->sli4_hba.num_present_cpu; i++) { +for (i =0 ; i < phba->sli4_hba.num_present_cpu; i++) { +for (j =0 ; j < phba->cfg_nvmet_mrq; j++) { + infop =lpfc_get_ctx_list (phba, i, j);lpfc_printf_log (phba,KERN_INFO ,LOG_NVME |LOG_INIT ,"6408 TOTAL NVMET ctx for CPU %d " "MRQ %d: cnt %d nextcpu %p\n" , i, j, infop->nvmet_ctx_list_cnt, infop->nvmet_ctx_next_cpu); - infop++; } }return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 99/239 scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
In reply to Greg Kroah-HartmanFrom: George Kennedy <[email protected]>
[ Upstream commit 288315e95264b6355e26609e9dec5dc4563d4ab0 ]
sym_int_sir() in sym_hipd.c does not check the command pointer for NULL before using it in debug message prints.
--- drivers/scsi/sym53c8xx_2/sym_hipd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/scsi/sym53c8xx_2/sym_hipd.c +11 -4
@@ -4371,6 +4371,13 @@ static void sym_nego_rejected(struct sym_hcb *np, struct sym_tcb *tp, struct symOUTB (np,HS_PRT ,HS_BUSY ); } +#define sym_printk(lvl, tp, cp, fmt, v...) do { \ + if (cp) \ + scmd_printk(lvl, cp->cmd, fmt, ##v); \ + else \ + starget_printk(lvl, tp->starget, fmt, ##v); \ +} while (0) +/* * chip exception handler for programmed interrupts. */
@@ -4416,7 +4423,7 @@ static void sym_int_sir(struct sym_hcb *np)* been selected with ATN. We do not want to handle that. */ case SIR_SEL_ATN_NO_MSG_OUT : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No MSG OUT phase after selection with ATN\n" ); goto out_stuck;/*
@@ -4424,7 +4431,7 @@ static void sym_int_sir(struct sym_hcb *np)* having reselected the initiator. */ case SIR_RESEL_NO_MSG_IN : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No MSG IN phase after reselection\n" ); goto out_stuck;/*
@@ -4432,7 +4439,7 @@ static void sym_int_sir(struct sym_hcb *np)* an IDENTIFY. */ case SIR_RESEL_NO_IDENTIFY : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No IDENTIFY after reselection\n" ); goto out_stuck;/*
@@ -4461,7 +4468,7 @@ static void sym_int_sir(struct sym_hcb *np)case SIR_RESEL_ABORTED : np->lastmsg = np->msgout[0 ]; np->msgout[0 ] =M_NOOP ; -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"message %x sent on bad reselection\n" , np->lastmsg); goto out;/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 100/239 ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
In reply to Greg Kroah-HartmanFrom: Oleksij Rempel <[email protected]>
[ Upstream commit 8148d2136002da2e2887caf6a07bbd9c033f14f3 ]
One of the Freescale recommended sequences for power off with external PMIC is the following:
...
3. SoC is programming PMIC for power off when standby is asserted.
4. In CCM STOP mode, Standby is asserted, PMIC gates SoC supplies.
See:
http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf
page 5083
This patch implements step 4. of this sequence.
--- arch/arm/mach-imx/pm-imx6.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/mach-imx/pm-imx6.c +25 -0
@@ -604,6 +604,28 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata IMX6Q_GPR1_GINT); } +static void imx6_pm_stby_poweroff (void ) +{ +imx6_set_lpm (STOP_POWER_OFF ); +imx6q_suspend_finish (0 ); + +mdelay (1000 ); + +pr_emerg ("Unable to poweroff system\n" ); +} + +static int imx6_pm_stby_poweroff_probe (void ) +{ +if (pm_power_off) { +pr_warn ("%s: pm_power_off already claimed %p %pf!\n" , + __func__, pm_power_off, pm_power_off); +return -EBUSY ; + } + + pm_power_off = imx6_pm_stby_poweroff; +return 0 ; +} +void __init imx6_pm_ccm_init (const char *ccm_compat) {struct device_node *np;
@@ -620,6 +642,9 @@ void __init imx6_pm_ccm_init(const char *ccm_compat) val =readl_relaxed (ccm_base +CLPCR ); val &= ~BM_CLPCR_LPM ;writel_relaxed (val, ccm_base +CLPCR ); + +if (of_property_read_bool (np,"fsl,pmic-stby-poweroff" )) +imx6_pm_stby_poweroff_probe (); }void __init imx6q_pm_init (void )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 101/239 scsi: pm80xx: Corrected dma_unmap_sg() parameter
In reply to Greg Kroah-HartmanFrom: Deepak Ukey <[email protected]>
[ Upstream commit 76cb25b058034d37244be6aca97a2ad52a5fbcad ]
For the function dma_unmap_sg(), the <nents> parameter should be number of elements in the scatter list prior to the mapping, not after the mapping.
--- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pm8001/pm8001_sas.c +1 -1
@@ -466,7 +466,7 @@ err_out:dev_printk (KERN_ERR , pm8001_ha->dev,"pm8001 exec failed[%d]!\n" , rc);if (!sas_protocol_ata (t->task_proto))if (n_elem) -dma_unmap_sg (pm8001_ha->dev, t->scatter, n_elem, +dma_unmap_sg (pm8001_ha->dev, t->scatter, t->num_scatter, t->data_dir); out_done:spin_unlock_irqrestore (&pm8001_ha->lock, flags);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 102/239 scsi: pm80xx: Fixed system hang issue during kexec boot
In reply to Greg Kroah-HartmanFrom: Deepak Ukey <[email protected]>
[ Upstream commit 72349b62a571effd6faadd0600b8e657dd87afbf ]
When the firmware is not responding, execution of kexec boot causes a system hang. When firmware assertion happened, driver get notified with interrupt vector updated in MPI configuration table. Then, the driver will read scratchpad register and set controller_fatal_error flag to true.
--- drivers/scsi/pm8001/pm8001_hwi.c | 6 +++ drivers/scsi/pm8001/pm8001_sas.c | 7 +++ drivers/scsi/pm8001/pm8001_sas.h | 1 + drivers/scsi/pm8001/pm80xx_hwi.c | 80 +++++++++++++++++++++++++++++--- drivers/scsi/pm8001/pm80xx_hwi.h | 3 ++ 5 files changed, 91 insertions(+), 6 deletions(-)
drivers/scsi/pm8001/pm8001_hwi.c +6 -0
@@ -1479,6 +1479,12 @@ u32 pm8001_mpi_msg_consume(struct pm8001_hba_info *pm8001_ha, }else {u32 producer_index;void *pi_virt = circularQ->pi_virt; +/* spurious interrupt during setup if +* kexec-ing and driver doing a doorbell access +* with the pre-kexec oq interrupt setup +*/ +if (!pi_virt) +break ;/* Update the producer index from SPC */ producer_index =pm8001_read_32 (pi_virt); circularQ->producer_index =cpu_to_le32 (producer_index);
drivers/scsi/pm8001/pm8001_sas.c +7 -0
@@ -374,6 +374,13 @@ static int pm8001_task_exec(struct sas_task *task,return 0 ; } pm8001_ha =pm8001_find_ha_by_dev (task->dev); +if (pm8001_ha->controller_fatal_error) { +struct task_status_struct *ts = &t->task_status; + + ts->resp =SAS_TASK_UNDELIVERED ; + t->task_done (t); +return 0 ; + }PM8001_IO_DBG (pm8001_ha,pm8001_printk ("pm8001_task_exec device \n " ));spin_lock_irqsave (&pm8001_ha->lock, flags); do {
drivers/scsi/pm8001/pm8001_sas.h +1 -0
@@ -529,6 +529,7 @@ struct pm8001_hba_info {u32 logging_level;u32 fw_status;u32 smp_exp_mode; +bool controller_fatal_error;const struct firmware *fw_image;struct isr_param irq_vector[PM8001_MAX_MSIX_VEC ]; };
drivers/scsi/pm8001/pm80xx_hwi.c +74 -6
115 lines not on this page · raw message
drivers/scsi/pm8001/pm80xx_hwi.h +3 -0
@@ -1288,6 +1288,9 @@ typedef struct SASProtocolTimerConfig SASProtocolTimerConfig_t;#define SCRATCH_PAD_BOOT_LOAD_SUCCESS 0x0#define SCRATCH_PAD_IOP0_READY 0xC00#define SCRATCH_PAD_IOP1_READY 0x3000 +#define SCRATCH_PAD_MIPSALL_READY (SCRATCH_PAD_IOP1_READY | \ + SCRATCH_PAD_IOP0_READY | \ + SCRATCH_PAD_RAAE_READY)/* boot loader state */ #define SCRATCH_PAD1_BOOTSTATE_MASK 0x70/* Bit 4-6 */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 103/239 kprobes: Dont call BUG_ON() if there is a kprobe in use on free list
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
[ Upstream commit cbdd96f5586151e48317d90a403941ec23f12660 ]
Instead of calling BUG_ON(), if we find a kprobe in use on free kprobe list, just remove it from the list and keep it on kprobe hash list as same as other in-use kprobes.
--- kernel/kprobes.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
kernel/kprobes.c +7 -1
@@ -544,8 +544,14 @@ static void do_free_cleaned_kprobes(void)struct optimized_kprobe *op, *tmp;list_for_each_entry_safe (op, tmp, &freeing_list, list) { -BUG_ON (!kprobe_unused (&op->kp));list_del_init (&op->list); +if (WARN_ON_ONCE (!kprobe_unused (&op->kp))) { +/* +* This must not happen, but if there is a kprobe +* still in use, keep it on kprobes hash list. +*/ +continue ; + }free_aggr_kprobe (&op->kp); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 104/239 Drivers: hv: vmbus: Fix synic per-cpu context initialization
In reply to Greg Kroah-HartmanFrom: Michael Kelley <[email protected]>
[ Upstream commit f25a7ece08bdb1f2b3c4bbeae942682fc3a99dde ]
If hv_synic_alloc() errors out, the state of the per-cpu context for some CPUs is unknown since the zero'ing is done as each CPU is iterated over. In such case, hv_synic_cleanup() may try to free memory based on uninitialized values. Fix this by zero'ing the per-cpu context for all CPUs before doing any memory allocations that might fail.
--- drivers/hv/hv.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/hv/hv.c +12 -3
@@ -148,6 +148,17 @@ static void hv_init_clockevent_device(struct clock_event_device *dev, int cpu)int hv_synic_alloc (void ) {int cpu; +struct hv_per_cpu_context *hv_cpu; + +/* +* First, zero all per-cpu memory areas so hv_synic_free() can +* detect what memory has been allocated and cleanup properly +* after any failures. +*/ +for_each_present_cpu (cpu) { + hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); +memset (hv_cpu,0 ,sizeof (*hv_cpu)); + } hv_context.hv_numa_map =kzalloc (sizeof (struct cpumask ) * nr_node_ids,GFP_ATOMIC );
@@ -157,10 +168,8 @@ int hv_synic_alloc(void) }for_each_present_cpu (cpu) { -struct hv_per_cpu_context *hv_cpu - =per_cpu_ptr (hv_context.cpu_context, cpu); + hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); -memset (hv_cpu,0 ,sizeof (*hv_cpu));tasklet_init (&hv_cpu->msg_dpc, vmbus_on_msg_dpc, (unsigned long ) hv_cpu);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 105/239 nvmem: core: return error code instead of NULL from nvmem_device_get
In reply to Greg Kroah-HartmanFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit ca6ac25cecf0e740d7cc8e03e0ebbf8acbeca3df ]
nvmem_device_get() should return ERR_PTR() on error or valid pointer on success, but one of the code path seems to return NULL, so fix it.
--- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/core.c +1 -1
@@ -617,7 +617,7 @@ static struct nvmem_device *nvmem_find(const char *name) d =bus_find_device (&nvmem_bus_type,NULL , (void *)name, nvmem_match);if (!d) -return NULL ; +return ERR_PTR (-ENOENT );return to_nvmem_device (d); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 106/239 media: dt-bindings: adv748x: Fix decimal unit addresses
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 27582f0ea97fe3e4a38beb98ab36cce4b6f029d5 ]
With recent dtc and W=1:
Warning (graph_port): video-receiver@70/port@10: graph node unit address error, expected "a" Warning (graph_port): video-receiver@70/port@11: graph node unit address error, expected "b"
Unit addresses are always hexadecimal (without prefix), while the bases of reg property values depend on their prefixes.
--- Documentation/devicetree/bindings/media/i2c/adv748x.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/media/i2c/adv748x.txt +2 -2
@@ -73,7 +73,7 @@ Example: }; }; - port@10 { + port@a { reg = <10>; adv7482_txa: endpoint {
@@ -83,7 +83,7 @@ Example: }; }; - port@11 { + port@b { reg = <11>; adv7482_txb: endpoint {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 107/239 media: fix: media: pci: meye: validate offset to avoid arbitrary access
In reply to Greg Kroah-HartmanFrom: Lao Wei <[email protected]>
[ Upstream commit eac7230fdb4672c2cb56f6a01a1744f562c01f80 ]
Motion eye video4linux driver for Sony Vaio PictureBook desn't validate user-controlled parameter 'vma->vm_pgoff', a malicious process might access all of kernel memory from user space by trying pass different arbitrary address.
Discussion: http://www.openwall.com/lists/oss-security/2018/07/06/1
--- drivers/media/pci/meye/meye.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/meye/meye.c +1 -1
@@ -1460,7 +1460,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma)unsigned long page, pos;mutex_lock (&meye.lock); -if (size > gbuffers * gbufsize) { +if (size > gbuffers * gbufsize || offset > gbuffers * gbufsize - size) {mutex_unlock (&meye.lock);return -EINVAL ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 108/239 media: dvb: fix compat ioctl translation
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit 1ccbeeb888ac33627d91f1ccf0b84ef3bcadef24 ]
The VIDEO_GET_EVENT and VIDEO_STILLPICTURE was added back in 2005 but it never worked because the command number is wrong.
Using the right command number means we have a better chance of them actually doing the right thing, though clearly nobody has ever tried it successfully.
I noticed these while auditing the remaining users of compat_time_t for y2038 bugs. This one is fine in that regard, it just never did anything.
--- fs/compat_ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/compat_ioctl.c +6 -4
@@ -161,6 +161,7 @@ struct compat_video_event {unsigned int frame_rate; } u; }; +#define VIDEO_GET_EVENT32 _IOR('o', 28, struct compat_video_event)static int do_video_get_event (struct file *file,unsigned int cmd,struct compat_video_event __user *up)
@@ -172,7 +173,7 @@ static int do_video_get_event(struct file *file,if (kevent ==NULL )return -EFAULT ; - err =do_ioctl (file, cmd, (unsigned long )kevent); + err =do_ioctl (file,VIDEO_GET_EVENT , (unsigned long )kevent);if (!err) { err =convert_in_user (&kevent->type, &up->type); err |=convert_in_user (&kevent->timestamp, &up->timestamp);
@@ -191,6 +192,7 @@ struct compat_video_still_picture {compat_uptr_t iFrame;int32_t size; }; +#define VIDEO_STILLPICTURE32 _IOW('o', 30, struct compat_video_still_picture)static int do_video_stillpicture (struct file *file,unsigned int cmd,struct compat_video_still_picture __user *up)
@@ -213,7 +215,7 @@ static int do_video_stillpicture(struct file *file,if (err)return -EFAULT ; - err =do_ioctl (file, cmd, (unsigned long ) up_native); + err =do_ioctl (file,VIDEO_STILLPICTURE , (unsigned long ) up_native);return err; }
@@ -1476,9 +1478,9 @@ static long do_ioctl_trans(unsigned int cmd,return rtc_ioctl (file, cmd, argp);/* dvb */ -case VIDEO_GET_EVENT : +case VIDEO_GET_EVENT32 :return do_video_get_event (file, cmd, argp); -case VIDEO_STILLPICTURE : +case VIDEO_STILLPICTURE32 :return do_video_stillpicture (file, cmd, argp);case VIDEO_SET_SPU_PALETTE :return do_video_set_spu_palette (file, cmd, argp);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 109/239 arm64: dts: meson: libretech: update board model
In reply to Greg Kroah-HartmanFrom: Jerome Brunet <[email protected]>
[ Upstream commit b7eb0e26cc4a212fde09144cd49d4103170d2b9e ]
There is actually several different libretech board with the CC suffix so the model name is not appropriate here. Update to something more specific
--- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +1 -1
@@ -14,7 +14,7 @@ / { compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl"; - model = "Libre Technology CC"; + model = "Libre Computer Board AML-S905X-CC"; aliases { serial0 = &uart_AO;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 110/239 ALSA: intel8x0m: Register irq handler after register initializations
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit 7064f376d4a10686f51c879401a569bb4babf9c6 ]
The interrupt handler has to be acquired after the other resource initialization when allocated with IRQF_SHARED. Otherwise it's triggered before the resource gets ready, and may lead to unpleasant behavior.
--- sound/pci/intel8x0m.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
sound/pci/intel8x0m.c +10 -10
@@ -1171,16 +1171,6 @@ static int snd_intel8x0m_create(struct snd_card *card, } port_inited: -if (request_irq (pci->irq, snd_intel8x0m_interrupt,IRQF_SHARED , -KBUILD_MODNAME , chip)) { -dev_err (card->dev,"unable to grab IRQ %d\n" , pci->irq); -snd_intel8x0m_free (chip); -return -EBUSY ; - } - chip->irq = pci->irq; -pci_set_master (pci); -synchronize_irq (chip->irq); -/* initialize offsets */ chip->bdbars_count =2 ; tbl = intel_regs;
@@ -1224,11 +1214,21 @@ static int snd_intel8x0m_create(struct snd_card *card, chip->int_sta_reg =ICH_REG_GLOB_STA ; chip->int_sta_mask = int_sta_masks; +pci_set_master (pci); +if ((err =snd_intel8x0m_chip_init (chip,1 )) <0 ) {snd_intel8x0m_free (chip);return err; } +if (request_irq (pci->irq, snd_intel8x0m_interrupt,IRQF_SHARED , +KBUILD_MODNAME , chip)) { +dev_err (card->dev,"unable to grab IRQ %d\n" , pci->irq); +snd_intel8x0m_free (chip); +return -EBUSY ; + } + chip->irq = pci->irq; +if ((err =snd_device_new (card,SNDRV_DEV_LOWLEVEL , chip, &ops)) <0 ) {snd_intel8x0m_free (chip);return err;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 111/239 pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit b97760ae8e3dc8bb91881c13425a0bff55f2bd85 ]
Smatch complains about this condition:
if (has_config && num_pins >= 1)
The "has_config" variable is either uninitialized or true. The "num_pins" variable is unsigned and we verified that it is non-zero on the lines before so we know "num_pines >= 1" is true. Really, we could just check "num_configs" directly and remove the "has_config" variable.
--- drivers/pinctrl/pinctrl-at91-pio4.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/pinctrl/pinctrl-at91-pio4.c +2 -6
@@ -483,7 +483,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,unsigned num_pins, num_configs, reserve;unsigned long *configs;struct property *pins; -bool has_config;u32 pinfunc;int ret, i;
@@ -499,9 +498,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,return ret; } -if (num_configs) - has_config = true; - num_pins = pins->length /sizeof (u32);if (!num_pins) {dev_err (pctldev->dev,"no pins found in node %pOF\n" , np);
@@ -514,7 +510,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,* map for each pin. */ reserve =1 ; -if (has_config && num_pins >=1 ) +if (num_configs) reserve++; reserve *= num_pins; ret = pinctrl_utils_reserve_map(pctldev, map, reserved_maps, num_maps,
@@ -537,7 +533,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,pinctrl_utils_add_map_mux (pctldev, map, reserved_maps, num_maps, group, func); -if (has_config) { +if (num_configs) { ret = pinctrl_utils_add_map_configs(pctldev, map, reserved_maps, num_maps, group, configs, num_configs,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 112/239 llc: avoid blocking in llc_sap_close()
In reply to Greg Kroah-HartmanFrom: Cong Wang <[email protected]>
[ Upstream commit 9708d2b5b7c648e8e0a40d11e8cea12f6277f33c ]
llc_sap_close() is called by llc_sap_put() which could be called in BH context in llc_rcv(). We can't block in BH.
There is no reason to block it here, kfree_rcu() should be sufficient.
--- include/net/llc.h | 1 + net/llc/llc_core.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
include/net/llc.h +1 -0
@@ -66,6 +66,7 @@ struct llc_sap {int sk_count;struct hlist_nulls_head sk_laddr_hash[LLC_SK_LADDR_HASH_ENTRIES ];struct hlist_head sk_dev_hash[LLC_SK_DEV_HASH_ENTRIES ]; +struct rcu_head rcu; }; static inline
net/llc/llc_core.c +1 -3
@@ -127,9 +127,7 @@ void llc_sap_close(struct llc_sap *sap)list_del_rcu (&sap->node);spin_unlock_bh (&llc_sap_list_lock); -synchronize_rcu (); - -kfree (sap); +kfree_rcu (sap, rcu); }static struct packet_type llc_packet_type__read_mostly = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 113/239 ARM: dts: qcom: ipq4019: fix cpu0s qcom,saw2 reg value
In reply to Greg Kroah-HartmanFrom: Christian Lamparter <[email protected]>
[ Upstream commit bd73a3dd257fb838bd456a18eeee0ef0224b7a40 ]
while compiling an ipq4019 target, dtc will complain:
regulator@b089000 unit address format error, expected "2089000"
The saw0 regulator reg value seems to be
copied and pasted from qcom-ipq8064.dtsi.
This patch fixes the reg value to match that of the unit address which in turn silences the warning. (There is no driver for qcom,saw2 right now. So this went unnoticed)
--- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-ipq4019.dtsi +1 -1
@@ -234,7 +234,7 @@ saw0: regulator@b089000 { compatible = "qcom,saw2"; - reg = <0x02089000 0x1000>, <0x0b009000 0x1000>; + reg = <0x0b089000 0x1000>, <0x0b009000 0x1000>; regulator; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 114/239 soc: qcom: wcnss_ctrl: Avoid string overflow
In reply to Greg Kroah-HartmanFrom: Niklas Cassel <[email protected]>
[ Upstream commit 4c96ed170d658d8826d94edec8ac93ee777981a2 ]
'chinfo.name' is used as a NUL-terminated string, but using strncpy() with the length equal to the buffer size may result in lack of the termination:
drivers//soc/qcom/wcnss_ctrl.c: In function 'qcom_wcnss_open_channel':drivers//soc/qcom/wcnss_ctrl.c:284:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(chinfo.name, name, sizeof(chinfo.name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes it to use the safer strscpy() instead.
--- drivers/soc/qcom/wcnss_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/wcnss_ctrl.c +1 -1
@@ -281,7 +281,7 @@ struct rpmsg_endpoint *qcom_wcnss_open_channel(void *wcnss, const char *name, rpstruct rpmsg_channel_info chinfo;struct wcnss_ctrl *_wcnss = wcnss; -strncpy (chinfo.name, name,sizeof (chinfo.name)); +strscpy (chinfo.name, name,sizeof (chinfo.name)); chinfo.src =RPMSG_ADDR_ANY ; chinfo.dst =RPMSG_ADDR_ANY ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 115/239 powerpc/vdso: Correct call frame information
In reply to Greg Kroah-HartmanFrom: Alan Modra <[email protected]>
[ Upstream commit 56d20861c027498b5a1112b4f9f05b56d906fdda ]
Call Frame Information is used by gdb for back-traces and inserting breakpoints on function return for the "finish" command. This failed when inside __kernel_clock_gettime. More concerning than difficulty debugging is that CFI is also used by stack frame unwinding code to implement exceptions. If you have an app that needs to handle asynchronous exceptions for some reason, and you are unlucky enough to get one inside the VDSO time functions, your app will crash.
What's wrong: There is control flow in __kernel_clock_gettime that reaches label 99 without saving lr in r12. CFI info however is interpreted by the unwinder without reference to control flow: It's a simple matter of "Execute all the CFI opcodes up to the current address". That means the unwinder thinks r12 contains the return address at label 99. Disabuse it of that notion by resetting CFI for the return address at label 99.
Note that the ".cfi_restore lr" could have gone anywhere from the "mtlr r12" a few instructions earlier to the instruction at label 99. I put the CFI as late as possible, because in general that's best practice (and if possible grouped with other CFI in order to reduce the number of CFI opcodes executed when unwinding). Using r12 as the return address is perfectly fine after the "mtlr r12" since r12 on that code path still contains the return address.
__get_datapage also has a CFI error. That function temporarily saves lr in r0, and reflects that fact with ".cfi_register lr,r0". A later use of r0 means the CFI at that point isn't correct, as r0 no longer contains the return address. Fix that too.
--- arch/powerpc/kernel/vdso32/datapage.S | 1 + arch/powerpc/kernel/vdso32/gettimeofday.S | 1 + arch/powerpc/kernel/vdso64/datapage.S | 1 + arch/powerpc/kernel/vdso64/gettimeofday.S | 1 + 4 files changed, 4 insertions(+)
arch/powerpc/kernel/vdso32/datapage.S +1 -0
@@ -37,6 +37,7 @@ data_page_branch: mtlr r0 addi r3, r3, __kernel_datapage_offset-data_page_branch lwz r0,0(r3) + .cfi_restore lr add r3,r0,r3 blr .cfi_endproc
arch/powerpc/kernel/vdso32/gettimeofday.S +1 -0
@@ -139,6 +139,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) */ 99: li r0,__NR_clock_gettime + .cfi_restore lr sc blr .cfi_endproc
arch/powerpc/kernel/vdso64/datapage.S +1 -0
@@ -37,6 +37,7 @@ data_page_branch: mtlr r0 addi r3, r3, __kernel_datapage_offset-data_page_branch lwz r0,0(r3) + .cfi_restore lr add r3,r0,r3 blr .cfi_endproc
arch/powerpc/kernel/vdso64/gettimeofday.S +1 -0
@@ -124,6 +124,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) */ 99: li r0,__NR_clock_gettime + .cfi_restore lr sc blr .cfi_endproc
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 116/239 ARM: dts: socfpga: Fix I2C bus unit-address error
In reply to Greg Kroah-HartmanFrom: Dinh Nguyen <[email protected]>
[ Upstream commit cbbc488ed85061a765cf370c3e41f383c1e0add6 ]
dtc has new checks for I2C buses. Fix the warnings in unit-addresses.
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dtb: Warning (i2c_bus_reg): /soc/i2c@ffc04000/adxl345@0: I2C bus unit address format error, expected "53"
--- arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts +1 -1
@@ -88,7 +88,7 @@ status = "okay"; clock-frequency = <100000>; - adxl345: adxl345@0 { + adxl345: adxl345@53 { compatible = "adi,adxl345"; reg = <0x53>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 117/239 pinctrl: at91: dont use the same irqchip with multiple gpiochips
In reply to Greg Kroah-HartmanFrom: Ludovic Desroches <[email protected]>
[ Upstream commit 0c3dfa176912b5f87732545598200fb55e9c1978 ]
Sharing the same irqchip with multiple gpiochips is not a good practice. For instance, when installing hooks, we change the state of the irqchip. The initial state of the irqchip for the second gpiochip to register is then disrupted.
--- drivers/pinctrl/pinctrl-at91.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/pinctrl/pinctrl-at91.c +14 -14
@@ -1566,16 +1566,6 @@ void at91_pinctrl_gpio_resume(void)#define gpio_irq_set_wake NULL#endif /* CONFIG_PM */ -static struct irq_chip gpio_irqchip = { - .name ="GPIO" , - .irq_ack = gpio_irq_ack, - .irq_disable = gpio_irq_mask, - .irq_mask = gpio_irq_mask, - .irq_unmask = gpio_irq_unmask, -/* .irq_set_type is set dynamically */ - .irq_set_wake = gpio_irq_set_wake, -}; -static void gpio_irq_handler (struct irq_desc *desc) {struct irq_chip *chip =irq_desc_get_chip (desc);
@@ -1616,12 +1606,22 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,struct gpio_chip *gpiochip_prev =NULL ;struct at91_gpio_chip *prev =NULL ;struct irq_data *d =irq_get_irq_data (at91_gpio->pioc_virq); +struct irq_chip *gpio_irqchip;int ret, i; + gpio_irqchip =devm_kzalloc (&pdev->dev,sizeof (*gpio_irqchip),GFP_KERNEL ); +if (!gpio_irqchip) +return -ENOMEM ; + at91_gpio->pioc_hwirq =irqd_to_hwirq (d); -/* Setup proper .irq_set_type function */ - gpio_irqchip.irq_set_type = at91_gpio->ops->irq_type; + gpio_irqchip->name ="GPIO" ; + gpio_irqchip->irq_ack = gpio_irq_ack; + gpio_irqchip->irq_disable = gpio_irq_mask; + gpio_irqchip->irq_mask = gpio_irq_mask; + gpio_irqchip->irq_unmask = gpio_irq_unmask; + gpio_irqchip->irq_set_wake = gpio_irq_set_wake, + gpio_irqchip->irq_set_type = at91_gpio->ops->irq_type;/* Disable irqs of this PIO controller */ writel_relaxed (~0 , at91_gpio->regbase +PIO_IDR );
@@ -1632,7 +1632,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,* interrupt. */ ret =gpiochip_irqchip_add (&at91_gpio->chip, - &gpio_irqchip, + gpio_irqchip,0 , handle_edge_irq,IRQ_TYPE_NONE );
@@ -1650,7 +1650,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,if (!gpiochip_prev) {/* Then register the chain on the parent IRQ */ gpiochip_set_chained_irqchip (&at91_gpio->chip, - &gpio_irqchip, + gpio_irqchip, at91_gpio->pioc_virq, gpio_irq_handler);return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 118/239 cxgb4: Fix endianness issue in t4_fwcache()
In reply to Greg Kroah-HartmanFrom: Ganesh Goudar <[email protected]>
[ Upstream commit 0dc235afc59a226d951352b0adf4a89b532a9d13 ]
Do not put host-endian 0 or 1 into big endian feild.
--- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +1 -1
@@ -3750,7 +3750,7 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op) c.param[0 ].mnem =cpu_to_be32 (FW_PARAMS_MNEM_V (FW_PARAMS_MNEM_DEV ) |FW_PARAMS_PARAM_X_V (FW_PARAMS_PARAM_DEV_FWCACHE )); - c.param[0 ].val = (__force __be32 )op; + c.param[0 ].val =cpu_to_be32 (op);return t4_wr_mbox (adap, adap->mbox, &c,sizeof (c),NULL ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 119/239 blok, bfq: do not plug I/O if all queues are weight-raised
In reply to Greg Kroah-HartmanFrom: Paolo Valente <[email protected]>
[ Upstream commit c8765de0adfcaaf4ffb2d951e07444f00ffa9453 ]
To reduce latency for interactive and soft real-time applications, bfq privileges the bfq_queues containing the I/O of these applications. These privileged queues, referred-to as weight-raised queues, get a much higher share of the device throughput w.r.t. non-privileged queues. To preserve this higher share, the I/O of any non-weight-raised queue must be plugged whenever a sync weight-raised queue, while being served, remains temporarily empty. To attain this goal, bfq simply plugs any I/O (from any queue), if a sync weight-raised queue remains empty while in service.
Unfortunately, this plugging typically lowers throughput with random I/O, on devices with internal queueing (because it reduces the filling level of the internal queues of the device).
This commit addresses this issue by restricting the cases where plugging is performed: if a sync weight-raised queue remains empty while in service, then I/O plugging is performed only if some of the active bfq_queues are *not* weight-raised (which is actually the only circumstance where plugging is needed to preserve the higher share of the throughput of weight-raised queues). This restriction proved able to boost throughput in really many use cases needing only maximum throughput.
--- block/bfq-iosched.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
block/bfq-iosched.c +8 -2
@@ -3314,7 +3314,12 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq)* whether bfqq is being weight-raised, because * bfq_symmetric_scenario() does not take into account also * weight-raised queues (see comments on -* bfq_weights_tree_add()). +* bfq_weights_tree_add()). In particular, if bfqq is being +* weight-raised, it is important to idle only if there are +* other, non-weight-raised queues that may steal throughput +* to bfqq. Actually, we should be even more precise, and +* differentiate between interactive weight raising and +* soft real-time weight raising. * * As a side note, it is worth considering that the above * device-idling countermeasures may however fail in the
@@ -3326,7 +3331,8 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq)* to let requests be served in the desired order until all * the requests already queued in the device have been served. */ - asymmetric_scenario = bfqq->wr_coeff >1 || + asymmetric_scenario = (bfqq->wr_coeff >1 && + bfqd->wr_busy_queues < bfqd->busy_queues) || !bfq_symmetric_scenario (bfqd);/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 120/239 arm64: dts: meson: Fix erroneous SPI bus warnings
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit 68ecb5c1920c5b98b1e717fd2349fba2ee5d4031 ]
dtc has new checks for SPI buses. The meson dts files have a node named spi' which causes false positive warnings. As the node is a pinctrl child node, change the node name to be 'spi-pins' to fix the warnings.
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dtb: Warning (spi_bus_bridge): /soc/periphs@c8834000/pinctrl@4b0/spi: incorrect #address-cells for SPI bus
--- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +1 -1
@@ -413,7 +413,7 @@ }; }; - spi_pins: spi { + spi_pins: spi-pins { mux { groups = "spi_miso", "spi_mosi",
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +1 -1
@@ -310,7 +310,7 @@ }; }; - spi_pins: spi { + spi_pins: spi-pins { mux { groups = "spi_miso", "spi_mosi",
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 121/239 power: supply: ab8500_fg: silence uninitialized variable warnings
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 54baff8d4e5dce2cef61953b1dc22079cda1ddb1 ]
If kstrtoul() fails then we print "charge_full" when it's uninitialized. The debug printk doesn't add anything so I deleted it and cleaned these two functions up a bit.
--- drivers/power/supply/ab8500_fg.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-)
drivers/power/supply/ab8500_fg.c +12 -19
@@ -2437,17 +2437,14 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf, size_t count) {unsigned long charge_full; -ssize_t ret; +int ret; ret =kstrtoul (buf,10 , &charge_full); +if (ret) +return ret; -dev_dbg (di->dev,"Ret %zd charge_full %lu" , ret, charge_full); - -if (!ret) { - di->bat_cap.max_mah = (int ) charge_full; - ret = count; - } -return ret; + di->bat_cap.max_mah = (int ) charge_full; +return count; }static ssize_t charge_now_show (struct ab8500_fg *di,char *buf)
@@ -2459,20 +2456,16 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf, size_t count) {unsigned long charge_now; -ssize_t ret; +int ret; ret =kstrtoul (buf,10 , &charge_now); +if (ret) +return ret; -dev_dbg (di->dev,"Ret %zd charge_now %lu was %d" , - ret, charge_now, di->bat_cap.prev_mah); - -if (!ret) { - di->bat_cap.user_mah = (int ) charge_now; - di->flags.user_cap = true; - ret = count; -queue_delayed_work (di->fg_wq, &di->fg_periodic_work,0 ); - } -return ret; + di->bat_cap.user_mah = (int ) charge_now; + di->flags.user_cap = true; +queue_delayed_work (di->fg_wq, &di->fg_periodic_work,0 ); +return count; } static struct ab8500_fg_sysfs_entry charge_full_attr =
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 122/239 power: reset: at91-poweroff: do not procede if at91_shdwc is allocated
In reply to Greg Kroah-HartmanFrom: Claudiu Beznea <[email protected]>
[ Upstream commit 9f1e44774be578fb92776add95f1fcaf8284d692 ]
There should be only one instance of struct shdwc in the system. This is referenced through at91_shdwc. Return in probe if at91_shdwc is already allocated.
--- drivers/power/reset/at91-sama5d2_shdwc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/power/reset/at91-sama5d2_shdwc.c +3 -0
@@ -246,6 +246,9 @@ static int __init at91_shdwc_probe(struct platform_device *pdev)if (!pdev->dev.of_node)return -ENODEV ; +if (at91_shdwc) +return -EBUSY ; + at91_shdwc =devm_kzalloc (&pdev->dev,sizeof (*at91_shdwc),GFP_KERNEL );if (!at91_shdwc)return -ENOMEM ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 123/239 power: supply: max8998-charger: Fix platform data retrieval
In reply to Greg Kroah-HartmanFrom: Tomasz Figa <[email protected]>
[ Upstream commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 ]
Since the max8998 MFD driver supports instantiation by DT, platform data retrieval is handled in MFD probe and cell drivers should get use the pdata field of max8998_dev struct to obtain them.
--- drivers/power/supply/max8998_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/max8998_charger.c +1 -1
@@ -85,7 +85,7 @@ static const struct power_supply_desc max8998_battery_desc = {static int max8998_battery_probe (struct platform_device *pdev) {struct max8998_dev *iodev =dev_get_drvdata (pdev->dev.parent); -struct max8998_platform_data *pdata =dev_get_platdata (iodev->dev); +struct max8998_platform_data *pdata = iodev->pdata;struct power_supply_config psy_cfg = {};struct max8998_battery_data *max8998;struct i2c_client *i2c;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 124/239 component: fix loop condition to call unbind() if bind() fails
In reply to Greg Kroah-HartmanFrom: Banajit Goswami <[email protected]>
[ Upstream commit bdae566d5d9733b6e32b378668b84eadf28a94d4 ]
During component_bind_all(), if bind() fails for any particular component associated with a master, unbind() should be called for all previous components in that master's match array, whose bind() might have completed successfully. As per the current logic, if bind() fails for the component at position 'n' in the master's match array, it would start calling unbind() from component in 'n'th position itself and work backwards, and will always skip calling unbind() for component in 0th position in the master's match array.
Fix this by updating the loop condition, and the logic to refer to the components in master's match array, so that unbind() is called for all components starting from 'n-1'st position in the array, until (and including) component in 0th position.
--- drivers/base/component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/base/component.c +3 -3
@@ -461,9 +461,9 @@ int component_bind_all(struct device *master_dev, void *data) }if (ret !=0 ) { -for (; i--; ) -if (!master->match->compare[i].duplicate) { - c = master->match->compare[i].component; +for (; i >0 ; i--) +if (!master->match->compare[i -1 ].duplicate) { + c = master->match->compare[i -1 ].component;component_unbind (c, master, data); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 125/239 kernfs: Fix range checks in kernfs_get_target_path
In reply to Greg Kroah-HartmanFrom: Bernd Edlinger <[email protected]>
[ Upstream commit a75e78f21f9ad4b810868c89dbbabcc3931591ca ]
The terminating NUL byte is only there because the buffer is allocated with kzalloc(PAGE_SIZE, GFP_KERNEL), but since the range-check is off-by-one, and PAGE_SIZE==PATH_MAX, the returned string may not be zero-terminated if it is exactly PATH_MAX characters long. Furthermore also the initial loop may theoretically exceed PATH_MAX and cause a fault.
--- fs/kernfs/symlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/kernfs/symlink.c +4 -1
@@ -63,6 +63,9 @@ static int kernfs_get_target_path(struct kernfs_node *parent,if (base == kn)break ; +if ((s - path) +3 >=PATH_MAX ) +return -ENAMETOOLONG ; +strcpy (s,"../" ); s +=3 ; base = base->parent;
@@ -79,7 +82,7 @@ static int kernfs_get_target_path(struct kernfs_node *parent,if (len <2 )return -EINVAL ; len--; -if ((s - path) + len >PATH_MAX ) +if ((s - path) + len >=PATH_MAX )return -ENAMETOOLONG ;/* reverse fillup of target string from target to base */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 126/239 ip_gre: fix parsing gre header in ipgre_err
In reply to Greg Kroah-HartmanFrom: Haishuang Yan <[email protected]>
[ Upstream commit b0350d51f001e6edc13ee4f253b98b50b05dd401 ]
gre_parse_header stops parsing when csum_err is encountered, which means tpi->key is undefined and ip_tunnel_lookup will return NULL improperly.
This patch introduce a NULL pointer as csum_err parameter. Even when csum_err is encountered, it won't return error and continue parsing gre header as expected.
--- net/ipv4/gre_demux.c | 7 ++++--- net/ipv4/ip_gre.c | 9 +++------ 2 files changed, 7 insertions(+), 9 deletions(-)
net/ipv4/gre_demux.c +4 -3
@@ -86,13 +86,14 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi, options = (__be32 *)(greh +1 );if (greh->flags &GRE_CSUM ) { -if (skb_checksum_simple_validate (skb)) { +if (!skb_checksum_simple_validate (skb)) { +skb_checksum_try_convert (skb,IPPROTO_GRE ,0 , + null_compute_pseudo); + }else if (csum_err) { *csum_err = true;return -EINVAL ; } -skb_checksum_try_convert (skb,IPPROTO_GRE ,0 , - null_compute_pseudo); options++; }
net/ipv4/ip_gre.c +3 -6
@@ -230,13 +230,10 @@ static void gre_err(struct sk_buff *skb, u32 info)const int type =icmp_hdr (skb)->type;const int code =icmp_hdr (skb)->code;struct tnl_ptk_info tpi; -bool csum_err = false; -if (gre_parse_header (skb, &tpi, &csum_err,htons (ETH_P_IP ), - iph->ihl *4 ) <0 ) { -if (!csum_err)/* ignore csum errors. */ -return ; - } +if (gre_parse_header (skb, &tpi,NULL ,htons (ETH_P_IP ), + iph->ihl *4 ) <0 ) +return ;if (type ==ICMP_DEST_UNREACH && code ==ICMP_FRAG_NEEDED ) { ipv4_update_pmtu(skb, dev_net(skb->dev), info,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 127/239 ARM: dts: rockchip: Fix erroneous SPI bus dtc warnings on rk3036
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit 131c3eb428ccd5f0c784b9edb4f72ec296a045d2 ]
dtc has new checks for SPI buses. The rk3036 dts file has a node named spi' which causes false positive warnings. As the node is a pinctrl child node, change the node name to be 'spi-pins' to fix the warnings.
arch/arm/boot/dts/rk3036-evb.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #address-cells for SPI bus arch/arm/boot/dts/rk3036-kylin.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #address-cells for SPI bus arch/arm/boot/dts/rk3036-evb.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #size-cells for SPI bus arch/arm/boot/dts/rk3036-kylin.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #size-cells for SPI bus
--- arch/arm/boot/dts/rk3036.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rk3036.dtsi +1 -1
@@ -750,7 +750,7 @@ /* no rts / cts for uart2 */ }; - spi { + spi-pins { spi_txd:spi-txd { rockchip,pins = <1 29 RK_FUNC_3 &pcfg_pull_default>; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 128/239 ACPI / LPSS: Exclude I2C busses shared with PUNIT from pmc_atom_d3_mask
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 86b62e5cd8965d3056f9e9ccdec51631c37add81 ]
lpss_iosf_enter_d3_state() checks if all hw-blocks using the DMA controllers are in d3 before powering down the DMA controllers.
But on devices, where the I2C bus connected to the PMIC is shared by the PUNIT, the controller for that bus will never reach d3 since it has an effectively empty _PS3 method. Instead it appears to automatically power-down during S0i3 and we never see it as being in d3.
This causes the DMA controllers to never be powered-down on these devices, causing them to never reach S0i3. This commit uses the ACPI _SEM method to detect if an I2C bus is shared with the PUNIT and if it is, it removes it from the mask of devices which lpss_iosf_enter_d3_state() checks for.
This fixes these devices never reaching any S0ix states.
--- drivers/acpi/acpi_lpss.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/acpi/acpi_lpss.c +20 -2
@@ -98,6 +98,9 @@ struct lpss_private_data {u32 prv_reg_ctx[LPSS_PRV_REG_COUNT ]; }; +/* Devices which need to be in D3 before lpss_iosf_enter_d3_state() proceeds */ +static u32 pmc_atom_d3_mask =0xfe000ffe ; +/* LPSS run time quirks */ static unsigned int lpss_quirks;
@@ -174,6 +177,21 @@ static void byt_pwm_setup(struct lpss_private_data *pdata)static void byt_i2c_setup (struct lpss_private_data *pdata) { +const char *uid_str =acpi_device_uid (pdata->adev); +acpi_handle handle = pdata->adev->handle; +unsigned long long shared_host =0 ; +acpi_status status; +long uid =0 ; + +/* Expected to always be true, but better safe then sorry */ +if (uid_str) + uid =simple_strtol (uid_str,NULL ,10 ); + +/* Detect I2C bus shared with PUNIT and ignore its d3 status */ + status =acpi_evaluate_integer (handle,"_SEM" ,NULL , &shared_host); +if (ACPI_SUCCESS (status) && shared_host && uid) + pmc_atom_d3_mask &= ~(BIT_LPSS2_F1_I2C1 << (uid -1 )); +lpss_deassert_reset (pdata);if (readl (pdata->mmio_base + pdata->dev_desc->prv_offset))
@@ -789,7 +807,7 @@ static void lpss_iosf_enter_d3_state(void)* Here we read the values related to LPSS power island, i.e. LPSS * devices, excluding both LPSS DMA controllers, along with SCC domain. */ -u32 func_dis, d3_sts_0, pmc_status, pmc_mask =0xfe000ffe ; +u32 func_dis, d3_sts_0, pmc_status;int ret; ret =pmc_atom_read (PMC_FUNC_DIS , &func_dis);
@@ -807,7 +825,7 @@ static void lpss_iosf_enter_d3_state(void)* Shutdown both LPSS DMA controllers if and only if all other devices * are already in D3hot. */ - pmc_status = (~(d3_sts_0 | func_dis)) & pmc_mask; + pmc_status = (~(d3_sts_0 | func_dis)) & pmc_atom_d3_mask;if (pmc_status) goto exit;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 129/239 ath9k: Fix a locking bug in ath9k_add_interface()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 461cf036057477805a8a391e5fd0f5264a5e56a8 ]
We tried to revert commit d9c52fd17cb4 ("ath9k: fix tx99 with monitor mode interface") but accidentally missed part of the locking change.
The lock has to be held earlier so that we're holding it when we do "sc->tx99_vif = vif;" and also there in the current code there is a stray unlock before we have taken the lock.
--- drivers/net/wireless/ath/ath9k/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +1 -2
@@ -1250,6 +1250,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,struct ath_vif *avp = (void *)vif->drv_priv;struct ath_node *an = &avp->mcast_node; +mutex_lock (&sc->mutex);if (IS_ENABLED (CONFIG_ATH9K_TX99 )) {if (sc->cur_chan->nvifs >=1 ) {mutex_unlock (&sc->mutex);
@@ -1258,8 +1259,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, sc->tx99_vif = vif; } -mutex_lock (&sc->mutex); -ath_dbg (common,CONFIG ,"Attach a VIF of type: %d\n" , vif->type); sc->cur_chan->nvifs++;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 130/239 s390/qeth: invoke softirqs after napi_schedule()
In reply to Greg Kroah-HartmanFrom: Julian Wiedmann <[email protected]>
[ Upstream commit 4d19db777a2f32c9b76f6fd517ed8960576cb43e ]
Calling napi_schedule() from process context does not ensure that the NET_RX softirq is run in a timely fashion. So trigger it manually.
This is no big issue with current code. A call to ndo_open() is usually followed by a ndo_set_rx_mode() call, and for qeth this contains a spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out early.
Nevertheless it's best to not depend on this behaviour, and just fix the issue at its source like all other drivers do. For instance see commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule").
--- drivers/s390/net/qeth_l2_main.c | 3 +++ drivers/s390/net/qeth_l3_main.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/s390/net/qeth_l2_main.c +3 -0
@@ -869,7 +869,10 @@ static int __qeth_l2_open(struct net_device *dev)if (qdio_stop_irq (card->data.ccwdev,0 ) >=0 ) {napi_enable (&card->napi); +local_bh_disable ();napi_schedule (&card->napi); +/* kick-start the NAPI softirq: */ +local_bh_enable (); }else rc = -EIO ;return rc;
drivers/s390/net/qeth_l3_main.c +3 -0
@@ -2849,7 +2849,10 @@ static int __qeth_l3_open(struct net_device *dev)if (qdio_stop_irq (card->data.ccwdev,0 ) >=0 ) {napi_enable (&card->napi); +local_bh_disable ();napi_schedule (&card->napi); +/* kick-start the NAPI softirq: */ +local_bh_enable (); }else rc = -EIO ;return rc;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 131/239 PCI/ACPI: Correct error message for ASPM disabling
In reply to Greg Kroah-HartmanFrom: Sinan Kaya <[email protected]>
[ Upstream commit 1ad61b612b95980a4d970c52022aa01dfc0f6068 ]
If _OSC execution fails today for platforms without an _OSC entry, code is printing a misleading message saying disabling ASPM as follows:
acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
We need to ensure that platform supports ASPM to begin with.
--- drivers/acpi/pci_root.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/acpi/pci_root.c +3 -2
@@ -454,8 +454,9 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)decode_osc_support (root,"OS supports" , support); status =acpi_pci_osc_support (root, support);if (ACPI_FAILURE (status)) { -dev_info (&device->dev,"_OSC failed (%s); disabling ASPM\n" , -acpi_format_exception (status)); +dev_info (&device->dev,"_OSC failed (%s)%s\n" , +acpi_format_exception (status), +pcie_aspm_support_enabled () ?"; disabling ASPM" :"" ); *no_aspm =1 ;return ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 132/239 serial: uartps: Fix suspend functionality
In reply to Greg Kroah-HartmanFrom: Nava kishore Manne <[email protected]>
[ Upstream commit 4b9d33c6a30688344a3e95179654ea31b07f59b7 ]
The driver's suspend/resume functions were buggy. If UART node contains any child node in the DT and the child is established a communication path with the parent UART. The relevant /dev/ttyPS* node will be not available for other operations.
If the driver is trying to do any operations like suspend/resume without checking the tty->dev status it leads to the kernel crash/hang.
This patch fix this issue by call the device_may_wake() with the generic parameter of type struct device. in the uart suspend and resume paths.
It also fixes a race condition in the uart suspend path(i.e uart_suspend_port() should be called at the end of cdns_uart_suspend API this path updates the same)
--- drivers/tty/serial/xilinx_uartps.c | 41 +++++++++--------------------- 1 file changed, 12 insertions(+), 29 deletions(-)
drivers/tty/serial/xilinx_uartps.c +12 -29
@@ -1342,24 +1342,11 @@ static struct uart_driver cdns_uart_uart_driver = {static int cdns_uart_suspend (struct device *device) {struct uart_port *port =dev_get_drvdata (device); -struct tty_struct *tty; -struct device *tty_dev; -int may_wake =0 ; - -/* Get the tty which could be NULL so don't assume it's valid */ - tty =tty_port_tty_get (&port->state->port); -if (tty) { - tty_dev = tty->dev; - may_wake =device_may_wakeup (tty_dev); -tty_kref_put (tty); - } +int may_wake; -/* -* Call the API provided in serial_core.c file which handles -* the suspend. -*/ -uart_suspend_port (&cdns_uart_uart_driver, port); -if (!(console_suspend_enabled && !may_wake)) { + may_wake =device_may_wakeup (device); + +if (console_suspend_enabled && may_wake) {unsigned long flags =0 ;spin_lock_irqsave (&port->lock, flags);
@@ -1374,7 +1361,11 @@ static int cdns_uart_suspend(struct device *device)spin_unlock_irqrestore (&port->lock, flags); } -return 0 ; +/* +* Call the API provided in serial_core.c file which handles +* the suspend. +*/ +return uart_suspend_port (&cdns_uart_uart_driver, port); }/**
@@ -1388,17 +1379,9 @@ static int cdns_uart_resume(struct device *device)struct uart_port *port =dev_get_drvdata (device);unsigned long flags =0 ;u32 ctrl_reg; -struct tty_struct *tty; -struct device *tty_dev; -int may_wake =0 ; - -/* Get the tty which could be NULL so don't assume it's valid */ - tty =tty_port_tty_get (&port->state->port); -if (tty) { - tty_dev = tty->dev; - may_wake =device_may_wakeup (tty_dev); -tty_kref_put (tty); - } +int may_wake; + + may_wake =device_may_wakeup (device);if (console_suspend_enabled && !may_wake) {struct cdns_uart *cdns_uart = port->private_data;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 133/239 serial: samsung: Enable baud clock for UART reset procedure in resume
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit 1ff3652bc7111df26b5807037f624be294cf69d5 ]
Ensure that the baud clock is also enabled for UART register writes in driver resume. On Exynos5433 SoC this is needed to avoid external abort issue.
--- drivers/tty/serial/samsung.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/tty/serial/samsung.c +8 -0
@@ -1922,7 +1922,11 @@ static int s3c24xx_serial_resume(struct device *dev)if (port) {clk_prepare_enable (ourport->clk); +if (!IS_ERR (ourport->baudclk)) +clk_prepare_enable (ourport->baudclk);s3c24xx_serial_resetport (port,s3c24xx_port_to_cfg (port)); +if (!IS_ERR (ourport->baudclk)) +clk_disable_unprepare (ourport->baudclk);clk_disable_unprepare (ourport->clk);uart_resume_port (&s3c24xx_uart_drv, port);
@@ -1945,7 +1949,11 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)if (rx_enabled (port)) uintm &= ~S3C64XX_UINTM_RXD_MSK ;clk_prepare_enable (ourport->clk); +if (!IS_ERR (ourport->baudclk)) +clk_prepare_enable (ourport->baudclk);wr_regl (port,S3C64XX_UINTM , uintm); +if (!IS_ERR (ourport->baudclk)) +clk_disable_unprepare (ourport->baudclk);clk_disable_unprepare (ourport->clk); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 134/239 serial: mxs-auart: Fix potential infinite loop
In reply to Greg Kroah-HartmanFrom: Anton Vasilyev <[email protected]>
[ Upstream commit 5963e8a3122471cadfe0eba41c4ceaeaa5c8bb4d ]
On the error path of mxs_auart_request_gpio_irq() is performed backward iterating with index i of enum type. Underline enum type may be unsigned char. In this case check (--i >= 0) will be always true and error handling goes into infinite loop.
The patch changes the check so that it is valid for signed and unsigned types.
Found by Linux Driver Verification project (linuxtesting.org).
--- drivers/tty/serial/mxs-auart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/mxs-auart.c +2 -1
@@ -1638,8 +1638,9 @@ static int mxs_auart_request_gpio_irq(struct mxs_auart_port *s)/* * If something went wrong, rollback. +* Be careful: i may be unsigned. */ -while (err && (--i >=0 )) +while (err && (i-- >0 ))if (irq[i] >=0 )free_irq (irq[i], s);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 135/239 samples/bpf: fix a compilation failure
In reply to Greg Kroah-HartmanFrom: Yonghong Song <[email protected]>
[ Upstream commit 534e0e52bc23de588e81b5a6f75e10c8c4b189fc ]
samples/bpf build failed with the following errors:
$ make samples/bpf/
...
HOSTCC samples/bpf/sockex3_user.o
/data/users/yhs/work/net-next/samples/bpf/sockex3_user.c:16:8: error: redefinition of ‘struct bpf_flow_keys’
struct bpf_flow_keys {
^
In file included from /data/users/yhs/work/net-next/samples/bpf/sockex3_user.c:4:0:
./usr/include/linux/bpf.h:2338:9: note: originally defined here
struct bpf_flow_keys *flow_keys;
^
make[3]: *** [samples/bpf/sockex3_user.o] Error 1Commit d58e468b1112d ("flow_dissector: implements flow dissector BPF hook") introduced struct bpf_flow_keys in include/uapi/linux/bpf.h and hence caused the naming conflict with samples/bpf/sockex3_user.c.
The fix is to rename struct bpf_flow_keys in samples/bpf/sockex3_user.c to flow_keys to avoid the conflict.
--- samples/bpf/sockex3_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
samples/bpf/sockex3_user.c +2 -2
@@ -13,7 +13,7 @@#define PARSE_IP_PROG_FD (prog_fd[0])#define PROG_ARRAY_FD (map_fd[0]) -struct bpf_flow_keys { +struct flow_keys {__be32 src;__be32 dst;union {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) (void ) f;for (i =0 ; i <5 ; i++) { -struct bpf_flow_keys key = {}, next_key; +struct flow_keys key = {}, next_key;struct pair value;sleep (1 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 136/239 spi: mediatek: Dont modify spi_transfer when transfer.
In reply to Greg Kroah-HartmanFrom: Peter Shih <[email protected]>
[ Upstream commit 00bca73bfca4fb0ab089b94cad0fc83d8b49c25f ]
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma, rx_dma) of the spi_transfer* passed in when doing transfer_one and in interrupt handler. This is somewhat unexpected, and there are some caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple messages. Add a field to record how many bytes have been transferred, and calculate the right len / buffer based on it instead.
--- drivers/spi/spi-mt65xx.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-)
drivers/spi/spi-mt65xx.c +21 -16
@@ -98,6 +98,7 @@ struct mtk_spi {struct clk *parent_clk, *sel_clk, *spi_clk;struct spi_transfer *cur_transfer;u32 xfer_len; +u32 num_xfered;struct scatterlist *tx_sgl, *rx_sgl;u32 tx_sgl_len, rx_sgl_len;const struct mtk_spi_compatible *dev_comp;
@@ -385,6 +386,7 @@ static int mtk_spi_fifo_transfer(struct spi_master *master, mdata->cur_transfer = xfer; mdata->xfer_len =min (MTK_SPI_MAX_FIFO_SIZE , xfer->len); + mdata->num_xfered =0 ;mtk_spi_prepare_transfer (master, xfer);mtk_spi_setup_packet (master);
@@ -415,6 +417,7 @@ static int mtk_spi_dma_transfer(struct spi_master *master, mdata->tx_sgl_len =0 ; mdata->rx_sgl_len =0 ; mdata->cur_transfer = xfer; + mdata->num_xfered =0 ;mtk_spi_prepare_transfer (master, xfer);
@@ -482,7 +485,7 @@ static int mtk_spi_setup(struct spi_device *spi)static irqreturn_t mtk_spi_interrupt (int irq,void *dev_id) { -u32 cmd, reg_val, cnt, remainder; +u32 cmd, reg_val, cnt, remainder, len;struct spi_master *master = dev_id;struct mtk_spi *mdata =spi_master_get_devdata (master);struct spi_transfer *trans = mdata->cur_transfer;
@@ -497,36 +500,38 @@ static irqreturn_t mtk_spi_interrupt(int irq, void *dev_id)if (trans->rx_buf) { cnt = mdata->xfer_len /4 ;ioread32_rep (mdata->base +SPI_RX_DATA_REG , - trans->rx_buf, cnt); + trans->rx_buf + mdata->num_xfered, cnt); remainder = mdata->xfer_len %4 ;if (remainder >0 ) { reg_val =readl (mdata->base +SPI_RX_DATA_REG ); -memcpy (trans->rx_buf + (cnt *4 ), - ®_val, remainder); +memcpy (trans->rx_buf + + mdata->num_xfered + + (cnt *4 ), + ®_val, + remainder); } } - trans->len -= mdata->xfer_len; -if (!trans->len) { + mdata->num_xfered += mdata->xfer_len; +if (mdata->num_xfered == trans->len) {spi_finalize_current_transfer (master);return IRQ_HANDLED ; } -if (trans->tx_buf) - trans->tx_buf += mdata->xfer_len; -if (trans->rx_buf) - trans->rx_buf += mdata->xfer_len; - - mdata->xfer_len =min (MTK_SPI_MAX_FIFO_SIZE , trans->len); + len = trans->len - mdata->num_xfered; + mdata->xfer_len =min (MTK_SPI_MAX_FIFO_SIZE , len);mtk_spi_setup_packet (master); - cnt = trans->len /4 ; -iowrite32_rep (mdata->base +SPI_TX_DATA_REG , trans->tx_buf, cnt); + cnt = len /4 ; +iowrite32_rep (mdata->base +SPI_TX_DATA_REG , + trans->tx_buf + mdata->num_xfered, cnt); - remainder = trans->len %4 ; + remainder = len %4 ;if (remainder >0 ) { reg_val =0 ; -memcpy (®_val, trans->tx_buf + (cnt *4 ), remainder); +memcpy (®_val, + trans->tx_buf + (cnt *4 ) + mdata->num_xfered, + remainder);writel (reg_val, mdata->base +SPI_TX_DATA_REG ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 137/239 ipmi:dmi: Ignore IPMI SMBIOS entries with a zero base address
In reply to Greg Kroah-HartmanFrom: Corey Minyard <[email protected]>
[ Upstream commit 1574608f5f4204440d6d9f52b971aba967664764 ]
Looking at logs from systems all over the place, it looks like tons of broken systems exist that set the base address to zero. I can only guess that is some sort of non-standard idea to mark the interface as not being present. It can't be zero, anyway, so just complain and ignore it.
--- drivers/char/ipmi/ipmi_dmi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/char/ipmi/ipmi_dmi.c +4 -0
@@ -197,6 +197,10 @@ static void __init dmi_decode_ipmi(const struct dmi_header *dm) slave_addr = data[DMI_IPMI_SLAVEADDR ];memcpy (&base_addr, data +DMI_IPMI_ADDR ,sizeof (unsigned long )); +if (!base_addr) { +pr_err ("Base address is zero, assuming no IPMI interface\n" ); +return ; + }if (len >=DMI_IPMI_VER2_LENGTH ) {if (type ==IPMI_DMI_TYPE_SSIF ) { offset =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 138/239 net: hns3: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit c9c3941186c5637caed131c4f4064411d6882299 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, also the implementation in this driver has returns 'netdev_tx_t' value, so just change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/hisilicon/hip04_eth.c | 3 ++- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/hisilicon/hip04_eth.c +2 -1
@@ -424,7 +424,8 @@ static void hip04_start_tx_timer(struct hip04_priv *priv) ns, HRTIMER_MODE_REL); } -static int hip04_mac_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +hip04_mac_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct hip04_priv *priv =netdev_priv (ndev);struct net_device_stats *stats = &ndev->stats;
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +1 -1
@@ -736,7 +736,7 @@ static int hix5hd2_fill_sg_desc(struct hix5hd2_priv *priv,return 0 ; } -static int hix5hd2_net_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t hix5hd2_net_xmit (struct sk_buff *skb,struct net_device *dev) {struct hix5hd2_priv *priv =netdev_priv (dev);struct hix5hd2_desc *desc;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 139/239 powerpc/iommu: Avoid derefence before pointer check
In reply to Greg Kroah-HartmanFrom: Breno Leitao <[email protected]>
[ Upstream commit 984ecdd68de0fa1f63ce205d6c19ef5a7bc67b40 ]
The tbl pointer is being derefenced by IOMMU_PAGE_SIZE prior the check if it is not NULL.
Just moving the dereference code to after the check, where there will be guarantee that 'tbl' will not be NULL.
--- arch/powerpc/kernel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/iommu.c +1 -1
@@ -785,9 +785,9 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl, vaddr =page_address (page) + offset; uaddr = (unsigned long )vaddr; - npages =iommu_num_pages (uaddr, size,IOMMU_PAGE_SIZE (tbl));if (tbl) { + npages =iommu_num_pages (uaddr, size,IOMMU_PAGE_SIZE (tbl)); align =0 ;if (tbl->it_page_shift <PAGE_SHIFT && size >=PAGE_SIZE && ((unsigned long )vaddr & ~PAGE_MASK ) ==0 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 140/239 powerpc/64s/hash: Fix stab_rr off by one initialization
In reply to Greg Kroah-HartmanFrom: Nicholas Piggin <[email protected]>
[ Upstream commit 09b4438db13fa83b6219aee5993711a2aa2a0c64 ]
This causes SLB alloation to start 1 beyond the start of the SLB. There is no real problem because after it wraps it stats behaving properly, it's just surprisig to see when looking at SLB traces.
--- arch/powerpc/mm/slb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/slb.c +1 -1
@@ -315,7 +315,7 @@ void slb_initialize(void)#endif } -get_paca ()->stab_rr =SLB_NUM_BOLTED ; +get_paca ()->stab_rr =SLB_NUM_BOLTED -1 ; lflags =SLB_VSID_KERNEL | linear_llp; vflags =SLB_VSID_KERNEL | vmalloc_llp;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 141/239 powerpc/pseries: Disable CPU hotplug across migrations
In reply to Greg Kroah-HartmanFrom: Nathan Fontenot <[email protected]>
[ Upstream commit 85a88cabad57d26d826dd94ea34d3a785824d802 ]
When performing partition migrations all present CPUs must be online as all present CPUs must make the H_JOIN call as part of the migration process. Once all present CPUs make the H_JOIN call, one CPU is returned to make the rtas call to perform the migration to the destination system.
During testing of migration and changing the SMT state we have found instances where CPUs are offlined, as part of the SMT state change, before they make the H_JOIN call. This results in a hung system where every CPU is either in H_JOIN or offline.
To prevent this this patch disables CPU hotplug during the migration process.
--- arch/powerpc/kernel/rtas.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/kernel/rtas.c +2 -0
@@ -984,6 +984,7 @@ int rtas_ibm_suspend_me(u64 handle) goto out; } +cpu_hotplug_disable ();stop_topology_update ();/* Call function on all CPUs. One of us will make the
@@ -998,6 +999,7 @@ int rtas_ibm_suspend_me(u64 handle)printk (KERN_ERR "Error doing global join\n" );start_topology_update (); +cpu_hotplug_enable ();/* Take down CPUs not online prior to suspend */ cpuret =rtas_offline_cpus_mask (offline_mask);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 142/239 powerpc: Fix duplicate const clang warning in user access code
In reply to Greg Kroah-HartmanFrom: Anton Blanchard <[email protected]>
[ Upstream commit e00d93ac9a189673028ac125a74b9bc8ae73eebc ]
This re-applies commit b91c1e3e7a6f ("powerpc: Fix duplicate const
clang warning in user access code") (Jun 2015) which was undone in
commits:
f2ca80905929 ("powerpc/sparse: Constify the address pointer in __get_user_nosleep()") (Feb 2017) d466f6c5cac1 ("powerpc/sparse: Constify the address pointer in __get_user_nocheck()") (Feb 2017) f84ed59a612d ("powerpc/sparse: Constify the address pointer in __get_user_check()") (Feb 2017)
We see a large number of duplicate const errors in the user access code when building with llvm/clang:
include/linux/pagemap.h:576:8: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
ret = __get_user(c, uaddr);
The problem is we are doing const __typeof__(*(ptr)), which will hit the warning if ptr is marked const.
Removing const does not seem to have any effect on GCC code generation.
--- arch/powerpc/include/asm/uaccess.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/include/asm/uaccess.h +3 -3
@@ -234,7 +234,7 @@ do { \ ({ \ long __gu_err; \ __long_type(*(ptr)) __gu_val; \ - const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ + __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ __chk_user_ptr(ptr); \ if (!is_kernel_addr((unsigned long)__gu_addr)) \ might_fault(); \
@@ -248,7 +248,7 @@ do { \ ({ \ long __gu_err = -EFAULT; \ __long_type(*(ptr)) __gu_val = 0; \ - const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ + __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ might_fault(); \ if (access_ok(VERIFY_READ, __gu_addr, (size))) { \ barrier_nospec(); \
@@ -262,7 +262,7 @@ do { \ ({ \ long __gu_err; \ __long_type(*(ptr)) __gu_val; \ - const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ + __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ __chk_user_ptr(ptr); \ barrier_nospec(); \ __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 143/239 RDMA/i40iw: Fix incorrect iterator type
In reply to Greg Kroah-HartmanFrom: Håkon Bugge <[email protected]>
[ Upstream commit 802fa45cd320de319e86c93bca72abec028ba059 ]
Commit f27b4746f378 ("i40iw: add connection management code") uses an incorrect rcu iterator, whilst holding the rtnl_lock. Since the critical region invokes i40iw_manage_qhash(), which is a sleeping function, the rcu locking and traversal cannot be used.
--- drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/i40iw/i40iw_cm.c +1 -1
@@ -1667,7 +1667,7 @@ static enum i40iw_status_code i40iw_add_mqh_6(struct i40iw_device *iwdev,unsigned long flags;rtnl_lock (); -for_each_netdev_rcu (&init_net, ip_dev) { +for_each_netdev (&init_net, ip_dev) {if ((((rdma_vlan_dev_vlan_id (ip_dev) <I40IW_NO_VLAN ) && (rdma_vlan_dev_real_dev (ip_dev) == iwdev->netdev)) || (ip_dev == iwdev->netdev)) && (ip_dev->flags &IFF_UP )) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 144/239 OPP: Protect dev_list with opp_table lock
In reply to Greg Kroah-HartmanFrom: Viresh Kumar <[email protected]>
[ Upstream commit 3d2556992a878a2210d3be498416aee39e0c32aa ]
The dev_list needs to be protected with a lock, else we may have simultaneous access (addition/removal) to it and that would be racy. Extend scope of the opp_table lock to protect dev_list as well.
--- drivers/base/power/opp/core.c | 21 +++++++++++++++++++-- drivers/base/power/opp/cpu.c | 2 ++ drivers/base/power/opp/opp.h | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-)
drivers/base/power/opp/core.c +19 -2
@@ -49,9 +49,14 @@ static struct opp_device *_find_opp_dev(const struct device *dev,static struct opp_table *_find_opp_table_unlocked (struct device *dev) {struct opp_table *opp_table; +bool found;list_for_each_entry (opp_table, &opp_tables, node) { -if (_find_opp_dev (dev, opp_table)) { +mutex_lock (&opp_table->lock); + found = !!_find_opp_dev (dev, opp_table); +mutex_unlock (&opp_table->lock); + +if (found) {_get_opp_table_kref (opp_table);return opp_table;
@@ -711,6 +716,8 @@ struct opp_device *_add_opp_dev(const struct device *dev,/* Initialize opp-dev */ opp_dev->dev = dev; + +mutex_lock (&opp_table->lock);list_add (&opp_dev->node, &opp_table->dev_list);/* Create debugfs entries for the opp_table */
@@ -718,6 +725,7 @@ struct opp_device *_add_opp_dev(const struct device *dev,if (ret)dev_err (dev,"%s: Failed to register opp debugfs (%d)\n" , __func__, ret); +mutex_unlock (&opp_table->lock);return opp_dev; }
@@ -736,6 +744,7 @@ static struct opp_table *_allocate_opp_table(struct device *dev)if (!opp_table)return NULL ; +mutex_init (&opp_table->lock);INIT_LIST_HEAD (&opp_table->dev_list); opp_dev =_add_opp_dev (dev, opp_table);
@@ -757,7 +766,6 @@ static struct opp_table *_allocate_opp_table(struct device *dev)BLOCKING_INIT_NOTIFIER_HEAD (&opp_table->head);INIT_LIST_HEAD (&opp_table->opp_list); -mutex_init (&opp_table->lock);kref_init (&opp_table->kref);/* Secure the device table modification */
@@ -799,6 +807,10 @@ static void _opp_table_kref_release(struct kref *kref)if (!IS_ERR (opp_table->clk))clk_put (opp_table->clk); +/* +* No need to take opp_table->lock here as we are guaranteed that no +* references to the OPP table are taken at this point. +*/ opp_dev = list_first_entry(&opp_table->dev_list, struct opp_device, node);
@@ -1702,6 +1714,9 @@ void _dev_pm_opp_remove_table(struct opp_table *opp_table, struct device *dev, {struct dev_pm_opp *opp, *tmp; +/* Protect dev_list */ +mutex_lock (&opp_table->lock); +/* Find if opp_table manages a single device */ if (list_is_singular (&opp_table->dev_list)) {/* Free static OPPs */
@@ -1712,6 +1727,8 @@ void _dev_pm_opp_remove_table(struct opp_table *opp_table, struct device *dev, }else {_remove_opp_dev (_find_opp_dev (dev, opp_table), opp_table); } + +mutex_unlock (&opp_table->lock); }void _dev_pm_opp_find_and_remove_table (struct device *dev,bool remove_all)
drivers/base/power/opp/cpu.c +2 -0
@@ -222,8 +222,10 @@ int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)cpumask_clear (cpumask);if (opp_table->shared_opp ==OPP_TABLE_ACCESS_SHARED ) { +mutex_lock (&opp_table->lock);list_for_each_entry (opp_dev, &opp_table->dev_list, node)cpumask_set_cpu (opp_dev->dev->id, cpumask); +mutex_unlock (&opp_table->lock); }else {cpumask_set_cpu (cpu_dev->id, cpumask); }
drivers/base/power/opp/opp.h +1 -1
@@ -124,7 +124,7 @@ enum opp_table_access {* @dev_list: list of devices that share these OPPs * @opp_list: table of opps * @kref: for reference count of the table. -* @lock: mutex protecting the opp_list. +* @lock: mutex protecting the opp_list and dev_list. * @np: struct device_node pointer for opp's DT node. * @clock_latency_ns_max: Max clock latency in nanoseconds. * @shared_opp: OPP is shared between multiple devices.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 145/239 libfdt: Ensure INT_MAX is defined in libfdt_env.h
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit 53dd9dce6979bc54d64a3a09a2fb20187a025be7 ]
The next update of libfdt has a new dependency on INT_MAX. Update the instances of libfdt_env.h in the kernel to either include the necessary header with the definition or define it locally.
--- arch/arm/boot/compressed/libfdt_env.h | 2 ++ arch/powerpc/boot/libfdt_env.h | 2 ++ include/linux/libfdt_env.h | 1 + 3 files changed, 5 insertions(+)
arch/arm/boot/compressed/libfdt_env.h +2 -0
@@ -6,6 +6,8 @@#include <linux/string.h> #include <asm/byteorder.h> +#define INT_MAX ((int)(~0U>>1)) +typedef __be16 fdt16_t ;typedef __be32 fdt32_t ;typedef __be64 fdt64_t ;
arch/powerpc/boot/libfdt_env.h +2 -0
@@ -5,6 +5,8 @@#include <types.h> #include <string.h> +#define INT_MAX ((int)(~0U>>1)) +#include "of.h" typedef u32 uint32_t ;
include/linux/libfdt_env.h +1 -0
@@ -2,6 +2,7 @@#ifndef _LIBFDT_ENV_H#define _LIBFDT_ENV_H +#include <linux/kernel.h> /* For INT_MAX */ #include <linux/string.h> #include <asm/byteorder.h>
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 146/239 power: supply: twl4030_charger: fix charging current out-of-bounds
In reply to Greg Kroah-HartmanFrom: Andreas Kemnade <[email protected]>
[ Upstream commit 8314c212f995bc0d06b54ad02ef0ab4089781540 ]
the charging current uses unsigned int variables, if we step back if the current is still low, we would run into negative which means setting the target to a huge value.
Better add checks here.
--- drivers/power/supply/twl4030_charger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/power/supply/twl4030_charger.c +2 -1
@@ -420,7 +420,8 @@ static void twl4030_current_worker(struct work_struct *data)if (v <USB_MIN_VOLT ) {/* Back up and stop adjusting. */ - bci->usb_cur -=USB_CUR_STEP ; +if (bci->usb_cur >=USB_CUR_STEP ) + bci->usb_cur -=USB_CUR_STEP ; bci->usb_cur_target = bci->usb_cur; }else if (bci->usb_cur >= bci->usb_cur_target || bci->usb_cur +USB_CUR_STEP >USB_MAX_CURRENT ) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 147/239 power: supply: twl4030_charger: disable eoc interrupt on linear charge
In reply to Greg Kroah-HartmanFrom: Andreas Kemnade <[email protected]>
[ Upstream commit 079cdff3d0a09c5da10ae1be35def7a116776328 ]
This avoids getting woken up from suspend after power interruptions when the bci wrongly thinks the battery is full just because of input current going low because of low input power
--- drivers/power/supply/twl4030_charger.c | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
drivers/power/supply/twl4030_charger.c +26 -1
@@ -440,6 +440,7 @@ static void twl4030_current_worker(struct work_struct *data)static int twl4030_charger_enable_usb (struct twl4030_bci *bci,bool enable) {int ret; +u32 reg;if (bci->usb_mode ==CHARGE_OFF ) enable = false;
@@ -453,14 +454,38 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable) bci->usb_enabled =1 ; } -if (bci->usb_mode ==CHARGE_AUTO ) +if (bci->usb_mode ==CHARGE_AUTO ) { +/* Enable interrupts now. */ + reg = ~(u32)(TWL4030_ICHGLOW |TWL4030_ICHGEOC | +TWL4030_TBATOR2 |TWL4030_TBATOR1 | +TWL4030_BATSTS ); + ret =twl_i2c_write_u8 (TWL4030_MODULE_INTERRUPTS , reg, +TWL4030_INTERRUPTS_BCIIMR1A ); +if (ret <0 ) { +dev_err (bci->dev, +"failed to unmask interrupts: %d\n" , + ret); +return ret; + }/* forcing the field BCIAUTOUSB (BOOT_BCI[1]) to 1 */ ret =twl4030_clear_set_boot_bci (0 ,TWL4030_BCIAUTOUSB ); + }/* forcing USBFASTMCHG(BCIMFSTS4[2]) to 1 */ ret =twl4030_clear_set (TWL_MODULE_MAIN_CHARGE ,0 ,TWL4030_USBFASTMCHG ,TWL4030_BCIMFSTS4 );if (bci->usb_mode ==CHARGE_LINEAR ) { +/* Enable interrupts now. */ + reg = ~(u32)(TWL4030_ICHGLOW |TWL4030_TBATOR2 | +TWL4030_TBATOR1 |TWL4030_BATSTS ); + ret =twl_i2c_write_u8 (TWL4030_MODULE_INTERRUPTS , reg, +TWL4030_INTERRUPTS_BCIIMR1A ); +if (ret <0 ) { +dev_err (bci->dev, +"failed to unmask interrupts: %d\n" , + ret); +return ret; + }twl4030_clear_set_boot_bci (TWL4030_BCIAUTOAC |TWL4030_CVENAC ,0 );/* Watch dog key: WOVF acknowledge */ ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x33,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 148/239 net: toshiba: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit bacade822524e02f662d88f784d2ae821a5546fb ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 4 ++-- drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +- drivers/net/ethernet/toshiba/spider_net.c | 4 ++-- drivers/net/ethernet/toshiba/tc35815.c | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-)
drivers/net/ethernet/toshiba/ps3_gelic_net.c +2 -2
@@ -845,9 +845,9 @@ static int gelic_card_kick_txdma(struct gelic_card *card,* @skb: packet to send out * @netdev: interface device structure * -* returns 0 on success, <0 on failure +* returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure */ -int gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev) +netdev_tx_t gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev) {struct gelic_card *card =netdev_card (netdev);struct gelic_descr *descr;
drivers/net/ethernet/toshiba/ps3_gelic_net.h +1 -1
@@ -370,7 +370,7 @@ void gelic_card_up(struct gelic_card *card);void gelic_card_down (struct gelic_card *card);int gelic_net_open (struct net_device *netdev);int gelic_net_stop (struct net_device *netdev); -int gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev); +netdev_tx_t gelic_net_xmit (struct sk_buff *skb,struct net_device *netdev);void gelic_net_set_multi (struct net_device *netdev);void gelic_net_tx_timeout (struct net_device *netdev);int gelic_net_setup_netdev (struct net_device *netdev,struct gelic_card *card);
drivers/net/ethernet/toshiba/spider_net.c +2 -2
@@ -880,9 +880,9 @@ out:* @skb: packet to send out * @netdev: interface device structure * -* returns 0 on success, !0 on failure +* returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure */ -static int +static netdev_tx_t spider_net_xmit (struct sk_buff *skb,struct net_device *netdev) {int cnt;
drivers/net/ethernet/toshiba/tc35815.c +4 -2
@@ -474,7 +474,8 @@ static void free_rxbuf_skb(struct pci_dev *hwdev, struct sk_buff *skb, dma_addr_/* Index to functions, as function prototypes. */ static int tc35815_open (struct net_device *dev); -static int tc35815_send_packet (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t tc35815_send_packet (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t tc35815_interrupt (int irq,void *dev_id);static int tc35815_rx (struct net_device *dev,int limit);static int tc35815_poll (struct napi_struct *napi,int budget);
@@ -1248,7 +1249,8 @@ tc35815_open(struct net_device *dev)* invariant will hold if you make sure that the netif_*_queue() * calls are done at the proper times. */ -static int tc35815_send_packet (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +tc35815_send_packet (struct sk_buff *skb,struct net_device *dev) {struct tc35815_local *lp =netdev_priv (dev);struct TxFD *txfd;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 149/239 net: xilinx: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 81255af8d9d5565004792c295dde49344df450ca ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/xilinx/ll_temac_main.c | 3 ++- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-)
drivers/net/ethernet/xilinx/ll_temac_main.c +2 -1
@@ -674,7 +674,8 @@ static inline int temac_check_tx_bd_space(struct temac_local *lp, int num_frag)return 0 ; } -static int temac_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +temac_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct temac_local *lp =netdev_priv (ndev);struct cdmac_bd *cur_p;
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +2 -1
@@ -657,7 +657,8 @@ static inline int axienet_check_tx_bd_space(struct axienet_local *lp,* start the transmission. Additionally if checksum offloading is supported, * it populates AXI Stream Control fields with appropriate values. */ -static int axienet_start_xmit (struct sk_buff *skb,struct net_device *ndev) +static netdev_tx_t +axienet_start_xmit (struct sk_buff *skb,struct net_device *ndev) {u32 ii;u32 num_frag;
drivers/net/ethernet/xilinx/xilinx_emaclite.c +5 -4
@@ -1005,9 +1005,10 @@ static int xemaclite_close(struct net_device *dev)* deferred and the Tx queue is stopped so that the deferred socket buffer can * be transmitted when the Emaclite device is free to transmit data. * -* Return: 0, always. +* Return: NETDEV_TX_OK, always. */ -static int xemaclite_send (struct sk_buff *orig_skb,struct net_device *dev) +static netdev_tx_t +xemaclite_send (struct sk_buff *orig_skb,struct net_device *dev) {struct net_local *lp =netdev_priv (dev);struct sk_buff *new_skb;
@@ -1028,7 +1029,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)/* Take the time stamp now, since we can't do this in an ISR. */ skb_tx_timestamp (new_skb);spin_unlock_irqrestore (&lp->reset_lock, flags); -return 0 ; +return NETDEV_TX_OK ; }spin_unlock_irqrestore (&lp->reset_lock, flags);
@@ -1037,7 +1038,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) dev->stats.tx_bytes += len;dev_consume_skb_any (new_skb); -return 0 ; +return NETDEV_TX_OK ; }/**
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 150/239 net: broadcom: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 0c13b8d1aee87c35a2fbc1d85a1f766227cf54b5 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 +++-- drivers/net/ethernet/broadcom/sb1250-mac.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/net/ethernet/broadcom/bcm63xx_enet.c +3 -2
@@ -571,12 +571,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id)/* * tx request callback */ -static int bcm_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +bcm_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct bcm_enet_priv *priv;struct bcm_enet_desc *desc;u32 len_stat; -int ret; +netdev_tx_t ret; priv =netdev_priv (dev);
drivers/net/ethernet/broadcom/sb1250-mac.c +2 -2
@@ -299,7 +299,7 @@ static enum sbmac_state sbmac_set_channel_state(struct sbmac_softc *,static void sbmac_promiscuous_mode (struct sbmac_softc *sc,int onoff);static uint64_t sbmac_addr2reg (unsigned char *ptr);static irqreturn_t sbmac_intr (int irq,void *dev_instance); -static int sbmac_start_tx (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t sbmac_start_tx (struct sk_buff *skb,struct net_device *dev);static void sbmac_setmulti (struct sbmac_softc *sc);static int sbmac_init (struct platform_device *pldev,long long base);static int sbmac_set_speed (struct sbmac_softc *s,enum sbmac_speed speed);
@@ -2028,7 +2028,7 @@ static irqreturn_t sbmac_intr(int irq,void *dev_instance)* Return value: * nothing ********************************************************************* */ -static int sbmac_start_tx (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t sbmac_start_tx (struct sk_buff *skb,struct net_device *dev) {struct sbmac_softc *sc =netdev_priv (dev);unsigned long flags;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 151/239 net: amd: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit fe72352e37ae8478f4c97975a9831f0c50f22e73 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/amd/am79c961a.c | 2 +- drivers/net/ethernet/amd/atarilance.c | 6 ++++-- drivers/net/ethernet/amd/declance.c | 2 +- drivers/net/ethernet/amd/sun3lance.c | 6 ++++-- drivers/net/ethernet/amd/sunlance.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-)
drivers/net/ethernet/amd/am79c961a.c +1 -1
@@ -440,7 +440,7 @@ static void am79c961_timeout(struct net_device *dev)/* * Transmit a packet */ -static int +static netdev_tx_t am79c961_sendpacket (struct sk_buff *skb,struct net_device *dev) {struct dev_priv *priv =netdev_priv (dev);
drivers/net/ethernet/amd/atarilance.c +4 -2
@@ -339,7 +339,8 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr *init_rec );static int lance_open (struct net_device *dev );static void lance_init_ring (struct net_device *dev ); -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ); +static netdev_tx_t lance_start_xmit (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t lance_interrupt (int irq,void *dev_id );static int lance_rx (struct net_device *dev );static int lance_close (struct net_device *dev );
@@ -769,7 +770,8 @@ static void lance_tx_timeout (struct net_device *dev)/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ) +static netdev_tx_t +lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);struct lance_ioreg *IO = lp->iobase;
drivers/net/ethernet/amd/declance.c +1 -1
@@ -893,7 +893,7 @@ static void lance_tx_timeout(struct net_device *dev)netif_wake_queue (dev); } -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);volatile struct lance_regs *ll = lp->ll;
drivers/net/ethernet/amd/sun3lance.c +4 -2
@@ -236,7 +236,8 @@ struct lance_private {static int lance_probe (struct net_device *dev);static int lance_open (struct net_device *dev );static void lance_init_ring (struct net_device *dev ); -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ); +static netdev_tx_t lance_start_xmit (struct sk_buff *skb, +struct net_device *dev);static irqreturn_t lance_interrupt (int irq,void *dev_id);static int lance_rx (struct net_device *dev );static int lance_close (struct net_device *dev );
@@ -511,7 +512,8 @@ static void lance_init_ring( struct net_device *dev ) } -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev ) +static netdev_tx_t +lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);int entry, len;
drivers/net/ethernet/amd/sunlance.c +1 -1
@@ -1106,7 +1106,7 @@ static void lance_tx_timeout(struct net_device *dev)netif_wake_queue (dev); } -static int lance_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t lance_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct lance_private *lp =netdev_priv (dev);int entry, skblen, len;
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +2 -2
@@ -1964,7 +1964,7 @@ static int xgbe_close(struct net_device *netdev)return 0 ; } -static int xgbe_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t xgbe_xmit (struct sk_buff *skb,struct net_device *netdev) {struct xgbe_prv_data *pdata =netdev_priv (netdev);struct xgbe_hw_if *hw_if = &pdata->hw_if;
@@ -1973,7 +1973,7 @@ static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)struct xgbe_ring *ring;struct xgbe_packet_data *packet;struct netdev_queue *txq; -int ret; +netdev_tx_t ret;DBGPR ("-->xgbe_xmit: skb->len = %d\n" , skb->len);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 152/239 net: sun: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 0e0cc31f6999df18bb5cfd0bd83c892ed5633975 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'.
Found by coccinelle.
--- drivers/net/ethernet/sun/ldmvsw.c | 2 +- drivers/net/ethernet/sun/sunbmac.c | 3 ++- drivers/net/ethernet/sun/sunqe.c | 2 +- drivers/net/ethernet/sun/sunvnet.c | 2 +- drivers/net/ethernet/sun/sunvnet_common.c | 14 ++++++++------ drivers/net/ethernet/sun/sunvnet_common.h | 7 ++++--- 6 files changed, 17 insertions(+), 13 deletions(-)
drivers/net/ethernet/sun/ldmvsw.c +1 -1
@@ -111,7 +111,7 @@ static u16 vsw_select_queue(struct net_device *dev, struct sk_buff *skb, }/* Wrappers to common functions */ -static int vsw_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t vsw_start_xmit (struct sk_buff *skb,struct net_device *dev) {return sunvnet_start_xmit_common (skb, dev, vsw_tx_port_find); }
drivers/net/ethernet/sun/sunbmac.c +2 -1
@@ -951,7 +951,8 @@ static void bigmac_tx_timeout(struct net_device *dev) }/* Put a packet on the wire. */ -static int bigmac_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +bigmac_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct bigmac *bp =netdev_priv (dev);int len, entry;
drivers/net/ethernet/sun/sunqe.c +1 -1
@@ -569,7 +569,7 @@ out: }/* Get a packet queued to go onto the wire. */ -static int qe_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t qe_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct sunqe *qep =netdev_priv (dev);struct sunqe_buffers *qbufs = qep->buffers;
drivers/net/ethernet/sun/sunvnet.c +1 -1
@@ -245,7 +245,7 @@ static u16 vnet_select_queue(struct net_device *dev, struct sk_buff *skb, }/* Wrappers to common functions */ -static int vnet_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t vnet_start_xmit (struct sk_buff *skb,struct net_device *dev) {return sunvnet_start_xmit_common (skb, dev, vnet_tx_port_find); }
drivers/net/ethernet/sun/sunvnet_common.c +8 -6
@@ -1215,9 +1215,10 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies)return skb; } -static int vnet_handle_offloads (struct vnet_port *port,struct sk_buff *skb, -struct vnet_port *(*vnet_tx_port) - (struct sk_buff *,struct net_device *)) +static netdev_tx_t +vnet_handle_offloads (struct vnet_port *port,struct sk_buff *skb, +struct vnet_port *(*vnet_tx_port) + (struct sk_buff *,struct net_device *)) {struct net_device *dev =VNET_PORT_TO_NET_DEVICE (port);struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING ];
@@ -1320,9 +1321,10 @@ out_dropped:return NETDEV_TX_OK ; } -int sunvnet_start_xmit_common (struct sk_buff *skb,struct net_device *dev, -struct vnet_port *(*vnet_tx_port) - (struct sk_buff *,struct net_device *)) +netdev_tx_t +sunvnet_start_xmit_common (struct sk_buff *skb,struct net_device *dev, +struct vnet_port *(*vnet_tx_port) + (struct sk_buff *,struct net_device *)) {struct vnet_port *port =NULL ;struct vio_dring_state *dr;
drivers/net/ethernet/sun/sunvnet_common.h +4 -3
@@ -136,9 +136,10 @@ int sunvnet_close_common(struct net_device *dev);void sunvnet_set_rx_mode_common (struct net_device *dev,struct vnet *vp);int sunvnet_set_mac_addr_common (struct net_device *dev,void *p);void sunvnet_tx_timeout_common (struct net_device *dev); -int sunvnet_start_xmit_common (struct sk_buff *skb,struct net_device *dev, -struct vnet_port *(*vnet_tx_port) - (struct sk_buff *,struct net_device *)); +netdev_tx_t +sunvnet_start_xmit_common (struct sk_buff *skb,struct net_device *dev, +struct vnet_port *(*vnet_tx_port) + (struct sk_buff *,struct net_device *));#ifdef CONFIG_NET_POLL_CONTROLLER void sunvnet_poll_controller_common (struct net_device *dev,struct vnet *vp);#endif
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 153/239 net: hns3: Fix for setting speed for phy failed problem
In reply to Greg Kroah-HartmanFrom: Fuyun Liang <[email protected]>
[ Upstream commit fd8133148eb6a733f9cfdaecd4d99f378e21d582 ]
The function of genphy_read_status is that reading phy information from HW and using these information to update SW variable. If user is using ethtool to setting the speed of phy and service task is calling by hclge_get_mac_phy_link, the result of speed setting is uncertain. Because ethtool cmd will modified phydev and hclge_get_mac_phy_link also will modified phydev.
Because phy state machine will update phy link periodically, we can just use phydev->link to check the link status. This patch removes function call of genphy_read_status. To ensure accuracy, this patch adds a phy state check. If phy state is not PHY_RUNNING, we consider link is down. Because in some scenarios, phydev->link may be link up, but phy state is not PHY_RUNNING. This is just an intermediate state. In fact, the link is not ready yet.
--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -1
@@ -2179,7 +2179,7 @@ static int hclge_get_mac_phy_link(struct hclge_dev *hdev) mac_state =hclge_get_mac_link_status (hdev);if (hdev->hw.mac.phydev) { -if (!genphy_read_status (hdev->hw.mac.phydev)) +if (hdev->hw.mac.phydev->state ==PHY_RUNNING ) link_stat = mac_state & hdev->hw.mac.phydev->link;else
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 154/239 net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg()
In reply to Greg Kroah-HartmanFrom: Jian Shen <[email protected]>
[ Upstream commit 32c7fbc8ffd752c6aa05d2dd7c13b0f0aa00ddaa ]
So far all the places calling hclge_tm_q_to_qs_map_cfg() are assigning an u16 type value to "q_id", and in the processing of hclge_tm_q_to_qs_map_cfg(), it also converts the "q_id" to le16.
The max tqp number for pf can be more than 256, we should use "u16" to store the queue id, instead of "u8", which may cause data lost.
--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +1 -1
@@ -200,7 +200,7 @@ static int hclge_tm_qs_to_pri_map_cfg(struct hclge_dev *hdev, }static int hclge_tm_q_to_qs_map_cfg (struct hclge_dev *hdev, -u8 q_id,u16 qs_id) +u16 q_id,u16 qs_id) {struct hclge_nq_to_qs_link_cmd *map;struct hclge_desc desc;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 155/239 nfp: provide a better warning when ring allocation fails
In reply to Greg Kroah-HartmanFrom: Jakub Kicinski <[email protected]>
[ Upstream commit 23d9f5531c7c28546954b0bf332134a9b8a38c0a ]
NFP supports fairly enormous ring sizes (up to 256k descriptors). In commit 466271703867 ("nfp: use kvcalloc() to allocate SW buffer descriptor arrays") we have started using kvcalloc() functions to make sure the allocation of software state arrays doesn't hit the MAX_ORDER limit. Unfortunately, we can't use virtual mappings for the DMA region holding HW descriptors. In case this allocation fails instead of the generic (and fairly scary) warning/splat in the logs print a helpful message explaining what happened and suggesting how to fix it.
--- .../net/ethernet/netronome/nfp/nfp_net_common.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/net/ethernet/netronome/nfp/nfp_net_common.c +12 -4
@@ -2169,9 +2169,13 @@ nfp_net_tx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring) tx_ring->size =sizeof (*tx_ring->txds) * tx_ring->cnt; tx_ring->txds =dma_zalloc_coherent (dp->dev, tx_ring->size, - &tx_ring->dma,GFP_KERNEL ); -if (!tx_ring->txds) + &tx_ring->dma, +GFP_KERNEL | __GFP_NOWARN); +if (!tx_ring->txds) { +netdev_warn (dp->netdev,"failed to allocate TX descriptor ring memory, requested descriptor count: %d, consider lowering descriptor count\n" , + tx_ring->cnt); goto err_alloc; + } sz =sizeof (*tx_ring->txbufs) * tx_ring->cnt; tx_ring->txbufs =kzalloc (sz,GFP_KERNEL );
@@ -2314,9 +2318,13 @@ nfp_net_rx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_rx_ring *rx_ring) rx_ring->cnt = dp->rxd_cnt; rx_ring->size =sizeof (*rx_ring->rxds) * rx_ring->cnt; rx_ring->rxds =dma_zalloc_coherent (dp->dev, rx_ring->size, - &rx_ring->dma,GFP_KERNEL ); -if (!rx_ring->rxds) + &rx_ring->dma, +GFP_KERNEL | __GFP_NOWARN); +if (!rx_ring->rxds) { +netdev_warn (dp->netdev,"failed to allocate RX descriptor ring memory, requested descriptor count: %d, consider lowering descriptor count\n" , + rx_ring->cnt); goto err_alloc; + } sz =sizeof (*rx_ring->rxbufs) * rx_ring->cnt; rx_ring->rxbufs =kzalloc (sz,GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 156/239 usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started
In reply to Greg Kroah-HartmanFrom: Nicolas Adell <[email protected]>
[ Upstream commit 1dedbdf2bbb1ede8d96f35f9845ecae179dc1988 ]
When initializing the USB subsystem before starting the kernel, OTG overcurrent detection is disabled. In case the OTG polarity of overcurrent is low active, the overcurrent detection is never enabled again and events cannot be reported as expected. Because imx usb overcurrent polarity is low active by default, only detection needs to be enable in usbmisc init function.
--- drivers/usb/chipidea/usbmisc_imx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/chipidea/usbmisc_imx.c +2 -0
@@ -343,6 +343,8 @@ static int usbmisc_imx6q_init(struct imx_usbmisc_data *data) }else if (data->oc_polarity ==1 ) {/* High active */ reg &= ~(MX6_BM_OVER_CUR_DIS |MX6_BM_OVER_CUR_POLARITY ); + }else { + reg &= ~(MX6_BM_OVER_CUR_DIS ); }writel (reg, usbmisc->base + data->index *4 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 157/239 usb: chipidea: Fix otg event handler
In reply to Greg Kroah-HartmanFrom: Loic Poulain <[email protected]>
[ Upstream commit 59739131e0ca06db7560f9073fff2fb83f6bc2a5 ]
At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it.
--- drivers/usb/chipidea/otg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/usb/chipidea/otg.c +6 -3
@@ -206,14 +206,17 @@ static void ci_otg_work(struct work_struct *work) }pm_runtime_get_sync (ci->dev); +if (ci->id_event) { ci->id_event = false;ci_handle_id_switch (ci); - }else if (ci->b_sess_valid_event) { + } + +if (ci->b_sess_valid_event) { ci->b_sess_valid_event = false;ci_handle_vbus_change (ci); - }else -dev_err (ci->dev,"unexpected event occurs at %s\n" , __func__); + } +pm_runtime_put_sync (ci->dev);enable_irq (ci->irq);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 158/239 mlxsw: spectrum: Init shaper for TCs 8..15
In reply to Greg Kroah-HartmanFrom: Petr Machata <[email protected]>
[ Upstream commit a9f36656b519a9a21309793c306941a3cd0eeb8f ]
With introduction of MC-aware mode to mlxsw, it became necessary to configure TCs above 7 as well. There is now code in mlxsw to disable ETS for these higher classes, but disablement of max shaper was neglected.
By default, max shaper is currently disabled to begin with, so the problem is just cosmetic. However, for symmetry, do like we do for ETS configuration, and call mlxsw_sp_port_ets_maxrate_set() for both TC i and i + 8.
--- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +7 -0
@@ -2825,6 +2825,13 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) MLXSW_REG_QEEC_MAS_DIS);if (err)return err; + + err =mlxsw_sp_port_ets_maxrate_set (mlxsw_sp_port, +MLXSW_REG_QEEC_HIERARCY_TC , + i +8 , i, +MLXSW_REG_QEEC_MAS_DIS ); +if (err) +return err; }/* Map all priorities to traffic class 0. */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 159/239 ARM: dts: am335x-evm: fix number of cpsw
In reply to Greg Kroah-HartmanFrom: Grygorii Strashko <[email protected]>
[ Upstream commit dcbf6b18d81bcdc51390ca1b258c17e2e13b7d0c ]
am335x-evm has only one CPSW external port physically wired, but DT defines 2 ext. ports. As result, PHY connection failure reported for the second ext. port.
Update DT to reflect am335x-evm board HW configuration, and, while here, switch to use phy-handle instead of phy_id.
--- arch/arm/boot/dts/am335x-evm.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/am335x-evm.dts +6 -6
@@ -724,6 +724,7 @@ pinctrl-0 = <&cpsw_default>; pinctrl-1 = <&cpsw_sleep>; status = "okay"; + slaves = <1>; }; &davinci_mdio {
@@ -731,15 +732,14 @@ pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; -}; -&cpsw_emac0 { - phy_id = <&davinci_mdio>, <0>; - phy-mode = "rgmii-txid"; + ethphy0: ethernet-phy@0 { + reg = <0>; + }; }; -&cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; +&cpsw_emac0 { + phy-handle = <ðphy0>; phy-mode = "rgmii-txid"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 160/239 f2fs: fix to recover inodes uid/gid during POR
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
[ Upstream commit dc4cd1257c86451cec3e8e352cc376348e4f4af4 ]
Step to reproduce this bug:
1. logon as root
2. mount -t f2fs /dev/sdd /mnt;
3. touch /mnt/file;
4. chown system /mnt/file; chgrp system /mnt/file;
5. xfs_io -f /mnt/file -c "fsync";
6. godown /mnt;
7. umount /mnt;
8. mount -t f2fs /dev/sdd /mnt;
After step 8) we will expect file's uid/gid are all system, but during recovery, these two fields were not been recovered, fix it.
--- fs/f2fs/recovery.c | 2 ++ 1 file changed, 2 insertions(+)
fs/f2fs/recovery.c +2 -0
@@ -201,6 +201,8 @@ static void recover_inode(struct inode *inode, struct page *page)char *name; inode->i_mode =le16_to_cpu (raw->i_mode); +i_uid_write (inode,le32_to_cpu (raw->i_uid)); +i_gid_write (inode,le32_to_cpu (raw->i_gid));f2fs_i_size_write (inode,le64_to_cpu (raw->i_size)); inode->i_atime.tv_sec =le64_to_cpu (raw->i_atime); inode->i_ctime.tv_sec =le64_to_cpu (raw->i_ctime);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 161/239 ARM: dts: ux500: Correct SCU unit address
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 2f217d24ecaec2012e628d21e244eef0608656a4 ]
The unit address of the Cortex-A9 SCU device node contains one zero too many. Remove it.
--- arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +1 -1
@@ -197,7 +197,7 @@ <0xa0410100 0x100>; }; - scu@a04100000 { + scu@a0410000 { compatible = "arm,cortex-a9-scu"; reg = <0xa0410000 0x100>; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 162/239 ARM: dts: ux500: Fix LCDA clock line muxing
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit ecde29569e3484e1d0a032bf4074449bce4d4a03 ]
The "lcdaclk_b_1" group is muxed with the function "lcd" but needs a separate entry to be muxed in with "lcda" rather than "lcd".
--- arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ste-href-family-pinctrl.dtsi +6 -2
@@ -607,16 +607,20 @@ mcde { lcd_default_mode: lcd_default { - default_mux { + default_mux1 { /* Mux in VSI0 and all the data lines */ function = "lcd"; groups = "lcdvsi0_a_1", /* VSI0 for LCD */ "lcd_d0_d7_a_1", /* Data lines */ "lcd_d8_d11_a_1", /* TV-out */ - "lcdaclk_b_1", /* Clock line for TV-out */ "lcdvsi1_a_1"; /* VSI1 for HDMI */ }; + default_mux2 { + function = "lcda"; + groups = + "lcdaclk_b_1"; /* Clock line for TV-out */ + }; default_cfg1 { pins = "GPIO68_E1", /* VSI0 */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 163/239 ARM: dts: ste: Fix SPI controller node names
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit 2f967f9e9fa076affb711da1a8389b5d33814fc6 ]
SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks.
--- arch/arm/boot/dts/ste-dbx5x0.dtsi | 4 ++-- arch/arm/boot/dts/ste-hrefprev60.dtsi | 2 +- arch/arm/boot/dts/ste-snowball.dts | 2 +- arch/arm/boot/dts/ste-u300.dts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +2 -2
@@ -878,7 +878,7 @@ power-domains = <&pm_domains DOMAIN_VAPE>; }; - ssp@80002000 { + spi@80002000 { compatible = "arm,pl022", "arm,primecell"; reg = <0x80002000 0x1000>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
@@ -892,7 +892,7 @@ power-domains = <&pm_domains DOMAIN_VAPE>; }; - ssp@80003000 { + spi@80003000 { compatible = "arm,pl022", "arm,primecell"; reg = <0x80003000 0x1000>; interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/ste-hrefprev60.dtsi +1 -1
@@ -57,7 +57,7 @@ }; }; - ssp@80002000 { + spi@80002000 { /* * On the first generation boards, this SSP/SPI port was connected * to the AB8500.
arch/arm/boot/dts/ste-snowball.dts +1 -1
@@ -376,7 +376,7 @@ pinctrl-1 = <&i2c3_sleep_mode>; }; - ssp@80002000 { + spi@80002000 { pinctrl-names = "default"; pinctrl-0 = <&ssp0_snowball_mode>; };
arch/arm/boot/dts/ste-u300.dts +1 -1
@@ -442,7 +442,7 @@ dma-names = "rx"; }; - spi: ssp@c0006000 { + spi: spi@c0006000 { compatible = "arm,pl022", "arm,primecell"; reg = <0xc0006000 0x1000>; interrupt-parent = <&vica>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 164/239 spi: pic32: Use proper enum in dmaengine_prep_slave_rg
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 8cfde7847d5ed0bb77bace41519572963e43cd17 ]
Clang warns when one enumerated type is converted implicitly to another:
drivers/spi/spi-pic32.c:323:8: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion]
DMA_FROM_DEVICE,
^~~~~~~~~~~~~~~
drivers/spi/spi-pic32.c:333:8: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
DMA_TO_DEVICE,
^~~~~~~~~~~~~2 warnings generated.
Use the proper enums from dma_transfer_direction (DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2, DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1) to satify Clang.
--- drivers/spi/spi-pic32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-pic32.c +2 -2
@@ -320,7 +320,7 @@ static int pic32_spi_dma_transfer(struct pic32_spi *pic32s, desc_rx =dmaengine_prep_slave_sg (master->dma_rx, xfer->rx_sg.sgl, xfer->rx_sg.nents, -DMA_FROM_DEVICE , +DMA_DEV_TO_MEM ,DMA_PREP_INTERRUPT |DMA_CTRL_ACK );if (!desc_rx) { ret = -EINVAL ;
@@ -330,7 +330,7 @@ static int pic32_spi_dma_transfer(struct pic32_spi *pic32s, desc_tx =dmaengine_prep_slave_sg (master->dma_tx, xfer->tx_sg.sgl, xfer->tx_sg.nents, -DMA_TO_DEVICE , +DMA_MEM_TO_DEV ,DMA_PREP_INTERRUPT |DMA_CTRL_ACK );if (!desc_tx) { ret = -EINVAL ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 165/239 cpufeature: avoid warning when compiling with clang
In reply to Greg Kroah-HartmanFrom: Stefan Agner <[email protected]>
[ Upstream commit c785896b21dd8e156326ff660050b0074d3431df ]
The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to warnings when building the kernel with Clang:
arch/arm/crypto/aes-ce-glue.c:450:1: warning: variable
'cpu_feature_match_AES' is not needed and will not be emitted [-Wunneeded-internal-declaration]
module_cpu_feature_match(AES, aes_init);
^
Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused").
--- include/linux/cpufeature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/cpufeature.h +1 -1
@@ -45,7 +45,7 @@* 'asm/cpufeature.h' of your favorite architecture. */ #define module_cpu_feature_match (x, __initfunc) \ -static struct cpu_feature const cpu_feature_match_ ## x[] = \ +static struct cpu_feature const __maybe_unused cpu_feature_match_ ## x[] = \ { { .feature = cpu_feature(x) }, { } }; \ MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x); \ \
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 166/239 crypto: arm/crc32 - avoid warning when compiling with Clang
In reply to Greg Kroah-HartmanFrom: Stefan Agner <[email protected]>
[ Upstream commit cd560235d8f9ddd94aa51e1c4dabdf3212b9b241 ]
The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to a warning when building the kernel with Clang:
arch/arm/crypto/crc32-ce-glue.c:239:33: warning: variable
'crc32_cpu_feature' is not needed and will not be emitted [-Wunneeded-internal-declaration]
static const struct cpu_feature crc32_cpu_feature[] = {
^Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused").
--- arch/arm/crypto/crc32-ce-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/crypto/crc32-ce-glue.c +1 -1
@@ -236,7 +236,7 @@ static void __exit crc32_pmull_mod_exit(void) ARRAY_SIZE(crc32_pmull_algs)); } -static const struct cpu_feature crc32_cpu_feature[] = { +static const struct cpu_feature __maybe_unused crc32_cpu_feature[] = { {cpu_feature (CRC32 ) }, {cpu_feature (PMULL ) }, { } };MODULE_DEVICE_TABLE (cpu, crc32_cpu_feature);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 167/239 ARM: dts: marvell: Fix SPI and I2C bus warnings
In reply to Greg Kroah-HartmanFrom: Rob Herring <[email protected]>
[ Upstream commit cf680cc5251487b9a39919c3cda31a108af19cf8 ]
dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses.
arch/arm/boot/dts/dove-cubox.dtb: Warning (i2c_bus_reg): /i2c-mux/i2c@0/clock-generator: I2C bus unit address format error, expected "60" arch/arm/boot/dts/dove-cubox-es.dtb: Warning (i2c_bus_reg): /i2c-mux/i2c@0/clock-generator: I2C bus unit address format error, expected "60" arch/arm/boot/dts/dove-cubox.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-cubox-es.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-dove-db.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-sbc-a510.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-sbc-a510.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@14600: node name for SPI buses should be 'spi' arch/arm/boot/dts/orion5x-kuroboxpro.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lschl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lsgl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lswtgl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32"
--- arch/arm/boot/dts/dove-cubox.dts | 2 +- arch/arm/boot/dts/dove.dtsi | 6 +++--- arch/arm/boot/dts/orion5x-linkstation.dtsi | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/dove-cubox.dts +1 -1
@@ -87,7 +87,7 @@ status = "okay"; clock-frequency = <100000>; - si5351: clock-generator { + si5351: clock-generator@60 { compatible = "silabs,si5351a-msop"; reg = <0x60>; #address-cells = <1>;
arch/arm/boot/dts/dove.dtsi +3 -3
@@ -155,7 +155,7 @@ 0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800 /* CESA SRAM 2k */ 0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU SRAM 2k */ - spi0: spi-ctrl@10600 { + spi0: spi@10600 { compatible = "marvell,orion-spi"; #address-cells = <1>; #size-cells = <0>;
@@ -168,7 +168,7 @@ status = "disabled"; }; - i2c: i2c-ctrl@11000 { + i2c: i2c@11000 { compatible = "marvell,mv64xxx-i2c"; reg = <0x11000 0x20>; #address-cells = <1>;
@@ -218,7 +218,7 @@ status = "disabled"; }; - spi1: spi-ctrl@14600 { + spi1: spi@14600 { compatible = "marvell,orion-spi"; #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/orion5x-linkstation.dtsi +1 -1
@@ -156,7 +156,7 @@ &i2c { status = "okay"; - rtc { + rtc@32 { compatible = "ricoh,rs5c372a"; reg = <0x32>; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 168/239 x86/mce-inject: Reset injection struct after injection
In reply to Greg Kroah-HartmanFrom: Borislav Petkov <[email protected]>
[ Upstream commit 7401a633c34adc7aefd3edfec60074cb0475a3e8 ]
Clear the MCE struct which is used for collecting the injection details after injection.
Also, populate it with more details from the machine.
--- arch/x86/kernel/cpu/mcheck/mce-inject.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/x86/kernel/cpu/mcheck/mce-inject.c +6 -0
@@ -108,6 +108,9 @@ static void setup_inj_struct(struct mce *m)memset (m,0 ,sizeof (struct mce )); m->cpuvendor = boot_cpu_data.x86_vendor; + m->time =ktime_get_real_seconds (); + m->cpuid =cpuid_eax (1 ); + m->microcode = boot_cpu_data.microcode; }/* Update fake mce registers on current CPU. */
@@ -576,6 +579,9 @@ static int inj_bank_set(void *data, u64 val) m->bank = val;do_inject (); +/* Reset injection struct */ +setup_inj_struct (&i_mce); +return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 169/239 ARM: dts: clearfog: fix sdhci supply property name
In reply to Greg Kroah-HartmanFrom: Baruch Siach <[email protected]>
[ Upstream commit e807f0298144c06740022a2f900d86b7f115595e ]
The vmmc phandle, like all power supply property names, must have the '-supply' suffix.
--- arch/arm/boot/dts/armada-388-clearfog.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-388-clearfog.dtsi +1 -1
@@ -89,7 +89,7 @@ &clearfog_sdhci_cd_pins>; pinctrl-names = "default"; status = "okay"; - vmmc = <®_3p3v>; + vmmc-supply = <®_3p3v>; wp-inverted; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 170/239 bnx2x: Ignore bandwidth attention in single function mode
In reply to Greg Kroah-HartmanFrom: Shahed Shaikh <[email protected]>
[ Upstream commit 75a110a1783ef8324ffd763b24f4ac268253cbca ]
This is a workaround for FW bug -
MFW generates bandwidth attention in single function mode, which is only expected to be generated in multi function mode. This undesired attention in SF mode results in incorrect HW configuration and resulting into Tx timeout.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +10 -0
@@ -3540,6 +3540,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)*/ static void bnx2x_config_mf_bw (struct bnx2x *bp) { +/* Workaround for MFW bug. +* MFW is not supposed to generate BW attention in +* single function mode. +*/ +if (!IS_MF (bp)) { +DP (BNX2X_MSG_MCP , +"Ignoring MF BW config in single function mode\n" ); +return ; + } +if (bp->link_vars.link_up) {bnx2x_cmng_fns_init (bp, true,CMNG_FNS_MINMAX );bnx2x_link_sync_notify (bp);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 171/239 samples/bpf: fix compilation failure
In reply to Greg Kroah-HartmanFrom: Prashant Bhole <[email protected]>
[ Upstream commit 32c009798385ce21080beaa87a9b95faad3acd1e ]
following commit:
commit d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") added struct bpf_flow_keys which conflicts with the struct with same name in sockex2_kern.c and sockex3_kern.c
similar to commit:
commit 534e0e52bc23 ("samples/bpf: fix a compilation failure") we tried the rename it "flow_keys" but it also conflicted with struct having same name in include/net/flow_dissector.h. Hence renaming the struct to "flow_key_record". Also, this commit doesn't fix the compilation error completely because the similar struct is present in sockex3_kern.c. Hence renaming it in both files sockex3_user.c and sockex3_kern.c
--- samples/bpf/sockex2_kern.c | 11 ++++++----- samples/bpf/sockex3_kern.c | 8 ++++---- samples/bpf/sockex3_user.c | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-)
samples/bpf/sockex2_kern.c +6 -5
@@ -14,7 +14,7 @@ struct vlan_hdr {__be16 h_vlan_encapsulated_proto; }; -struct bpf_flow_keys { +struct flow_key_record {__be32 src;__be32 dst;union {
@@ -59,7 +59,7 @@ static inline __u32 ipv6_addr_hash(struct __sk_buff *ctx, __u64 off) }static inline __u64 parse_ip (struct __sk_buff *skb,__u64 nhoff,__u64 *ip_proto, -struct bpf_flow_keys *flow) +struct flow_key_record *flow) {__u64 verlen;
@@ -83,7 +83,7 @@ static inline __u64 parse_ip(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto }static inline __u64 parse_ipv6 (struct __sk_buff *skb,__u64 nhoff,__u64 *ip_proto, -struct bpf_flow_keys *flow) +struct flow_key_record *flow) { *ip_proto =load_byte (skb, nhoff + offsetof(struct ipv6hdr , nexthdr));
@@ -96,7 +96,8 @@ static inline __u64 parse_ipv6(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proreturn nhoff; } -static inline bool flow_dissector (struct __sk_buff *skb,struct bpf_flow_keys *flow) +static inline bool flow_dissector (struct __sk_buff *skb, +struct flow_key_record *flow) {__u64 nhoff =ETH_HLEN ;__u64 ip_proto;
@@ -198,7 +199,7 @@ struct bpf_map_def SEC("maps") hash_map = { SEC("socket2")int bpf_prog2 (struct __sk_buff *skb) { -struct bpf_flow_keys flow = {}; +struct flow_key_record flow = {};struct pair *value;u32 key;
samples/bpf/sockex3_kern.c +4 -4
@@ -61,7 +61,7 @@ struct vlan_hdr {__be16 h_vlan_encapsulated_proto; }; -struct bpf_flow_keys { +struct flow_key_record {__be32 src;__be32 dst;union {
@@ -88,7 +88,7 @@ static inline __u32 ipv6_addr_hash(struct __sk_buff *ctx, __u64 off) }struct globals { -struct bpf_flow_keys flow; +struct flow_key_record flow; }; struct bpf_map_def SEC("maps") percpu_map = {
@@ -114,14 +114,14 @@ struct pair { struct bpf_map_def SEC("maps") hash_map = { .type = BPF_MAP_TYPE_HASH, - .key_size = sizeof(struct bpf_flow_keys), + .key_size = sizeof(struct flow_key_record), .value_size = sizeof(struct pair), .max_entries = 1024, };static void update_stats (struct __sk_buff *skb,struct globals *g) { -struct bpf_flow_keys key = g->flow; +struct flow_key_record key = g->flow;struct pair *value; value =bpf_map_lookup_elem (&hash_map, &key);
samples/bpf/sockex3_user.c +2 -2
@@ -13,7 +13,7 @@#define PARSE_IP_PROG_FD (prog_fd[0])#define PROG_ARRAY_FD (map_fd[0]) -struct flow_keys { +struct flow_key_record {__be32 src;__be32 dst;union {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) (void ) f;for (i =0 ; i <5 ; i++) { -struct flow_keys key = {}, next_key; +struct flow_key_record key = {}, next_key;struct pair value;sleep (1 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 172/239 net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider
In reply to Greg Kroah-HartmanFrom: Florian Fainelli <[email protected]>
[ Upstream commit b78ac6ecd1b6b46f8767cbafa95a7b0b51b87ad8 ]
Allow the configuration of the MDIO clock divider when the Device Tree contains 'clock-frequency' property (similar to I2C and SPI buses). Because the hardware may have lost its state during suspend/resume, re-apply the MDIO clock divider upon resumption.
--- .../bindings/net/brcm,unimac-mdio.txt | 3 + drivers/net/phy/mdio-bcm-unimac.c | 83 ++++++++++++++++++- 2 files changed, 84 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt +3 -0
@@ -19,6 +19,9 @@ Optional properties: - interrupt-names: must be "mdio_done_error" when there is a share interrupt fed to this hardware block, or must be "mdio_done" for the first interrupt and "mdio_error" for the second when there are separate interrupts +- clocks: A reference to the clock supplying the MDIO bus controller +- clock-frequency: the MDIO bus clock that must be output by the MDIO bus + hardware, if absent, the default hardware values are used Child nodes of this MDIO bus controller node are standard Ethernet PHY device nodes as described in Documentation/devicetree/bindings/net/phy.txt
drivers/net/phy/mdio-bcm-unimac.c +81 -2
130 lines not on this page · raw message
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 173/239 net: micrel: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 2b49117a5abee8478b0470cba46ac74f93b4a479 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/micrel/ks8695net.c +1 -1
@@ -1164,7 +1164,7 @@ ks8695_timeout(struct net_device *ndev)* sk_buff and adds it to the TX ring. It then kicks the TX DMA * engine to ensure transmission begins. */ -static int +static netdev_tx_t ks8695_start_xmit (struct sk_buff *skb,struct net_device *ndev) {struct ks8695_priv *ksp =netdev_priv (ndev);
drivers/net/ethernet/micrel/ks8851_mll.c +2 -2
@@ -1020,9 +1020,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)* spin_lock_irqsave is required because tx and rx should be mutual exclusive. * So while tx is in-progress, prevent IRQ interrupt from happenning. */ -static int ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) +static netdev_tx_t ks_start_xmit (struct sk_buff *skb,struct net_device *netdev) { -int retv =NETDEV_TX_OK ; +netdev_tx_t retv =NETDEV_TX_OK ;struct ks_net *ks =netdev_priv (netdev);disable_irq (netdev->irq);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 174/239 net: freescale: fix return type of ndo_start_xmit function
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 06983aa526c759ebdf43f202d8d0491d9494e2f4 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.
Found by coccinelle.
--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 ++- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/freescale/gianfar.c | 4 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-)
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +2 -1
@@ -2036,7 +2036,8 @@ static inline int dpaa_xmit(struct dpaa_priv *priv,return 0 ; } -static int dpaa_start_xmit (struct sk_buff *skb,struct net_device *net_dev) +static netdev_tx_t +dpaa_start_xmit (struct sk_buff *skb,struct net_device *net_dev) {const int queue_mapping =skb_get_queue_mapping (skb);bool nonlinear =skb_is_nonlinear (skb);
drivers/net/ethernet/freescale/fec_mpc52xx.c +2 -1
@@ -305,7 +305,8 @@ static int mpc52xx_fec_close(struct net_device *dev)* invariant will hold if you make sure that the netif_*_queue() * calls are done at the proper times. */ -static int mpc52xx_fec_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +mpc52xx_fec_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct mpc52xx_fec_priv *priv =netdev_priv (dev);struct bcom_fec_bd *bd;
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +2 -1
@@ -481,7 +481,8 @@ static struct sk_buff *tx_skb_align_workaround(struct net_device *dev, }#endif -static int fs_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +fs_enet_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct fs_enet_private *fep =netdev_priv (dev);cbd_t __iomem *bdp;
drivers/net/ethernet/freescale/gianfar.c +2 -2
@@ -112,7 +112,7 @@const char gfar_driver_version[] ="2.0" ;static int gfar_enet_open (struct net_device *dev); -static int gfar_start_xmit (struct sk_buff *skb,struct net_device *dev); +static netdev_tx_t gfar_start_xmit (struct sk_buff *skb,struct net_device *dev);static void gfar_reset_task (struct work_struct *work);static void gfar_timeout (struct net_device *dev);static int gfar_close (struct net_device *dev);
@@ -2334,7 +2334,7 @@ static inline bool gfar_csum_errata_76(struct gfar_private *priv,/* This is called by the kernel when a frame is ready for transmission. * It is pointed to by the dev->hard_start_xmit function pointer */ -static int gfar_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t gfar_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct gfar_private *priv =netdev_priv (dev);struct gfar_priv_tx_q *tx_queue =NULL ;
drivers/net/ethernet/freescale/ucc_geth.c +2 -1
@@ -3085,7 +3085,8 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)/* This is called by the kernel when a frame is ready for transmission. */ /* It is pointed to by the dev->hard_start_xmit function pointer */ -static int ucc_geth_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t +ucc_geth_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct ucc_geth_private *ugeth =netdev_priv (dev);#ifdef CONFIG_UGETH_TX_ON_DEMAND
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 175/239 x86/CPU: Use correct macros for Cyrix calls
In reply to Greg Kroah-HartmanFrom: Matthew Whitehead <[email protected]>
[ Upstream commit 03b099bdcdf7125d4a63dc9ddeefdd454e05123d ]
There are comments in processor-cyrix.h advising you to _not_ make calls using the deprecated macros in this style:
setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);
This is because it expands the macro into a non-functioning calling sequence. The calling order must be:
outb(CX86_CCR2, 0x22); inb(0x23);
Quoted 1 line
From the comments:
* When using the old macros a line like
* setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
* gets expanded to:
* do {
* outb((CX86_CCR2), 0x22);
* outb((({
* outb((CX86_CCR2), 0x22);
* inb(0x23);
* }) | 0x88), 0x23);
* } while (0);
The new macros fix this problem, so use them instead.
--- arch/x86/kernel/cpu/cyrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/cyrix.c +1 -1
@@ -437,7 +437,7 @@ static void cyrix_identify(struct cpuinfo_x86 *c)/* enable MAPEN */ setCx86 (CX86_CCR3 , (ccr3 &0x0f ) |0x10 );/* enable cpuid */ -setCx86_old (CX86_CCR4 ,getCx86_old (CX86_CCR4 ) |0x80 ); +setCx86 (CX86_CCR4 ,getCx86 (CX86_CCR4 ) |0x80 );/* disable MAPEN */ setCx86 (CX86_CCR3 , ccr3);local_irq_restore (flags);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 176/239 x86/CPU: Change query logic so CPUID is enabled before testing
In reply to Greg Kroah-HartmanFrom: Matthew Whitehead <[email protected]>
[ Upstream commit 2893cc8ff892fa74972d8dc0e1d0dc65116daaa3 ]
Presently we check first if CPUID is enabled. If it is not already enabled, then we next call identify_cpu_without_cpuid() and clear X86_FEATURE_CPUID.
Unfortunately, identify_cpu_without_cpuid() is the function where CPUID becomes _enabled_ on Cyrix 6x86/6x86L CPUs.
Reverse the calling sequence so that CPUID is first enabled, and then check a second time to see if the feature has now been activated.
[ bp: Massage commit message and remove trailing whitespace. ]
--- arch/x86/kernel/cpu/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/common.c +3 -1
@@ -1066,6 +1066,9 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)memset (&c->x86_capability,0 ,sizeof c->x86_capability); c->extended_cpuid_level =0 ; +if (!have_cpuid_p ()) +identify_cpu_without_cpuid (c); +/* cyrix could have cpuid enabled via c_identify()*/ if (have_cpuid_p ()) {cpu_detect (c);
@@ -1082,7 +1085,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)if (this_cpu->c_bsp_init) this_cpu->c_bsp_init (c); }else { -identify_cpu_without_cpuid (c);setup_clear_cpu_cap (X86_FEATURE_CPUID ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 177/239 MIPS: kexec: Relax memory restriction
In reply to Greg Kroah-HartmanFrom: Dengcheng Zhu <[email protected]>
[ Upstream commit a6da4d6fdf8bd512c98d3ac7f1d16bc4bb282919 ]
We can rely on the system kernel and the dump capture kernel themselves in memory usage.
Being restrictive with 512MB limit may cause kexec tool failure on some platforms.
Patchwork: https://patchwork.linux-mips.org/patch/20568/
--- arch/mips/include/asm/kexec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/mips/include/asm/kexec.h +3 -3
@@ -12,11 +12,11 @@#include <asm/stacktrace.h> /* Maximum physical address we can use pages from */ -#define KEXEC_SOURCE_MEMORY_LIMIT (0x20000000) +#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)/* Maximum address we can reach in physical address mode */ -#define KEXEC_DESTINATION_MEMORY_LIMIT (0x20000000) +#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)/* Maximum address we can use for the control code buffer */ -#define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000) +#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)/* Reserve 3*4096 bytes for board-specific info */ #define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 178/239 arm64: dts: rockchip: Fix microSD in rk3399 sapphire board
In reply to Greg Kroah-HartmanFrom: Vicente Bergas <[email protected]>
[ Upstream commit 88a20edf76091ee7f1bb459b89d714d53f0f8940 ]
The microSD card slot in the Sapphire board is not working because of several issues:
1.- The vmmc power supply is missing in the DTS. It is capable of 3.0V and has a GPIO-based enable control.
2.- The vqmmc power supply can provide up to 3.3V, but it is capped in the DTS to just 3.0V because of the vmmc capability. This results in a conflict from the mmc driver requesting an unsupportable voltage range from 3.3V to 3.0V (min > max) as reported in dmesg. So, extend the range up to 3.3V. The hw should be able to stand this 0.3V tolerance. See mmc_regulator_set_vqmmc in drivers/mmc/core/core.c.
3.- The card detect signal is non-working. There is a known conflict with jtag, but the workaround in drivers/soc/rockchip/grf.c does not work. Adding the broken-cd attribute to the DTS fixes the issue.
--- .../boot/dts/rockchip/rk3399-sapphire.dtsi | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +23 -1
@@ -113,6 +113,19 @@ vin-supply = <&vcc_1v8>; }; + vcc3v0_sd: vcc3v0-sd { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_pwr_h>; + regulator-always-on; + regulator-max-microvolt = <3000000>; + regulator-min-microvolt = <3000000>; + regulator-name = "vcc3v0_sd"; + vin-supply = <&vcc3v3_sys>; + }; + vcc3v3_sys: vcc3v3-sys { compatible = "regulator-fixed"; regulator-name = "vcc3v3_sys";
@@ -315,7 +328,7 @@ regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <3000000>;
@@ -490,6 +503,13 @@ }; }; + sd { + sdmmc0_pwr_h: sdmmc0-pwr-h { + rockchip,pins = + <RK_GPIO0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + usb2 { vcc5v0_host_en: vcc5v0-host-en { rockchip,pins =
@@ -537,6 +557,7 @@ }; &sdmmc { + broken-cd; bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed;
@@ -545,6 +566,7 @@ max-frequency = <150000000>; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; + vmmc-supply = <&vcc3v0_sd>; vqmmc-supply = <&vcc_sdio>; status = "okay"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 179/239 media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
In reply to Greg Kroah-HartmanFrom: Jia-Ju Bai <[email protected]>
[ Upstream commit 8d11eb847de7d89c2754988c944d51a4f63e219b ]
The driver may sleep in a interrupt handler.
The function call paths (from bottom to top) in Linux-4.16 are:
[FUNC] kzalloc(GFP_KERNEL) drivers/media/pci/ivtv/ivtv-yuv.c, 938:
kzalloc in ivtv_yuv_initdrivers/media/pci/ivtv/ivtv-yuv.c, 960:
ivtv_yuv_init in ivtv_yuv_next_freedrivers/media/pci/ivtv/ivtv-yuv.c, 1126:
ivtv_yuv_next_free in ivtv_yuv_setup_stream_framedrivers/media/pci/ivtv/ivtv-irq.c, 827:
ivtv_yuv_setup_stream_frame in ivtv_irq_dec_data_reqdrivers/media/pci/ivtv/ivtv-irq.c, 1013:
ivtv_irq_dec_data_req in ivtv_irq_handler
To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.
This bug is found by my static analysis tool DSAC.
--- drivers/media/pci/ivtv/ivtv-yuv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-yuv.c +1 -1
@@ -935,7 +935,7 @@ static void ivtv_yuv_init(struct ivtv *itv) }/* We need a buffer for blanking when Y plane is offset - non-fatal if we can't get one */ - yi->blanking_ptr =kzalloc (720 *16 ,GFP_KERNEL |__GFP_NOWARN); + yi->blanking_ptr =kzalloc (720 *16 ,GFP_ATOMIC |__GFP_NOWARN);if (yi->blanking_ptr) { yi->blanking_dmaptr =pci_map_single (itv->pdev, yi->blanking_ptr,720 *16 ,PCI_DMA_TODEVICE ); }else {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 180/239 media: au0828: Fix incorrect error messages
In reply to Greg Kroah-HartmanFrom: Brad Love <[email protected]>
[ Upstream commit f347596f2bf114a3af3d80201c6e6bef538d884f ]
Correcting red herring error messages.
Where appropriate, replaces au0282_dev_register with:
- au0828_analog_register
- au0828_dvb_register
--- drivers/media/usb/au0828/au0828-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/au0828/au0828-core.c +2 -2
@@ -632,7 +632,7 @@ static int au0828_usb_probe(struct usb_interface *interface,/* Analog TV */ retval =au0828_analog_register (dev, interface);if (retval) { -pr_err ("%s() au0282_dev_register failed to register on V4L2\n" , +pr_err ("%s() au0828_analog_register failed to register on V4L2\n" , __func__);mutex_unlock (&dev->lock); goto done;
@@ -641,7 +641,7 @@ static int au0828_usb_probe(struct usb_interface *interface,/* Digital TV */ retval =au0828_dvb_register (dev);if (retval) -pr_err ("%s() au0282_dev_register failed\n" , +pr_err ("%s() au0828_dvb_register failed\n" , __func__);/* Remote controller */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 181/239 media: davinci: Fix implicit enum conversion warning
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 4158757395b300b6eb308fc20b96d1d231484413 ]
Clang warns when one enumerated type is implicitly converted to another.
drivers/media/platform/davinci/vpbe_display.c:524:24: warning: implicit conversion from enumeration type 'enum osd_v_exp_ratio' to different enumeration type 'enum osd_h_exp_ratio' [-Wenum-conversion]
layer_info->h_exp = V_EXP_6_OVER_5;
~ ^~~~~~~~~~~~~~1 warning generated.
This appears to be a copy and paste error judging from the couple of lines directly above this statement and the way that height is handled in the if block above this one.
--- drivers/media/platform/davinci/vpbe_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/davinci/vpbe_display.c +1 -1
@@ -518,7 +518,7 @@ vpbe_disp_calculate_scale_factor(struct vpbe_display *disp_dev,else if (v_scale ==4 ) layer_info->v_zoom =ZOOM_X4 ;if (v_exp) - layer_info->h_exp =V_EXP_6_OVER_5 ; + layer_info->v_exp =V_EXP_6_OVER_5 ; }else {/* no scaling, only cropping. Set display area to crop area */ cfg->ysize = expected_ysize;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 182/239 ARM: dts: rockchip: explicitly set vcc_sd0 pin to gpio on rk3188-radxarock
In reply to Greg Kroah-HartmanFrom: Heiko Stuebner <[email protected]>
[ Upstream commit a2df0984e73fd9e1dad5fc3f1c307ec3de395e30 ]
It is good practice to make the setting of gpio-pinctrls explicitly in the devicetree, and in this case even necessary.
Rockchip boards start with iomux settings set to gpio for most pins and while the linux pinctrl driver also implicitly sets the gpio function if a pin is requested as gpio that is not necessarily true for other drivers.
The issue in question stems from uboot, where the sdmmc_pwr pin is set to function 1 (sdmmc-power) by the bootrom when reading the 1st-stage loader. The regulator controlled by the pin is active-low though, so when the dwmmc hw-block sets its enabled bit, it actually disables the regulator. By changing the pin back to gpio we fix that behaviour.
--- arch/arm/boot/dts/rk3188-radxarock.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/rk3188-radxarock.dts +8 -0
@@ -130,6 +130,8 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_pwr>; startup-delay-us = <100000>; vin-supply = <&vcc_io>; };
@@ -348,6 +350,12 @@ }; }; + sd0 { + sdmmc_pwr: sdmmc-pwr { + rockchip,pins = <RK_GPIO3 1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + usb { host_vbus_drv: host-vbus-drv { rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 183/239 usb: gadget: uvc: configfs: Drop leaked references to config items
In reply to Greg Kroah-HartmanFrom: Laurent Pinchart <[email protected]>
[ Upstream commit 86f3daed59bceb4fa7981d85e89f63ebbae1d561 ]
Some of the .allow_link() and .drop_link() operations implementations call config_group_find_item() and then leak the reference to the returned item. Fix this by dropping those references where needed.
--- drivers/usb/gadget/function/uvc_configfs.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/gadget/function/uvc_configfs.c +4 -0
@@ -543,6 +543,7 @@ static int uvcg_control_class_allow_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex);return ret; }
@@ -578,6 +579,7 @@ static void uvcg_control_class_drop_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex); }
@@ -2037,6 +2039,7 @@ static int uvcg_streaming_class_allow_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex);return ret; }
@@ -2077,6 +2080,7 @@ static void uvcg_streaming_class_drop_link(struct config_item *src, unlock:mutex_unlock (&opts->lock); out: +config_item_put (header);mutex_unlock (su_mutex); }
Signature · 1 line
2.20.1