Issue: DMA will be in suspend state if there is no rx buffer allocation
happen to HW. If DMA is in suspend state, no interrupt will
occur for channel which leads to not calling of
osd_receive_packet().
Fix: Whenever there is rx buffer kernel memory allocation failure,
desc will be updated with reserve buffer. This reserved RX buffer
is already allocated at the time of eqos_open. Aim of same to
make sure rx DMA always have buffer and not go in suspend state.
Bug 200650229
Change-Id: Ic18d9f8f03c69c142d91288a1a7288d26e1c8b42
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2399011
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
nvethernet comes up before gpio and hence reset gpio error below
seen in galen boot log:
###
[ 2.252546] nvethernet 2490000.ethernet: Adding to iommu group 0
[ 2.257577] nvethernet 2490000.ethernet: failed to get phy reset gpio
[ 2.265533] nvethernet 2490000.ethernet: Ethernet MAC address: 00:04:4b:af:62:37
[ 2.271764] libphy: nvethernet_mdio_bus: probed
[ 2.275940] mdio_bus 2490000.ethernet: MDIO device at address 0 is missing.
[ 2.284469] nvethernet 2490000.ethernet: eth0 (HW ver: 50) created with 1 DMA channels
[ 2.548104] GPIO line 510 (gpio_default) hogged as output/high
[ 2.553598] GPIO line 511 (gpio_default) hogged as output/high
[ 2.558156] gpiochip_setup_dev: registered GPIOs 504 to 511 on device: gpiochip0 (max77620-gpio)
##
Returning -EPROBE_DEFER allows the driver initialization once gpio is initialized.
Ethernet works fine in probe retry call once gpio is up. Hence, the defer probe
is needed.
bug 200617764
Change-Id: Icdcf0d7f0b69c564ecb0b142634b504287db3ea1
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2348758
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Fix build linux-5.7-rc5 errors including following:
- change timespec to timespec64. replace getnstimeofday
with ktime_get_ts64
- replace usage of macro FIELD_SIZEOF with sizeof_field in ethtool.c
nvethernet and eqos files.
- support 2 arguments for of_get_phy_mode call
bug 200617764
Change-Id: I46067d7d36d08ee9556b2722e9ccec707b8853d4
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2347244
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Adds VM interrupt handling for VM interrupt
based MAC controllers.
Need to pass below parameters from DT -
o Number of VM IRQ's assigned per OS/VM.
o Number of VM channels assigned to a VM IRQ.
o List of DMA channels assigned to a VM IRQ.
Below is the sample DT representation -
vm_irq_config: vm-irq-config {
nvidia,num-vm-irqs = <4>;
vm_irq1 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <0 1>;
};
vm_irq2 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <2 3>;
};
vm_irq3 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <4 5>;
};
vm_irq4 {
nvidia,num-vm-channels = <2>;
nvidia,vm-channels = <6 7>;
};
};
ethernet@<base_addr> {
[...]
nvidia,vm-irq-config = <&vm_irq_config>;
[...]
}
Bug 200548572
Change-Id: I802f247fa95ef6dcd769afbc7c13c6362d2f328e
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2292602
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
1. Add Flag which decides stats work queue is enabled(1) or
disabled(0)
2. If virtualization is enabled then allow function driver instance
to specify non zero DMA channel and to read stats flag from DT.
Bug 2694285
Change-Id: Ic97c079e66c117ed78f1b473ffda33173bd3f23c
Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com>
Change-Id: Ic97c079e66c117ed78f1b473ffda33173bd3f23c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2327179
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue: During SOC suspend, the MAC is placed in reset.
This causes all dynamic configurations done by
SW on the MAC core registers is lost. When SOC
resumes, MAC is initialized to power-on-default
configuration, while other SW components still
have previously set configuration. This results
in mismatch between HW/SW configuration.
Fix: Invoke APIs osi_save_registers(), osi_restore_registers()
to backup and restore the MAC core configuration
registers before suspend and after resume respectively.
Bug 200561046
Change-Id: I22183ba86fe9e7a7d8f9efb6a90c265182c5c68a
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2267402
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue: osi_process_tx_completions is run in the BH for
processing Tx done irq. This function always loops
till the Tx status for all packets that are Tx'd so
far is processed.
1) The NAPI budget for this Tx completions handler is
not honored.
2) The condition to invoke napi_complete() is incorrect.
Currently, processed count should be 0, which can happen
only if BH is scheduled to run and it finds no packets that
have completed Tx. THis is a wasted schedule for the BH.
3) netdev stats for Tx packets is incremented for every Tx
descriptor instead of packet.
Fix: 1) Add budget parameter to osi_process_tx_completions() API.
2) Change condition to invoke napi_complete() to avoid wasted
scheduling of the napi handler.
3) Increment the netdev stats only when skb is consumed ie.
entire packet is transmitted).
Bug 2756439
Change-Id: I273bdb2667112b8d252b119dee5cc92055cb2913
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2237821
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue:
In suspend - PHY placed in reset with phy-reset GPIO.
With this, all register content will be gone.
After resume - PHY placed out of reset but
PHY registers will not be restored. With this change,
we are putting PHY in the proper state after resume.
Fix:
Add PHY config on resume call.
Bug 200545651
Change-Id: I138d951c42be0b00a1e22c2a45f0d58567f22df1
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2255706
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tx frame count and software timer based interrupt coalescing
is enabled. Tx frame count based interrupt coalescing can be
enabled only when tx software timer based interrupt coalescing
is also enabled.
Bug 200529168
Change-Id: I8ac701c86238e8d34d7dbe9924df1162083c023e
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2234610
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Rx frame based coalescing can be enabled only when
Rx timer based coalescing is also enabled. This is to avoid
no rx interrupt issues for applications which send only limited
frames and expects reply.
Bug 200529168
Change-Id: I7b00414bd56935ad8df57c9fa28764feb878213d
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2233503
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue:
Data packets sent via EQOS hardware are not
following any packet gaping. The AVB use-cases
have different timing requirements for class A
data packets. For example, the time difference
between two class A data packets are supposed
to be 125 microseconds for audio data
of frequency 48 kHz.
Fix:
Enable slot function support to schedule the data
fetching from the system memory by the DMA.
This feature is useful when the source AV data
needs to be transmitted at specific intervals.
Bug 200545374
Change-Id: I549014998380cd6c0d161c778bccdaa5ed017129
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2223850
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Issue: APIs like osi_clear_tx/rx_intr, osi_update_rx_tailptr
are redundant. The operations that are done in these
functions can be included as part of other existing
OSD-OSI interface API. OSD need not micro-manage the
hardware controller by using such fine grain APIs.
Fix: Remove the redundant APIs and implement their functionality
as part of existing APIs.
Bug 2715391
Change-Id: Ib2feee7b9080d3762ddd33f79f5410ef10a43a07
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2211092
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>