summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2023-11-07stmmac: add ethercat supportMinda Chen2-54/+188
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-11-06net: sched: Merge Qdisc::bstats and Qdisc::cpu_bstats data typesAhmed S. Darwish1-1/+1
The only factor differentiating per-CPU bstats data type (struct gnet_stats_basic_cpu) from the packed non-per-CPU one (struct gnet_stats_basic_packed) was a u64_stats sync point inside the former. The two data types are now equivalent: earlier commits added a u64_stats sync point to the latter. Combine both data types into "struct gnet_stats_basic_sync". This eliminates redundancy and simplifies the bstats read/write APIs. Use u64_stats_t for bstats "packets" and "bytes" data types. On 64-bit architectures, u64_stats sync points do not use sequence counter protection. Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2023-10-25drivers: wireless: aic8800 : wifi dongle revert to one interfaceziv.xu1-3/+0
wifi dongle revert to one interface Signed-off-by: ziv.xu <ziv.xu@starfive.com>
2023-08-31Merge tag 'JH7110_515_SDK_v5.7.0' into vf2-515-develAndy Hu1-2/+0
2023-08-30can: starfive: drop flow control to fix buffer blocking issueWilliam Qiu1-2/+0
drop flow control to fix buffer blocking issue Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2023-08-07driver: wireless: aic8800: add one more interfaceziv.xu1-0/+3
open one more interface to support both sta and ap modes Signed-off-by: ziv.xu <ziv.xu@starfive.com>
2023-07-27Merge tag 'JH7110_515_SDK_v5.4.2' into vf2-515-develAndy Hu1-6/+6
2023-07-26ipms: can: modify the range of tseg1/tseg2William Qiu1-6/+6
modify the range of tseg1/tseg2 Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2023-06-21Merge tag 'JH7110_515_SDK_v5.2.1' into vf2-515-develAndy Hu1-1/+22
2023-06-20ipms: can: clear skb buffer after transmitWilliam Qiu1-1/+22
clear skb buffer after transmit Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2023-05-12Merge tag 'JH7110_515_SDK_v4.9.0' into vf2-515-develAndy Hu1-1/+20
1. linux: Merge branch 'CR_4707_imx219_515_changhuang.liang' into 'jh7110-5.15.y-devel' Merge branch 'CR_5042_gmac_phy_delay_ds_samin.guo' into 'jh7110-5.15.y-devel' Merge branch 'CR_5262_copyright_shanlong.li' into 'jh7110-5.15.y-devel' Merge branch 'CR_5283_eMMC_515_william.qiu' into 'jh7110-5.15.y-devel'
2023-04-20Merge tag 'JH7110_515_SDK_v4.8.1' into vf2-515-develAndy Hu1-11/+6
version JH7110_515_SDK_v4.8.1 for JH7110 EVB board 1. linux: Merge branch 'CR_4844_PCIe_515_Kevin.xie' into 'jh7110-5.15.y-devel' Merge branch 'CR_4874_Copyright_515_william.qiu' into 'jh7110-5.15.y-devel' Merge branch 'CR_4450_vout_515_changhuang.liang' into 'jh7110-5.15.y-devel' Merge branch 'CR_4114_thermal_5.15_ziv.xu' into 'jh7110-5.15.y-devel' Merge branch 'CR_4657_SDK_keep_the_same_host_driver_code_5.15_ziv.xu' into 'jh7110-5.15.y-devel'
2023-04-20net: phy: motorcomm: add Pad Drive Strength CfgSamin Guo1-1/+20
YT8531 supports Pad Drive Strength configuration. Including rx_data/rx_clk, etc. Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-04-14starfive: copyright: modify related descriptionWilliam Qiu1-11/+6
Modify related description. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2023-03-22wireless: clear aic8800 driver warningskyler.zheng6-26/+49
clear aic8800 driver warning Signed-off-by: <skyler.zheng@starfivetech.com>
2023-03-22wireless: format aic8800 driver files to unixskyler.zheng15-4857/+4857
format aic8800 driver files to unix Signed-off-by: <skyler.zheng@starfivetech.com>
2023-03-22wireless: add gpl-2.0 license for aic8800 driverskyler.zheng106-0/+109
add SPDX-License-Identifier: GPL-2.0-or-later for usb wifi dongle aic8800 driver Signed-off-by: <skyler.zheng@starfivetech.com>
2023-03-22wireless: add usb wifi dongle aic8800 driverskyler.zheng111-0/+62805
add usb wifi dongle aic8800 linux driver Signed-off-by: Skyler Zheng <skyler.zheng@starfivetech.com>
2023-02-12Merge tag 'JH7110_515_SDK_v4.2.0' into vf2-515-develAndy Hu1-15/+8
version JH7110_515_SDK_v4.2.0 for JH7110 EVB board 1. Fix hibernation issue: AQC107 PCIe NIC 2. Support linux driver module build for: PDM, TDM, I2S, Watchdog, QSPI 3. #3253 open source for spl_tool 4. #3211 fix gst-omx crashed upon calling OMX_UseEGLImage func 5. #3262 Fix hdmi mipi dual display crash dump issue
2023-02-09net: atlantic: remove aq_nic_deinit() when resumeChia-Lin Kao (AceLan)1-3/+0
aq_nic_deinit() has been called while suspending, so we don't have to call it again on resume. Actually, call it again leads to another hang issue when resuming from S3. Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992345] Call Trace: Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992346] <TASK> Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992348] aq_nic_deinit+0xb4/0xd0 [atlantic] Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992356] aq_pm_thaw+0x7f/0x100 [atlantic] Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992362] pci_pm_resume+0x5c/0x90 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992366] ? pci_pm_thaw+0x80/0x80 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992368] dpm_run_callback+0x4e/0x120 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992371] device_resume+0xad/0x200 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992373] async_resume+0x1e/0x40 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992374] async_run_entry_fn+0x33/0x120 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992377] process_one_work+0x220/0x3c0 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992380] worker_thread+0x4d/0x3f0 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992382] ? process_one_work+0x3c0/0x3c0 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992384] kthread+0x12a/0x150 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992386] ? set_kthread_struct+0x40/0x40 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992387] ret_from_fork+0x22/0x30 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992391] </TASK> Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992392] ---[ end trace 1ec8c79604ed5e0d ]--- Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992394] PM: dpm_run_callback(): pci_pm_resume+0x0/0x90 returns -110 Jul 8 03:09:44 u-Precision-7865-Tower kernel: [ 5910.992397] atlantic 0000:02:00.0: PM: failed to resume async: error -110 Fixes: 1809c30b6e5a ("net: atlantic: always deep reset on pm op, fixing up my null deref regression") Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com> Link: https://lore.kernel.org/r/20220713111224.1535938-2-acelan.kao@canonical.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-02-09net: atlantic: remove deep parameter on suspend/resume functionsChia-Lin Kao (AceLan)1-14/+10
Below commit claims that atlantic NIC requires to reset the device on pm op, and had set the deep to true for all suspend/resume functions. commit 1809c30b6e5a ("net: atlantic: always deep reset on pm op, fixing up my null deref regression") So, we could remove deep parameter on suspend/resume functions without any functional change. Fixes: 1809c30b6e5a ("net: atlantic: always deep reset on pm op, fixing up my null deref regression") Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com> Link: https://lore.kernel.org/r/20220713111224.1535938-1-acelan.kao@canonical.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-02-09net: atlantic: always deep reset on pm op, fixing up my null deref regressionManuel Ullmann1-2/+2
The impact of this regression is the same for resume that I saw on thaw: the kernel hangs and nothing except SysRq rebooting can be done. Fixes regression in commit cbe6c3a8f8f4 ("net: atlantic: invert deep par in pm functions, preventing null derefs"), where I disabled deep pm resets in suspend and resume, trying to make sense of the atl_resume_common() deep parameter in the first place. It turns out, that atlantic always has to deep reset on pm operations. Even though I expected that and tested resume, I screwed up by kexec-rebooting into an unpatched kernel, thus missing the breakage. This fixup obsoletes the deep parameter of atl_resume_common, but I leave the cleanup for the maintainers to post to mainline. Suspend and hibernation were successfully tested by the reporters. Fixes: cbe6c3a8f8f4 ("net: atlantic: invert deep par in pm functions, preventing null derefs") Link: https://lore.kernel.org/regressions/9-Ehc_xXSwdXcvZqKD5aSqsqeNj5Izco4MYEwnx5cySXVEc9-x_WC4C3kAoCqNTi-H38frroUK17iobNVnkLtW36V6VWGSQEOHXhmVMm5iQ=@protonmail.com/ Reported-by: Jordan Leppert <jordanleppert@protonmail.com> Reported-by: Holger Hoffstaette <holger@applied-asynchrony.com> Tested-by: Jordan Leppert <jordanleppert@protonmail.com> Tested-by: Holger Hoffstaette <holger@applied-asynchrony.com> CC: <stable@vger.kernel.org> # 5.10+ Signed-off-by: Manuel Ullmann <labre@posteo.de> Link: https://lore.kernel.org/r/87bkw8dfmp.fsf@posteo.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-02-09net: atlantic: invert deep par in pm functions, preventing null derefsManuel Ullmann1-4/+4
This will reset deeply on freeze and thaw instead of suspend and resume and prevent null pointer dereferences of the uninitialized ring 0 buffer while thawing. The impact is an indefinitely hanging kernel. You can't switch consoles after this and the only possible user interaction is SysRq. BUG: kernel NULL pointer dereference RIP: 0010:aq_ring_rx_fill+0xcf/0x210 [atlantic] aq_vec_init+0x85/0xe0 [atlantic] aq_nic_init+0xf7/0x1d0 [atlantic] atl_resume_common+0x4f/0x100 [atlantic] pci_pm_thaw+0x42/0xa0 resolves in aq_ring.o to ``` 0000000000000ae0 <aq_ring_rx_fill>: { /* ... */ baf: 48 8b 43 08 mov 0x8(%rbx),%rax buff->flags = 0U; /* buff is NULL */ ``` The bug has been present since the introduction of the new pm code in 8aaa112a57c1 ("net: atlantic: refactoring pm logic") and was hidden until 8ce84271697a ("net: atlantic: changes for multi-TC support"), which refactored the aq_vec_{free,alloc} functions into aq_vec_{,ring}_{free,alloc}, but is technically not wrong. The original functions just always reinitialized the buffers on S3/S4. If the interface is down before freezing, the bug does not occur. It does not matter, whether the initrd contains and loads the module before thawing. So the fix is to invert the boolean parameter deep in all pm function calls, which was clearly intended to be set like that. First report was on Github [1], which you have to guess from the resume logs in the posted dmesg snippet. Recently I posted one on Bugzilla [2], since I did not have an AQC device so far. #regzbot introduced: 8ce84271697a #regzbot from: koo5 <kolman.jindrich@gmail.com> #regzbot monitor: https://github.com/Aquantia/AQtion/issues/32 Fixes: 8aaa112a57c1 ("net: atlantic: refactoring pm logic") Link: https://github.com/Aquantia/AQtion/issues/32 [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=215798 [2] Cc: stable@vger.kernel.org Reported-by: koo5 <kolman.jindrich@gmail.com> Signed-off-by: Manuel Ullmann <labre@posteo.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2023-01-17net:wireless:eswin:disable p2p functionMichaelZhuxx1-1/+1
To fix dynamic naming issue, disable CONFIG_ECRNX_P2P for wifi ECR6600U Signed-off-by: MichaelZhuxx <michael.zhu@starfivetech.com>
2023-01-07Merge tag 'JH7110_515_SDK_v4.0.0-rc1' into vf2-515-develAndy Hu1-3/+43
version JH7110_515_SDK_v4.0.0-rc1 for JH7110 EVB board 1. #2828 support linux perf tool 2. #3049 merge hibernation branch to SDK 3. #2708 uboot support vout clk driver 4. #3006 uboot handle OTP return value 5. #2969, #3039 venc jpu fix futex issue
2023-01-06Hibernation: canfd: Add system PM API for can/canfdWilliam Qiu1-3/+43
Add system PM API for can/canfd. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2022-12-30net:wireless:Support eswin usb wifi ECR6600UJianlong Huang109-0/+52820
Add usb wifi ECR6600U driver Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
2022-11-10Merge tag 'JH7110_515_SDK_v3.0.0-rc3' into vf2-515-develJianlong Huang1-18/+8
version JH7110_515_SDK_v3.0.0-rc3 for JH7110 EVB board
2022-11-09net:phy:motorcomm: Fix the problem that phytool cannot be used by YT8531Samin Guo1-18/+8
phy_read_status should not judge the auto negotiation speed, which will cause 0x1e to be frequently modified. JH7110B In different speed modes, the tx_inverted needs to be dynamically updated to match the timming. known issue: Function yt8521_read_status, it will be executed once per second. Can read and write ext reg (0xa001/a002/a003). This may causes the ext value read by the phytool always is 0. $ phytool write eth0/0/0x1e 0xa001 $ phytool read eth0/0/0x1f 0000 To avoid this problem, you can read 0x1f as fast as possible after writing 0x1e. $ phytool write eth0/0/0x1e 0xa001; phytool read eth0/0/0x1f 0x8160 Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2022-11-03net:stmmac:dwc-qos: add support for external rmii_rtx clocksSamin Guo1-0/+11
JH7110A use external rmii_rtx clk for tx clk on 100M/10M mode. Signed-off-by: Samin Guo <samin.guo@linux.starfivetech.com>
2022-11-03net: phy: motorcomm: Support the YT8531 gigabit PHYJianlong Huang1-1/+1
Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
2022-11-01net:phy:motorcomm: support yt8521 invertedSamin Guo1-26/+36
jh7110B need yt8521 inverted. Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2022-11-01net:phy:motorcomm: support modifying RGMII_TX_CLK delay train from dtsSamin Guo1-11/+102
support use original or inverted RGMII_TX_CLK delay train. 10M/100M/1000M can be configured independently. tx_inverted_xx = val; for example: &gmac0 { #address-cells = <1>; #size-cells = <0>; phy0: ethernet-phy@0 { tx_inverted_10 = <0>; tx_inverted_100 = <1>; tx_inverted_1000 = <1>; }; }; 0: original (default) 1: inverted Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2022-10-27canfd:ipms:modify runtime PM callback funcitonWilliam Qiu1-2/+6
modify runtime PM callback function. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2022-10-27canfd:ipms:add canfd runtime PM opsWilliam Qiu1-0/+50
add canfd runtime PM ops. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2022-10-11can:starfive:modify some data field and clock frequencyWilliam Qiu1-4/+8
modify some data field and clock frequency Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2022-09-07Merge branch 'CR_1946_515_GMAC_yanhong.wang' into 'jh7110-5.15.y-devel'andy.hu4-143/+162
Cr 1946 515 gmac yanhong.wang See merge request sdk/linux!416
2022-08-26can:ipms_can: Added return values for other casesWilliam Qiu1-0/+2
Added return values for other cases. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2022-08-24net: stmmac: Add StarFive dwmac supportyanhong.wang4-143/+162
Remove the gmac driver in dwmac-dwc-qos-eth.c for JH7110 SoC, and add StarFive dwmac driver to replace. Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2022-08-03net:phy:YUTAI: Update YUTAI PHY driveryanhong.wang1-293/+1882
Update YUTAI phy driver to support more type, such as YT8531,YT8510 etc. Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2022-05-23net:phy:motorcomm: change tx delay chain.samin1-1/+1
Improve compatibility of YT8521SC and YT8521SH in rgmii mode. Signed-off-by: samin <samin.guo@starfivetech.com>
2022-05-15net:stmmac:dwc-qos: add JH7110_GMAC0_GTXC clk config for JH7110yanhong.wang1-0/+13
Add JH7110_GMAC0_GTXC clk configuration for JH7110. Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2022-05-15net:phy: support YUTAI 8521 phyyanhong.wang2-1/+452
Add driver to support YUTAI 8521 phy. Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2022-04-25Merge branch 'CR_786_CAN_clivia.cai' into 'jh7110_fpga_dev_5.15'andy.hu1-77/+62
Cr 786 can clivia.cai See merge request sdk/sft-riscvpi-linux-5.10!24
2022-04-24can:ipms_can: Driver code optimizationClivia.Cai1-77/+62
Use the syscon framework to manage the syscon registers. In addition, Use devm_reset_control_array_get_exclusive API to manage a list of reset controllers Signed-off-by: Clivia.Cai <Clivia.Cai@starfivetech.com>
2022-04-24net:stmmac:dwc-qos: Add jh7110 supportyanhong.wang1-1/+130
The StarFive JH7110 SoC contains an instance of the Synopsys DWC ethernet QOS IP core.The binding that it uses is slightly different from existing ones because of the integration (clocks, resets, ...). Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2022-04-24net:stmmac: remove DWMAC_CORE_5_20 hw configyanhong.wang1-18/+0
The version DWMAC_CORE_5_20 and DWMAC_CORE_5_10 would use the same configuration,so remove the DWMAC_CORE_5_20 configuration. Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2022-04-19can:ipms_can: fix code styleClivia.Cai1-984/+670
Optimize the can driver code to conform to the upstream specification Signed-off-by: Clivia.Cai <Clivia.Cai@starfivetech.com>
2021-12-16[can] Add jh7110 can driver code“jenny.zhang”3-0/+1508
2021-11-18[board]:Init board config for JH7110yanhong.wang5-1/+101