Commit Graph

638493 Commits

Author SHA1 Message Date
Larson Jiang
97c2d30b4b wifi: wifi work over sdio controller
PD#138714: wifi work over sdio controller

Change-Id: I51997e23e4409565dacdd68972133048ed72d483
Signed-off-by: Larson Jiang <larson.jiang@amlogic.com>
2017-04-27 03:27:28 -07:00
Larson Jiang
75623db85c PD#138714: add bt/wifi config
Change-Id: Id1e0fcc80f7aa25db1768ac4c5e5987ba2dff4e3
Signed-off-by: Larson Jiang <larson.jiang@amlogic.com>
2017-04-27 17:14:36 +08:00
Ao Xu
522e990f33 defconfig: meson32: enable net configs
PD#141217: enable net configs
+CONFIG_PACKET=y
+CONFIG_PACKET_DIAG=y
+CONFIG_UNIX=y
+CONFIG_UNIX_DIAG=y
+CONFIG_XFRM_USER=y
+CONFIG_NET_KEY=y
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=y
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_ESP=y
+CONFIG_IPV6_ROUTER_PREF=y
+CONFIG_IPV6_ROUTE_INFO=y
+CONFIG_IPV6_OPTIMISTIC_DAD=y
+CONFIG_INET6_AH=y
+CONFIG_INET6_ESP=y
+CONFIG_INET6_IPCOMP=y
+CONFIG_IPV6_MIP6=y
+CONFIG_IPV6_TUNNEL=y
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_NETFILTER=y
+CONFIG_NF_CONNTRACK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_DCCP=y
+CONFIG_NF_CT_PROTO_SCTP=y
+CONFIG_NF_CT_PROTO_UDPLITE=y
+CONFIG_NF_CONNTRACK_AMANDA=y
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_H323=y
+CONFIG_NF_CONNTRACK_NETBIOS_NS=y
+CONFIG_NF_CONNTRACK_PPTP=y
+CONFIG_NF_CONNTRACK_SANE=y
+CONFIG_NF_CONNTRACK_TFTP=y
+CONFIG_NF_CT_NETLINK=y
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
+CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
+CONFIG_NETFILTER_XT_TARGET_MARK=y
+CONFIG_NETFILTER_XT_TARGET_NFLOG=y
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
+CONFIG_NETFILTER_XT_TARGET_TPROXY=y
+CONFIG_NETFILTER_XT_TARGET_TRACE=y
+CONFIG_NETFILTER_XT_MATCH_COMMENT=y
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
+CONFIG_NETFILTER_XT_MATCH_HELPER=y
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
+CONFIG_NETFILTER_XT_MATCH_LENGTH=y
+CONFIG_NETFILTER_XT_MATCH_LIMIT=y
+CONFIG_NETFILTER_XT_MATCH_MAC=y
+CONFIG_NETFILTER_XT_MATCH_POLICY=y
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
+CONFIG_NETFILTER_XT_MATCH_QUOTA=y
+CONFIG_NETFILTER_XT_MATCH_SOCKET=y
+CONFIG_NETFILTER_XT_MATCH_STATE=y
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
+CONFIG_NETFILTER_XT_MATCH_STRING=y
+CONFIG_NETFILTER_XT_MATCH_TIME=y
+CONFIG_NETFILTER_XT_MATCH_U32=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_NF_NAT_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_MATCH_AH=y
+CONFIG_IP_NF_MATCH_ECN=y
+CONFIG_IP_NF_MATCH_TTL=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_IP_NF_ARPTABLES=y
+CONFIG_IP_NF_ARPFILTER=y
+CONFIG_IP_NF_ARP_MANGLE=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_NF_NAT_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_L2TP=y
+CONFIG_L2TP_DEBUGFS=y
+CONFIG_L2TP_V3=y
+CONFIG_L2TP_IP=y
+CONFIG_L2TP_ETH=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_PHONET=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_HTB=y
+CONFIG_NET_SCH_INGRESS=y
+CONFIG_NET_CLS_U32=y
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_U32=y
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=y
+CONFIG_NET_ACT_GACT=y
+CONFIG_NET_ACT_MIRRED=y

Change-Id: I1ec756db193d335b363ea2a8adfcb458fa73c213
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2017-04-27 00:16:07 -07:00
Yonghui Yu
ac4c9b12bf nand: fix wait ready condition for samsung slc.
PD#142961: only status[7] of samsung indicate the R/B status, as others
using status[6:7].

Change-Id: I6b6030c868f81e250b4c96629025c1aeeb7b7d65
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
2017-04-26 23:03:30 -07:00
Xingyu Chen
f2821d4899 saradc: add interface to switch input voltage for ch7
PD#138714: add interface to switch input voltage for ch7

add /sys/class/saradc/ch7_mux

Change-Id: I5e1ef3666f76ff38fa2f1878c06dad5108be67e0
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2017-04-26 21:38:35 -07:00
Jiamin Ma
4e6661c904 compiler: solve section mismatch warning during compiling
PD#141217: compiler: solve section mismatch warning during compiling

Change-Id: Ifde0e48a08b61bf19cbe763f6accaf7cb9b53bc5
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2017-04-27 12:30:19 +08:00
Xingyu Chen
1de5a5d17c remote: report wakeup event after system resume
PD#138714: report wakeup event after system resume

Change-Id: Ie51f6594a7e27c207dee48e82538343888f781cc
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2017-04-26 20:09:58 -07:00
Qiufang Dai
c459e072c6 PM / sleep: Re-implement legacy early_suspend.
PD#138714: Re-implement legacy early_suspend for Amlogic driver.

1. re-implement early_suspend mechanism for legacy early_suspend driver code.
   The early_suspend/late_resume can be trigger via cmd:
   echo 1/0 > /sys/power/eary_suspend_trigger

2. Register wakeup source and report wakeup event for Remoute KEY_POWER

Change-Id: I07ba9861aa0c0c1126238e84248948f7707e9ae2
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2017-04-26 20:05:30 -07:00
Xing Wang
f6e11697b0 audio: config audio for m8b
PD#141217: audio: config audio for m8b

Change-Id: If837cf19bf3da0e54830fefd2267fd14445ca6f1
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2017-04-26 07:41:02 -07:00
Xing Wang
b8db114aca audio: fix pcm bclk
PD#141217: fix pcm bclk following sample rate, pcm format and slot number

Change-Id: I4e1547c6c7c133a46a8c8b9a9d595adb7aa2771c
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2017-04-26 06:50:49 -07:00
Yun Cai
f4bf7b7800 dts: add axg dts file
PD#142470: add dts for axg pxp

Change-Id: I0d5c77368b0583fcfa046f4c01ac936704e96434
Signed-off-by: Yun Cai <yun.cai@amlogic.com>
2017-04-26 04:28:13 -07:00
Larson Jiang
3b025d7ff5 bt: add bt support
PD#138714: initial add bt support for gxl and m8b

Change-Id: Ia243a220ec87ff7bb6242f21e8372b90a4f6456b
Signed-off-by: Larson Jiang <larson.jiang@amlogic.com>
2017-04-26 01:18:30 -07:00
Jianxin Pan
9d8654673c defconfig: meson32: enable CONFIG_DEBUG_INFO
PD#141217: enable CONFIG_DEBUG_INFO to add -g to KBUILD_CFLAGS

Change-Id: I4fa030ec02729d58ff5076c3ccf1e6c50385c1a5
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2017-04-26 00:10:24 -07:00
Yun Cai
d80fa6e36d clk: add clock measure for m8b
PD#141217: clkmsr support m8baby

Change-Id: Id7e471353f235a6b8f69d46ed0250afe4479990d
Signed-off-by: Yun Cai <yun.cai@amlogic.com>
2017-04-25 23:54:04 -07:00
Yun Cai
224e893fbb clk: m8b add clks for mpll/media/gpu/misc/store/test
PD#141217: add mpll/media/gpu/misc/store/test clks for meson8b

Change-Id: I95268d46395d78419d311f1b9a5add9c593da810
Signed-off-by: Yun Cai <yun.cai@amlogic.com>
2017-04-26 14:19:58 +08:00
Xuhua Zhang
e6f70bd47b i2c: modify i2c config on gxl&gxm.
PD#138714: fix i2c error on gxl/gxm

Change-Id: Ic1e8685b4cf853749808707266d0cec98db99496
Signed-off-by: Xuhua Zhang <xuhua.zhang@amlogic.com>
2017-04-25 16:11:32 +08:00
Zan Peng
aa49a5ed73 remote: add remote driver to meson8b
PD#141217: enable remote driver for meson8b

Change-Id: I0c09ce5a71fdc34eb010d03efd35be683c8d224c
Signed-off-by: Zan Peng <zan.peng@amlogic.com>
2017-04-24 19:34:13 -07:00
Jian Hu
5b92a08fd6 pwm: update pwm driver
PD#138714: update pwm driver

update driver for gxtvbb/gxl/gxm/txl dts parse error

Change-Id: I673e791f1ec46aba2a1916cafeb01526dd90505d
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2017-04-23 23:40:14 -07:00
Yun Cai
9a06b057e8 dts: add gxl skt dts
PD#138714: add gxl_skt.dts

Change-Id: I0ca48f72267eed4f7f4dc2264c7e88483744740f
Signed-off-by: Yun Cai <yun.cai@amlogic.com>
2017-04-21 20:00:02 +08:00
Frank Chen
1b3655bb46 dts: fix i2c pinmux for gxl
PD#138714: fix i2c pinmux

Change-Id: I8956c0910a643ecddea72b6585445d14810850f7
Signed-off-by: Frank Chen <frank.chen@amlogic.com>
2017-04-21 02:19:52 -07:00
Evoke Zhang
c7e263e9af vout: remove FB config for axis sysfs node
PD#138714: remove FB config for axis sysfs node

Change-Id: I2f8c657ef46d184062bb2b09fbc0f2a1ba0770e1
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
2017-04-21 00:31:14 -07:00
Victor Wan
d935baa065 Merge branch 'android-4.9' into amlogic-4.9-dev
Conflicts:
	fs/ext4/inode.c
2017-04-21 15:25:31 +08:00
MingLiang Dong
2286b5158a amvecm: add amvecm driver
PD#138714: add amvecm driver

Change-Id: Ieb0be7a4b02b7a8daa549544a97ee23e0daeb6da
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
2017-04-21 14:23:19 +08:00
Evoke Zhang
73f330b0b8 hdmitx: update vmode_is_supported function to avoid invalid mode setting
PD#138714: update vmode_is_supported function to avoid invalid mode setting,
adjust hdmitx probe before vout serve.
also add NULL pointer protection in vout serve API.

Change-Id: I0815dfe35fa00ae8805d0ab6a9ae7b189a1b2af5
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
2017-04-20 22:17:21 -07:00
Jianxin Pan
7fca780826 Merge "osd: free uboot logo memory when kernel loaded" into amlogic-4.9-dev 2017-04-20 22:17:10 -07:00
Pengcheng Chen
518bb18904 osd: free uboot logo memory when kernel loaded
PD#139665: free uboot logo memory when kernel loaded

Change-Id: I78c46946f3a06078a41491196a79f72e56cdc795
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2017-04-20 22:11:31 -07:00
Jin Qian
67f252c89d ANDROID: uid_sys_stats: reduce update_io_stats overhead
Replaced read_lock with rcu_read_lock to reduce time that preemption
is disabled.

Added a function to update io stats for specific uid and moved
hash table lookup, user_namespace out of loops.

Bug: 37319300
Change-Id: I2b81b5cd3b6399b40d08c3c14b42cad044556970
Signed-off-by: Jin Qian <jinqian@google.com>
2017-04-20 21:47:08 +00:00
Jiebing Li
6b4bbab071 ANDROID: usb: gadget: fix MTP enumeration issue under super speed mode
MTP function doesn't show as a drive in Windows when the device
is connected to PC's USB3 port, because device fails to respond
ACK to BULK OUT transfer request.

This patch modifies MTP OUT request length as multiple of MaxPacketSize
per databook requirement in order to fix this issue.

Patchset: mtp

Change-Id: I090d7880ff00c499dc5ba7fd644b1fe7cd87fcb5
Signed-off-by: Jiebing Li <jiebing.li@intel.com>
Signed-off-by: Wang, Yu <yu.y.wang@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
2017-04-20 12:43:54 -07:00
Daniel Rosenberg
9560fe633f Revert "Android: sdcardfs: Don't do d_add for lower fs"
This reverts commit ab16e2fd5e.

This change caused issues for sdcardfs on top of vfat

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: I34918eed57a8b566c58f8083de12a93a12ba5857
2017-04-20 12:15:22 -07:00
Nanxin Qin
98179834ca media: the regs r/w are removed in the module_init.
PD#138714: fixed the crash when the os booting

Change-Id: I0ffd67b9b85d06db9ffdae83a0cbc4c9bc8f6594
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2017-04-20 06:41:18 -07:00
Jianxin Pan
283297a47f defconfig: meson64: enable CONFIG_EXTCON
PD#138714: enable CONFIG_EXTCON

Change-Id: Id4c4d118458578ea4b95516e811750bc4aeeb83f
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2017-04-20 06:23:53 -07:00
Jianxin Pan
aad3b820d9 timer: enable percpu local timer for m8b
PD#141217: enable  percpu local timer for m8b
1. TimerA ~ TimerD for CPU0 ~ CPU3
2. TimerE is clock source
3. TimerE is delay source
4. hrtimer is enabled

Change-Id: I79b0b73f5ab5ec4d2321faa8ea5cba25e28550b2
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2017-04-20 06:19:40 -07:00
Peipeng Zhao
e5ca5f86b9 dts: fix spdif_in and i2c_c_1 dtsi error
PD#138714: fix dts and pinctrl define error

1.fix i2c_c_1 dts and pinctrl define error
2.add spdif in dts and pinctrl funtion

Change-Id: I78809a0f183a55e3a90a17cc326e37fd2c8b7983
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
2017-04-20 15:50:00 +08:00
Frank Chen
25c9d1b76a dts: disable useless devices
PD#138714: disable useless devices on p400 and p401

Change-Id: I7f0d2f4b59cae56814b3a91ceacf4aaac6058e16
Signed-off-by: Frank Chen <frank.chen@amlogic.com>
2017-04-20 12:42:54 +08:00
Daniel Rosenberg
33efe54e61 Android: sdcardfs: Don't complain in fixup_lower_ownership
Not all filesystems support changing the owner of a file.
We shouldn't complain if it doesn't happen.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 37488099
Change-Id: I403e44ab7230f176e6df82f6adb4e5c82ce57f33
2017-04-19 15:25:49 -07:00
Daniel Rosenberg
ab16e2fd5e Android: sdcardfs: Don't do d_add for lower fs
For file based encryption, ext4 explicitly does not
create negative dentries for encrypted files. If you
force one over it, the decrypted file will be hidden
until the cache is cleared. Instead, just fail out.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 37231161
Change-Id: Id2a9708dfa75e1c22f89915c529789caadd2ca4b
2017-04-19 15:25:49 -07:00
Daniel Rosenberg
480cd3ec0e ANDROID: sdcardfs: ->iget fixes
Adapted from wrapfs
commit 8c49eaa0sb9c ("Wrapfs: ->iget fixes")

Change where we igrab/iput to ensure we always hold a valid lower_inode.
Return ENOMEM (not EACCES) if iget5_locked returns NULL.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35766959

Change-Id: Id8d4e0c0cbc685a0a77685ce73c923e9a3ddc094
2017-04-19 15:25:49 -07:00
Daniel Rosenberg
366b8b8dcb Android: sdcardfs: Change cache GID value
Change-Id: Ieb955dd26493da26a458bc20fbbe75bca32b094f
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 37193650
2017-04-19 15:25:49 -07:00
Yonghui Yu
e84d781b45 nand: fix mtd0 erase operation
PD#138714: add erase interface for mtd0(bootloader)

Change-Id: I5d6de9013d9f2c83a218d29e390df58430eeea58
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
2017-04-19 04:37:01 -07:00
Peipeng Zhao
9a2e9f09c0 audio: add i2s capture function and fix pinctrl error
PD#138714: fix i2s in error

1. add aml_i2s_copy_capture for 8 channels
2. fix i2s pinctrl define error
3. add 8channel mic board d601 function on P400/P401 dts

Change-Id: I7b289e9926bded95f2a4e9a24b756363a94ba8dd
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
2017-04-19 15:39:16 +08:00
Jianxin Pan
577cb57584 defconfig: meson32: enable some debug configs
PD#141217: enable configs:
+CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+CONFIG_WQ_WATCHDOG=y
+CONFIG_PANIC_ON_RT_THROTTLING=y
+CONFIG_SCHEDSTATS=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_TIMER_STATS=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y

Change-Id: Ia3ba9b790e103d4de21d2b92bc2fd4f76f3ebffc
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2017-04-18 03:56:50 -07:00
Jianxin Pan
c50a5fcc06 defconfig: meson64: enable some kernel hacking and sync savedefconfig
PD#138714: enable configs and sync savedefconfig
+CONFIG_LOCKUP_DETECTOR=y
+CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_WQ_WATCHDOG=y
+CONFIG_PANIC_ON_RT_THROTTLING=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y

Change-Id: I5f697a5ebb3444c6136d9e8d91da48910da8cfcf
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2017-04-18 03:48:03 -07:00
Pengcheng Chen
ec6391838e osd: fix used kzalloc caused sleep in osd_rdma_irq
PD#138714: fix risk of sleep in atomic

Change-Id: I0af741c0837904e89cb18552fe0242745e53182a
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2017-04-18 03:12:45 -07:00
Greg Kroah-Hartman
497947879f Merge 4.9.23 into android-4.9
Changes in 4.9.23:
	drm/i915/gen9: Increase PCODE request timeout to 50ms
	drm/i915: Nuke debug messages from the pipe update critical section
	drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3
	drm/i915: Only enable hotplug interrupts if the display interrupts are enabled
	drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters.
	drm/i915: Stop using RP_DOWN_EI on Baytrail
	drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker)
	orangefs: fix memory leak of string 'new' on exit path
	orangefs: Dan Carpenter influenced cleanups...
	orangefs: fix buffer size mis-match between kernel space and user space.
	i2c: bcm2835: Fix hang for writing messages larger than 16 bytes
	rt2x00usb: fix anchor initialization
	rt2x00usb: do not anchor rx and tx urb's
	rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB
	mtd: bcm47xxpart: fix parsing first block after aligned TRX
	MIPS: Introduce irq_stack
	MIPS: Stack unwinding while on IRQ stack
	MIPS: Only change $28 to thread_info if coming from user mode
	MIPS: Switch to the irq_stack in interrupts
	MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK
	MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
	crypto: caam - fix RNG deinstantiation error checking
	crypto: caam - fix invalid dereference in caam_rsa_init_tfm()
	Revert "drm/i915/execlists: Reset RING registers upon resume"
	net/packet: fix overflow in check for priv area size
	blk-mq: Avoid memory reclaim when remapping queues
	usb: hub: Wait for connection to be reestablished after port reset
	net/mlx4_en: Fix bad WQE issue
	net/mlx4_core: Fix racy CQ (Completion Queue) free
	net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
	dma-buf: add support for compat ioctl
	Linux 4.9.23

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-04-18 09:31:20 +02:00
Pengcheng Chen
94b258de6a dts: fix Q200 ion_share_dma_buf_fd failed issue
PD#138714: fix Q200 ion_share_dma_buf_fd failed issue

Change-Id: I9feed9d3190e5c5fb8f39c2c92f93bee94037291
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2017-04-17 23:47:20 -07:00
Greg Kroah-Hartman
c3582cc56e Linux 4.9.23 2017-04-18 07:12:30 +02:00
Marek Szyprowski
0ade21a2ed dma-buf: add support for compat ioctl
commit 888022c047 upstream.

Add compat ioctl support to dma-buf. This lets one to use DMA_BUF_IOCTL_SYNC
ioctl from 32bit application on 64bit kernel. Data structures for both 32
and 64bit modes are same, so there is no need for additional translation
layer.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1487683261-2655-1-git-send-email-m.szyprowski@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18 07:11:50 +02:00
Jack Morgenstein
27dedde689 net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
commit 7c3945bc20 upstream.

Save the qp context flags byte containing the flag disabling vlan stripping
in the RESET to INIT qp transition, rather than in the INIT to RTR
transition. Per the firmware spec, the flags in this byte are active
in the RESET to INIT transition.

As a result of saving the flags in the incorrect qp transition, when
switching dynamically from VGT to VST and back to VGT, the vlan
remained stripped (as is required for VST) and did not return to
not-stripped (as is required for VGT).

Fixes: f0f829bf42 ("net/mlx4_core: Add immediate activate for VGT->VST->VGT")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18 07:11:50 +02:00
Jack Morgenstein
48b2f1dd57 net/mlx4_core: Fix racy CQ (Completion Queue) free
commit 291c566a28 upstream.

In function mlx4_cq_completion() and mlx4_cq_event(), the
radix_tree_lookup requires a rcu_read_lock.
This is mandatory: if another core frees the CQ, it could
run the radix_tree_node_rcu_free() call_rcu() callback while
its being used by the radix tree lookup function.

Additionally, in function mlx4_cq_event(), since we are adding
the rcu lock around the radix-tree lookup, we no longer need to take
the spinlock. Also, the synchronize_irq() call for the async event
eliminates the need for incrementing the cq reference count in
mlx4_cq_event().

Other changes:
1. In function mlx4_cq_free(), replace spin_lock_irq with spin_lock:
   we no longer take this spinlock in the interrupt context.
   The spinlock here, therefore, simply protects against different
   threads simultaneously invoking mlx4_cq_free() for different cq's.

2. In function mlx4_cq_free(), we move the radix tree delete to before
   the synchronize_irq() calls. This guarantees that we will not
   access this cq during any subsequent interrupts, and therefore can
   safely free the CQ after the synchronize_irq calls. The rcu_read_lock
   in the interrupt handlers only needs to protect against corrupting the
   radix tree; the interrupt handlers may access the cq outside the
   rcu_read_lock due to the synchronize_irq calls which protect against
   premature freeing of the cq.

3. In function mlx4_cq_event(), we change the mlx_warn message to mlx4_dbg.

4. We leave the cq reference count mechanism in place, because it is
   still needed for the cq completion tasklet mechanism.

Fixes: 6d90aa5cf1 ("net/mlx4_core: Make sure there are no pending async events when freeing CQ")
Fixes: 225c7b1fee ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18 07:11:50 +02:00
Eugenia Emantayev
cee26997a6 net/mlx4_en: Fix bad WQE issue
commit 6496bbf0ec upstream.

Single send WQE in RX buffer should be stamped with software
ownership in order to prevent the flow of QP in error in FW
once UPDATE_QP is called.

Fixes: 9f519f68cf ('mlx4_en: Not using Shared Receive Queues')
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18 07:11:50 +02:00