Yueguie He [Mon, 4 Sep 2017 09:07:33 +0000 (17:07 +0800)]
mtd: nand : add slc ids
PD#150442: mtd: nand: add 128m FS33ND01GS108TFI0 nand
Change-Id: Ibda5d793825cef1a3c522cf42f277f74db3172f7
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Nanxin Qin [Wed, 6 Sep 2017 03:10:03 +0000 (11:10 +0800)]
frame_sync: replace the magic number with msecs_to_jiffies.
PD#150542: replace the magic number with msecs_to_jiffies.
Change-Id: I071da655a9ea3edf496fca65dc67167145ccc167
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Nanxin Qin [Mon, 4 Sep 2017 12:32:41 +0000 (20:32 +0800)]
video_sink: modify modules dir in the sysfs to compatible with kernel 3.14 [1/3]
PD#150498: modify modules dir in the sysfs to compatible with kernel 3.14
Change-Id: If34cb6a153a4e5b97537faad1da04a1afec3fe4b
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Jiamin Ma [Wed, 6 Sep 2017 02:28:42 +0000 (10:28 +0800)]
scheduler: remove log info for cpu capacity updating
PD#138714: too much log info for cpu capacity updating
Change-Id: I14164903950afc2f29d7446d743ba0b0062edc19
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
Yueguie He [Tue, 5 Sep 2017 12:49:38 +0000 (20:49 +0800)]
nand: change boot partition size
PD#150531: nand: change boot partition size to 15M
Change-Id: I64e376b89908b882b6b70bfd370871bc540020f1
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Nan Li [Tue, 5 Sep 2017 02:39:24 +0000 (10:39 +0800)]
sd: add sd_uart support
PD#149976: add sd to uart support
modify emmc init min clk freq to 400k.
Change-Id: I204d68668497a1a6a1f37f5e06d944a2687412ff
Signed-off-by: Nan Li <nan.li@amlogic.com>
Tao Zeng [Mon, 4 Sep 2017 03:07:03 +0000 (11:07 +0800)]
gcc: add options to limit large object and stack usage
PD#150373: gcc: add options to limit large object and stack usage
We should restrict limit large size of global object allocated in
driver code to reduce size of .data/.bss/.rodata sections. Also,
large array/many variables declared in a function is not allowed,
this behavior may cause kernel stack overflow especially in IRQ
context or recursion calls.
Right now we just set a very high limit in order to pass comiple.
Final target is to limit:
1. large global object size should not over 4096 bytes, a page size;
2. stack usage of each function should not over 256 bytes.
If your global object is larger than a page size, we advise allocate
it as a static pointer, and allocate it's memory during probe stage.
Change-Id: Ic14995f642bc1e0b47d3a07143468e6e1dac7bfc
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
sky zhou [Mon, 4 Sep 2017 14:54:14 +0000 (22:54 +0800)]
osd: init osd output pt value to 1, and fix osd buf hnd leak. [1/3]
PD#148907: fix osd output fence error and framebuffer hnd leak.
Change-Id: Ic5a412d41b808766d6d0e05edeb770b2b20bb4a6
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
Weiguang Ruan [Wed, 30 Aug 2017 02:45:15 +0000 (10:45 +0800)]
wifi: add wext and wext_priv [5/8]
PD#150114: add wext and wext_priv
select WIRELESS_EXT WEXT_PRIV in
driver/amlogic/wifi/Kconfig
qualcomm wifi drivers need wext support
Change-Id: I1f85481013ba6c35b304eeb45d0c4917a67c67eb
Signed-off-by: Weiguang Ruan <Weiguang.ruan@amlogic.com>
Jiyu Yang [Fri, 1 Sep 2017 12:59:13 +0000 (20:59 +0800)]
osd: use new fence api. [3/7]
PD#149525: osd use new fence api
Change-Id: I3c7f0acf63012a12cdc9a3b4512db0d3bd4f8927
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
Jiyu Yang [Fri, 1 Sep 2017 12:45:37 +0000 (20:45 +0800)]
sync: new fence api [2/7]
PD#149525: sync: new fence api
Change-Id: I3c957758a67fb6c0a0b3aa5031637b00d3d510e8
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
Jiyu Yang [Tue, 22 Aug 2017 11:41:10 +0000 (19:41 +0800)]
Revert "android: port fence driver from kernel-4.4 "[1/7]
PD#149525: Revert "android: port fence driver from kernel-4.4
This reverts commit
22f718c442a2c91e6c92eb000f795dfe781721e9.
Change-Id: I0ad1ad31fe6624b11bb840bc13d64c9c5af5d651
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
jintao xu [Thu, 31 Aug 2017 08:21:23 +0000 (16:21 +0800)]
ionvideo: omx support osd display
PD#150258: omx support osd display
Change-Id: I566e530e0ec2dc5e7eb73e33b90345552f6ae7fc
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
Qi Duan [Fri, 1 Sep 2017 06:52:16 +0000 (14:52 +0800)]
USB: don't set softdisconnect when suspend
PD#148350: USB: don't set softdisconnect when suspend. [1/1]
Change-Id: I037d951f23c6d5c606af64f8c1b5550246256d79
Signed-off-by: Qi Duan <qi.duan@amlogic.com>
KeLe Bai [Fri, 1 Sep 2017 02:24:39 +0000 (10:24 +0800)]
di: support muti decode
PD#150173: di: merge muti decode from bug143269
Change-Id: I821171c93aa3a6a77a1309429a9c8a37e704b17b
Signed-off-by: KeLe Bai <kele.bai@amlogic.com>
Ao Xu [Fri, 1 Sep 2017 08:44:29 +0000 (16:44 +0800)]
defconfig: add config to solve AndroidO CTS&VTS fail
PD#149771: add config to solve AndroidO CTS&VTS fail
add the following configs:
1. CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
2. CONFIG_RANDOMIZE_BASE=y
3. CONFIG_PM_AUTOSLEEP=y
4. CONFIG_INET_DIAG_DESTROY=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
CONFIG_NETFILTER_XT_TARGET_SECMARK=y
CONFIG_IP_NF_SECURITY=y
5. CONFIG_PPPOLAC=y
CONFIG_PPPOPNS=y
6. CONFIG_USB_CONFIGFS_F_PTP=y
CONFIG_USB_CONFIGFS_F_ACC=y
CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
CONFIG_USB_CONFIGFS_F_MIDI=y
7. CONFIG_QUOTA_NETLINK_INTERFACE=y
8. CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y
CONFIG_HARDENED_USERCOPY=y
Change-Id: If0a9667682ed42790ed76addc9383dfdb62ff0c4
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Yueguie He [Thu, 31 Aug 2017 07:15:10 +0000 (15:15 +0800)]
dts: axg: sync dts config
PD#150185: dts: sync dts config
Change-Id: I3edcba36aefc1c487fcb8e31b4bdb23108b226cb
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Zhi Zhou [Thu, 31 Aug 2017 03:03:59 +0000 (11:03 +0800)]
media: codec_mm: fixed scatter cache bug
PD#150197: codec_mm: fixed tvp first wait long time bug
Change-Id: Ide5532c0e331948a70bdc809fe232b06b4a7076d
Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com>
Xing Wang [Wed, 30 Aug 2017 16:00:35 +0000 (00:00 +0800)]
audio: fix loopback channel map
PD#149869: audio: fix tdmin_lb channel mask and swap for loopback
Change-Id: I1bf2dd42a2869ca2404b72e1f0e57a267f365e23
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
Victor Wan [Thu, 31 Aug 2017 06:01:28 +0000 (14:01 +0800)]
Merge branch 'android-4.9' into amlogic-4.9-dev
Conflicts:
arch/arm/configs/s3c2410_defconfig
drivers/mmc/core/mmc.c
Signed-off-by: Victor Wan <victor.wan@amlogic.com>
Peipeng Zhao [Wed, 30 Aug 2017 09:32:43 +0000 (17:32 +0800)]
codec: fixed codec tlv320adc3101 driver clk error on 48K and 16K
PD#150168: fixed codec tlv320adc3101 record error on 48K and 16K
Change-Id: Ia672427de4c1a0e730eecdb00133d84640720785
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
Kaifu Hu [Wed, 30 Aug 2017 09:19:54 +0000 (17:19 +0800)]
hdmitx: fix 4k smpte no signal
PD#149239: hdmitx: fix 4k smpte no signal
when 4k smpte 444,10bit, div40 and scramble need be setted
Change-Id: Iadfc337519e1444c244b36086c3929d231bd80c4
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
Evoke Zhang [Fri, 25 Aug 2017 16:12:38 +0000 (00:12 +0800)]
vout: optimize tvout monitor function
PD#149868: vout: optimize tvout monitor function as below:
1.add vout_mutex lock to prevent tvout_monitor and vout_mode_store
running at the same time;
2.vout_mode_store operation will stop tvout_monitor running.
Change-Id: Ic2578357edb17cf471b90bec50ba11eb9178a8e9
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
Yueguie He [Tue, 29 Aug 2017 06:31:37 +0000 (14:31 +0800)]
mtd: add slc ids
PD#150009: mtd: nand: add slc ids
1. spansion 1024MB S34ML08G1
Change-Id: I5844574a21b0e59b10ab133db98b4f32f4547f1f
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Ao Xu [Tue, 29 Aug 2017 09:12:26 +0000 (17:12 +0800)]
defconfig: remove CONFIG_SYSVIPC to fix AndroidO CTS fail
PD#149771: remove CONFIG_SYSVIPC to fix AndroidO CTS fail
Change-Id: I16eca775b80480ca5ea1f8b5187b29ca1a5a8ed2
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Qiufang Dai [Tue, 29 Aug 2017 07:14:01 +0000 (15:14 +0800)]
pcie: move mipi gate control to pcie driver.
PD#147022: pcie: mipi share gate control.
Change-Id: I85d9676e39db548b39c4c9d3ece0ca1572bffe26
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
yi.zeng [Thu, 17 Aug 2017 02:25:35 +0000 (10:25 +0800)]
nand: fix nand key read issue
PD#146835: nand: fix the nand key read issue caused by overload memory
Change-Id: I53ce06da8ddf5f691898a7546b1b96bb9af486cd
Signed-off-by: yi.zeng <yi.zeng@amlogic.com>
Shuai Li [Mon, 28 Aug 2017 03:16:16 +0000 (11:16 +0800)]
audio: add channel constrains for TDM
PD#149888: constrains max channels number by DTS lanes
and tx_mask configs. If not, FIFO will fetch the wrong
data and cause abnormal behavior for I2S data.
Change-Id: Ic10bb773f6360ad0dfee74c227adb279dcc47cec
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Shuai Li [Fri, 25 Aug 2017 11:05:08 +0000 (19:05 +0800)]
audio: fix codecs kcontrol bugs
PD#145715: kernel 4.9 use components to wrapper the codec instance.
When poring form early versions, we have no idea about
this change. And this commit fixes this issue.
Change-Id: I56357b45c1bf93844f77fe89a828911fa9779406
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Ao Xu [Thu, 24 Aug 2017 11:31:22 +0000 (19:31 +0800)]
pstore: change pstore address to 0x7400000
PD#149300: pstore: change pstore address to 0x7400000
Change-Id: Ic8f4240a2c5c4c2137ad4c050a9af8692be15dba
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Nanxin Qin [Wed, 23 Aug 2017 06:42:54 +0000 (14:42 +0800)]
frame_sync: fixed the issure of the player that starts slowly [2/2]
PD#148146: modify checkin_firstvpts to 0xffffffff
Change-Id: I16d75f8cd0f7ed7582f731db42bc247c49580974
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Ao Xu [Thu, 24 Aug 2017 06:54:27 +0000 (14:54 +0800)]
defconfig: enable configs to fix AndroidO CTS and VTS fail
PD#149771: enable configs to fix AndroidO CTS and VTS fail
CONFIG_IKCONFIG_PROC=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=y
CONFIG_CPU_FREQ_STAT=y
In order to know how the kernel was configured via /proc,
select the CONFIG_IKCONFIG_PROC is a good choice.
Change-Id: Ief65788029157adfbd3351f6a1d589670e440d76
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Xindong Xu [Fri, 11 Aug 2017 06:38:48 +0000 (14:38 +0800)]
dts: adjust partition table for Android 8.0 [1/2]
PD#149137: dts: adjust partition table for Android 8.0
1. delete crypt
2. change tee to 32M
3. add param 16M
4. add cri_data 8M
5. add dto 8M
6. change logo to 8M
7. change misc to 8M
8. change boot to 16M
9. change recovery to 24M
10. change system to 1856M
11. change cache to 1120M
Change-Id: Ice80dee7736a127c555cac641bc3a8874aeb519e
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
Yue Wang [Wed, 23 Aug 2017 09:59:56 +0000 (17:59 +0800)]
pcie: enable pcie pm.
PD#147022: pcie: enable pcie pm.
Change-Id: Ide75af5cbe2bb840887e36a174cbfec33691534c
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
Haibing.An [Wed, 23 Aug 2017 02:01:44 +0000 (10:01 +0800)]
dts: axg: fix error when unistall wifi that call trace
PD#148250: S400 and S420
Change-Id: I690f3ab850e01d3ad8a48fc01d74625a89a8db11
Signed-off-by: Haibing.An <haibing.an@amlogic.com>
Yonghui Yu [Mon, 14 Aug 2017 08:24:16 +0000 (16:24 +0800)]
nand: add toshiba 512M(TC58NVG2S0HTA00)
PD#149262: mtd:nand : add toshiba 512M(TC58NVG2S0HTA00)
Change-Id: Ib4e5abca5b1b99542df1e9a6dc3ed347474ecfa2
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
Weiming Liu [Fri, 18 Aug 2017 07:47:39 +0000 (15:47 +0800)]
lcd_extern: fix i2c address mistake for dts config
PD#149233: lcd: add lcd_extern driver za7783
1.add lcd_extern driver za7783
2.modify the axg pll parameters
3.read under the dts lcd_extern i2c address errors
Change-Id: Ib059805a6a82d7896b2394d451d5aedb3f10ecb9
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
binqi.zhang [Fri, 11 Aug 2017 07:18:50 +0000 (15:18 +0800)]
mm: export symbol for show_mem
PD#149671: mm: export symbol for show_mem.
export symbol for show_mem() and other modules can use the function
Change-Id: Ia4b0c595ada1db2326e07d67b136ad92c9d3cb67
Signed-off-by: binqi.zhang <binqi.zhang@amlogic.com>
(cherry picked from commit
53577ac0164bcd9e933ec43c18139f2f1c55ea56)
Nanxin Qin [Tue, 22 Aug 2017 05:45:03 +0000 (13:45 +0800)]
rdma: fixed issure of crash on boot.
PD#149681: removed the operation of registers in the rdma_init
Change-Id: Iecf12be123952d0a5eb91b77e433d3fb67378d4e
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Peipeng Zhao [Tue, 22 Aug 2017 07:06:29 +0000 (15:06 +0800)]
dts: axg: fix bluetooth pinmux problems
PD#149672:
modified dts tdma data pinmux, tdma output data pin
need be set tdma_out1. otherwise soc can not send data
to Bluetooth.
Change-Id: I62a0ea89de092c6b9c3504223822e8c7fd58ecad
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
Nanxin Qin [Mon, 19 Jun 2017 07:34:01 +0000 (15:34 +0800)]
media: merged code from
43177e6a on the amlogic-3.14-dev
PD#146152: merged code from
43177e6a on the amlogic-3.14-dev
1. support for multi-instance features
2. fixed in multi-instance codec_mm memory bugs and added some
debugging information
3. optimization of vfm problems
Change-Id: I43ba9d4894ae71d53c158df667490030735b9e1e
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Signed-off-by: KeLe Bai <kele.bai@amlogic.com>
Ao Xu [Fri, 18 Aug 2017 06:51:47 +0000 (14:51 +0800)]
defconfig: add uid_sys_stats and cpu_freq_stat support
PD#149464: defconfig: add uid_sys_stats and cpu_freq_stat support
1. add CONFIG_CPU_FREQ_STAT
2. add CONFIG_UID_SYS_STATS
3. remove CONFIG_FHANDLE
Change-Id: I2b165676619a46e95ed2f75354e6e0a440cac43f
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Yueguie He [Mon, 21 Aug 2017 04:34:16 +0000 (12:34 +0800)]
dts: axg: support 128m ddr
PD#148955: dts: support 128m ddr
Change-Id: I7694bb10659b748c4e43e665945dcd7e8082a68e
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Dezhi Kong [Fri, 18 Aug 2017 02:23:18 +0000 (10:23 +0800)]
vpp: fix interlace out issue
PD#145318: vpp: fix interlace out issue
Change-Id: I623bbaf0b0795029ca689a81cf10c274afaa1fc3
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
jianxin.pan [Thu, 17 Aug 2017 12:31:47 +0000 (20:31 +0800)]
security: fix security issues about memory and registers
PD#138714: fix security issuses
1.Kernel Memory Corruption in efuse_read_usr()
Kernel Memory Corruption in efuse_read_usr()
2.Audio SoC DebugFS Entry Allows Kernel Memory Corruption
3.Kernel Stack Buffer Overwrite in clk_test debugfs
4.Register DebugFS Entry Allows Kernel Memory Read
Change-Id: I49373967732dde10e589f07aaab313340ba726e7
Signed-off-by: jianxin.pan <jianxin.pan@amlogic.com>
Qiufang Dai [Fri, 18 Aug 2017 02:35:39 +0000 (10:35 +0800)]
dts: axg: enable vrtc for axg
PD#149457: rtc: enable vrtc for axg
Change-Id: Ibb724cdbc767173e84a1238ffd5d33190f09efe0
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
Xing Wang [Wed, 16 Aug 2017 07:40:13 +0000 (15:40 +0800)]
audio: snd mixer controls for tdm/spdif
PD#147540: audio: add snd mixer controls for tdm/spdif
1. add gain/mute/swap/mask for tdm/spdif
2. channel status for spdif in/out
3. add loopback for s420, and fix datain channel number
Change-Id: I81d4432dc2b73c7cb0275087fc3d4e23ec83e400
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
Yueguie He [Thu, 17 Aug 2017 06:10:32 +0000 (14:10 +0800)]
dts: change system partition size
PD#149409: dts: change system partition size
Change-Id: I163b8f09705e3cd81211cfe790e7ef9997ae21dc
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Tellen Yu [Wed, 16 Aug 2017 07:46:04 +0000 (15:46 +0800)]
dts: add dhd_static_buf for p230 [1/1]
PD#146107: dts: add dhd_static_buf for gxl p230.
Change-Id: Ic54abfc97bdae8cdce184aa6562bcbc577f05f74
Signed-off-by: Tellen Yu <tellen.yu@amlogic.com>
Ao Xu [Tue, 15 Aug 2017 06:03:53 +0000 (14:03 +0800)]
pstore: add CONFIG_PSTORE_PMSG, add dts node in gxl_p212_2g.dts
PD#149300: pstore: add CONFIG_PSTORE_PMSG, add dts node in gxl_p212_2g.dts
Change-Id: I4407180bcde350fe4204380dacc9c8450ce254e0
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Yueguie He [Wed, 16 Aug 2017 06:55:42 +0000 (14:55 +0800)]
ddr: fix ddr window drvir error
PD#149154: ddr: fix ddr window error
Change-Id: Icf3f63e96950a28f0ae30ce7fa470c397bef6495
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Xindong Xu [Tue, 15 Aug 2017 10:39:20 +0000 (18:39 +0800)]
dts: p230: add cma heap for ion [1/1]
PD#146107: dts: p230: add cma heap for ion on Android 8.0
Change-Id: I37614c6d7417da9bf686295147739ad1d7ed1ef4
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
Tao Zeng [Wed, 16 Aug 2017 02:55:34 +0000 (10:55 +0800)]
cec: fix rcu stall by bad usage of spinlock
PD#149212: cec: fix rcu stall by spinlock
Using irqsave/irqrestore API to prevent rcu stall by spinlock
Change-Id: Ia960864e1f9b21f11c1f9656da2c0efbf221a8ac
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Yi Zhou [Tue, 15 Aug 2017 05:51:28 +0000 (13:51 +0800)]
hdmitx: using BL31 cmd to access hdmi reg
PD#149289: using BL31 cmd to access hdmi reg
1.hdmitx register may be accessed by kernel, bl30, bl31, etc...
To avoid concurrence issue, all should be only one port to access
hdmitx registers.Uniform kernel access to bl31.
2.optimize hdmitx driver style.
Change-Id: Ie5ae4b8bb8a641ccd39375b9addf9a8b01dcf464
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
Yi Zeng [Mon, 14 Aug 2017 03:25:01 +0000 (11:25 +0800)]
nand: add a new nand flash "TC58NVG2S0HBAI6" for SU customer
PD#149218: nand: add a new nand flash "TC58NVG2S0HBAI6" for SU customer
Change-Id: I06b832365db629bd4c46fa6b6fa6ab4656267602
Signed-off-by: Yi Zeng <“yi.zeng@amlogic.com”>
Shuai Li [Fri, 11 Aug 2017 11:09:44 +0000 (19:09 +0800)]
audio: modify lanemask for tdmout
PD#149114: S420 V03 speaker no sound when playing 2-ch wav
S400 & S420 modify the lineout and speaker out on TDMC dataIO2.
This commit make the speaker output available
by the output lanemask setting:
"dai-tdm-lane-slot-mask-out = <0 0 1 0>;"
It masks the third lane as data output when playing two channel
PCM waves.
Change-Id: Id1627c06f24f3fb57cc645247ca8183f197656db
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Victor Wan [Mon, 14 Aug 2017 07:24:11 +0000 (15:24 +0800)]
Merge branch 'android-4.9' into amlogic-4.9-dev
Jianxin Pan [Mon, 14 Aug 2017 06:37:53 +0000 (23:37 -0700)]
Merge "audio: modified tlv320adc3101 to support multi config through amixer" into amlogic-4.9-dev
Peipeng Zhao [Fri, 11 Aug 2017 09:43:18 +0000 (17:43 +0800)]
audio: modified tlv320adc3101 to support multi config through amixer
PD#149164: modified codec tlv320adc3101 to support multi config through
amixer
Change-Id: I8c679a2ef6b977efd84d3951fa6d0012a5c8af50
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
Yueguie He [Mon, 14 Aug 2017 02:09:56 +0000 (10:09 +0800)]
dts: add s420 128m dts
PD#148955: dts: support 128m ddr, when enable SecurOs:setenv initrd_high
0x04000000
Change-Id: If59c049a3cd5af9ba9d15f2fca63a5e3df672e1d
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
Nan Li [Tue, 1 Aug 2017 05:28:57 +0000 (13:28 +0800)]
emmc: clear line_dly on calibration
PD#148637: clear line_delay on every line calibration,
so any line's line_delay will not interfere with each other.
Change-Id: I784f66ab9df111b886ab0e45fa007f3bb2dc111e
Signed-off-by: Nan Li <nan.li@amlogic.com>
Long Yu [Fri, 11 Aug 2017 09:09:13 +0000 (17:09 +0800)]
emmc: optimizing emmc hs400 timing process
PD#148082: emmc: optimizing emmc hs400 timing process
Change-Id: I0318dec3e0c89eef3a396b157ada97b2ef768f7f
Signed-off-by: Long Yu <long.yu@amlogic.com>
Jiamin Ma [Sat, 12 Aug 2017 09:26:05 +0000 (17:26 +0800)]
secure_monitor: use reserve mem from secure os
PD#148390: add nandkey and secure storage
the reserve mem used by secure monitor comes form secure os.
we should not redefine it in DTS
Change-Id: If42f2410474e090ed5b2bca143d5a9d16260f49c
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
Greg Kroah-Hartman [Fri, 11 Aug 2017 20:55:02 +0000 (13:55 -0700)]
Merge 4.9.42 into android-4.9
Changes in 4.9.42
parisc: Handle vma's whose context is not current in flush_cache_range
cgroup: create dfl_root files on subsys registration
cgroup: fix error return value from cgroup_subtree_control()
libata: array underflow in ata_find_dev()
workqueue: restore WQ_UNBOUND/max_active==1 to be ordered
iwlwifi: dvm: prevent an out of bounds access
brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
NFSv4: Fix EXCHANGE_ID corrupt verifier issue
mmc: sdhci-of-at91: force card detect value for non removable devices
device property: Make dev_fwnode() public
mmc: core: Fix access to HS400-ES devices
mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries
cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()
ALSA: hda - Fix speaker output from VAIO VPCL14M1R
drm/amdgpu: Fix undue fallthroughs in golden registers initialization
ASoC: do not close shared backend dailink
KVM: async_pf: make rcu irq exit if not triggered from idle task
mm/page_alloc: Remove kernel address exposure in free_reserved_area()
timers: Fix overflow in get_next_timer_interrupt
powerpc/tm: Fix saving of TM SPRs in core dump
powerpc/64: Fix __check_irq_replay missing decrementer interrupt
iommu/amd: Enable ga_log_intr when enabling guest_mode
gpiolib: skip unwanted events, don't convert them to opposite edge
ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize
ext4: fix overflow caused by missing cast in ext4_resize_fs()
ARM: dts: armada-38x: Fix irq type for pca955
ARM: dts: tango4: Request RGMII RX and TX clock delays
media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
iscsi-target: Fix initial login PDU asynchronous socket close OOPs
mmc: dw_mmc: Use device_property_read instead of of_property_read
mmc: core: Use device_property_read instead of of_property_read
media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds
f2fs: sanity check checkpoint segno and blkoff
Btrfs: fix early ENOSPC due to delalloc
saa7164: fix double fetch PCIe access condition
tcp_bbr: cut pacing rate only if filled pipe
tcp_bbr: introduce bbr_bw_to_pacing_rate() helper
tcp_bbr: introduce bbr_init_pacing_rate_from_rtt() helper
tcp_bbr: remove sk_pacing_rate=0 transient during init
tcp_bbr: init pacing rate on first RTT sample
ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check()
net: Zero terminate ifr_name in dev_ifname().
ipv6: avoid overflow of offset in ip6_find_1stfragopt
net: dsa: b53: Add missing ARL entries for BCM53125
ipv4: initialize fib_trie prior to register_netdev_notifier call.
rtnetlink: allocate more memory for dev_set_mac_address()
mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled
openvswitch: fix potential out of bound access in parse_ct
packet: fix use-after-free in prb_retire_rx_blk_timer_expired()
ipv6: Don't increase IPSTATS_MIB_FRAGFAILS twice in ip6_fragment()
net: ethernet: nb8800: Handle all 4 RGMII modes identically
dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly
dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly
dccp: fix a memleak for dccp_feat_init err process
sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()
sctp: fix the check for _sctp_walk_params and _sctp_walk_errors
net/mlx5: Consider tx_enabled in all modes on remap
net/mlx5: Fix command bad flow on command entry allocation failure
net/mlx5e: Fix outer_header_zero() check size
net/mlx5e: Fix wrong delay calculation for overflow check scheduling
net/mlx5e: Schedule overflow check work to mlx5e workqueue
net: phy: Correctly process PHY_HALTED in phy_stop_machine()
xen-netback: correctly schedule rate-limited queues
sparc64: Measure receiver forward progress to avoid send mondo timeout
sparc64: Fix exception handling in UltraSPARC-III memcpy.
wext: handle NULL extra data in iwe_stream_add_point better
sh_eth: fix EESIPR values for SH77{34|63}
sh_eth: R8A7740 supports packet shecksumming
net: phy: dp83867: fix irq generation
tg3: Fix race condition in tg3_get_stats64().
x86/boot: Add missing declaration of string functions
spi: spi-axi: Free resources on error path
ASoC: rt5645: set sel_i2s_pre_div1 to 2
netfilter: use fwmark_reflect in nf_send_reset
phy state machine: failsafe leave invalid RUNNING state
ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int
clk/samsung: exynos542x: mark some clocks as critical
scsi: qla2xxx: Get mutex lock before checking optrom_state
drm/virtio: fix framebuffer sparse warning
ARM: dts: sun8i: Support DTB build for NanoPi M1
ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
iw_cxgb4: do not send RX_DATA_ACK CPLs after close/abort
nbd: blk_mq_init_queue returns an error code on failure, not NULL
virtio_blk: fix panic in initialization error path
ARM: 8632/1: ftrace: fix syscall name matching
mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER
lib/Kconfig.debug: fix frv build failure
signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
mm: don't dereference struct page fields of invalid pages
net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy
ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
net: account for current skb length when deciding about UFO
net: phy: Fix PHY unbind crash
workqueue: implicit ordered attribute should be overridable
Linux 4.9.42
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Greg Kroah-Hartman [Fri, 11 Aug 2017 15:49:50 +0000 (08:49 -0700)]
Linux 4.9.42
Tejun Heo [Sun, 23 Jul 2017 12:36:15 +0000 (08:36 -0400)]
workqueue: implicit ordered attribute should be overridable
commit
0a94efb5acbb6980d7c9ab604372d93cd507e4d8 upstream.
5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be
ordered") automatically enabled ordered attribute for unbound
workqueues w/ max_active == 1. Because ordered workqueues reject
max_active and some attribute changes, this implicit ordered mode
broke cases where the user creates an unbound workqueue w/ max_active
== 1 and later explicitly changes the related attributes.
This patch distinguishes explicit and implicit ordered setting and
overrides from attribute changes if implict.
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes:
5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered")
Cc: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Florian Fainelli [Sat, 18 Feb 2017 00:07:33 +0000 (16:07 -0800)]
net: phy: Fix PHY unbind crash
commit
7b9a88a390dacb37b051a7b09b9a08f546edf5eb upstream.
The PHY library does not deal very well with bind and unbind events. The first
thing we would see is that we were not properly canceling the PHY state machine
workqueue, so we would be crashing while dereferencing phydev->drv since there
is no driver attached anymore.
Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michal Kubeček [Mon, 19 Jun 2017 11:03:43 +0000 (13:03 +0200)]
net: account for current skb length when deciding about UFO
[ Upstream commit
a5cb659bbc1c8644efa0c3138a757a1e432a4880 ]
Our customer encountered stuck NFS writes for blocks starting at specific
offsets w.r.t. page boundary caused by networking stack sending packets via
UFO enabled device with wrong checksum. The problem can be reproduced by
composing a long UDP datagram from multiple parts using MSG_MORE flag:
sendto(sd, buff, 1000, MSG_MORE, ...);
sendto(sd, buff, 1000, MSG_MORE, ...);
sendto(sd, buff, 3000, 0, ...);
Assume this packet is to be routed via a device with MTU 1500 and
NETIF_F_UFO enabled. When second sendto() gets into __ip_append_data(),
this condition is tested (among others) to decide whether to call
ip_ufo_append_data():
((length + fragheaderlen) > mtu) || (skb && skb_is_gso(skb))
At the moment, we already have skb with 1028 bytes of data which is not
marked for GSO so that the test is false (fragheaderlen is usually 20).
Thus we append second 1000 bytes to this skb without invoking UFO. Third
sendto(), however, has sufficient length to trigger the UFO path so that we
end up with non-UFO skb followed by a UFO one. Later on, udp_send_skb()
uses udp_csum() to calculate the checksum but that assumes all fragments
have correct checksum in skb->csum which is not true for UFO fragments.
When checking against MTU, we need to add skb->len to length of new segment
if we already have a partially filled skb and fragheaderlen only if there
isn't one.
In the IPv6 case, skb can only be null if this is the first segment so that
we have to use headersize (length of the first IPv6 header) rather than
fragheaderlen (length of IPv6 header of further fragments) for skb == NULL.
Fixes:
e89e9cf539a2 ("[IPv4/IPv6]: UFO Scatter-gather approach")
Fixes:
e4c5e13aa45c ("ipv6: Should use consistent conditional judgement for
ip6 fragment between __ip6_append_data and ip6_finish_output")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
zheng li [Mon, 12 Dec 2016 01:56:05 +0000 (09:56 +0800)]
ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
[ Upstream commit
0a28cfd51e17f4f0a056bcf66bfbe492c3b99f38 ]
There is an inconsistent conditional judgement in __ip_append_data and
ip_finish_output functions, the variable length in __ip_append_data just
include the length of application's payload and udp header, don't include
the length of ip header, but in ip_finish_output use
(skb->len > ip_skb_dst_mtu(skb)) as judgement, and skb->len include the
length of ip header.
That causes some particular application's udp payload whose length is
between (MTU - IP Header) and MTU were fragmented by ip_fragment even
though the rst->dev support UFO feature.
Add the length of ip header to length in __ip_append_data to keep
consistent conditional judgement as ip_finish_output for ip fragment.
Signed-off-by: Zheng Li <james.z.li@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Or Gerlitz [Sun, 15 Jan 2017 17:05:38 +0000 (19:05 +0200)]
net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy
[ Upstream commit
5bae8c031053c69b4aa74b7f1ba15d4ec8426208 ]
We must re-enable RoCE on the e-switch management port (PF) only after destroying
the FDB in its switchdev/offloaded mode. Otherwise, when encapsulation is supported,
this re-enablement will fail.
Also, it's more natural and symmetric to disable RoCE on the PF before we create
the FDB under switchdev mode, so do that as well and revert if getting into error
during the mode change later.
Fixes:
9da34cd34e85 ('net/mlx5: Disable RoCE on the e-switch management [..]')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ard Biesheuvel [Wed, 11 Jan 2017 00:58:00 +0000 (16:58 -0800)]
mm: don't dereference struct page fields of invalid pages
[ Upstream commit
f073bdc51771f5a5c7a8d1191bfc3ae371d44de7 ]
The VM_BUG_ON() check in move_freepages() checks whether the node id of
a page matches the node id of its zone. However, it does this before
having checked whether the struct page pointer refers to a valid struct
page to begin with. This is guaranteed in most cases, but may not be
the case if CONFIG_HOLES_IN_ZONE=y.
So reorder the VM_BUG_ON() with the pfn_valid_within() check.
Link: http://lkml.kernel.org/r/1481706707-6211-2-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Yisheng Xie <xieyisheng1@huawei.com>
Cc: Robert Richter <rrichter@cavium.com>
Cc: James Morse <james.morse@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jamie Iles [Wed, 11 Jan 2017 00:57:54 +0000 (16:57 -0800)]
signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
[ Upstream commit
2d39b3cd34e6d323720d4c61bd714f5ae202c022 ]
Since commit
00cd5c37afd5 ("ptrace: permit ptracing of /sbin/init") we
can now trace init processes. init is initially protected with
SIGNAL_UNKILLABLE which will prevent fatal signals such as SIGSTOP, but
there are a number of paths during tracing where SIGNAL_UNKILLABLE can
be implicitly cleared.
This can result in init becoming stoppable/killable after tracing. For
example, running:
while true; do kill -STOP 1; done &
strace -p 1
and then stopping strace and the kill loop will result in init being
left in state TASK_STOPPED. Sending SIGCONT to init will resume it, but
init will now respond to future SIGSTOP signals rather than ignoring
them.
Make sure that when setting SIGNAL_STOP_CONTINUED/SIGNAL_STOP_STOPPED
that we don't clear SIGNAL_UNKILLABLE.
Link: http://lkml.kernel.org/r/20170104122017.25047-1-jamie.iles@oracle.com
Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Wed, 11 Jan 2017 00:57:45 +0000 (16:57 -0800)]
lib/Kconfig.debug: fix frv build failure
[ Upstream commit
da0510c47519fe0999cffe316e1d370e29f952be ]
The build of frv allmodconfig was failing with the errors like:
/tmp/cc0JSPc3.s: Assembler messages:
/tmp/cc0JSPc3.s:1839: Error: symbol `.LSLT0' is already defined
/tmp/cc0JSPc3.s:1842: Error: symbol `.LASLTP0' is already defined
/tmp/cc0JSPc3.s:1969: Error: symbol `.LELTP0' is already defined
/tmp/cc0JSPc3.s:1970: Error: symbol `.LELT0' is already defined
Commit
866ced950bcd ("kbuild: Support split debug info v4") introduced
splitting the debug info and keeping that in a separate file. Somehow,
the frv-linux gcc did not like that and I am guessing that instead of
splitting it started copying. The first report about this is at:
https://lists.01.org/pipermail/kbuild-all/2015-July/010527.html.
I will try and see if this can work with frv and if still fails I will
open a bug report with gcc. But meanwhile this is the easiest option to
solve build failure of frv.
Fixes:
866ced950bcd ("kbuild: Support split debug info v4")
Link: http://lkml.kernel.org/r/1482062348-5352-1-git-send-email-sudipm.mukherjee@gmail.com
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michal Hocko [Wed, 11 Jan 2017 00:57:27 +0000 (16:57 -0800)]
mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER
[ Upstream commit
bb1107f7c6052c863692a41f78c000db792334bf ]
Andrey Konovalov has reported the following warning triggered by the
syzkaller fuzzer.
WARNING: CPU: 1 PID: 9935 at mm/page_alloc.c:3511 __alloc_pages_nodemask+0x159c/0x1e20
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 9935 Comm: syz-executor0 Not tainted 4.9.0-rc7+ #34
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Call Trace:
__alloc_pages_slowpath mm/page_alloc.c:3511
__alloc_pages_nodemask+0x159c/0x1e20 mm/page_alloc.c:3781
alloc_pages_current+0x1c7/0x6b0 mm/mempolicy.c:2072
alloc_pages include/linux/gfp.h:469
kmalloc_order+0x1f/0x70 mm/slab_common.c:1015
kmalloc_order_trace+0x1f/0x160 mm/slab_common.c:1026
kmalloc_large include/linux/slab.h:422
__kmalloc+0x210/0x2d0 mm/slub.c:3723
kmalloc include/linux/slab.h:495
ep_write_iter+0x167/0xb50 drivers/usb/gadget/legacy/inode.c:664
new_sync_write fs/read_write.c:499
__vfs_write+0x483/0x760 fs/read_write.c:512
vfs_write+0x170/0x4e0 fs/read_write.c:560
SYSC_write fs/read_write.c:607
SyS_write+0xfb/0x230 fs/read_write.c:599
entry_SYSCALL_64_fastpath+0x1f/0xc2
The issue is caused by a lack of size check for the request size in
ep_write_iter which should be fixed. It, however, points to another
problem, that SLUB defines KMALLOC_MAX_SIZE too large because the its
KMALLOC_SHIFT_MAX is (MAX_ORDER + PAGE_SHIFT) which means that the
resulting page allocator request might be MAX_ORDER which is too large
(see __alloc_pages_slowpath).
The same applies to the SLOB allocator which allows even larger sizes.
Make sure that they are capped properly and never request more than
MAX_ORDER order.
Link: http://lkml.kernel.org/r/20161220130659.16461-2-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rabin Vincent [Wed, 23 Nov 2016 12:02:32 +0000 (13:02 +0100)]
ARM: 8632/1: ftrace: fix syscall name matching
[ Upstream commit
270c8cf1cacc69cb8d99dea812f06067a45e4609 ]
ARM has a few system calls (most notably mmap) for which the names of
the functions which are referenced in the syscall table do not match the
names of the syscall tracepoints. As a consequence of this, these
tracepoints are not made available. Implement
arch_syscall_match_sym_name to fix this and allow tracing even these
system calls.
Signed-off-by: Rabin Vincent <rabinv@axis.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Omar Sandoval [Mon, 9 Jan 2017 19:44:12 +0000 (11:44 -0800)]
virtio_blk: fix panic in initialization error path
[ Upstream commit
6bf6b0aa3da84a3d9126919a94c49c0fb7ee2fb3 ]
If blk_mq_init_queue() returns an error, it gets assigned to
vblk->disk->queue. Then, when we call put_disk(), we end up calling
blk_put_queue() with the ERR_PTR, causing a bad dereference. Fix it by
only assigning to vblk->disk->queue on success.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jeff Moyer [Mon, 9 Jan 2017 20:20:31 +0000 (15:20 -0500)]
nbd: blk_mq_init_queue returns an error code on failure, not NULL
[ Upstream commit
25b4acfc7de0fc4da3bfea3a316f7282c6fbde81 ]
Additionally, don't assign directly to disk->queue, otherwise
blk_put_queue (called via put_disk) will choke (panic) on the errno
stored there.
Bug found by code inspection after Omar found a similar issue in
virtio_blk. Compile-tested only.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Steve Wise [Thu, 22 Dec 2016 15:40:37 +0000 (07:40 -0800)]
iw_cxgb4: do not send RX_DATA_ACK CPLs after close/abort
[ Upstream commit
3bcf96e0183f5c863657cb6ae9adad307a0f6071 ]
Function rx_data(), which handles ingress CPL_RX_DATA messages, was
always sending an RX_DATA_ACK with the goal of updating the credits.
However, if the RDMA connection is moved out of FPDU mode abruptly,
then it is possible for iw_cxgb4 to process queued RX_DATA CPLs after HW
has aborted the connection. These CPLs should not trigger RX_DATA_ACKS.
If they do, HW can see a READ after DELETE of the DB_LE hash entry for
the tid and post a LE_DB HashTblMemCrcError.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emmanuel Vadot [Wed, 14 Dec 2016 14:57:24 +0000 (15:57 +0100)]
ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
[ Upstream commit
3116d37651d77125bf50f81f859b1278e02ccce6 ]
The node name for the power seq pin is mmc2@0 like the mmc2_pins_a one.
This makes the original node (mmc2_pins_a) scrapped out of the dtb and
result in a unusable eMMC if U-Boot didn't configured the pins to the
correct functions.
Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Milo Kim [Mon, 12 Dec 2016 23:18:15 +0000 (08:18 +0900)]
ARM: dts: sun8i: Support DTB build for NanoPi M1
[ Upstream commit
661ccdc1a95f18ab6c1373322fde09afd5b90a1f ]
The commit
10efbf5f1633 ("ARM: dts: sun8i: Add dts file for NanoPi M1 SBC")
introduced NanoPi M1 board but it's missing in Allwinner H3 DTB build.
Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gerd Hoffmann [Mon, 28 Nov 2016 07:52:20 +0000 (08:52 +0100)]
drm/virtio: fix framebuffer sparse warning
[ Upstream commit
71d3f6ef7f5af38dea2975ec5715c88bae92e92d ]
virtio uses normal ram as backing storage for the framebuffer, so we
should assign the address to new screen_buffer (added by commit
17a7b0b4d9749f80d365d7baff5dec2f54b0e992) instead of screen_base.
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Milan P. Gandhi [Sat, 24 Dec 2016 16:32:46 +0000 (22:02 +0530)]
scsi: qla2xxx: Get mutex lock before checking optrom_state
[ Upstream commit
c7702b8c22712a06080e10f1d2dee1a133ec8809 ]
There is a race condition with qla2xxx optrom functions where one thread
might modify optrom buffer, optrom_state while other thread is still
reading from it.
In couple of crashes, it was found that we had successfully passed the
following 'if' check where we confirm optrom_state to be
QLA_SREADING. But by the time we acquired mutex lock to proceed with
memory_read_from_buffer function, some other thread/process had already
modified that option rom buffer and optrom_state from QLA_SREADING to
QLA_SWAITING. Then we got ha->optrom_buffer 0x0 and crashed the system:
if (ha->optrom_state != QLA_SREADING)
return 0;
mutex_lock(&ha->optrom_mutex);
rval = memory_read_from_buffer(buf, count, &off, ha->optrom_buffer,
ha->optrom_region_size);
mutex_unlock(&ha->optrom_mutex);
With current optrom function we get following crash due to a race
condition:
[ 1479.466679] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 1479.466707] IP: [<
ffffffff81326756>] memcpy+0x6/0x110
[...]
[ 1479.473673] Call Trace:
[ 1479.474296] [<
ffffffff81225cbc>] ? memory_read_from_buffer+0x3c/0x60
[ 1479.474941] [<
ffffffffa01574dc>] qla2x00_sysfs_read_optrom+0x9c/0xc0 [qla2xxx]
[ 1479.475571] [<
ffffffff8127e76b>] read+0xdb/0x1f0
[ 1479.476206] [<
ffffffff811fdf9e>] vfs_read+0x9e/0x170
[ 1479.476839] [<
ffffffff811feb6f>] SyS_read+0x7f/0xe0
[ 1479.477466] [<
ffffffff816964c9>] system_call_fastpath+0x16/0x1b
Below patch modifies qla2x00_sysfs_read_optrom,
qla2x00_sysfs_write_optrom functions to get the mutex_lock before
checking ha->optrom_state to avoid similar crashes.
The patch was applied and tested and same crashes were no longer
observed again.
Tested-by: Milan P. Gandhi <mgandhi@redhat.com>
Signed-off-by: Milan P. Gandhi <mgandhi@redhat.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marek Szyprowski [Thu, 22 Dec 2016 09:44:30 +0000 (10:44 +0100)]
clk/samsung: exynos542x: mark some clocks as critical
[ Upstream commit
318fa46cc60d37fec1e87dbf03a82aca0f5ce695 ]
Some parent clocks of the Exynos542x clock blocks, which have separate
power domains (like DISP, MFC, MSC, GSC, FSYS and G2D) must be always
enabled to access any register related to power management unit or devices
connected to it. For the time being, until a proper solution based on
runtime PM is applied, mark those clocks as critical (instead of ignore
unused or even no flags) to prevent disabling them.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> [Exynos5800 Peach Pi Chromebook]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pavel Tikhomirov [Mon, 9 Jan 2017 07:45:49 +0000 (10:45 +0300)]
ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int
[ Upstream commit
b007f09072ca8afa118ade333e717ba443e8d807 ]
> cat /proc/sys/net/ipv4/tcp_notsent_lowat
-1
> echo
4294967295 > /proc/sys/net/ipv4/tcp_notsent_lowat
-bash: echo: write error: Invalid argument
> echo -
2147483648 > /proc/sys/net/ipv4/tcp_notsent_lowat
> cat /proc/sys/net/ipv4/tcp_notsent_lowat
-
2147483648
but in documentation we have "tcp_notsent_lowat - UNSIGNED INTEGER"
v2: simplify to just proc_douintvec
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Zefir Kurtisi [Fri, 6 Jan 2017 11:14:48 +0000 (12:14 +0100)]
phy state machine: failsafe leave invalid RUNNING state
[ Upstream commit
811a919135b980bac8009d042acdccf10dc1ef5e ]
While in RUNNING state, phy_state_machine() checks for link changes by
comparing phydev->link before and after calling phy_read_status().
This works as long as it is guaranteed that phydev->link is never
changed outside the phy_state_machine().
If in some setups this happens, it causes the state machine to miss
a link loss and remain RUNNING despite phydev->link being 0.
This has been observed running a dsa setup with a process continuously
polling the link states over ethtool each second (SNMPD RFC-1213
agent). Disconnecting the link on a phy followed by a ETHTOOL_GSET
causes dsa_slave_get_settings() / dsa_slave_get_link_ksettings() to
call phy_read_status() and with that modify the link status - and
with that bricking the phy state machine.
This patch adds a fail-safe check while in RUNNING, which causes to
move to CHANGELINK when the link is gone and we are still RUNNING.
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pau Espin Pedrol [Fri, 6 Jan 2017 19:33:27 +0000 (20:33 +0100)]
netfilter: use fwmark_reflect in nf_send_reset
[ Upstream commit
cc31d43b4154ad5a7d8aa5543255a93b7e89edc2 ]
Otherwise, RST packets generated by ipt_REJECT always have mark 0 when
the routing is checked later in the same code path.
Fixes:
e110861f8609 ("net: add a sysctl to reflect the fwmark on replies")
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Pau Espin Pedrol <pau.espin@tessares.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bard Liao [Tue, 27 Dec 2016 04:05:05 +0000 (12:05 +0800)]
ASoC: rt5645: set sel_i2s_pre_div1 to 2
[ Upstream commit
02c5c03283c52157d336abf5e44ffcda10579fbf ]
The i2s clock pre-divider 1 is used for both i2s1 and sysclk.
The i2s1 is usually used for the main i2s and the pre-divider
will be set in hw_params function.
However, if i2s2 is used, the pre-divider is not set in the hw_params
function and the default value of i2s clock pre-divider 1 is too high
for sysclk and DMIC usage. Fix by overriding default divider value to 2.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95681
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christophe JAILLET [Mon, 9 Jan 2017 00:02:47 +0000 (01:02 +0100)]
spi: spi-axi: Free resources on error path
[ Upstream commit
9620ca90115d4bd700f05862d3b210a266a66efe ]
We should go to 'err_put_master' here instead of returning directly.
Otherwise a call to 'spi_master_put' is missing.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Mc Guire [Sat, 7 Jan 2017 09:38:31 +0000 (10:38 +0100)]
x86/boot: Add missing declaration of string functions
[ Upstream commit
fac69d0efad08fc15e4dbfc116830782acc0dc9a ]
Add the missing declarations of basic string functions to string.h to allow
a clean build.
Fixes:
5be865661516 ("String-handling functions for the new x86 setup code.")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Link: http://lkml.kernel.org/r/1483781911-21399-1-git-send-email-hofrat@osadl.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Chan [Fri, 6 Jan 2017 21:18:53 +0000 (16:18 -0500)]
tg3: Fix race condition in tg3_get_stats64().
[ Upstream commit
f5992b72ebe0dde488fa8f706b887194020c66fc ]
The driver's ndo_get_stats64() method is not always called under RTNL.
So it can race with driver close or ethtool reconfigurations. Fix the
race condition by taking tp->lock spinlock in tg3_free_consistent()
when freeing the tp->hw_stats memory block. tg3_get_stats64() is
already taking tp->lock.
Reported-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grygorii Strashko [Thu, 5 Jan 2017 20:48:07 +0000 (14:48 -0600)]
net: phy: dp83867: fix irq generation
[ Upstream commit
5ca7d1ca77dc23934504b95a96d2660d345f83c2 ]
For proper IRQ generation by DP83867 phy the INT/PWDN pin has to be
programmed as an interrupt output instead of a Powerdown input in
Configuration Register 3 (CFG3), Address 0x001E, bit 7 INT_OE = 1. The
current driver doesn't do this and as result IRQs will not be generated by
DP83867 phy even if they are properly configured in DT.
Hence, fix IRQ generation by properly configuring CFG3.INT_OE bit and
ensure that Link Status Change (LINK_STATUS_CHNG_INT) and Auto-Negotiation
Complete (AUTONEG_COMP_INT) interrupt are enabled. After this the DP83867
driver will work properly in interrupt enabled mode.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergei Shtylyov [Wed, 4 Jan 2017 21:29:32 +0000 (00:29 +0300)]
sh_eth: R8A7740 supports packet shecksumming
[ Upstream commit
0f1f9cbc04dbb3cc310f70a11cba0cf1f2109d9c ]
The R8A7740 GEther controller supports the packet checksum offloading
but the 'hw_crc' (bad name, I'll fix it) flag isn't set in the R8A7740
data, thus CSMR isn't cleared...
Fixes:
73a0d907301e ("net: sh_eth: add support R8A7740")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergei Shtylyov [Wed, 4 Jan 2017 19:18:24 +0000 (22:18 +0300)]
sh_eth: fix EESIPR values for SH77{34|63}
[ Upstream commit
978d3639fd13d987950e4ce85c8737ae92154b2c ]
As the SH77{34|63} manuals are freely available, I've checked the EESIPR
values written against the manuals, and they appeared to set the reserved
bits 11-15 (which should be 0 on write). Fix those EESIPR values.
Fixes:
380af9e390ec ("net: sh_eth: CPU dependency code collect to "struct sh_eth_cpu_data"")
Fixes:
f5d12767c8fd ("sh_eth: get SH77{34|63} support out of #ifdef")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 11 Jan 2017 14:35:25 +0000 (15:35 +0100)]
wext: handle NULL extra data in iwe_stream_add_point better
commit
93be2b74279c15c2844684b1a027fdc71dd5d9bf upstream.
gcc-7 complains that wl3501_cs passes NULL into a function that
then uses the argument as the input for memcpy:
drivers/net/wireless/wl3501_cs.c: In function 'wl3501_get_scan':
include/net/iw_handler.h:559:3: error: argument 2 null where non-null expected [-Werror=nonnull]
memcpy(stream + point_len, extra, iwe->u.data.length);
This works fine here because iwe->u.data.length is guaranteed to be 0
and the memcpy doesn't actually have an effect.
Making the length check explicit avoids the warning and should have
no other effect here.
Also check the pointer itself, since otherwise we get warnings
elsewhere in the code.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Fri, 4 Aug 2017 16:47:52 +0000 (09:47 -0700)]
sparc64: Fix exception handling in UltraSPARC-III memcpy.
[ Upstream commit
0ede1c401332173ab0693121dc6cde04a4dbf131 ]
Mikael Pettersson reported that some test programs in the strace-4.18
testsuite cause an OOPS.
After some debugging it turns out that garbage values are returned
when an exception occurs, causing the fixup memset() to be run with
bogus arguments.
The problem is that two of the exception handler stubs write the
successfully copied length into the wrong register.
Fixes:
ee841d0aff64 ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.")
Reported-by: Mikael Pettersson <mikpelinux@gmail.com>
Tested-by: Mikael Pettersson <mikpelinux@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jane Chu [Tue, 11 Jul 2017 18:00:54 +0000 (12:00 -0600)]
sparc64: Measure receiver forward progress to avoid send mondo timeout
[ Upstream commit
9d53caec84c7c5700e7c1ed744ea584fff55f9ac ]
A large sun4v SPARC system may have moments of intensive xcall activities,
usually caused by unmapping many pages on many CPUs concurrently. This can
flood receivers with CPU mondo interrupts for an extended period, causing
some unlucky senders to hit send-mondo timeout. This problem gets worse
as cpu count increases because sometimes mappings must be invalidated on
all CPUs, and sometimes all CPUs may gang up on a single CPU.
But a busy system is not a broken system. In the above scenario, as long
as the receiver is making forward progress processing mondo interrupts,
the sender should continue to retry.
This patch implements the receiver's forward progress meter by introducing
a per cpu counter 'cpu_mondo_counter[cpu]' where 'cpu' is in the range
of 0..NR_CPUS. The receiver increments its counter as soon as it receives
a mondo and the sender tracks the receiver's counter. If the receiver has
stopped making forward progress when the retry limit is reached, the sender
declares send-mondo-timeout and panic; otherwise, the receiver is allowed
to keep making forward progress.
In addition, it's been observed that PCIe hotplug events generate Correctable
Errors that are handled by hypervisor and then OS. Hypervisor 'borrows'
a guest cpu strand briefly to provide the service. If the cpu strand is
simultaneously the only cpu targeted by a mondo, it may not be available
for the mondo in 20msec, causing SUN4V mondo timeout. It appears that 1 second
is the agreed wait time between hypervisor and guest OS, this patch makes
the adjustment.
Orabug:
25476541
Orabug:
26417466
Signed-off-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Thomas Tai <thomas.tai@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Liu [Wed, 21 Jun 2017 09:21:22 +0000 (10:21 +0100)]
xen-netback: correctly schedule rate-limited queues
[ Upstream commit
dfa523ae9f2542bee4cddaea37b3be3e157f6e6b ]
Add a flag to indicate if a queue is rate-limited. Test the flag in
NAPI poll handler and avoid rescheduling the queue if true, otherwise
we risk locking up the host. The rescheduling will be done in the
timer callback function.
Reported-by: Jean-Louis Dupond <jean-louis@dupond.be>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Jean-Louis Dupond <jean-louis@dupond.be>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Florian Fainelli [Fri, 28 Jul 2017 18:58:36 +0000 (11:58 -0700)]
net: phy: Correctly process PHY_HALTED in phy_stop_machine()
[ Upstream commit
7ad813f208533cebfcc32d3d7474dc1677d1b09a ]
Marc reported that he was not getting the PHY library adjust_link()
callback function to run when calling phy_stop() + phy_disconnect()
which does not indeed happen because we set the state machine to
PHY_HALTED but we don't get to run it to process this state past that
point.
Fix this with a synchronous call to phy_state_machine() in order to have
the state machine actually act on PHY_HALTED, set the PHY device's link
down, turn the network device's carrier off and finally call the
adjust_link() function.
Reported-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Fixes:
a390d1f379cf ("phylib: convert state_queue work to delayed_work")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eugenia Emantayev [Wed, 12 Jul 2017 14:44:07 +0000 (17:44 +0300)]
net/mlx5e: Schedule overflow check work to mlx5e workqueue
[ Upstream commit
f08c39ed0bfb503c7b3e013cd40d036ce6a0941a ]
This is done in order to ensure that work will not run after the cleanup.
Fixes:
ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support')
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eugenia Emantayev [Wed, 12 Jul 2017 14:27:18 +0000 (17:27 +0300)]
net/mlx5e: Fix wrong delay calculation for overflow check scheduling
[ Upstream commit
d439c84509a510e864fdc6166c760482cd03fc57 ]
The overflow_period is calculated in seconds. In order to use it
for delayed work scheduling translation to jiffies is needed.
Fixes:
ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support')
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>