mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
linux:nvidia: macsec sysfs nodes only if enabled
Issue: Accessing the macsec sysfs nodes is leading to crash when macsec is disabled in DT Fix: Do not create sysfs nodes if macsec is not enabled in DT. Also update the instance_id reading as part of ether_probe which will be executed even when macsec is disabled Bug 4431523 Bug 4910958 Change-Id: I354ac142b9d49852a0d5c7557a7368e1c36b0f63 Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/3043469 (cherry picked from commit acf3356b8e9cbd7c0f9e34a0ead3591e83f65b60) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/3081473 Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292924 Reviewed-by: Narayana Reddy P <narayanr@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d641168e9e
commit
00761e184e
@@ -5790,6 +5790,13 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
|
||||
}
|
||||
}
|
||||
|
||||
/* Read MAC instance id */
|
||||
ret = of_property_read_u32(np, "nvidia,instance_id", &osi_core->instance_id);
|
||||
if (ret != 0) {
|
||||
dev_info(dev, "DT instance_id missing\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (osi_dma->num_dma_chans != osi_core->num_mtl_queues) {
|
||||
dev_err(dev, "mismatch in numbers of DMA channel and MTL Q\n");
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user