Commit graph

877,558 commits

Author SHA1 Message Date
Shaleen Agrawal
dcb879fbf7 cpufreq: Add snapshot of qcom-cpufreq driver
This is a snapshot of qcom-cpufreq as of msm-4.19 commit 9a1757a1cb90
("qcom-cpufreq: Add missing cpufreq registers when use common table").

Change-Id: I4458f50dff9e9d44ec56d0214a60bf26673706a6
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2019-12-19 16:34:12 -08:00
Tingwei Zhang
7b0d5d038d arm64: defconfig: Enable debug features on Lahaina
Enable coresight, dcc, memory dump, remote qdss driver.

Change-Id: Iaf64adb71dc54457e30c7d42cc9f6f9e2854f3be
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-12-20 08:33:13 +08:00
Tingwei Zhang
2e837c23f2 coresight: ost: correct the kconfig dependency
Make the dependency correct to avoid warning in build.

Change-Id: I5d39c83e0773c7077072ffe2c0ba4b18c082bca6
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-12-20 08:31:44 +08:00
Umesh Vats
7fa2f55c9b Bluetooth: Re-initialize regulator to NULL on error
Reset the regulator to NULL when its allocation fails.

Change-Id: I5e9fcad83d0ed449c225c7c5c99d93ebae9848fc
Signed-off-by: Umesh Vats <uvats@codeaurora.org>
2019-12-19 16:24:16 -08:00
qctecmdr
a70116e190 Merge "sched: Improve the scheduler" 2019-12-19 14:10:22 -08:00
qctecmdr
ad8801ff2e Merge "pinctrl: Add wakeup gpio register and bit information" 2019-12-19 13:31:01 -08:00
qctecmdr
b7b6d681a0 Merge "usb: dwc3-msm: Delete sysfs files on driver remove" 2019-12-19 12:55:23 -08:00
qctecmdr
1f1c1c00a8 Merge "msm: sps: Fix build warnings" 2019-12-19 12:55:22 -08:00
Manikandan Mohan
8e94cf254f net: cnss2: Remove unsupported symbol references
Update cnss2 driver for unsupported function references on
msm-5.4 kernel. Also revert pci device no_d3hot optimization.

Change-Id: Id62cef36801cde43fc773fdc16d9f1ddca6b62f5
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2019-12-19 12:23:39 -08:00
qctecmdr
5d11e8c54c Merge "wil6210: reduce ucode_debug memory region" 2019-12-19 10:09:24 -08:00
qctecmdr
b188aa0158 Merge "sched: Support Energy Aware Scheduling irrespective of governor" 2019-12-19 10:09:23 -08:00
Murali Nalajala
723761af32 arm64: defconfig: Enable EDAC driver support for QCOM SoCs
Enable error reporting driver for Single Bit Errors (SBEs) and
Double Bit Errors (DBEs). This driver supports error reporting
for Last Level Cache Controller (LLCC) of Tag RAM and Data RAM.

Change-Id: Idd1adb33f4b945ea61ca2e123ecbda163d74db31
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2019-12-19 09:55:37 -08:00
qctecmdr
b4b60f8832 Merge "wil6210: add verification for cid upper bound" 2019-12-19 06:29:41 -08:00
qctecmdr
14bc58fa2d Merge "firmware: qcom_scm: Add calls to support poweroff driver" 2019-12-19 03:51:40 -08:00
qctecmdr
2c3dddaef1 Merge "arm64: defconfig: Enable minidump driver on Lahaina GKI" 2019-12-19 03:51:40 -08:00
qctecmdr
f3cd02fc21 Merge "sched: Add schedutil snapshot" 2019-12-19 03:51:37 -08:00
Siva Kumar Akkireddi
a66a77dd9c msm: sps: Fix build warnings
Fix Sparse warnings to enable SPS driver for Lahaina - use
NULL instead of 0 to specify null argument, and use the static
keyword for locally used structures.

Change-Id: If6d69bb464b821e408d757317f7ed2ef15355f7f
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
2019-12-19 16:05:41 +05:30
qctecmdr
9b0c05f16b Merge "scsi: ufs-qti: port UFS driver changes for QTI configuration" 2019-12-19 01:52:18 -08:00
Praveen Kurapati
d85b4e856c msm: ipa3: Fix to avoid memory out of bound access error
Allocate the memory of structure size instead of using macros
generated by IDL.

Change-Id: I400506e0a7228e71d8c76fd39723d88ce29e3016
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2019-12-19 13:23:00 +05:30
Dedy Lansky
369c5b7f02 wil6210: reduce ucode_debug memory region
ucode_debug memory region defined as 4K bytes. Fix this according to
Talyn device memory map.

Change-Id: I47397ea00332926e678af2d50be25b16124587c3
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
2019-12-19 09:09:24 +02:00
Ahmad Masri
8ca4b705ac wil6210: enable access category queues
Set ac_queues default to enabled.
Change wil_select_ac_queue to return higher priority queue for EAPOL,
ARP and ICMP packets. These special packets are critical to maintain
the link with the AP and guarantee healthy operations and diagnostics
in the network.

Special packets will get the higher priority to ensure early
transmission when access category is enabled.

Change-Id: Ic03a810c303f614174f9f10c72e339ee32a6f023
Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
2019-12-19 09:09:04 +02:00
Hrishikesh Vidwans
b990cfb88f wil6210: allow sending special packets when tx ring is full
When traffic is very high, some special packets such as ARP may get
dropped causing the tx traffic to stall intermittently.
This patch preserves spare tx descriptors so that special packets can
be sent even when the tx ring is almost full. The number of reserved
entries can be changed by writing to tx_reserved_entries via debugfs,
taking effect in subsequent connections.

This feature is enabled when either drop_if_ring_full or ac_queues are
enabled.

Change-Id: I6c5215500966840445f2631fb32494750e60303d
Signed-off-by: Hrishikesh Vidwans <hvidwans@codeaurora.org>
Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
2019-12-19 09:08:44 +02:00
Ahmad Masri
e76f6c74d3 wil6210: Support ndo_select_queue in net_device_ops
Add support for Access Category to select queue for transmit packets.
The callback wil_select_queue will return the queue id [0..3] to use for
the current skb transmission.

This feature is disabled by default. Use ac_queues parameter from
wigig.ini configuration file to enable.

Change-Id: I2891c58744eddafe16f9d74d1a87acdbf90d3d40
Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
2019-12-19 09:08:26 +02:00
Alexei Avshalom Lazar
5f44d3caa7 wil6210: add verification for cid upper bound
max_assoc_sta can receive values (from the user or from the FW)
that are higher than WIL6210_MAX_CID.
Verify that cid doesn't exceed the upper bound of WIL6210_MAX_CID.

Change-Id: Id00b69a128d2c4df4a3ef85583bbe44590ff557c
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
2019-12-19 09:08:05 +02:00
Alexei Avshalom Lazar
ff02bf9483 wil6210: take mem_lock for writing in crash dump collection
On some crash dump cases mem_lock is already taken, error
returns and crash dump copy fails.
In this case wait until mem_lock available instead of failing
the operation.
Also take the mem_lock for writing to prevent other threads from
altering the state of the device while collecting crash dump.

Change-Id: I2ae74fba77e39161e33a7c5302916d1c9254fa05
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
2019-12-19 09:07:35 +02:00
Alexei Avshalom Lazar
68aa288faa wil6210: minimize the time that mem_lock is held
mem_lock is taken for the entire wil_reset().
Optimize this by taking mem_lock just before device is
being reset and release the lock after FW download.

Change-Id: Icf3430e355acc2c33dc37c6a38a18c47de03a2cf
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
2019-12-19 09:06:33 +02:00
Ahmad Masri
4a8e85bc08 wil6210: enable AP/PCP power save
New FW has power save capability in AP/PCP mode. FW reports this to
driver with WMI_FW_CAPABILITY_AP_POWER_MANAGEMENT.

AP/PCP mode power save in FW is disabled by default. It can be enabled
by sending WMI_PS_DEV_PROFILE_CFG_CMD to FW as part of start_ap
sequence.

Several pre-conditions must be met for driver to enable this:
1. power save enabled from cfg80211
2. AP power save enabled from platform driver. This is reported from
   platform driver with a new WIL_PLATFORM_CAPA_AP_PS

AP power save can be controlled via "ap_ps" debugfs.

Change-Id: I328fdbfe5382e60688c9f4a67aa9378197e01987
Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
2019-12-19 09:06:03 +02:00
qctecmdr
4837fa24d4 Merge "msm: sps: Add SPS driver snapshot" 2019-12-18 21:53:37 -08:00
Yuanfang Zhang
29cdfe444a soc: mem_dump: fix physical address mapping issue
Using phys_to_virt can't get correct virtual address. Because the physical
address is continuous, the virtual address can be obtained by using the
offset of the physical address.

Change-Id: Ifdf57820273b2466dca0e486b42ed6895bff0f48
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2019-12-18 21:26:58 -08:00
Jeevan Shriram
b249ddf502 soc: mem_dump: Add support for CPU subsystem register dump
Add support in memory dump driver to dump the cpuss registers for
debugging CPUSS issues.

Change-Id: I5ab5d2bfc0a34aa9f00c826928046324f1d2c574
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2019-12-18 21:26:52 -08:00
Prasad Sodagudi
b3f2f0d43c soc: qcom: Update the dump table region size in imem
Secure world need whole dump memory region size along with
start address to map that region in the secure world.

Change-Id: Ie3467086b3fb491761b35935f16cc2e7e9d4871b
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2019-12-18 21:26:36 -08:00
Prasad Sodagudi
2fb25cbc0f soc: qcom: Unify the memory dump entries registration
cpu context, cache dump table entries are getting registered
from different drivers. Idea is to unify all the dump table
entries registration for all entries from kernel.

Change-Id: I159ee826345ea7eefb6a085c3e78447317a4b4a3
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-12-19 13:22:53 +08:00
qctecmdr
27f58fc32a Merge "usb: gadget: f_fs: Add support for IPC logging" 2019-12-18 17:51:59 -08:00
Elliot Berman
11b6668835 arm64: defconfig: Enable minidump driver on Lahaina GKI
Enable minidump driver on Lahaina GKI.

Change-Id: Id5cdadecdbe115c574091bce9bc5327e9da572c1
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-12-18 16:31:55 -08:00
Elliot Berman
6f016c2e4a soc: qcom: Add snapshot of minidump
Add snapshot of minidump as of commit <f94ba33e3b90> ("Merge "usb:
dwc3-msm: Fix GDSC collapse in host mode bus suspend"").

Change-Id: Ie322154aefa3b5d482549188096dc613bde1badf
[eberman@codeaurora.org: minidump Kconfig to tristate]
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-12-18 16:31:45 -08:00
Zhen Kong
632167a62c shmbridge: get bridge mem pool's DMA address with dma_map_single
set up IOMMU mapping for default bridge memory pool and get its
DMA address, thus to address the cache maintenance requirement
when clients suballocate buffer from the pool and pass this buffer
to TZ. Add two APIs to do sync buffer allocated from bridge.

Change-Id: Icd6c70a1185ac96642d9efba74d2b55739eb78ba
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2019-12-18 15:31:51 -08:00
Elliot Berman
4b9eafd143 firmware: qcom_scm: Add calls to support poweroff driver
Add SCM calls to support poweroff driver.

Change-Id: Ie55382d3c099a5f99f37a3e140d71f5dfd44e64f
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-12-18 14:55:17 -08:00
Elliot Berman
173c971a4c firmware: qcom_scm: Expose qcom_scm_set_download_mode
Add support for other drivers to manage download mode by exposing
qcom_scm_set_download_mode (such as in commit: "power: reset:
msm-poweroff: Manage download mode"). Also, change the function to
support changing to different download modes with enum
qcom_download_mode, instead of only either "full dump mode" or "normal
restart".

Change-Id: Ic79d8dda97c17df70bd2cef5d9ce12ecb4c06d00
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-12-18 14:55:16 -08:00
Satya Durga Srinivasu Prabhala
b1f41a0c5f arm64: defconfig: Enable WALT for Lahaina
Enable WALT to support EAS on Lahaina SoC.

Change-Id: I321f3fa25112e7abd6f920766c61500c027dbb29
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-12-18 13:00:51 -08:00
Satya Durga Srinivasu Prabhala
4b0086f90f sched: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I7a981c0aa4826ae448d4de224966dec7e21dab86
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-12-18 13:00:01 -08:00
Zhen Kong
a064eb98a7 hwrng: Add QRNG driver snapshot for kona
This is a snapshot of the qrng driver as of msm-4.19
commit e74173d56eb2c869 ("hwrng: Add QRNG driver
snapshot for kona") with changes to comply with
msm-5.4 format requirement.

Change-Id: I930b0dfd70db8b2c1ffcb98965aabe45bffbd0ba
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2019-12-18 11:40:06 -08:00
qctecmdr
d5cc8a271e Merge "drivers: thermal: qmi_cooling: Add snapshot of QMI cooling device driver" 2019-12-18 10:54:03 -08:00
Siva Kumar Akkireddi
ea4e5098ac msm: sps: Add SPS driver snapshot
Add snapshot of the SPS (Smart Peripheral Subsystem) driver from msm-4.19
'commit thermal: tsens: Add support for TSENS min temp and 0C interrupt
("7b3e424f29e7c55468258ea49e24996684a5051a")'.

Change-Id: I26319a4ac0571e72aecdd0f1c65e1837aafbafc6
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
2019-12-18 23:47:15 +05:30
qctecmdr
e8ec9c23bd Merge "msm: ipa: Update IPA register offsets and fields" 2019-12-18 10:00:10 -08:00
qctecmdr
35a14d258a Merge "arm64: config: Enable socinfo driver for QCOM SoCs" 2019-12-18 09:05:08 -08:00
Greg Kroah-Hartman
09cdc723de This is the 5.4.5 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl36QR4ACgkQONu9yGCS
 aT4prg/9Eiypkpf0V1QtxGLmE1M0ylsXhwwvl8YfED2ku/zqzFxm3ht+IQkGBFl9
 x7Y4LMkPJenfbQYV3iMk5hgjPJ4CNJiqXI+uD6le2SSp+vRi7U9DzH/JPNgd80qp
 JSSuAeK43l3dTUx+zNOfziLnnczf8X1gT4V00LArIFQHF+kATZKAaKcRx7Wqouw8
 mCt+UoJgGa9Et+yKjDbBIlmALs9e2xPR0ltwxBNCgJO99KE+qDZAXeLAOsPppA7K
 h2zWpMSczbq9X4MejN2Jbj3aGZueHoXwmtlbXiSglMefAJF1vEt7NmJzdZ4TCWCw
 ajVOhiW7+PGqmV46nMuSLxDef2osITHR+x8TOUlLMYsqNywUluHnf44GHmzqurzY
 6vI1y+nCWKes6Xb2nV5XofphOUNJEMcHXmwntKWicnuexTeBiWWS06UYdxn+ECEY
 VRwt4rsWmTGwNQpKHG8Kwyi+OLy85JC7iWJORKhpRKrHd1mTNRFNkUtH1BKpkd9b
 QokoL3YIeyA8pCWYFzCjT5WJy+YvDKI2pp3edByKilg3z2pRPr5c6VYU5mERSIuw
 EKDuVYHfo/m6mKHfdoBW8LugOB33bbe2Y446b8J+ELwwlv/SnRVIadzzZeQcHudg
 +FG7jwN+vTBSD1TuPSKg6WzbirM6R4HnGaMyYOdAd6Bzlkg0/CU=
 =MihI
 -----END PGP SIGNATURE-----

Merge 5.4.5 into android-5.4

Changes in 5.4.5
	inet: protect against too small mtu values.
	mqprio: Fix out-of-bounds access in mqprio_dump
	net: bridge: deny dev_set_mac_address() when unregistering
	net: dsa: fix flow dissection on Tx path
	net: ethernet: ti: cpsw: fix extra rx interrupt
	net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues
	net_sched: validate TCA_KIND attribute in tc_chain_tmplt_add()
	net: thunderx: start phy before starting autonegotiation
	net/tls: Fix return values to avoid ENOTSUPP
	openvswitch: support asymmetric conntrack
	tcp: md5: fix potential overestimation of TCP option space
	tipc: fix ordering of tipc module init and exit routine
	net/mlx5e: Query global pause state before setting prio2buffer
	net: ipv6: add net argument to ip6_dst_lookup_flow
	net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
	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()
	net: core: rename indirect block ingress cb function
	net: sched: allow indirect blocks to bind to clsact in TC
	cls_flower: Fix the behavior using port ranges with hw-offload
	gre: refetch erspan header from skb->data after pskb_may_pull()
	Fixed updating of ethertype in function skb_mpls_pop
	hsr: fix a NULL pointer dereference in hsr_dev_xmit()
	net: Fixed updating of ethertype in skb_mpls_push()
	net/mlx5e: Fix TXQ indices to be sequential
	act_ct: support asymmetric conntrack
	net/mlx5e: Fix SFF 8472 eeprom length
	net/mlx5e: Fix freeing flow with kfree() and not kvfree()
	net/mlx5e: Fix translation of link mode into speed
	net/mlx5e: ethtool, Fix analysis of speed setting
	page_pool: do not release pool until inflight == 0.
	xdp: obtain the mem_id mutex before trying to remove an entry.
	ionic: keep users rss hash across lif reset
	net: mscc: ocelot: unregister the PTP clock on deinit
	r8169: add missing RX enabling for WoL on RTL8125
	Linux 5.4.5

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I65207949c27553e0bdc8d10740c9f11d97ff8ebf
2019-12-18 16:54:08 +01:00
qctecmdr
d409bbdf62 Merge "kbuild: Disable the gcc-wrapper with an environment variable" 2019-12-18 07:29:28 -08:00
Greg Kroah-Hartman
9a08897100 Linux 5.4.5 2019-12-18 16:09:17 +01:00
Heiner Kallweit
68159412b2 r8169: add missing RX enabling for WoL on RTL8125
[ Upstream commit 00222d1394104f0fd6c01ca9f578afec9e0f148b ]

RTL8125 also requires to enable RX for WoL.

v2: add missing Fixes tag

Fixes: f1bce4ad2f ("r8169: add support for RTL8125")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-18 16:09:17 +01:00
Vladimir Oltean
157560f95d net: mscc: ocelot: unregister the PTP clock on deinit
[ Upstream commit 9385973fe8db9743fa93bf17245635be4eb8c4a6 ]

Currently a switch driver deinit frees the regmaps, but the PTP clock is
still out there, available to user space via /dev/ptpN. Any PTP
operation is a ticking time bomb, since it will attempt to use the freed
regmaps and thus trigger kernel panics:

[    4.291746] fsl_enetc 0000:00:00.2 eth1: error -22 setting up slave phy
[    4.291871] mscc_felix 0000:00:00.5: Failed to register DSA switch: -22
[    4.308666] mscc_felix: probe of 0000:00:00.5 failed with error -22
[    6.358270] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000088
[    6.367090] Mem abort info:
[    6.369888]   ESR = 0x96000046
[    6.369891]   EC = 0x25: DABT (current EL), IL = 32 bits
[    6.369892]   SET = 0, FnV = 0
[    6.369894]   EA = 0, S1PTW = 0
[    6.369895] Data abort info:
[    6.369897]   ISV = 0, ISS = 0x00000046
[    6.369899]   CM = 0, WnR = 1
[    6.369902] user pgtable: 4k pages, 48-bit VAs, pgdp=00000020d58c7000
[    6.369904] [0000000000000088] pgd=00000020d5912003, pud=00000020d5915003, pmd=0000000000000000
[    6.369914] Internal error: Oops: 96000046 [#1] PREEMPT SMP
[    6.420443] Modules linked in:
[    6.423506] CPU: 1 PID: 262 Comm: phc_ctl Not tainted 5.4.0-03625-gb7b2a5dadd7f #204
[    6.431273] Hardware name: LS1028A RDB Board (DT)
[    6.435989] pstate: 40000085 (nZcv daIf -PAN -UAO)
[    6.440802] pc : css_release+0x24/0x58
[    6.444561] lr : regmap_read+0x40/0x78
[    6.448316] sp : ffff800010513cc0
[    6.451636] x29: ffff800010513cc0 x28: ffff002055873040
[    6.456963] x27: 0000000000000000 x26: 0000000000000000
[    6.462289] x25: 0000000000000000 x24: 0000000000000000
[    6.467617] x23: 0000000000000000 x22: 0000000000000080
[    6.472944] x21: ffff800010513d44 x20: 0000000000000080
[    6.478270] x19: 0000000000000000 x18: 0000000000000000
[    6.483596] x17: 0000000000000000 x16: 0000000000000000
[    6.488921] x15: 0000000000000000 x14: 0000000000000000
[    6.494247] x13: 0000000000000000 x12: 0000000000000000
[    6.499573] x11: 0000000000000000 x10: 0000000000000000
[    6.504899] x9 : 0000000000000000 x8 : 0000000000000000
[    6.510225] x7 : 0000000000000000 x6 : ffff800010513cf0
[    6.515550] x5 : 0000000000000000 x4 : 0000000fffffffe0
[    6.520876] x3 : 0000000000000088 x2 : ffff800010513d44
[    6.526202] x1 : ffffcada668ea000 x0 : ffffcada64d8b0c0
[    6.531528] Call trace:
[    6.533977]  css_release+0x24/0x58
[    6.537385]  regmap_read+0x40/0x78
[    6.540795]  __ocelot_read_ix+0x6c/0xa0
[    6.544641]  ocelot_ptp_gettime64+0x4c/0x110
[    6.548921]  ptp_clock_gettime+0x4c/0x58
[    6.552853]  pc_clock_gettime+0x5c/0xa8
[    6.556699]  __arm64_sys_clock_gettime+0x68/0xc8
[    6.561331]  el0_svc_common.constprop.2+0x7c/0x178
[    6.566133]  el0_svc_handler+0x34/0xa0
[    6.569891]  el0_sync_handler+0x114/0x1d0
[    6.573908]  el0_sync+0x140/0x180
[    6.577232] Code: d503201f b00119a1 91022263 b27b7be4 (f9004663)
[    6.583349] ---[ end trace d196b9b14cdae2da ]---
[    6.587977] Kernel panic - not syncing: Fatal exception
[    6.593216] SMP: stopping secondary CPUs
[    6.597151] Kernel Offset: 0x4ada54400000 from 0xffff800010000000
[    6.603261] PHYS_OFFSET: 0xffffd0a7c0000000
[    6.607454] CPU features: 0x10002,21806008
[    6.611558] Memory Limit: none

And now that ocelot->ptp_clock is checked at exit, prevent a potential
error where ptp_clock_register returned a pointer-encoded error, which
we are keeping in the ocelot private data structure. So now,
ocelot->ptp_clock is now either NULL or a valid pointer.

Fixes: 4e3b0468e6 ("net: mscc: PTP Hardware Clock (PHC) support")
Cc: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-18 16:09:14 +01:00