Merge 4.9.207 into android-4.9-q
Changes in 4.9.207
arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator
usb: gadget: u_serial: add missing port entry locking
tty: serial: fsl_lpuart: use the sg count from dma_map_sg
tty: serial: msm_serial: Fix flow control
serial: pl011: Fix DMA ->flush_buffer()
serial: serial_core: Perform NULL checks for break_ctl ops
serial: ifx6x60: add missed pm_runtime_disable
autofs: fix a leak in autofs_expire_indirect()
RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
exportfs_decode_fh(): negative pinned may become positive without the parent locked
audit_get_nd(): don't unlock parent too early
NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
Input: cyttsp4_core - fix use after free bug
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
rsxx: add missed destroy_workqueue calls in remove
net: ep93xx_eth: fix mismatch of request_mem_region in remove
serial: core: Allow processing sysrq at port unlock time
cxgb4vf: fix memleak in mac_hlist initialization
iwlwifi: mvm: Send non offchannel traffic via AP sta
ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
net/mlx5: Release resource on error flow
extcon: max8997: Fix lack of path setting in USB device mode
clk: rockchip: fix rk3188 sclk_smc gate data
clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering
ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name
dlm: fix missing idr_destroy for recover_idr
MIPS: SiByte: Enable ZONE_DMA32 for LittleSur
scsi: zfcp: drop default switch case which might paper over missing case
pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues
Staging: iio: adt7316: Fix i2c data reading, set the data field
regulator: Fix return value of _set_load() stub
MIPS: OCTEON: octeon-platform: fix typing
math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'
rtc: dt-binding: abx80x: fix resistance scale
ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module
media: pulse8-cec: return 0 when invalidating the logical address
dmaengine: coh901318: Fix a double-lock bug
dmaengine: coh901318: Remove unused variable
usb: dwc3: don't log probe deferrals; but do log other error codes
ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
dma-mapping: fix return type of dma_set_max_seg_size()
altera-stapl: check for a null key before strcasecmp'ing it
serial: imx: fix error handling in console_setup
i2c: imx: don't print error message on probe defer
dlm: NULL check before kmem_cache_destroy is not needed
ARM: debug: enable UART1 for socfpga Cyclone5
nfsd: fix a warning in __cld_pipe_upcall()
ARM: OMAP1/2: fix SoC name printing
net/x25: fix called/calling length calculation in x25_parse_address_block
net/x25: fix null_x25_address handling
ARM: dts: mmp2: fix the gpio interrupt cell number
ARM: dts: realview-pbx: Fix duplicate regulator nodes
tcp: fix off-by-one bug on aborting window-probing socket
tcp: fix SNMP TCP timeout under-estimation
modpost: skip ELF local symbols during section mismatch check
kbuild: fix single target build for external module
mtd: fix mtd_oobavail() incoherent returned value
ARM: dts: pxa: clean up USB controller nodes
clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent
ARM: dts: realview: Fix some more duplicate regulator nodes
dlm: fix invalid cluster name warning
net/mlx4_core: Fix return codes of unsupported operations
powerpc/math-emu: Update macros from GCC
MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition
nfsd: Return EPERM, not EACCES, in some SETATTR cases
tty: Don't block on IO when ldisc change is pending
media: stkwebcam: Bugfix for wrong return values
mlx4: Use snprintf instead of complicated strcpy
ARM: dts: sunxi: Fix PMU compatible strings
sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision
fuse: verify nlink
fuse: verify attributes
ALSA: pcm: oss: Avoid potential buffer overflows
Input: goodix - add upside-down quirk for Teclast X89 tablet
coresight: etm4x: Fix input validation for sysfs.
x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect
CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
CIFS: Fix SMB2 oplock break processing
tty: vt: keyboard: reject invalid keycodes
can: slcan: Fix use-after-free Read in slcan_open
jbd2: Fix possible overflow in jbd2_log_space_left()
drm/i810: Prevent underflow in ioctl
KVM: x86: do not modify masked bits of shared MSRs
KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES
crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
crypto: ccp - fix uninitialized list head
crypto: ecdh - fix big endian bug in ECC library
crypto: user - fix memory leak in crypto_report
spi: atmel: Fix CS high support
RDMA/qib: Validate ->show()/store() callbacks before calling them
thermal: Fix deadlock in thermal thermal_zone_device_check
KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332)
appletalk: Fix potential NULL pointer dereference in unregister_snap_client
appletalk: Set error code if register_snap_client failed
usb: gadget: configfs: Fix missing spin_lock_init()
USB: uas: honor flag to avoid CAPACITY16
USB: uas: heed CAPACITY_HEURISTICS
usb: Allow USB device to be warm reset in suspended state
staging: rtl8188eu: fix interface sanity check
staging: rtl8712: fix interface sanity check
staging: gigaset: fix general protection fault on probe
staging: gigaset: fix illegal free on probe errors
staging: gigaset: add endpoint-type sanity check
xhci: Increase STS_HALT timeout in xhci_suspend()
ARM: dts: pandora-common: define wl1251 as child node of mmc3
iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting
USB: atm: ueagle-atm: add missing endpoint check
USB: idmouse: fix interface sanity checks
USB: serial: io_edgeport: fix epic endpoint lookup
USB: adutux: fix interface sanity check
usb: core: urb: fix URB structure initialization function
usb: mon: Fix a deadlock in usbmon between mmap and read
mtd: spear_smi: Fix Write Burst mode
virtio-balloon: fix managed page counts when migrating pages between zones
btrfs: check page->mapping when loading free space cache
btrfs: Remove btrfs_bio::flags member
Btrfs: send, skip backreference walking for extents with many references
btrfs: record all roots for rename exchange on a subvol
rtlwifi: rtl8192de: Fix missing code to retrieve RX buffer address
rtlwifi: rtl8192de: Fix missing callback that tests for hw release of buffer
rtlwifi: rtl8192de: Fix missing enable interrupt flag
lib: raid6: fix awk build warnings
ALSA: hda - Fix pending unsol events at shutdown
workqueue: Fix spurious sanity check failures in destroy_workqueue()
workqueue: Fix pwq ref leak in rescuer_thread()
ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report
blk-mq: avoid sysfs buffer overflow with too many CPU cores
cgroup: pids: use atomic64_t for pids->limit
ar5523: check NULL before memcpy() in ar5523_cmd()
media: bdisp: fix memleak on release
media: radio: wl1273: fix interrupt masking on release
cpuidle: Do not unset the driver if it is there already
PM / devfreq: Lock devfreq in trans_stat_show
ACPI: OSL: only free map once in osl.c
ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data()
ACPI: PM: Avoid attaching ACPI PM domain to certain devices
pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init
pinctrl: samsung: Fix device node refcount leaks in init code
mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card
ppdev: fix PPGETTIME/PPSETTIME ioctls
powerpc: Allow 64bit VDSO __kernel_sync_dicache to work across ranges >4GB
video/hdmi: Fix AVI bar unpack
quota: Check that quota is not dirty before release
ext2: check err when partial != NULL
quota: fix livelock in dquot_writeback_dquots
scsi: zfcp: trace channel log even for FCP command responses
usb: xhci: only set D3hot for pci device
xhci: Fix memory leak in xhci_add_in_port()
xhci: make sure interrupts are restored to correct state
iio: adis16480: Add debugfs_reg_access entry
Btrfs: fix negative subv_writers counter and data space leak after buffered write
omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251
scsi: lpfc: Cap NPIV vports to 256
e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait
x86/MCE/AMD: Turn off MC4_MISC thresholding on all family 0x15 models
x86/MCE/AMD: Carve out the MC4_MISC thresholding quirk
ath10k: fix fw crash by moving chip reset after napi disabled
ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity
pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init
scsi: qla2xxx: Fix DMA unmap leak
scsi: qla2xxx: Fix session lookup in qlt_abort_work()
scsi: qla2xxx: Fix qla24xx_process_bidir_cmd()
scsi: qla2xxx: Always check the qla2x00_wait_for_hba_online() return value
powerpc: Fix vDSO clock_getres()
reiserfs: fix extended attributes on the root directory
firmware: qcom: scm: Ensure 'a0' status code is treated as signed
mm/shmem.c: cast the type of unmap_start to u64
ext4: fix a bug in ext4_wait_for_tail_page_commit
blk-mq: make sure that line break can be printed
workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
sunrpc: fix crash when cache_head become valid before update
net/mlx5e: Fix SFF 8472 eeprom length
kernel/module.c: wakeup processes in module_wq on module unload
nvme: host: core: fix precedence of ternary operator
net: bridge: deny dev_set_mac_address() when unregistering
net: ethernet: ti: cpsw: fix extra rx interrupt
openvswitch: support asymmetric conntrack
tcp: md5: fix potential overestimation of TCP option space
tipc: fix ordering of tipc module init and exit routine
inet: protect against too small mtu values.
tcp: fix rejected syncookies due to stale timestamps
tcp: tighten acceptance of ACKs not matching a child socket
tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
Revert "regulator: Defer init completion for a while after late_initcall"
PCI: Fix Intel ACS quirk UPDCR register address
PCI/MSI: Fix incorrect MSI-X masking on resume
xtensa: fix TLB sanity checker
CIFS: Respect O_SYNC and O_DIRECT flags during reconnect
ARM: dts: s3c64xx: Fix init order of clock providers
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
vfio/pci: call irq_bypass_unregister_producer() before freeing irq
dma-buf: Fix memory leak in sync_file_merge()
dm btree: increase rebalance threshold in __rebalance2()
scsi: iscsi: Fix a potential deadlock in the timeout handler
drm/radeon: fix r1xx/r2xx register checker for POT textures
xhci: fix USB3 device initiated resume race with roothub autosuspend
net: stmmac: use correct DMA buffer size in the RX descriptor
net: stmmac: don't stop NAPI processing when dropping a packet
Linux 4.9.207
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -27,4 +27,4 @@ and valid to enable charging:
|
||||
|
||||
- "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
|
||||
- "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
|
||||
resistor, the other values are in ohm.
|
||||
resistor, the other values are in kOhm.
|
||||
|
||||
13
Makefile
13
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 206
|
||||
SUBLEVEL = 207
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
@@ -1609,9 +1609,6 @@ else # KBUILD_EXTMOD
|
||||
|
||||
# We are always building modules
|
||||
KBUILD_MODULES := 1
|
||||
PHONY += crmodverdir
|
||||
crmodverdir:
|
||||
$(cmd_crmodverdir)
|
||||
|
||||
PHONY += $(objtree)/Module.symvers
|
||||
$(objtree)/Module.symvers:
|
||||
@@ -1623,7 +1620,7 @@ $(objtree)/Module.symvers:
|
||||
|
||||
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
|
||||
PHONY += $(module-dirs) modules
|
||||
$(module-dirs): crmodverdir $(objtree)/Module.symvers
|
||||
$(module-dirs): prepare $(objtree)/Module.symvers
|
||||
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
|
||||
|
||||
modules: $(module-dirs)
|
||||
@@ -1664,7 +1661,8 @@ help:
|
||||
|
||||
# Dummies...
|
||||
PHONY += prepare scripts
|
||||
prepare: ;
|
||||
prepare:
|
||||
$(cmd_crmodverdir)
|
||||
scripts: ;
|
||||
endif # KBUILD_EXTMOD
|
||||
|
||||
@@ -1790,17 +1788,14 @@ endif
|
||||
|
||||
# Modules
|
||||
/: prepare scripts FORCE
|
||||
$(cmd_crmodverdir)
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(build-dir)
|
||||
# Make sure the latest headers are built for Documentation
|
||||
Documentation/ samples/: headers_install
|
||||
%/: prepare scripts FORCE
|
||||
$(cmd_crmodverdir)
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(build-dir)
|
||||
%.ko: prepare scripts FORCE
|
||||
$(cmd_crmodverdir)
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(build-dir) $(@:.ko=.o)
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
@@ -987,14 +987,21 @@ choice
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
|
||||
|
||||
config DEBUG_SOCFPGA_UART1
|
||||
config DEBUG_SOCFPGA_ARRIA10_UART1
|
||||
depends on ARCH_SOCFPGA
|
||||
bool "Use SOCFPGA UART1 for low-level debug"
|
||||
bool "Use SOCFPGA Arria10 UART1 for low-level debug"
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on SOCFPGA(Arria 10) based platforms.
|
||||
|
||||
config DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||
depends on ARCH_SOCFPGA
|
||||
bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug"
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
|
||||
|
||||
config DEBUG_SUN9I_UART0
|
||||
bool "Kernel low-level debugging messages via sun9i UART0"
|
||||
@@ -1534,7 +1541,8 @@ config DEBUG_UART_PHYS
|
||||
default 0xfe800000 if ARCH_IOP32X
|
||||
default 0xff690000 if DEBUG_RK32_UART2
|
||||
default 0xffc02000 if DEBUG_SOCFPGA_UART0
|
||||
default 0xffc02100 if DEBUG_SOCFPGA_UART1
|
||||
default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
|
||||
default 0xffc03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||
default 0xffd82340 if ARCH_IOP13XX
|
||||
default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0
|
||||
default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2
|
||||
@@ -1624,7 +1632,8 @@ config DEBUG_UART_VIRT
|
||||
default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
|
||||
default 0xfeb31000 if DEBUG_KEYSTONE_UART1
|
||||
default 0xfec02000 if DEBUG_SOCFPGA_UART0
|
||||
default 0xfec02100 if DEBUG_SOCFPGA_UART1
|
||||
default 0xfec02100 if DEBUG_SOCFPGA_ARRIA10_UART1
|
||||
default 0xfec03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||
default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
|
||||
default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
|
||||
default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
|
||||
@@ -1672,9 +1681,9 @@ config DEBUG_UART_8250_WORD
|
||||
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
|
||||
depends on DEBUG_UART_8250_SHIFT >= 2
|
||||
default y if DEBUG_PICOXCELL_UART || \
|
||||
DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_UART1 || \
|
||||
DEBUG_KEYSTONE_UART0 || DEBUG_KEYSTONE_UART1 || \
|
||||
DEBUG_ALPINE_UART0 || \
|
||||
DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
|
||||
DEBUG_SOCFPGA_CYCLONE5_UART1 || DEBUG_KEYSTONE_UART0 || \
|
||||
DEBUG_KEYSTONE_UART1 || DEBUG_ALPINE_UART0 || \
|
||||
DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
|
||||
DEBUG_DAVINCI_DA8XX_UART2 || \
|
||||
DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
};
|
||||
|
||||
/* The voltage to the MMC card is hardwired at 3.3V */
|
||||
vmmc: fixedregulator@0 {
|
||||
vmmc: regulator-vmmc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmc";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
@@ -53,7 +53,7 @@
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
veth: fixedregulator@0 {
|
||||
veth: regulator-veth {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "veth";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
};
|
||||
|
||||
/* The voltage to the MMC card is hardwired at 3.3V */
|
||||
vmmc: fixedregulator@0 {
|
||||
vmmc: regulator-vmmc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmc";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
@@ -153,7 +153,7 @@
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
veth: fixedregulator@0 {
|
||||
veth: regulator-veth {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "veth";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
};
|
||||
|
||||
/* The voltage to the MMC card is hardwired at 3.3V */
|
||||
vmmc: fixedregulator@0 {
|
||||
vmmc: regulator-vmmc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmc";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
@@ -51,7 +51,7 @@
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
veth: fixedregulator@0 {
|
||||
veth: regulator-veth {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "veth";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
@@ -539,4 +539,3 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
};
|
||||
|
||||
hsotg: hsotg@12480000 {
|
||||
compatible = "snps,dwc2";
|
||||
compatible = "samsung,s3c6400-hsotg", "snps,dwc2";
|
||||
reg = <0x12480000 0x20000>;
|
||||
interrupts = <0 141 0>;
|
||||
clocks = <&cmu CLK_USBOTG>;
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
clocks = <&soc_clocks MMP2_CLK_GPIO>;
|
||||
resets = <&soc_clocks MMP2_CLK_GPIO>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
#interrupt-cells = <2>;
|
||||
ranges;
|
||||
|
||||
gcb0: gpio@d4019000 {
|
||||
|
||||
@@ -221,6 +221,17 @@
|
||||
gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>; /* GPIO_164 */
|
||||
};
|
||||
|
||||
/* wl1251 wifi+bt module */
|
||||
wlan_en: fixed-regulator-wg7210_en {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vwlan";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
startup-delay-us = <50000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
/* wg7210 (wifi+bt module) 32k clock buffer */
|
||||
wg7210_32k: fixed-regulator-wg7210_32k {
|
||||
compatible = "regulator-fixed";
|
||||
@@ -514,9 +525,30 @@
|
||||
/*wp-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;*/ /* GPIO_127 */
|
||||
};
|
||||
|
||||
/* mmc3 is probed using pdata-quirks to pass wl1251 card data */
|
||||
&mmc3 {
|
||||
status = "disabled";
|
||||
vmmc-supply = <&wlan_en>;
|
||||
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
cap-power-off-card;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
wlan: wifi@1 {
|
||||
compatible = "ti,wl1251";
|
||||
|
||||
reg = <1>;
|
||||
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* GPIO_21 */
|
||||
|
||||
ti,wl1251-has-eeprom;
|
||||
};
|
||||
};
|
||||
|
||||
/* bluetooth*/
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
vmmc-supply = <&vmmc1>;
|
||||
vmmc_aux-supply = <&vsim>;
|
||||
cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_HIGH>;
|
||||
cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
|
||||
bus-width = <8>;
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
clocks = <&clks CLK_NONE>;
|
||||
};
|
||||
|
||||
pxa27x_ohci: usb@4c000000 {
|
||||
usb0: usb@4c000000 {
|
||||
compatible = "marvell,pxa-ohci";
|
||||
reg = <0x4c000000 0x10000>;
|
||||
interrupts = <3>;
|
||||
|
||||
@@ -117,13 +117,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb0: ohci@4c000000 {
|
||||
compatible = "marvell,pxa-ohci";
|
||||
reg = <0x4c000000 0x10000>;
|
||||
interrupts = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mmc0: mmc@41100000 {
|
||||
compatible = "marvell,pxa-mmc";
|
||||
reg = <0x41100000 0x1000>;
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pxa3xx_ohci: usb@4c000000 {
|
||||
usb0: usb@4c000000 {
|
||||
compatible = "marvell,pxa-ohci";
|
||||
reg = <0x4c000000 0x10000>;
|
||||
interrupts = <3>;
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
vcc_flash: flash-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
regulator-name = "vcc_flash";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
startup-delay-us = <150>;
|
||||
|
||||
@@ -167,6 +167,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&clocks {
|
||||
clocks = <&fin_pll>;
|
||||
};
|
||||
|
||||
&sdhci0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
|
||||
|
||||
@@ -71,6 +71,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&clocks {
|
||||
clocks = <&fin_pll>;
|
||||
};
|
||||
|
||||
&sdhci0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
};
|
||||
|
||||
pmu {
|
||||
compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
};
|
||||
|
||||
pmu {
|
||||
compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
@@ -379,6 +379,13 @@ do { \
|
||||
#define __get_user_asm_byte(x, addr, err) \
|
||||
__get_user_asm(x, addr, err, ldrb)
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
|
||||
#define __get_user_asm_half(x, addr, err) \
|
||||
__get_user_asm(x, addr, err, ldrh)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef __ARMEB__
|
||||
#define __get_user_asm_half(x, __gu_addr, err) \
|
||||
({ \
|
||||
@@ -397,6 +404,8 @@ do { \
|
||||
})
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_ARM_ARCH__ >= 6 */
|
||||
|
||||
#define __get_user_asm_word(x, addr, err) \
|
||||
__get_user_asm(x, addr, err, ldr)
|
||||
#endif
|
||||
@@ -472,6 +481,13 @@ do { \
|
||||
#define __put_user_asm_byte(x, __pu_addr, err) \
|
||||
__put_user_asm(x, __pu_addr, err, strb)
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
|
||||
#define __put_user_asm_half(x, __pu_addr, err) \
|
||||
__put_user_asm(x, __pu_addr, err, strh)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef __ARMEB__
|
||||
#define __put_user_asm_half(x, __pu_addr, err) \
|
||||
({ \
|
||||
@@ -488,6 +504,8 @@ do { \
|
||||
})
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_ARM_ARCH__ >= 6 */
|
||||
|
||||
#define __put_user_asm_word(x, __pu_addr, err) \
|
||||
__put_user_asm(x, __pu_addr, err, str)
|
||||
|
||||
|
||||
@@ -42,6 +42,12 @@ _ASM_NOKPROBE(__get_user_1)
|
||||
|
||||
ENTRY(__get_user_2)
|
||||
check_uaccess r0, 2, r1, r2, __get_user_bad
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
|
||||
2: TUSER(ldrh) r2, [r0]
|
||||
|
||||
#else
|
||||
|
||||
#ifdef CONFIG_CPU_USE_DOMAINS
|
||||
rb .req ip
|
||||
2: ldrbt r2, [r0], #1
|
||||
@@ -56,6 +62,9 @@ rb .req r0
|
||||
#else
|
||||
orr r2, rb, r2, lsl #8
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_ARM_ARCH__ >= 6 */
|
||||
|
||||
mov r0, #0
|
||||
ret lr
|
||||
ENDPROC(__get_user_2)
|
||||
@@ -145,7 +154,9 @@ _ASM_NOKPROBE(__get_user_bad8)
|
||||
.pushsection __ex_table, "a"
|
||||
.long 1b, __get_user_bad
|
||||
.long 2b, __get_user_bad
|
||||
#if __LINUX_ARM_ARCH__ < 6
|
||||
.long 3b, __get_user_bad
|
||||
#endif
|
||||
.long 4b, __get_user_bad
|
||||
.long 5b, __get_user_bad8
|
||||
.long 6b, __get_user_bad8
|
||||
|
||||
@@ -41,16 +41,13 @@ ENDPROC(__put_user_1)
|
||||
|
||||
ENTRY(__put_user_2)
|
||||
check_uaccess r0, 2, r1, ip, __put_user_bad
|
||||
mov ip, r2, lsr #8
|
||||
#ifdef CONFIG_THUMB2_KERNEL
|
||||
#ifndef __ARMEB__
|
||||
2: TUSER(strb) r2, [r0]
|
||||
3: TUSER(strb) ip, [r0, #1]
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
|
||||
2: TUSER(strh) r2, [r0]
|
||||
|
||||
#else
|
||||
2: TUSER(strb) ip, [r0]
|
||||
3: TUSER(strb) r2, [r0, #1]
|
||||
#endif
|
||||
#else /* !CONFIG_THUMB2_KERNEL */
|
||||
|
||||
mov ip, r2, lsr #8
|
||||
#ifndef __ARMEB__
|
||||
2: TUSER(strb) r2, [r0], #1
|
||||
3: TUSER(strb) ip, [r0]
|
||||
@@ -58,7 +55,8 @@ ENTRY(__put_user_2)
|
||||
2: TUSER(strb) ip, [r0], #1
|
||||
3: TUSER(strb) r2, [r0]
|
||||
#endif
|
||||
#endif /* CONFIG_THUMB2_KERNEL */
|
||||
|
||||
#endif /* __LINUX_ARM_ARCH__ >= 6 */
|
||||
mov r0, #0
|
||||
ret lr
|
||||
ENDPROC(__put_user_2)
|
||||
@@ -91,7 +89,9 @@ ENDPROC(__put_user_bad)
|
||||
.pushsection __ex_table, "a"
|
||||
.long 1b, __put_user_bad
|
||||
.long 2b, __put_user_bad
|
||||
#if __LINUX_ARM_ARCH__ < 6
|
||||
.long 3b, __put_user_bad
|
||||
#endif
|
||||
.long 4b, __put_user_bad
|
||||
.long 5b, __put_user_bad
|
||||
.long 6b, __put_user_bad
|
||||
|
||||
@@ -200,10 +200,10 @@ void __init omap_check_revision(void)
|
||||
printk(KERN_INFO "Unknown OMAP cpu type: 0x%02x\n", cpu_type);
|
||||
}
|
||||
|
||||
printk(KERN_INFO "OMAP%04x", omap_revision >> 16);
|
||||
pr_info("OMAP%04x", omap_revision >> 16);
|
||||
if ((omap_revision >> 8) & 0xff)
|
||||
printk(KERN_INFO "%x", (omap_revision >> 8) & 0xff);
|
||||
printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n",
|
||||
pr_cont("%x", (omap_revision >> 8) & 0xff);
|
||||
pr_cont(" revision %i handled as %02xxx id: %08x%08x\n",
|
||||
die_rev, omap_revision & 0xff, system_serial_low,
|
||||
system_serial_high);
|
||||
}
|
||||
|
||||
@@ -199,8 +199,8 @@ void __init omap2xxx_check_revision(void)
|
||||
|
||||
pr_info("%s", soc_name);
|
||||
if ((omap_rev() >> 8) & 0x0f)
|
||||
pr_info("%s", soc_rev);
|
||||
pr_info("\n");
|
||||
pr_cont("%s", soc_rev);
|
||||
pr_cont("\n");
|
||||
}
|
||||
|
||||
#define OMAP3_SHOW_FEATURE(feat) \
|
||||
|
||||
@@ -308,108 +308,15 @@ static void __init omap3_logicpd_torpedo_init(void)
|
||||
}
|
||||
|
||||
/* omap3pandora legacy devices */
|
||||
#define PANDORA_WIFI_IRQ_GPIO 21
|
||||
#define PANDORA_WIFI_NRESET_GPIO 23
|
||||
|
||||
static struct platform_device pandora_backlight = {
|
||||
.name = "pandora-backlight",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data pandora_vmmc3 = {
|
||||
.constraints = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(pandora_vmmc3_supply),
|
||||
.consumer_supplies = pandora_vmmc3_supply,
|
||||
};
|
||||
|
||||
static struct fixed_voltage_config pandora_vwlan = {
|
||||
.supply_name = "vwlan",
|
||||
.microvolts = 1800000, /* 1.8V */
|
||||
.gpio = PANDORA_WIFI_NRESET_GPIO,
|
||||
.startup_delay = 50000, /* 50ms */
|
||||
.enable_high = 1,
|
||||
.init_data = &pandora_vmmc3,
|
||||
};
|
||||
|
||||
static struct platform_device pandora_vwlan_device = {
|
||||
.name = "reg-fixed-voltage",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &pandora_vwlan,
|
||||
},
|
||||
};
|
||||
|
||||
static void pandora_wl1251_init_card(struct mmc_card *card)
|
||||
{
|
||||
/*
|
||||
* We have TI wl1251 attached to MMC3. Pass this information to
|
||||
* SDIO core because it can't be probed by normal methods.
|
||||
*/
|
||||
if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) {
|
||||
card->quirks |= MMC_QUIRK_NONSTD_SDIO;
|
||||
card->cccr.wide_bus = 1;
|
||||
card->cis.vendor = 0x104c;
|
||||
card->cis.device = 0x9066;
|
||||
card->cis.blksize = 512;
|
||||
card->cis.max_dtr = 24000000;
|
||||
card->ocr = 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
static struct omap2_hsmmc_info pandora_mmc3[] = {
|
||||
{
|
||||
.mmc = 3,
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
|
||||
.gpio_cd = -EINVAL,
|
||||
.gpio_wp = -EINVAL,
|
||||
.init_card = pandora_wl1251_init_card,
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static void __init pandora_wl1251_init(void)
|
||||
{
|
||||
struct wl1251_platform_data pandora_wl1251_pdata;
|
||||
int ret;
|
||||
|
||||
memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
|
||||
|
||||
pandora_wl1251_pdata.power_gpio = -1;
|
||||
|
||||
ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq");
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
|
||||
if (pandora_wl1251_pdata.irq < 0)
|
||||
goto fail_irq;
|
||||
|
||||
pandora_wl1251_pdata.use_eeprom = true;
|
||||
ret = wl1251_set_platform_data(&pandora_wl1251_pdata);
|
||||
if (ret < 0)
|
||||
goto fail_irq;
|
||||
|
||||
return;
|
||||
|
||||
fail_irq:
|
||||
gpio_free(PANDORA_WIFI_IRQ_GPIO);
|
||||
fail:
|
||||
pr_err("wl1251 board initialisation failed\n");
|
||||
}
|
||||
|
||||
static void __init omap3_pandora_legacy_init(void)
|
||||
{
|
||||
platform_device_register(&pandora_backlight);
|
||||
platform_device_register(&pandora_vwlan_device);
|
||||
omap_hsmmc_init(pandora_mmc3);
|
||||
omap_hsmmc_late_init(pandora_mmc3);
|
||||
pandora_wl1251_init();
|
||||
}
|
||||
#endif /* CONFIG_ARCH_OMAP3 */
|
||||
|
||||
|
||||
@@ -56,16 +56,16 @@ ENTRY(tegra_resume)
|
||||
cmp r6, #TEGRA20
|
||||
beq 1f @ Yes
|
||||
/* Clear the flow controller flags for this CPU. */
|
||||
cpu_to_csr_reg r1, r0
|
||||
cpu_to_csr_reg r3, r0
|
||||
mov32 r2, TEGRA_FLOW_CTRL_BASE
|
||||
ldr r1, [r2, r1]
|
||||
ldr r1, [r2, r3]
|
||||
/* Clear event & intr flag */
|
||||
orr r1, r1, \
|
||||
#FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
|
||||
movw r0, #0x3FFD @ enable, cluster_switch, immed, bitmaps
|
||||
@ & ext flags for CPU power mgnt
|
||||
bic r1, r1, r0
|
||||
str r1, [r2]
|
||||
str r1, [r2, r3]
|
||||
1:
|
||||
|
||||
mov32 r9, 0xc09
|
||||
|
||||
@@ -1583,7 +1583,7 @@
|
||||
regulator-name = "VDD_HDMI_5V0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&exp1 12 GPIO_ACTIVE_LOW>;
|
||||
gpio = <&exp1 12 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
vin-supply = <&vdd_5v0_sys>;
|
||||
};
|
||||
|
||||
@@ -804,6 +804,7 @@ config SIBYTE_LITTLESUR
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_HIGHMEM
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select ZONE_DMA32 if 64BIT
|
||||
|
||||
config SIBYTE_SENTOSA
|
||||
bool "Sibyte BCM91250E-Sentosa"
|
||||
|
||||
@@ -266,7 +266,7 @@ int cvmx_cmd_queue_length(cvmx_cmd_queue_id_t queue_id)
|
||||
} else {
|
||||
union cvmx_pko_mem_debug8 debug8;
|
||||
debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
|
||||
return debug8.cn58xx.doorbell;
|
||||
return debug8.cn50xx.doorbell;
|
||||
}
|
||||
case CVMX_CMD_QUEUE_ZIP:
|
||||
case CVMX_CMD_QUEUE_DFA:
|
||||
|
||||
@@ -502,7 +502,7 @@ static void __init octeon_fdt_set_phy(int eth, int phy_addr)
|
||||
if (phy_addr >= 256 && alt_phy > 0) {
|
||||
const struct fdt_property *phy_prop;
|
||||
struct fdt_property *alt_prop;
|
||||
u32 phy_handle_name;
|
||||
fdt32_t phy_handle_name;
|
||||
|
||||
/* Use the alt phy node instead.*/
|
||||
phy_prop = fdt_get_property(initial_boot_params, eth, "phy-handle", NULL);
|
||||
|
||||
@@ -611,7 +611,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear,
|
||||
pko_reg_read_idx.s.index = cvmx_pko_get_base_queue(port_num);
|
||||
cvmx_write_csr(CVMX_PKO_REG_READ_IDX, pko_reg_read_idx.u64);
|
||||
debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
|
||||
status->doorbell = debug8.cn58xx.doorbell;
|
||||
status->doorbell = debug8.cn50xx.doorbell;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -213,30 +213,18 @@
|
||||
* respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow
|
||||
* (i.e. carry out) is not stored anywhere, and is lost.
|
||||
*/
|
||||
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
|
||||
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
|
||||
do { \
|
||||
if (__builtin_constant_p (bh) && (bh) == 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "%r" ((USItype)(ah)), \
|
||||
"%r" ((USItype)(al)), \
|
||||
"rI" ((USItype)(bl))); \
|
||||
else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "%r" ((USItype)(ah)), \
|
||||
"%r" ((USItype)(al)), \
|
||||
"rI" ((USItype)(bl))); \
|
||||
__asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
|
||||
__asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
|
||||
else \
|
||||
__asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "%r" ((USItype)(ah)), \
|
||||
"r" ((USItype)(bh)), \
|
||||
"%r" ((USItype)(al)), \
|
||||
"rI" ((USItype)(bl))); \
|
||||
__asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
|
||||
: "=r" (sh), "=&r" (sl) \
|
||||
: "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
|
||||
} while (0)
|
||||
|
||||
/* sub_ddmmss is used in op-2.h and udivmodti4.c and should be equivalent to
|
||||
@@ -248,44 +236,24 @@
|
||||
* and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere,
|
||||
* and is lost.
|
||||
*/
|
||||
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
|
||||
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
|
||||
do { \
|
||||
if (__builtin_constant_p (ah) && (ah) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "r" ((USItype)(bh)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
else if (__builtin_constant_p (ah) && (ah) ==~(USItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "r" ((USItype)(bh)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "r" ((USItype)(ah)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "r" ((USItype)(ah)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
|
||||
else \
|
||||
__asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
|
||||
: "=r" ((USItype)(sh)), \
|
||||
"=&r" ((USItype)(sl)) \
|
||||
: "r" ((USItype)(ah)), \
|
||||
"r" ((USItype)(bh)), \
|
||||
"rI" ((USItype)(al)), \
|
||||
"r" ((USItype)(bl))); \
|
||||
__asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
|
||||
: "=r" (sh), "=&r" (sl) \
|
||||
: "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
|
||||
} while (0)
|
||||
|
||||
/* asm fragments for mul and div */
|
||||
@@ -294,13 +262,10 @@
|
||||
* UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype
|
||||
* word product in HIGH_PROD and LOW_PROD.
|
||||
*/
|
||||
#define umul_ppmm(ph, pl, m0, m1) \
|
||||
#define umul_ppmm(ph, pl, m0, m1) \
|
||||
do { \
|
||||
USItype __m0 = (m0), __m1 = (m1); \
|
||||
__asm__ ("mulhwu %0,%1,%2" \
|
||||
: "=r" ((USItype)(ph)) \
|
||||
: "%r" (__m0), \
|
||||
"r" (__m1)); \
|
||||
__asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
|
||||
(pl) = __m0 * __m1; \
|
||||
} while (0)
|
||||
|
||||
@@ -312,9 +277,10 @@
|
||||
* significant bit of DENOMINATOR must be 1, then the pre-processor symbol
|
||||
* UDIV_NEEDS_NORMALIZATION is defined to 1.
|
||||
*/
|
||||
#define udiv_qrnnd(q, r, n1, n0, d) \
|
||||
#define udiv_qrnnd(q, r, n1, n0, d) \
|
||||
do { \
|
||||
UWtype __d1, __d0, __q1, __q0, __r1, __r0, __m; \
|
||||
UWtype __d1, __d0, __q1, __q0; \
|
||||
UWtype __r1, __r0, __m; \
|
||||
__d1 = __ll_highpart (d); \
|
||||
__d0 = __ll_lowpart (d); \
|
||||
\
|
||||
@@ -325,7 +291,7 @@
|
||||
if (__r1 < __m) \
|
||||
{ \
|
||||
__q1--, __r1 += (d); \
|
||||
if (__r1 >= (d)) /* we didn't get carry when adding to __r1 */ \
|
||||
if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
|
||||
if (__r1 < __m) \
|
||||
__q1--, __r1 += (d); \
|
||||
} \
|
||||
|
||||
@@ -86,6 +86,7 @@ struct vdso_data {
|
||||
__s32 wtom_clock_nsec;
|
||||
struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
|
||||
__u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */
|
||||
__u32 hrtimer_res; /* hrtimer resolution */
|
||||
__u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */
|
||||
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
|
||||
};
|
||||
@@ -107,6 +108,7 @@ struct vdso_data {
|
||||
__s32 wtom_clock_nsec;
|
||||
struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
|
||||
__u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */
|
||||
__u32 hrtimer_res; /* hrtimer resolution */
|
||||
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
|
||||
__u32 dcache_block_size; /* L1 d-cache block size */
|
||||
__u32 icache_block_size; /* L1 i-cache block size */
|
||||
|
||||
@@ -383,6 +383,7 @@ int main(void)
|
||||
DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
|
||||
DEFINE(STAMP_XTIME, offsetof(struct vdso_data, stamp_xtime));
|
||||
DEFINE(STAMP_SEC_FRAC, offsetof(struct vdso_data, stamp_sec_fraction));
|
||||
DEFINE(CLOCK_HRTIMER_RES, offsetof(struct vdso_data, hrtimer_res));
|
||||
DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size));
|
||||
DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size));
|
||||
DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size));
|
||||
@@ -411,7 +412,6 @@ int main(void)
|
||||
DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
|
||||
DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
|
||||
DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
|
||||
DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
|
||||
|
||||
#ifdef CONFIG_BUG
|
||||
DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
|
||||
|
||||
@@ -862,6 +862,7 @@ void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,
|
||||
vdso_data->wtom_clock_nsec = wtm->tv_nsec;
|
||||
vdso_data->stamp_xtime = *wall_time;
|
||||
vdso_data->stamp_sec_fraction = frac_sec;
|
||||
vdso_data->hrtimer_res = hrtimer_resolution;
|
||||
smp_wmb();
|
||||
++(vdso_data->tb_update_count);
|
||||
}
|
||||
|
||||
@@ -160,12 +160,15 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
|
||||
cror cr0*4+eq,cr0*4+eq,cr1*4+eq
|
||||
bne cr0,99f
|
||||
|
||||
mflr r12
|
||||
.cfi_register lr,r12
|
||||
bl __get_datapage@local /* get data page */
|
||||
lwz r5, CLOCK_HRTIMER_RES(r3)
|
||||
mtlr r12
|
||||
li r3,0
|
||||
cmpli cr0,r4,0
|
||||
crclr cr0*4+so
|
||||
beqlr
|
||||
lis r5,CLOCK_REALTIME_RES@h
|
||||
ori r5,r5,CLOCK_REALTIME_RES@l
|
||||
stw r3,TSPC32_TV_SEC(r4)
|
||||
stw r5,TSPC32_TV_NSEC(r4)
|
||||
blr
|
||||
|
||||
@@ -39,7 +39,7 @@ V_FUNCTION_BEGIN(__kernel_sync_dicache)
|
||||
subf r8,r6,r4 /* compute length */
|
||||
add r8,r8,r5 /* ensure we get enough */
|
||||
lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10)
|
||||
srw. r8,r8,r9 /* compute line count */
|
||||
srd. r8,r8,r9 /* compute line count */
|
||||
crclr cr0*4+so
|
||||
beqlr /* nothing to do? */
|
||||
mtctr r8
|
||||
@@ -56,7 +56,7 @@ V_FUNCTION_BEGIN(__kernel_sync_dicache)
|
||||
subf r8,r6,r4 /* compute length */
|
||||
add r8,r8,r5
|
||||
lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10)
|
||||
srw. r8,r8,r9 /* compute line count */
|
||||
srd. r8,r8,r9 /* compute line count */
|
||||
crclr cr0*4+so
|
||||
beqlr /* nothing to do? */
|
||||
mtctr r8
|
||||
|
||||
@@ -145,12 +145,15 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
|
||||
cror cr0*4+eq,cr0*4+eq,cr1*4+eq
|
||||
bne cr0,99f
|
||||
|
||||
mflr r12
|
||||
.cfi_register lr,r12
|
||||
bl V_LOCAL_FUNC(__get_datapage)
|
||||
lwz r5, CLOCK_HRTIMER_RES(r3)
|
||||
mtlr r12
|
||||
li r3,0
|
||||
cmpldi cr0,r4,0
|
||||
crclr cr0*4+so
|
||||
beqlr
|
||||
lis r5,CLOCK_REALTIME_RES@h
|
||||
ori r5,r5,CLOCK_REALTIME_RES@l
|
||||
std r3,TSPC64_TV_SEC(r4)
|
||||
std r5,TSPC64_TV_NSEC(r4)
|
||||
blr
|
||||
|
||||
@@ -1648,36 +1648,6 @@ static int __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
|
||||
if (c->x86 == 0x15 && c->x86_model <= 0xf)
|
||||
mce_flags.overflow_recov = 1;
|
||||
|
||||
/*
|
||||
* Turn off MC4_MISC thresholding banks on those models since
|
||||
* they're not supported there.
|
||||
*/
|
||||
if (c->x86 == 0x15 &&
|
||||
(c->x86_model >= 0x10 && c->x86_model <= 0x1f)) {
|
||||
int i;
|
||||
u64 hwcr;
|
||||
bool need_toggle;
|
||||
u32 msrs[] = {
|
||||
0x00000413, /* MC4_MISC0 */
|
||||
0xc0000408, /* MC4_MISC1 */
|
||||
};
|
||||
|
||||
rdmsrl(MSR_K7_HWCR, hwcr);
|
||||
|
||||
/* McStatusWrEn has to be set */
|
||||
need_toggle = !(hwcr & BIT(18));
|
||||
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr | BIT(18));
|
||||
|
||||
/* Clear CntP bit safely */
|
||||
for (i = 0; i < ARRAY_SIZE(msrs); i++)
|
||||
msr_clear_bit(msrs[i], 62);
|
||||
|
||||
/* restore old settings */
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr);
|
||||
}
|
||||
}
|
||||
|
||||
if (c->x86_vendor == X86_VENDOR_INTEL) {
|
||||
|
||||
@@ -499,6 +499,40 @@ out:
|
||||
return offset;
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn off MC4_MISC thresholding banks on all family 0x15 models since
|
||||
* they're not supported there.
|
||||
*/
|
||||
void disable_err_thresholding(struct cpuinfo_x86 *c)
|
||||
{
|
||||
int i;
|
||||
u64 hwcr;
|
||||
bool need_toggle;
|
||||
u32 msrs[] = {
|
||||
0x00000413, /* MC4_MISC0 */
|
||||
0xc0000408, /* MC4_MISC1 */
|
||||
};
|
||||
|
||||
if (c->x86 != 0x15)
|
||||
return;
|
||||
|
||||
rdmsrl(MSR_K7_HWCR, hwcr);
|
||||
|
||||
/* McStatusWrEn has to be set */
|
||||
need_toggle = !(hwcr & BIT(18));
|
||||
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr | BIT(18));
|
||||
|
||||
/* Clear CntP bit safely */
|
||||
for (i = 0; i < ARRAY_SIZE(msrs); i++)
|
||||
msr_clear_bit(msrs[i], 62);
|
||||
|
||||
/* restore old settings */
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr);
|
||||
}
|
||||
|
||||
/* cpu init entry point, called from mce.c with preempt off */
|
||||
void mce_amd_feature_init(struct cpuinfo_x86 *c)
|
||||
{
|
||||
@@ -506,6 +540,8 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
|
||||
unsigned int bank, block, cpu = smp_processor_id();
|
||||
int offset = -1;
|
||||
|
||||
disable_err_thresholding(c);
|
||||
|
||||
for (bank = 0; bank < mca_cfg.banks; ++bank) {
|
||||
if (mce_flags.smca)
|
||||
get_smca_bank_info(bank);
|
||||
|
||||
@@ -389,7 +389,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
||||
|
||||
r = -E2BIG;
|
||||
|
||||
if (*nent >= maxnent)
|
||||
if (WARN_ON(*nent >= maxnent))
|
||||
goto out;
|
||||
|
||||
do_cpuid_1_ent(entry, function, index);
|
||||
@@ -691,6 +691,9 @@ out:
|
||||
static int do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 func,
|
||||
u32 idx, int *nent, int maxnent, unsigned int type)
|
||||
{
|
||||
if (*nent >= maxnent)
|
||||
return -E2BIG;
|
||||
|
||||
if (type == KVM_GET_EMULATED_CPUID)
|
||||
return __do_cpuid_ent_emulated(entry, func, idx, nent, maxnent);
|
||||
|
||||
|
||||
@@ -273,13 +273,14 @@ int kvm_set_shared_msr(unsigned slot, u64 value, u64 mask)
|
||||
struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
|
||||
int err;
|
||||
|
||||
if (((value ^ smsr->values[slot].curr) & mask) == 0)
|
||||
value = (value & mask) | (smsr->values[slot].host & ~mask);
|
||||
if (value == smsr->values[slot].curr)
|
||||
return 0;
|
||||
smsr->values[slot].curr = value;
|
||||
err = wrmsrl_safe(shared_msrs_global.msrs[slot], value);
|
||||
if (err)
|
||||
return 1;
|
||||
|
||||
smsr->values[slot].curr = value;
|
||||
if (!smsr->registered) {
|
||||
smsr->urn.on_user_return = kvm_on_user_return;
|
||||
user_return_notifier_register(&smsr->urn);
|
||||
@@ -1074,10 +1075,15 @@ u64 kvm_get_arch_capabilities(void)
|
||||
* If TSX is disabled on the system, guests are also mitigated against
|
||||
* TAA and clear CPU buffer mitigation is not required for guests.
|
||||
*/
|
||||
if (boot_cpu_has_bug(X86_BUG_TAA) && boot_cpu_has(X86_FEATURE_RTM) &&
|
||||
(data & ARCH_CAP_TSX_CTRL_MSR))
|
||||
if (!boot_cpu_has(X86_FEATURE_RTM))
|
||||
data &= ~ARCH_CAP_TAA_NO;
|
||||
else if (!boot_cpu_has_bug(X86_BUG_TAA))
|
||||
data |= ARCH_CAP_TAA_NO;
|
||||
else if (data & ARCH_CAP_TSX_CTRL_MSR)
|
||||
data &= ~ARCH_CAP_MDS_NO;
|
||||
|
||||
/* KVM does not emulate MSR_IA32_TSX_CTRL. */
|
||||
data &= ~ARCH_CAP_TSX_CTRL_MSR;
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@@ -572,6 +572,17 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6f60, pci_invalid_bar);
|
||||
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fa0, pci_invalid_bar);
|
||||
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, pci_invalid_bar);
|
||||
|
||||
/*
|
||||
* Device [1022:7914]
|
||||
* When in D0, PME# doesn't get asserted when plugging USB 2.0 device.
|
||||
*/
|
||||
static void pci_fixup_amd_fch_xhci_pme(struct pci_dev *dev)
|
||||
{
|
||||
dev_info(&dev->dev, "PME# does not work under D0, disabling it\n");
|
||||
dev->pme_support &= ~(PCI_PM_CAP_PME_D0 >> PCI_PM_CAP_PME_SHIFT);
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7914, pci_fixup_amd_fch_xhci_pme);
|
||||
|
||||
/*
|
||||
* Apple MacBook Pro: Avoid [mem 0x7fa00000-0x7fbfffff]
|
||||
*
|
||||
|
||||
@@ -218,6 +218,8 @@ static int check_tlb_entry(unsigned w, unsigned e, bool dtlb)
|
||||
unsigned tlbidx = w | (e << PAGE_SHIFT);
|
||||
unsigned r0 = dtlb ?
|
||||
read_dtlb_virtual(tlbidx) : read_itlb_virtual(tlbidx);
|
||||
unsigned r1 = dtlb ?
|
||||
read_dtlb_translation(tlbidx) : read_itlb_translation(tlbidx);
|
||||
unsigned vpn = (r0 & PAGE_MASK) | (e << PAGE_SHIFT);
|
||||
unsigned pte = get_pte_for_vaddr(vpn);
|
||||
unsigned mm_asid = (get_rasid_register() >> 8) & ASID_MASK;
|
||||
@@ -233,8 +235,6 @@ static int check_tlb_entry(unsigned w, unsigned e, bool dtlb)
|
||||
}
|
||||
|
||||
if (tlb_asid == mm_asid) {
|
||||
unsigned r1 = dtlb ? read_dtlb_translation(tlbidx) :
|
||||
read_itlb_translation(tlbidx);
|
||||
if ((pte ^ r1) & PAGE_MASK) {
|
||||
pr_err("%cTLB: way: %u, entry: %u, mapping: %08x->%08x, PTE: %08x\n",
|
||||
dtlb ? 'D' : 'I', w, e, r0, r1, pte);
|
||||
|
||||
@@ -243,20 +243,25 @@ static ssize_t blk_mq_hw_sysfs_active_show(struct blk_mq_hw_ctx *hctx, char *pag
|
||||
|
||||
static ssize_t blk_mq_hw_sysfs_cpus_show(struct blk_mq_hw_ctx *hctx, char *page)
|
||||
{
|
||||
const size_t size = PAGE_SIZE - 1;
|
||||
unsigned int i, first = 1;
|
||||
ssize_t ret = 0;
|
||||
int ret = 0, pos = 0;
|
||||
|
||||
for_each_cpu(i, hctx->cpumask) {
|
||||
if (first)
|
||||
ret += sprintf(ret + page, "%u", i);
|
||||
ret = snprintf(pos + page, size - pos, "%u", i);
|
||||
else
|
||||
ret += sprintf(ret + page, ", %u", i);
|
||||
ret = snprintf(pos + page, size - pos, ", %u", i);
|
||||
|
||||
if (ret >= size - pos)
|
||||
break;
|
||||
|
||||
first = 0;
|
||||
pos += ret;
|
||||
}
|
||||
|
||||
ret += sprintf(ret + page, "\n");
|
||||
return ret;
|
||||
ret = snprintf(pos + page, size + 1 - pos, "\n");
|
||||
return pos + ret;
|
||||
}
|
||||
|
||||
static struct blk_mq_ctx_sysfs_entry blk_mq_sysfs_dispatched = {
|
||||
|
||||
@@ -269,8 +269,10 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
|
||||
drop_alg:
|
||||
crypto_mod_put(alg);
|
||||
|
||||
if (err)
|
||||
if (err) {
|
||||
kfree_skb(skb);
|
||||
return err;
|
||||
}
|
||||
|
||||
return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid);
|
||||
}
|
||||
|
||||
@@ -897,10 +897,11 @@ static void ecc_point_mult(struct ecc_point *result,
|
||||
static inline void ecc_swap_digits(const u64 *in, u64 *out,
|
||||
unsigned int ndigits)
|
||||
{
|
||||
const __be64 *src = (__force __be64 *)in;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ndigits; i++)
|
||||
out[i] = __swab64(in[ndigits - 1 - i]);
|
||||
out[i] = be64_to_cpu(src[ndigits - 1 - i]);
|
||||
}
|
||||
|
||||
int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
|
||||
|
||||
@@ -158,7 +158,7 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data)
|
||||
{
|
||||
acpi_status status;
|
||||
|
||||
if (!*data)
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
status = acpi_get_data(handle, acpi_bus_private_data_handler, data);
|
||||
|
||||
@@ -1096,9 +1096,19 @@ static void acpi_dev_pm_detach(struct device *dev, bool power_off)
|
||||
*/
|
||||
int acpi_dev_pm_attach(struct device *dev, bool power_on)
|
||||
{
|
||||
/*
|
||||
* Skip devices whose ACPI companions match the device IDs below,
|
||||
* because they require special power management handling incompatible
|
||||
* with the generic ACPI PM domain.
|
||||
*/
|
||||
static const struct acpi_device_id special_pm_ids[] = {
|
||||
{"PNP0C0B", }, /* Generic ACPI fan */
|
||||
{"INT3404", }, /* Fan */
|
||||
{}
|
||||
};
|
||||
struct acpi_device *adev = ACPI_COMPANION(dev);
|
||||
|
||||
if (!adev)
|
||||
if (!adev || !acpi_match_device_ids(adev, special_pm_ids))
|
||||
return -ENODEV;
|
||||
|
||||
if (dev->pm_domain)
|
||||
|
||||
@@ -375,19 +375,21 @@ void *__ref acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_os_map_memory);
|
||||
|
||||
static void acpi_os_drop_map_ref(struct acpi_ioremap *map)
|
||||
/* Must be called with mutex_lock(&acpi_ioremap_lock) */
|
||||
static unsigned long acpi_os_drop_map_ref(struct acpi_ioremap *map)
|
||||
{
|
||||
if (!--map->refcount)
|
||||
unsigned long refcount = --map->refcount;
|
||||
|
||||
if (!refcount)
|
||||
list_del_rcu(&map->list);
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static void acpi_os_map_cleanup(struct acpi_ioremap *map)
|
||||
{
|
||||
if (!map->refcount) {
|
||||
synchronize_rcu_expedited();
|
||||
acpi_unmap(map->phys, map->virt);
|
||||
kfree(map);
|
||||
}
|
||||
synchronize_rcu_expedited();
|
||||
acpi_unmap(map->phys, map->virt);
|
||||
kfree(map);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,6 +409,7 @@ static void acpi_os_map_cleanup(struct acpi_ioremap *map)
|
||||
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
||||
{
|
||||
struct acpi_ioremap *map;
|
||||
unsigned long refcount;
|
||||
|
||||
if (!acpi_gbl_permanent_mmap) {
|
||||
__acpi_unmap_table(virt, size);
|
||||
@@ -420,10 +423,11 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
||||
WARN(true, PREFIX "%s: bad address %p\n", __func__, virt);
|
||||
return;
|
||||
}
|
||||
acpi_os_drop_map_ref(map);
|
||||
refcount = acpi_os_drop_map_ref(map);
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
|
||||
acpi_os_map_cleanup(map);
|
||||
if (!refcount)
|
||||
acpi_os_map_cleanup(map);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_os_unmap_iomem);
|
||||
|
||||
@@ -464,6 +468,7 @@ void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
|
||||
{
|
||||
u64 addr;
|
||||
struct acpi_ioremap *map;
|
||||
unsigned long refcount;
|
||||
|
||||
if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
|
||||
return;
|
||||
@@ -479,10 +484,11 @@ void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
return;
|
||||
}
|
||||
acpi_os_drop_map_ref(map);
|
||||
refcount = acpi_os_drop_map_ref(map);
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
|
||||
acpi_os_map_cleanup(map);
|
||||
if (!refcount)
|
||||
acpi_os_map_cleanup(map);
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_os_unmap_generic_address);
|
||||
|
||||
|
||||
@@ -1025,8 +1025,10 @@ static void rsxx_pci_remove(struct pci_dev *dev)
|
||||
|
||||
cancel_work_sync(&card->event_work);
|
||||
|
||||
destroy_workqueue(card->event_wq);
|
||||
rsxx_destroy_dev(card);
|
||||
rsxx_dma_destroy(card);
|
||||
destroy_workqueue(card->creg_ctrl.creg_wq);
|
||||
|
||||
spin_lock_irqsave(&card->irq_lock, flags);
|
||||
rsxx_disable_ier_and_isr(card, CR_INTR_ALL);
|
||||
|
||||
@@ -624,20 +624,27 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
if (copy_from_user(time32, argp, sizeof(time32)))
|
||||
return -EFAULT;
|
||||
|
||||
if ((time32[0] < 0) || (time32[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
return pp_set_timeout(pp->pdev, time32[0], time32[1]);
|
||||
|
||||
case PPSETTIME64:
|
||||
if (copy_from_user(time64, argp, sizeof(time64)))
|
||||
return -EFAULT;
|
||||
|
||||
if ((time64[0] < 0) || (time64[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall())
|
||||
time64[1] >>= 32;
|
||||
|
||||
return pp_set_timeout(pp->pdev, time64[0], time64[1]);
|
||||
|
||||
case PPGETTIME32:
|
||||
jiffies_to_timespec64(pp->pdev->timeout, &ts);
|
||||
time32[0] = ts.tv_sec;
|
||||
time32[1] = ts.tv_nsec / NSEC_PER_USEC;
|
||||
if ((time32[0] < 0) || (time32[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_to_user(argp, time32, sizeof(time32)))
|
||||
return -EFAULT;
|
||||
@@ -648,8 +655,9 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
jiffies_to_timespec64(pp->pdev->timeout, &ts);
|
||||
time64[0] = ts.tv_sec;
|
||||
time64[1] = ts.tv_nsec / NSEC_PER_USEC;
|
||||
if ((time64[0] < 0) || (time64[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall())
|
||||
time64[1] <<= 32;
|
||||
|
||||
if (copy_to_user(argp, time64, sizeof(time64)))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -361,8 +361,8 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
|
||||
RK2928_CLKGATE_CON(2), 5, GFLAGS),
|
||||
MUX(SCLK_MAC, "sclk_macref", mux_sclk_macref_p, CLK_SET_RATE_PARENT,
|
||||
RK2928_CLKSEL_CON(21), 4, 1, MFLAGS),
|
||||
GATE(0, "sclk_mac_lbtest", "sclk_macref",
|
||||
RK2928_CLKGATE_CON(2), 12, 0, GFLAGS),
|
||||
GATE(0, "sclk_mac_lbtest", "sclk_macref", 0,
|
||||
RK2928_CLKGATE_CON(2), 12, GFLAGS),
|
||||
|
||||
COMPOSITE(0, "hsadc_src", mux_pll_src_gpll_cpll_p, 0,
|
||||
RK2928_CLKSEL_CON(22), 0, 1, MFLAGS, 8, 8, DFLAGS,
|
||||
@@ -390,8 +390,8 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
|
||||
* Clock-Architecture Diagram 4
|
||||
*/
|
||||
|
||||
GATE(SCLK_SMC, "sclk_smc", "hclk_peri",
|
||||
RK2928_CLKGATE_CON(2), 4, 0, GFLAGS),
|
||||
GATE(SCLK_SMC, "sclk_smc", "hclk_peri", 0,
|
||||
RK2928_CLKGATE_CON(2), 4, GFLAGS),
|
||||
|
||||
COMPOSITE_NOMUX(SCLK_SPI0, "sclk_spi0", "pclk_peri", 0,
|
||||
RK2928_CLKSEL_CON(25), 0, 7, DFLAGS,
|
||||
|
||||
@@ -458,7 +458,7 @@ static const char * const csi_sclk_parents[] = { "pll-periph0", "pll-periph1" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(csi_sclk_clk, "csi-sclk", csi_sclk_parents,
|
||||
0x134, 16, 4, 24, 3, BIT(31), 0);
|
||||
|
||||
static const char * const csi_mclk_parents[] = { "osc24M", "pll-video", "pll-periph0" };
|
||||
static const char * const csi_mclk_parents[] = { "osc24M", "pll-video", "pll-periph1" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(csi_mclk_clk, "csi-mclk", csi_mclk_parents,
|
||||
0x134, 0, 5, 8, 3, BIT(15), 0);
|
||||
|
||||
|
||||
@@ -61,25 +61,24 @@ static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv)
|
||||
* __cpuidle_set_driver - set per CPU driver variables for the given driver.
|
||||
* @drv: a valid pointer to a struct cpuidle_driver
|
||||
*
|
||||
* For each CPU in the driver's cpumask, unset the registered driver per CPU
|
||||
* to @drv.
|
||||
*
|
||||
* Returns 0 on success, -EBUSY if the CPUs have driver(s) already.
|
||||
* Returns 0 on success, -EBUSY if any CPU in the cpumask have a driver
|
||||
* different from drv already.
|
||||
*/
|
||||
static inline int __cpuidle_set_driver(struct cpuidle_driver *drv)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for_each_cpu(cpu, drv->cpumask) {
|
||||
struct cpuidle_driver *old_drv;
|
||||
|
||||
if (__cpuidle_get_cpu_driver(cpu)) {
|
||||
__cpuidle_unset_driver(drv);
|
||||
old_drv = __cpuidle_get_cpu_driver(cpu);
|
||||
if (old_drv && old_drv != drv)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
per_cpu(cpuidle_drivers, cpu) = drv;
|
||||
}
|
||||
|
||||
for_each_cpu(cpu, drv->cpumask)
|
||||
per_cpu(cpuidle_drivers, cpu) = drv;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -400,12 +400,8 @@ static u32 crypto4xx_build_sdr(struct crypto4xx_device *dev)
|
||||
dma_alloc_coherent(dev->core_dev->device,
|
||||
dev->scatter_buffer_size * PPC4XX_NUM_SD,
|
||||
&dev->scatter_buffer_pa, GFP_ATOMIC);
|
||||
if (!dev->scatter_buffer_va) {
|
||||
dma_free_coherent(dev->core_dev->device,
|
||||
sizeof(struct ce_sd) * PPC4XX_NUM_SD,
|
||||
dev->sdr, dev->sdr_pa);
|
||||
if (!dev->scatter_buffer_va)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
sd_array = dev->sdr;
|
||||
|
||||
|
||||
@@ -309,6 +309,7 @@ static struct ccp_dma_desc *ccp_alloc_dma_desc(struct ccp_dma_chan *chan,
|
||||
desc->tx_desc.flags = flags;
|
||||
desc->tx_desc.tx_submit = ccp_tx_submit;
|
||||
desc->ccp = chan->ccp;
|
||||
INIT_LIST_HEAD(&desc->entry);
|
||||
INIT_LIST_HEAD(&desc->pending);
|
||||
INIT_LIST_HEAD(&desc->active);
|
||||
desc->status = DMA_IN_PROGRESS;
|
||||
|
||||
@@ -135,6 +135,7 @@ int devfreq_update_status(struct devfreq *devfreq, unsigned long freq)
|
||||
int lev, prev_lev, ret = 0;
|
||||
unsigned long cur_time;
|
||||
|
||||
lockdep_assert_held(&devfreq->lock);
|
||||
cur_time = jiffies;
|
||||
|
||||
/* Immediately exit if previous_freq is not initialized yet. */
|
||||
@@ -1170,12 +1171,17 @@ static ssize_t trans_stat_show(struct device *dev,
|
||||
int i, j;
|
||||
unsigned int max_state = devfreq->profile->max_state;
|
||||
|
||||
if (!devfreq->stop_polling &&
|
||||
devfreq_update_status(devfreq, devfreq->previous_freq))
|
||||
return 0;
|
||||
if (max_state == 0)
|
||||
return sprintf(buf, "Not Supported.\n");
|
||||
|
||||
mutex_lock(&devfreq->lock);
|
||||
if (!devfreq->stop_polling &&
|
||||
devfreq_update_status(devfreq, devfreq->previous_freq)) {
|
||||
mutex_unlock(&devfreq->lock);
|
||||
return 0;
|
||||
}
|
||||
mutex_unlock(&devfreq->lock);
|
||||
|
||||
len = sprintf(buf, " From : To\n");
|
||||
len += sprintf(buf + len, " :");
|
||||
for (i = 0; i < max_state; i++)
|
||||
|
||||
@@ -204,7 +204,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
||||
a_fences = get_fences(a, &a_num_fences);
|
||||
b_fences = get_fences(b, &b_num_fences);
|
||||
if (a_num_fences > INT_MAX - b_num_fences)
|
||||
return NULL;
|
||||
goto err;
|
||||
|
||||
num_fences = a_num_fences + b_num_fences;
|
||||
|
||||
|
||||
@@ -1797,13 +1797,10 @@ static struct dma_chan *coh901318_xlate(struct of_phandle_args *dma_spec,
|
||||
static int coh901318_config(struct coh901318_chan *cohc,
|
||||
struct coh901318_params *param)
|
||||
{
|
||||
unsigned long flags;
|
||||
const struct coh901318_params *p;
|
||||
int channel = cohc->id;
|
||||
void __iomem *virtbase = cohc->base->virtbase;
|
||||
|
||||
spin_lock_irqsave(&cohc->lock, flags);
|
||||
|
||||
if (param)
|
||||
p = param;
|
||||
else
|
||||
@@ -1823,8 +1820,6 @@ static int coh901318_config(struct coh901318_chan *cohc,
|
||||
coh901318_set_conf(cohc, p->config);
|
||||
coh901318_set_ctrl(cohc, p->ctrl_lli_last);
|
||||
|
||||
spin_unlock_irqrestore(&cohc->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -321,12 +321,10 @@ static int max8997_muic_handle_usb(struct max8997_muic_info *info,
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (usb_type == MAX8997_USB_HOST) {
|
||||
ret = max8997_muic_set_path(info, info->path_usb, attached);
|
||||
if (ret < 0) {
|
||||
dev_err(info->dev, "failed to update muic register\n");
|
||||
return ret;
|
||||
}
|
||||
ret = max8997_muic_set_path(info, info->path_usb, attached);
|
||||
if (ret < 0) {
|
||||
dev_err(info->dev, "failed to update muic register\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (usb_type) {
|
||||
|
||||
@@ -158,7 +158,7 @@ static int qcom_scm_call(struct device *dev, u32 svc_id, u32 cmd_id,
|
||||
kfree(args_virt);
|
||||
}
|
||||
|
||||
if (res->a0 < 0)
|
||||
if ((long)res->a0 < 0)
|
||||
return qcom_scm_remap_error(res->a0);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -723,7 +723,7 @@ static void i810_dma_dispatch_vertex(struct drm_device *dev,
|
||||
if (nbox > I810_NR_SAREA_CLIPRECTS)
|
||||
nbox = I810_NR_SAREA_CLIPRECTS;
|
||||
|
||||
if (used > 4 * 1024)
|
||||
if (used < 0 || used > 4 * 1024)
|
||||
used = 0;
|
||||
|
||||
if (sarea_priv->dirty)
|
||||
@@ -1043,7 +1043,7 @@ static void i810_dma_dispatch_mc(struct drm_device *dev, struct drm_buf *buf, in
|
||||
if (u != I810_BUF_CLIENT)
|
||||
DRM_DEBUG("MC found buffer that isn't mine!\n");
|
||||
|
||||
if (used > 4 * 1024)
|
||||
if (used < 0 || used > 4 * 1024)
|
||||
used = 0;
|
||||
|
||||
sarea_priv->dirty = 0x7f;
|
||||
|
||||
@@ -1824,8 +1824,8 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
|
||||
track->textures[i].use_pitch = 1;
|
||||
} else {
|
||||
track->textures[i].use_pitch = 0;
|
||||
track->textures[i].width = 1 << ((idx_value >> RADEON_TXFORMAT_WIDTH_SHIFT) & RADEON_TXFORMAT_WIDTH_MASK);
|
||||
track->textures[i].height = 1 << ((idx_value >> RADEON_TXFORMAT_HEIGHT_SHIFT) & RADEON_TXFORMAT_HEIGHT_MASK);
|
||||
track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH_SHIFT);
|
||||
track->textures[i].height = 1 << ((idx_value & RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEIGHT_SHIFT);
|
||||
}
|
||||
if (idx_value & RADEON_TXFORMAT_CUBIC_MAP_ENABLE)
|
||||
track->textures[i].tex_coord_type = 2;
|
||||
|
||||
@@ -476,8 +476,8 @@ int r200_packet0_check(struct radeon_cs_parser *p,
|
||||
track->textures[i].use_pitch = 1;
|
||||
} else {
|
||||
track->textures[i].use_pitch = 0;
|
||||
track->textures[i].width = 1 << ((idx_value >> RADEON_TXFORMAT_WIDTH_SHIFT) & RADEON_TXFORMAT_WIDTH_MASK);
|
||||
track->textures[i].height = 1 << ((idx_value >> RADEON_TXFORMAT_HEIGHT_SHIFT) & RADEON_TXFORMAT_HEIGHT_MASK);
|
||||
track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH_SHIFT);
|
||||
track->textures[i].height = 1 << ((idx_value & RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEIGHT_SHIFT);
|
||||
}
|
||||
if (idx_value & R200_TXFORMAT_LOOKUP_DISABLE)
|
||||
track->textures[i].lookup_disable = true;
|
||||
|
||||
@@ -667,10 +667,13 @@ static ssize_t cyc_threshold_store(struct device *dev,
|
||||
|
||||
if (kstrtoul(buf, 16, &val))
|
||||
return -EINVAL;
|
||||
|
||||
/* mask off max threshold before checking min value */
|
||||
val &= ETM_CYC_THRESHOLD_MASK;
|
||||
if (val < drvdata->ccitmin)
|
||||
return -EINVAL;
|
||||
|
||||
config->ccctlr = val & ETM_CYC_THRESHOLD_MASK;
|
||||
config->ccctlr = val;
|
||||
return size;
|
||||
}
|
||||
static DEVICE_ATTR_RW(cyc_threshold);
|
||||
@@ -701,14 +704,16 @@ static ssize_t bb_ctrl_store(struct device *dev,
|
||||
return -EINVAL;
|
||||
if (!drvdata->nr_addr_cmp)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Bit[7:0] selects which address range comparator is used for
|
||||
* branch broadcast control.
|
||||
* Bit[8] controls include(1) / exclude(0), bits[0-7] select
|
||||
* individual range comparators. If include then at least 1
|
||||
* range must be selected.
|
||||
*/
|
||||
if (BMVAL(val, 0, 7) > drvdata->nr_addr_cmp)
|
||||
if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0))
|
||||
return -EINVAL;
|
||||
|
||||
config->bb_ctrl = val;
|
||||
config->bb_ctrl = val & GENMASK(8, 0);
|
||||
return size;
|
||||
}
|
||||
static DEVICE_ATTR_RW(bb_ctrl);
|
||||
@@ -1341,8 +1346,8 @@ static ssize_t seq_event_store(struct device *dev,
|
||||
|
||||
spin_lock(&drvdata->spinlock);
|
||||
idx = config->seq_idx;
|
||||
/* RST, bits[7:0] */
|
||||
config->seq_ctrl[idx] = val & 0xFF;
|
||||
/* Seq control has two masks B[15:8] F[7:0] */
|
||||
config->seq_ctrl[idx] = val & 0xFFFF;
|
||||
spin_unlock(&drvdata->spinlock);
|
||||
return size;
|
||||
}
|
||||
@@ -1597,7 +1602,7 @@ static ssize_t res_ctrl_store(struct device *dev,
|
||||
if (idx % 2 != 0)
|
||||
/* PAIRINV, bit[21] */
|
||||
val &= ~BIT(21);
|
||||
config->res_ctrl[idx] = val;
|
||||
config->res_ctrl[idx] = val & GENMASK(21, 0);
|
||||
spin_unlock(&drvdata->spinlock);
|
||||
return size;
|
||||
}
|
||||
|
||||
@@ -1088,7 +1088,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
|
||||
/* Get I2C clock */
|
||||
i2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(i2c_imx->clk)) {
|
||||
dev_err(&pdev->dev, "can't get I2C clock\n");
|
||||
if (PTR_ERR(i2c_imx->clk) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "can't get I2C clock\n");
|
||||
return PTR_ERR(i2c_imx->clk);
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
|
||||
*val2 = 65536;
|
||||
return IIO_VAL_FRACTIONAL;
|
||||
} else {
|
||||
*val = 100;
|
||||
*val = 100000;
|
||||
*val2 = 65536;
|
||||
return IIO_VAL_FRACTIONAL;
|
||||
}
|
||||
|
||||
@@ -724,6 +724,7 @@ static const struct iio_info adis16480_info = {
|
||||
.write_raw = &adis16480_write_raw,
|
||||
.update_scan_mode = adis_update_scan_mode,
|
||||
.driver_module = THIS_MODULE,
|
||||
.debugfs_reg_access = adis_debugfs_reg_access,
|
||||
};
|
||||
|
||||
static int adis16480_stop_device(struct iio_dev *indio_dev)
|
||||
|
||||
@@ -52,7 +52,7 @@ enum {
|
||||
|
||||
#define HNS_ROCE_HEM_CHUNK_LEN \
|
||||
((256 - sizeof(struct list_head) - 2 * sizeof(int)) / \
|
||||
(sizeof(struct scatterlist)))
|
||||
(sizeof(struct scatterlist) + sizeof(void *)))
|
||||
|
||||
enum {
|
||||
HNS_ROCE_HEM_PAGE_SHIFT = 12,
|
||||
|
||||
@@ -352,16 +352,12 @@ err:
|
||||
|
||||
static void get_name(struct mlx4_ib_dev *dev, char *name, int i, int max)
|
||||
{
|
||||
char base_name[9];
|
||||
|
||||
/* pci_name format is: bus:dev:func -> xxxx:yy:zz.n */
|
||||
strlcpy(name, pci_name(dev->dev->persist->pdev), max);
|
||||
strncpy(base_name, name, 8); /*till xxxx:yy:*/
|
||||
base_name[8] = '\0';
|
||||
/* with no ARI only 3 last bits are used so when the fn is higher than 8
|
||||
/* pci_name format is: bus:dev:func -> xxxx:yy:zz.n
|
||||
* with no ARI only 3 last bits are used so when the fn is higher than 8
|
||||
* need to add it to the dev num, so count in the last number will be
|
||||
* modulo 8 */
|
||||
sprintf(name, "%s%.2d.%d", base_name, (i/8), (i%8));
|
||||
snprintf(name, max, "%.8s%.2d.%d", pci_name(dev->dev->persist->pdev),
|
||||
i / 8, i % 8);
|
||||
}
|
||||
|
||||
struct mlx4_port {
|
||||
|
||||
@@ -301,6 +301,9 @@ static ssize_t qib_portattr_show(struct kobject *kobj,
|
||||
struct qib_pportdata *ppd =
|
||||
container_of(kobj, struct qib_pportdata, pport_kobj);
|
||||
|
||||
if (!pattr->show)
|
||||
return -EIO;
|
||||
|
||||
return pattr->show(ppd, buf);
|
||||
}
|
||||
|
||||
@@ -312,6 +315,9 @@ static ssize_t qib_portattr_store(struct kobject *kobj,
|
||||
struct qib_pportdata *ppd =
|
||||
container_of(kobj, struct qib_pportdata, pport_kobj);
|
||||
|
||||
if (!pattr->store)
|
||||
return -EIO;
|
||||
|
||||
return pattr->store(ppd, buf, len);
|
||||
}
|
||||
|
||||
|
||||
@@ -1972,11 +1972,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
|
||||
|
||||
/* get sysinfo */
|
||||
md->si = &cd->sysinfo;
|
||||
if (!md->si) {
|
||||
dev_err(dev, "%s: Fail get sysinfo pointer from core p=%p\n",
|
||||
__func__, md->si);
|
||||
goto error_get_sysinfo;
|
||||
}
|
||||
|
||||
rc = cyttsp4_setup_input_device(cd);
|
||||
if (rc)
|
||||
@@ -1986,8 +1981,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
|
||||
|
||||
error_init_input:
|
||||
input_free_device(md->input);
|
||||
error_get_sysinfo:
|
||||
input_set_drvdata(md->input, NULL);
|
||||
error_alloc_failed:
|
||||
dev_err(dev, "%s failed.\n", __func__);
|
||||
return rc;
|
||||
|
||||
@@ -89,6 +89,15 @@ static const unsigned long goodix_irq_flags[] = {
|
||||
*/
|
||||
static const struct dmi_system_id rotated_screen[] = {
|
||||
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
||||
{
|
||||
.ident = "Teclast X89",
|
||||
.matches = {
|
||||
/* tPAD is too generic, also match on bios date */
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
|
||||
DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "WinBook TW100",
|
||||
.matches = {
|
||||
|
||||
@@ -574,8 +574,7 @@ static int gigaset_initcshw(struct cardstate *cs)
|
||||
{
|
||||
struct usb_cardstate *ucs;
|
||||
|
||||
cs->hw.usb = ucs =
|
||||
kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL);
|
||||
cs->hw.usb = ucs = kzalloc(sizeof(struct usb_cardstate), GFP_KERNEL);
|
||||
if (!ucs) {
|
||||
pr_err("out of memory\n");
|
||||
return -ENOMEM;
|
||||
@@ -587,9 +586,6 @@ static int gigaset_initcshw(struct cardstate *cs)
|
||||
ucs->bchars[3] = 0;
|
||||
ucs->bchars[4] = 0x11;
|
||||
ucs->bchars[5] = 0x13;
|
||||
ucs->bulk_out_buffer = NULL;
|
||||
ucs->bulk_out_urb = NULL;
|
||||
ucs->read_urb = NULL;
|
||||
tasklet_init(&cs->write_tasklet,
|
||||
gigaset_modem_fill, (unsigned long) cs);
|
||||
|
||||
@@ -688,6 +684,11 @@ static int gigaset_probe(struct usb_interface *interface,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (hostif->desc.bNumEndpoints < 2) {
|
||||
dev_err(&interface->dev, "missing endpoints\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dev_info(&udev->dev, "%s: Device matched ... !\n", __func__);
|
||||
|
||||
/* allocate memory for our device state and initialize it */
|
||||
@@ -707,6 +708,12 @@ static int gigaset_probe(struct usb_interface *interface,
|
||||
|
||||
endpoint = &hostif->endpoint[0].desc;
|
||||
|
||||
if (!usb_endpoint_is_bulk_out(endpoint)) {
|
||||
dev_err(&interface->dev, "missing bulk-out endpoint\n");
|
||||
retval = -ENODEV;
|
||||
goto error;
|
||||
}
|
||||
|
||||
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
|
||||
ucs->bulk_out_size = buffer_size;
|
||||
ucs->bulk_out_epnum = usb_endpoint_num(endpoint);
|
||||
@@ -726,6 +733,12 @@ static int gigaset_probe(struct usb_interface *interface,
|
||||
|
||||
endpoint = &hostif->endpoint[1].desc;
|
||||
|
||||
if (!usb_endpoint_is_int_in(endpoint)) {
|
||||
dev_err(&interface->dev, "missing int-in endpoint\n");
|
||||
retval = -ENODEV;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ucs->busy = 0;
|
||||
|
||||
ucs->read_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
|
||||
@@ -203,7 +203,13 @@ static void __rebalance2(struct dm_btree_info *info, struct btree_node *parent,
|
||||
struct btree_node *right = r->n;
|
||||
uint32_t nr_left = le32_to_cpu(left->header.nr_entries);
|
||||
uint32_t nr_right = le32_to_cpu(right->header.nr_entries);
|
||||
unsigned threshold = 2 * merge_threshold(left) + 1;
|
||||
/*
|
||||
* Ensure the number of entries in each child will be greater
|
||||
* than or equal to (max_entries / 3 + 1), so no matter which
|
||||
* child is used for removal, the number will still be not
|
||||
* less than (max_entries / 3).
|
||||
*/
|
||||
unsigned int threshold = 2 * (merge_threshold(left) + 1);
|
||||
|
||||
if (nr_left + nr_right < threshold) {
|
||||
/*
|
||||
|
||||
@@ -651,8 +651,7 @@ static int bdisp_release(struct file *file)
|
||||
|
||||
dev_dbg(bdisp->dev, "%s\n", __func__);
|
||||
|
||||
if (mutex_lock_interruptible(&bdisp->lock))
|
||||
return -ERESTARTSYS;
|
||||
mutex_lock(&bdisp->lock);
|
||||
|
||||
v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
|
||||
|
||||
|
||||
@@ -1149,8 +1149,7 @@ static int wl1273_fm_fops_release(struct file *file)
|
||||
if (radio->rds_users > 0) {
|
||||
radio->rds_users--;
|
||||
if (radio->rds_users == 0) {
|
||||
if (mutex_lock_interruptible(&core->lock))
|
||||
return -EINTR;
|
||||
mutex_lock(&core->lock);
|
||||
|
||||
radio->irq_flags &= ~WL1273_RDS_EVENT;
|
||||
|
||||
|
||||
@@ -166,7 +166,11 @@ int stk_camera_read_reg(struct stk_camera *dev, u16 index, u8 *value)
|
||||
*value = *buf;
|
||||
|
||||
kfree(buf);
|
||||
return ret;
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int stk_start_stream(struct stk_camera *dev)
|
||||
|
||||
@@ -2176,8 +2176,7 @@ static int altera_get_note(u8 *p, s32 program_size,
|
||||
key_ptr = &p[note_strings +
|
||||
get_unaligned_be32(
|
||||
&p[note_table + (8 * i)])];
|
||||
if ((strncasecmp(key, key_ptr, strlen(key_ptr)) == 0) &&
|
||||
(key != NULL)) {
|
||||
if (key && !strncasecmp(key, key_ptr, strlen(key_ptr))) {
|
||||
status = 0;
|
||||
|
||||
value_ptr = &p[note_strings +
|
||||
|
||||
@@ -1700,6 +1700,36 @@ static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card)
|
||||
|
||||
if (mmc_pdata(host)->init_card)
|
||||
mmc_pdata(host)->init_card(card);
|
||||
else if (card->type == MMC_TYPE_SDIO ||
|
||||
card->type == MMC_TYPE_SD_COMBO) {
|
||||
struct device_node *np = mmc_dev(mmc)->of_node;
|
||||
|
||||
/*
|
||||
* REVISIT: should be moved to sdio core and made more
|
||||
* general e.g. by expanding the DT bindings of child nodes
|
||||
* to provide a mechanism to provide this information:
|
||||
* Documentation/devicetree/bindings/mmc/mmc-card.txt
|
||||
*/
|
||||
|
||||
np = of_get_compatible_child(np, "ti,wl1251");
|
||||
if (np) {
|
||||
/*
|
||||
* We have TI wl1251 attached to MMC3. Pass this
|
||||
* information to the SDIO core because it can't be
|
||||
* probed by normal methods.
|
||||
*/
|
||||
|
||||
dev_info(host->dev, "found wl1251\n");
|
||||
card->quirks |= MMC_QUIRK_NONSTD_SDIO;
|
||||
card->cccr.wide_bus = 1;
|
||||
card->cis.vendor = 0x104c;
|
||||
card->cis.device = 0x9066;
|
||||
card->cis.blksize = 512;
|
||||
card->cis.max_dtr = 24000000;
|
||||
card->ocr = 0x80;
|
||||
of_node_put(np);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
|
||||
|
||||
@@ -595,6 +595,26 @@ static int spear_mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The purpose of this function is to ensure a memcpy_toio() with byte writes
|
||||
* only. Its structure is inspired from the ARM implementation of _memcpy_toio()
|
||||
* which also does single byte writes but cannot be used here as this is just an
|
||||
* implementation detail and not part of the API. Not mentioning the comment
|
||||
* stating that _memcpy_toio() should be optimized.
|
||||
*/
|
||||
static void spear_smi_memcpy_toio_b(volatile void __iomem *dest,
|
||||
const void *src, size_t len)
|
||||
{
|
||||
const unsigned char *from = src;
|
||||
|
||||
while (len) {
|
||||
len--;
|
||||
writeb(*from, dest);
|
||||
from++;
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int spear_smi_cpy_toio(struct spear_smi *dev, u32 bank,
|
||||
void __iomem *dest, const void *src, size_t len)
|
||||
{
|
||||
@@ -617,7 +637,23 @@ static inline int spear_smi_cpy_toio(struct spear_smi *dev, u32 bank,
|
||||
ctrlreg1 = readl(dev->io_base + SMI_CR1);
|
||||
writel((ctrlreg1 | WB_MODE) & ~SW_MODE, dev->io_base + SMI_CR1);
|
||||
|
||||
memcpy_toio(dest, src, len);
|
||||
/*
|
||||
* In Write Burst mode (WB_MODE), the specs states that writes must be:
|
||||
* - incremental
|
||||
* - of the same size
|
||||
* The ARM implementation of memcpy_toio() will optimize the number of
|
||||
* I/O by using as much 4-byte writes as possible, surrounded by
|
||||
* 2-byte/1-byte access if:
|
||||
* - the destination is not 4-byte aligned
|
||||
* - the length is not a multiple of 4-byte.
|
||||
* Avoid this alternance of write access size by using our own 'byte
|
||||
* access' helper if at least one of the two conditions above is true.
|
||||
*/
|
||||
if (IS_ALIGNED(len, sizeof(u32)) &&
|
||||
IS_ALIGNED((uintptr_t)dest, sizeof(u32)))
|
||||
memcpy_toio(dest, src, len);
|
||||
else
|
||||
spear_smi_memcpy_toio_b(dest, src, len);
|
||||
|
||||
writel(ctrlreg1, dev->io_base + SMI_CR1);
|
||||
|
||||
|
||||
@@ -613,6 +613,7 @@ err_free_chan:
|
||||
sl->tty = NULL;
|
||||
tty->disc_data = NULL;
|
||||
clear_bit(SLF_INUSE, &sl->flags);
|
||||
slc_free_netdev(sl->dev);
|
||||
free_netdev(sl->dev);
|
||||
|
||||
err_exit:
|
||||
|
||||
@@ -718,6 +718,10 @@ static int adapter_up(struct adapter *adapter)
|
||||
|
||||
if (adapter->flags & USING_MSIX)
|
||||
name_msix_vecs(adapter);
|
||||
|
||||
/* Initialize hash mac addr list*/
|
||||
INIT_LIST_HEAD(&adapter->mac_hlist);
|
||||
|
||||
adapter->flags |= FULL_INIT_DONE;
|
||||
}
|
||||
|
||||
@@ -743,8 +747,6 @@ static int adapter_up(struct adapter *adapter)
|
||||
enable_rx(adapter);
|
||||
t4vf_sge_start(adapter);
|
||||
|
||||
/* Initialize hash mac addr list*/
|
||||
INIT_LIST_HEAD(&adapter->mac_hlist);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -780,6 +780,7 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct net_device *dev;
|
||||
struct ep93xx_priv *ep;
|
||||
struct resource *mem;
|
||||
|
||||
dev = platform_get_drvdata(pdev);
|
||||
if (dev == NULL)
|
||||
@@ -795,8 +796,8 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
|
||||
iounmap(ep->base_addr);
|
||||
|
||||
if (ep->res != NULL) {
|
||||
release_resource(ep->res);
|
||||
kfree(ep->res);
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(mem->start, resource_size(mem));
|
||||
}
|
||||
|
||||
free_netdev(dev);
|
||||
|
||||
@@ -1370,8 +1370,8 @@ static inline int e100_load_ucode_wait(struct nic *nic)
|
||||
|
||||
fw = e100_request_firmware(nic);
|
||||
/* If it's NULL, then no ucode is required */
|
||||
if (!fw || IS_ERR(fw))
|
||||
return PTR_ERR(fw);
|
||||
if (IS_ERR_OR_NULL(fw))
|
||||
return PTR_ERR_OR_ZERO(fw);
|
||||
|
||||
if ((err = e100_exec_cb(nic, (void *)fw, e100_setup_ucode)))
|
||||
netif_err(nic, probe, nic->netdev,
|
||||
|
||||
@@ -198,7 +198,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
|
||||
for (i = 0; i < dev->caps.num_ports - 1; i++) {
|
||||
if (port_type[i] != port_type[i + 1]) {
|
||||
mlx4_err(dev, "Only same port types supported on this HCA, aborting\n");
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,7 +207,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
|
||||
if (!(port_type[i] & dev->caps.supported_type[i+1])) {
|
||||
mlx4_err(dev, "Requested port type for port %d is not supported on this HCA\n",
|
||||
i + 1);
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -1122,8 +1122,7 @@ static int __set_port_type(struct mlx4_port_info *info,
|
||||
mlx4_err(mdev,
|
||||
"Requested port type for port %d is not supported on this HCA\n",
|
||||
info->port);
|
||||
err = -EINVAL;
|
||||
goto err_sup;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
mlx4_stop_sense(mdev);
|
||||
@@ -1145,7 +1144,7 @@ static int __set_port_type(struct mlx4_port_info *info,
|
||||
for (i = 1; i <= mdev->caps.num_ports; i++) {
|
||||
if (mdev->caps.possible_type[i] == MLX4_PORT_TYPE_AUTO) {
|
||||
mdev->caps.possible_type[i] = mdev->caps.port_type[i];
|
||||
err = -EINVAL;
|
||||
err = -EOPNOTSUPP;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1171,7 +1170,7 @@ static int __set_port_type(struct mlx4_port_info *info,
|
||||
out:
|
||||
mlx4_start_sense(mdev);
|
||||
mutex_unlock(&priv->port_mutex);
|
||||
err_sup:
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -1368,7 +1368,7 @@ static int mlx5e_get_module_info(struct net_device *netdev,
|
||||
break;
|
||||
case MLX5_MODULE_ID_SFP:
|
||||
modinfo->type = ETH_MODULE_SFF_8472;
|
||||
modinfo->eeprom_len = MLX5_EEPROM_PAGE_LENGTH;
|
||||
modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
|
||||
break;
|
||||
default:
|
||||
netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n",
|
||||
|
||||
@@ -125,7 +125,7 @@ void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type)
|
||||
if (!is_event_type_allowed((rsn >> MLX5_USER_INDEX_LEN), event_type)) {
|
||||
mlx5_core_warn(dev, "event 0x%.2x is not allowed on resource 0x%.8x\n",
|
||||
event_type, rsn);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
switch (common->res) {
|
||||
@@ -139,7 +139,7 @@ void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type)
|
||||
default:
|
||||
mlx5_core_warn(dev, "invalid resource type for 0x%x\n", rsn);
|
||||
}
|
||||
|
||||
out:
|
||||
mlx5_core_put_rsc(common);
|
||||
}
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ struct dma_features {
|
||||
struct stmmac_desc_ops {
|
||||
/* DMA RX descriptor ring initialization */
|
||||
void (*init_rx_desc) (struct dma_desc *p, int disable_rx_ic, int mode,
|
||||
int end);
|
||||
int end, int bfsize);
|
||||
/* DMA TX descriptor ring initialization */
|
||||
void (*init_tx_desc) (struct dma_desc *p, int mode, int end);
|
||||
|
||||
|
||||
@@ -33,11 +33,14 @@
|
||||
/* Specific functions used for Ring mode */
|
||||
|
||||
/* Enhanced descriptors */
|
||||
static inline void ehn_desc_rx_set_on_ring(struct dma_desc *p, int end)
|
||||
static inline void ehn_desc_rx_set_on_ring(struct dma_desc *p, int end,
|
||||
int bfsize)
|
||||
{
|
||||
p->des1 |= cpu_to_le32(((BUF_SIZE_8KiB - 1)
|
||||
<< ERDES1_BUFFER2_SIZE_SHIFT)
|
||||
& ERDES1_BUFFER2_SIZE_MASK);
|
||||
if (bfsize == BUF_SIZE_16KiB)
|
||||
p->des1 |= cpu_to_le32((BUF_SIZE_8KiB
|
||||
<< ERDES1_BUFFER2_SIZE_SHIFT)
|
||||
& ERDES1_BUFFER2_SIZE_MASK);
|
||||
|
||||
|
||||
if (end)
|
||||
p->des1 |= cpu_to_le32(ERDES1_END_RING);
|
||||
@@ -63,11 +66,15 @@ static inline void enh_set_tx_desc_len_on_ring(struct dma_desc *p, int len)
|
||||
}
|
||||
|
||||
/* Normal descriptors */
|
||||
static inline void ndesc_rx_set_on_ring(struct dma_desc *p, int end)
|
||||
static inline void ndesc_rx_set_on_ring(struct dma_desc *p, int end, int bfsize)
|
||||
{
|
||||
p->des1 |= cpu_to_le32(((BUF_SIZE_2KiB - 1)
|
||||
<< RDES1_BUFFER2_SIZE_SHIFT)
|
||||
& RDES1_BUFFER2_SIZE_MASK);
|
||||
if (bfsize >= BUF_SIZE_2KiB) {
|
||||
int bfsize2;
|
||||
|
||||
bfsize2 = min(bfsize - BUF_SIZE_2KiB + 1, BUF_SIZE_2KiB - 1);
|
||||
p->des1 |= cpu_to_le32((bfsize2 << RDES1_BUFFER2_SIZE_SHIFT)
|
||||
& RDES1_BUFFER2_SIZE_MASK);
|
||||
}
|
||||
|
||||
if (end)
|
||||
p->des1 |= cpu_to_le32(RDES1_END_RING);
|
||||
|
||||
@@ -289,7 +289,7 @@ exit:
|
||||
}
|
||||
|
||||
static void dwmac4_rd_init_rx_desc(struct dma_desc *p, int disable_rx_ic,
|
||||
int mode, int end)
|
||||
int mode, int end, int bfsize)
|
||||
{
|
||||
p->des3 = cpu_to_le32(RDES3_OWN | RDES3_BUFFER1_VALID_ADDR);
|
||||
|
||||
|
||||
@@ -269,15 +269,19 @@ static int enh_desc_get_rx_status(void *data, struct stmmac_extra_stats *x,
|
||||
}
|
||||
|
||||
static void enh_desc_init_rx_desc(struct dma_desc *p, int disable_rx_ic,
|
||||
int mode, int end)
|
||||
int mode, int end, int bfsize)
|
||||
{
|
||||
int bfsize1;
|
||||
|
||||
p->des0 |= cpu_to_le32(RDES0_OWN);
|
||||
p->des1 |= cpu_to_le32((BUF_SIZE_8KiB - 1) & ERDES1_BUFFER1_SIZE_MASK);
|
||||
|
||||
bfsize1 = min(bfsize, BUF_SIZE_8KiB);
|
||||
p->des1 |= cpu_to_le32(bfsize1 & ERDES1_BUFFER1_SIZE_MASK);
|
||||
|
||||
if (mode == STMMAC_CHAIN_MODE)
|
||||
ehn_desc_rx_set_on_chain(p);
|
||||
else
|
||||
ehn_desc_rx_set_on_ring(p, end);
|
||||
ehn_desc_rx_set_on_ring(p, end, bfsize);
|
||||
|
||||
if (disable_rx_ic)
|
||||
p->des1 |= cpu_to_le32(ERDES1_DISABLE_IC);
|
||||
|
||||
@@ -137,15 +137,19 @@ static int ndesc_get_rx_status(void *data, struct stmmac_extra_stats *x,
|
||||
}
|
||||
|
||||
static void ndesc_init_rx_desc(struct dma_desc *p, int disable_rx_ic, int mode,
|
||||
int end)
|
||||
int end, int bfsize)
|
||||
{
|
||||
int bfsize1;
|
||||
|
||||
p->des0 |= cpu_to_le32(RDES0_OWN);
|
||||
p->des1 |= cpu_to_le32((BUF_SIZE_2KiB - 1) & RDES1_BUFFER1_SIZE_MASK);
|
||||
|
||||
bfsize1 = min(bfsize, BUF_SIZE_2KiB - 1);
|
||||
p->des1 |= cpu_to_le32(bfsize1 & RDES1_BUFFER1_SIZE_MASK);
|
||||
|
||||
if (mode == STMMAC_CHAIN_MODE)
|
||||
ndesc_rx_set_on_chain(p, end);
|
||||
else
|
||||
ndesc_rx_set_on_ring(p, end);
|
||||
ndesc_rx_set_on_ring(p, end, bfsize);
|
||||
|
||||
if (disable_rx_ic)
|
||||
p->des1 |= cpu_to_le32(RDES1_DISABLE_IC);
|
||||
|
||||
@@ -956,11 +956,11 @@ static void stmmac_clear_descriptors(struct stmmac_priv *priv)
|
||||
if (priv->extend_desc)
|
||||
priv->hw->desc->init_rx_desc(&priv->dma_erx[i].basic,
|
||||
priv->use_riwt, priv->mode,
|
||||
(i == DMA_RX_SIZE - 1));
|
||||
(i == DMA_RX_SIZE - 1), priv->dma_buf_sz);
|
||||
else
|
||||
priv->hw->desc->init_rx_desc(&priv->dma_rx[i],
|
||||
priv->use_riwt, priv->mode,
|
||||
(i == DMA_RX_SIZE - 1));
|
||||
(i == DMA_RX_SIZE - 1), priv->dma_buf_sz);
|
||||
for (i = 0; i < DMA_TX_SIZE; i++)
|
||||
if (priv->extend_desc)
|
||||
priv->hw->desc->init_tx_desc(&priv->dma_etx[i].basic,
|
||||
@@ -2479,7 +2479,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv)
|
||||
wmb();
|
||||
|
||||
if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00))
|
||||
priv->hw->desc->init_rx_desc(p, priv->use_riwt, 0, 0);
|
||||
priv->hw->desc->init_rx_desc(p, priv->use_riwt, 0, 0, priv->dma_buf_sz);
|
||||
else
|
||||
priv->hw->desc->set_rx_owner(p);
|
||||
|
||||
@@ -2499,8 +2499,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv)
|
||||
*/
|
||||
static int stmmac_rx(struct stmmac_priv *priv, int limit)
|
||||
{
|
||||
unsigned int entry = priv->cur_rx;
|
||||
unsigned int next_entry;
|
||||
unsigned int next_entry = priv->cur_rx;
|
||||
unsigned int count = 0;
|
||||
int coe = priv->hw->rx_csum;
|
||||
|
||||
@@ -2516,10 +2515,12 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
|
||||
priv->hw->desc->display_ring(rx_head, DMA_RX_SIZE, true);
|
||||
}
|
||||
while (count < limit) {
|
||||
int status;
|
||||
int entry, status;
|
||||
struct dma_desc *p;
|
||||
struct dma_desc *np;
|
||||
|
||||
entry = next_entry;
|
||||
|
||||
if (priv->extend_desc)
|
||||
p = (struct dma_desc *)(priv->dma_erx + entry);
|
||||
else
|
||||
@@ -2584,7 +2585,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
|
||||
priv->dev->name, frame_len,
|
||||
priv->dma_buf_sz);
|
||||
priv->dev->stats.rx_length_errors++;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* ACS is set; GMAC core strips PAD/FCS for IEEE 802.3
|
||||
@@ -2615,7 +2616,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
|
||||
dev_warn(priv->device,
|
||||
"packet dropped\n");
|
||||
priv->dev->stats.rx_dropped++;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
dma_sync_single_for_cpu(priv->device,
|
||||
@@ -2638,7 +2639,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
|
||||
pr_err("%s: Inconsistent Rx chain\n",
|
||||
priv->dev->name);
|
||||
priv->dev->stats.rx_dropped++;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
prefetch(skb->data - NET_IP_ALIGN);
|
||||
priv->rx_skbuff[entry] = NULL;
|
||||
@@ -2672,7 +2673,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
|
||||
priv->dev->stats.rx_packets++;
|
||||
priv->dev->stats.rx_bytes += frame_len;
|
||||
}
|
||||
entry = next_entry;
|
||||
}
|
||||
|
||||
stmmac_rx_refill(priv);
|
||||
|
||||
@@ -773,8 +773,8 @@ static irqreturn_t cpsw_rx_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct cpsw_common *cpsw = dev_id;
|
||||
|
||||
cpdma_ctlr_eoi(cpsw->dma, CPDMA_EOI_RX);
|
||||
writel(0, &cpsw->wr_regs->rx_en);
|
||||
cpdma_ctlr_eoi(cpsw->dma, CPDMA_EOI_RX);
|
||||
|
||||
if (cpsw->quirk_irq) {
|
||||
disable_irq_nosync(cpsw->irqs_table[0]);
|
||||
|
||||
@@ -255,7 +255,8 @@ static int ar5523_cmd(struct ar5523 *ar, u32 code, const void *idata,
|
||||
|
||||
if (flags & AR5523_CMD_FLAG_MAGIC)
|
||||
hdr->magic = cpu_to_be32(1 << 24);
|
||||
memcpy(hdr + 1, idata, ilen);
|
||||
if (ilen)
|
||||
memcpy(hdr + 1, idata, ilen);
|
||||
|
||||
cmd->odata = odata;
|
||||
cmd->olen = olen;
|
||||
|
||||
@@ -1765,6 +1765,11 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif stop\n");
|
||||
|
||||
ath10k_pci_irq_disable(ar);
|
||||
ath10k_pci_irq_sync(ar);
|
||||
napi_synchronize(&ar->napi);
|
||||
napi_disable(&ar->napi);
|
||||
|
||||
/* Most likely the device has HTT Rx ring configured. The only way to
|
||||
* prevent the device from accessing (and possible corrupting) host
|
||||
* memory is to reset the chip now.
|
||||
@@ -1778,10 +1783,6 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
|
||||
*/
|
||||
ath10k_pci_safe_chip_reset(ar);
|
||||
|
||||
ath10k_pci_irq_disable(ar);
|
||||
ath10k_pci_irq_sync(ar);
|
||||
napi_synchronize(&ar->napi);
|
||||
napi_disable(&ar->napi);
|
||||
ath10k_pci_flush(ar);
|
||||
|
||||
spin_lock_irqsave(&ar_pci->ps_lock, flags);
|
||||
|
||||
@@ -805,6 +805,21 @@ static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
|
||||
!ieee80211_is_action(hdr->frame_control)))
|
||||
sta = NULL;
|
||||
|
||||
/* If there is no sta, and it's not offchannel - send through AP */
|
||||
if (info->control.vif->type == NL80211_IFTYPE_STATION &&
|
||||
info->hw_queue != IWL_MVM_OFFCHANNEL_QUEUE && !sta) {
|
||||
struct iwl_mvm_vif *mvmvif =
|
||||
iwl_mvm_vif_from_mac80211(info->control.vif);
|
||||
u8 ap_sta_id = READ_ONCE(mvmvif->ap_sta_id);
|
||||
|
||||
if (ap_sta_id < IWL_MVM_STATION_COUNT) {
|
||||
/* mac80211 holds rcu read lock */
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[ap_sta_id]);
|
||||
if (IS_ERR_OR_NULL(sta))
|
||||
goto drop;
|
||||
}
|
||||
}
|
||||
|
||||
if (sta) {
|
||||
if (iwl_mvm_defer_tx(mvm, sta, skb))
|
||||
return;
|
||||
|
||||
@@ -1209,6 +1209,7 @@ void rtl92de_enable_interrupt(struct ieee80211_hw *hw)
|
||||
|
||||
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF);
|
||||
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] & 0xFFFFFFFF);
|
||||
rtlpci->irq_enabled = true;
|
||||
}
|
||||
|
||||
void rtl92de_disable_interrupt(struct ieee80211_hw *hw)
|
||||
@@ -1218,7 +1219,7 @@ void rtl92de_disable_interrupt(struct ieee80211_hw *hw)
|
||||
|
||||
rtl_write_dword(rtlpriv, REG_HIMR, IMR8190_DISABLED);
|
||||
rtl_write_dword(rtlpriv, REG_HIMRE, IMR8190_DISABLED);
|
||||
synchronize_irq(rtlpci->pdev->irq);
|
||||
rtlpci->irq_enabled = false;
|
||||
}
|
||||
|
||||
static void _rtl92de_poweroff_adapter(struct ieee80211_hw *hw)
|
||||
@@ -1389,7 +1390,7 @@ void rtl92de_set_beacon_related_registers(struct ieee80211_hw *hw)
|
||||
|
||||
bcn_interval = mac->beacon_interval;
|
||||
atim_window = 2;
|
||||
/*rtl92de_disable_interrupt(hw); */
|
||||
rtl92de_disable_interrupt(hw);
|
||||
rtl_write_word(rtlpriv, REG_ATIMWND, atim_window);
|
||||
rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval);
|
||||
rtl_write_word(rtlpriv, REG_BCNTCFG, 0x660f);
|
||||
@@ -1409,9 +1410,9 @@ void rtl92de_set_beacon_interval(struct ieee80211_hw *hw)
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
|
||||
"beacon_interval:%d\n", bcn_interval);
|
||||
/* rtl92de_disable_interrupt(hw); */
|
||||
rtl92de_disable_interrupt(hw);
|
||||
rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval);
|
||||
/* rtl92de_enable_interrupt(hw); */
|
||||
rtl92de_enable_interrupt(hw);
|
||||
}
|
||||
|
||||
void rtl92de_update_interrupt_mask(struct ieee80211_hw *hw,
|
||||
|
||||
@@ -243,6 +243,7 @@ static struct rtl_hal_ops rtl8192de_hal_ops = {
|
||||
.led_control = rtl92de_led_control,
|
||||
.set_desc = rtl92de_set_desc,
|
||||
.get_desc = rtl92de_get_desc,
|
||||
.is_tx_desc_closed = rtl92de_is_tx_desc_closed,
|
||||
.tx_polling = rtl92de_tx_polling,
|
||||
.enable_hw_sec = rtl92de_enable_hw_security_config,
|
||||
.set_key = rtl92de_set_key,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user