aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-11-22net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driverHao Chen3-2/+60
Tx copybreak buf size is used for tx copybreak feature, the feature is used for small size packet or frag. It adds a queue based tx shared bounce buffer to memcpy the small packet when the len of xmitted skb is below tx_copybreak(value to distinguish small size and normal size), and reduce the overhead of dma map and unmap when IOMMU is on. Support setting it via ethtool --set-tunable parameter and getting it via ethtool --get-tunable parameter. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-20bnx2x: constify static inline stub for dev_addrJakub Kicinski1-1/+1
bnx2x_vfpf_config_mac() was constified by not its stub. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-2082596: use eth_hw_addr_set()Jakub Kicinski1-1/+2
Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19net: phy: add support for TI DP83561-SP phyHari Nagalla1-20/+22
Add support for the TI DP83561-SP Gigabit ethernet phy device. The dp83561-sp is a radiation hardened space grade gigabit ethernet PHY. It has been tested for single event latch upto 121 MeV, the critical reliability parameter for space designs. It interfaces directly to twisted pair media through an external transformer. And the device also interfaces directly to the MAC layer through Reduced GMII (RGMII) and MII. DP83867, DP83869 and DP83561-SP, all these parts support 1000Base-T/ 100Base-TX/ and 10Base-Te standards and have similar register map for the core functionality. The data sheet for this part is at https://www.ti.com/product/DP83561-SP Signed-off-by: Hari Nagalla <hnagalla@ti.com> Signed-off-by: Geet Modi <geet.modi@ti.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20211118102532.9835-1-hnagalla@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-19ethernet: renesas: Use div64_ul instead of do_divYang Li1-4/+2
do_div() does a 64-by-32 division. Here the divisor is an unsigned long which on some platforms is 64 bit wide. So use div64_ul instead of do_div to avoid a possible truncation. Eliminate the following coccicheck warning: ./drivers/net/ethernet/renesas/ravb_main.c:2492:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Link: https://lore.kernel.org/r/1637228883-100100-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-19nfp: flower: correction of error handlingYu Xiao1-20/+0
Removing reduplicated error handling when running into error path of `nfp_compile_flow_metadata`. Signed-off-by: Yu Xiao <yu.xiao@corigine.com> Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19sky2: use PCI VPD API in eeprom ethtool opsHeiner Kallweit1-72/+12
Recently pci_read/write_vpd_any() have been added to the PCI VPD API. These functions allow to access VPD address space outside the auto-detected VPD, and they can be used to significantly simplify the eeprom ethtool ops. Tested with a 88E8070 card with 1KB EEPROM. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19net: ipa: Use 'for_each_clear_bit' when possibleChristophe JAILLET1-3/+1
Use 'for_each_clear_bit()' instead of hand writing it. It is much less version. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19bnx2x: Use struct_group() for memcpy() regionKees Cook2-7/+14
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Use struct_group() in struct nig_stats around members egress_mac_pkt0_lo, egress_mac_pkt0_hi, egress_mac_pkt1_lo, and egress_mac_pkt1_hi (and the respective members in struct bnx2x_eth_stats), so they can be referenced together. This will allow memcpy() and sizeof() to more easily reason about sizes, improve readability, and avoid future warnings about writing beyond the end of struct bnx2x_eth_stats's rx_stat_ifhcinbadoctets_hi. "pahole" shows no size nor member offset changes to either struct. "objdump -d" shows no meaningful object code changes (i.e. only source line number induced differences and optimizations). Additionally adds BUILD_BUG_ON() to compare the separate struct group sizes. Reviewed-by: Prabhakar Kushwaha <pkushwaha@marvell.com> Link: https://lore.kernel.org/lkml/DM5PR18MB2229B0413C372CC6E49D59A3B2C59@DM5PR18MB2229.namprd18.prod.outlook.com Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19cxgb4: Use struct_group() for memcpy() regionKees Cook3-12/+13
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Use struct_group() in struct fw_eth_tx_pkt_vm_wr around members ethmacdst, ethmacsrc, ethtype, and vlantci, so they can be referenced together. This will allow memcpy() and sizeof() to more easily reason about sizes, improve readability, and avoid future warnings about writing beyond the end of ethmacdst. "pahole" shows no size nor member offset changes to struct fw_eth_tx_pkt_vm_wr. "objdump -d" shows no object code changes. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19cxgb3: Use struct_group() for memcpy() regionKees Cook1-3/+6
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Use struct_group() in struct rss_hdr around members imm_data and intr_gen, so they can be referenced together. This will allow memcpy() and sizeof() to more easily reason about sizes, improve readability, and avoid future warnings about writing beyond the end of imm_data. "pahole" shows no size nor member offset changes to struct rss_hdr. "objdump -d" shows no object code changes. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19net: phylink: add 1000base-KX to phylink_caps_to_linkmodes()Russell King (Oracle)1-0/+1
1000base-KX was missed in phylink_caps_to_linkmodes(), add it. This will be necessary to convert stmmac with xpcs to ensure we don't drop any supported linkmodes. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19s390/lcs: add braces around empty function bodyHeiko Carstens1-5/+6
Fix allmodconfig + W=1 compile breakage: drivers/s390/net/lcs.c: In function ‘lcs_get_frames_cb’: drivers/s390/net/lcs.c:1823:25: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body] 1823 | ; // FIXME: error message ? | ^ Acked-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19s390/ctcm: add __printf format attribute to ctcm_dbf_longtextHeiko Carstens1-0/+1
Allow the compiler to recognize and check format strings and parameters. As reported with allmodconfig and W=1: drivers/s390/net/ctcm_dbug.c: In function ‘ctcm_dbf_longtext’: drivers/s390/net/ctcm_dbug.c:73:9: error: function ‘ctcm_dbf_longtext’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] 73 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); | ^~~~~~~~~ Acked-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19s390/ctcm: fix format stringHeiko Carstens1-1/+1
The second parameter as specified by the format string is actually a string not an integer. Acked-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19s390/qeth: allocate RX queue at probe timeJulian Wiedmann1-18/+17
We always need an RX queue, and there's no reconfig situation either where we would need to free & rebuild the queue. So allocate the RX queue right from the start, and avoid freeing it during unrelated qeth_free_qdio_queues() calls. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19natsemi: macsonic: use eth_hw_addr_set()Jakub Kicinski1-10/+17
Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19cirrus: mac89x0: use eth_hw_addr_set()Jakub Kicinski1-2/+5
Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19apple: macmace: use eth_hw_addr_set()Jakub Kicinski1-5/+9
Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19lasi_82594: use eth_hw_addr_set()Jakub Kicinski1-2/+4
dev_addr is set from IO reads, passed to an arch-specific helper. Note that the helper never reads it so uninitialized temp is fine. Fixes build on parisc. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19smc9194: use eth_hw_addr_set()Jakub Kicinski1-2/+4
dev_addr is set from IO reads, and broken from a u16 value. Fixes build on Alpha. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-198390: wd: use eth_hw_addr_set()Jakub Kicinski1-1/+3
IO reads, so save to an array then eth_hw_addr_set(). Fixes build on x86 (32bit). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-198390: mac8390: use eth_hw_addr_set()Jakub Kicinski1-1/+3
Use temp to pass to the reading function, the function is generic so can't fix there. Fixes m68k build. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-198390: hydra: use eth_hw_addr_set()Jakub Kicinski1-1/+3
Loop with offsetting to every second byte, so use a temp buffer. Fixes m68k build. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-198390: smc-ultra: use eth_hw_addr_set()Jakub Kicinski1-1/+3
IO reads, so save to an array then eth_hw_addr_set(). Fixes build on Alpha. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19amd: mvme147: use eth_hw_addr_set()Jakub Kicinski1-6/+8
Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19amd: atarilance: use eth_hw_addr_set()Jakub Kicinski1-2/+5
Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19amd: hplance: use eth_hw_addr_set()Jakub Kicinski1-1/+3
Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19amd: a2065/ariadne: use eth_hw_addr_set()Jakub Kicinski2-17/+21
dev_addr is initialized byte by byte from series. Fixes build on x86 (32bit). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19amd: ni65: use eth_hw_addr_set()Jakub Kicinski1-3/+5
IO reads, so save to an array then eth_hw_addr_set(). Fixes build on x86 (32bit). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19amd: lance: use eth_hw_addr_set()Jakub Kicinski1-1/+3
IO reads, so save to an array then eth_hw_addr_set(). Fixes build on x86 (32bit). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19ipw2200: constify address in ipw_send_adapter_addressJakub Kicinski1-1/+1
Add const to the address param of ipw_send_adapter_address() all the functions down the chain have already been changed. Not sure how I lost this in the rebase. Acked-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19wilc1000: copy address before calling wilc_set_mac_addressJakub Kicinski1-3/+3
wilc_set_mac_address() calls IO routines which don't guarantee the pointer won't be written to. Make a copy. Acked-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19mlxsw: constify address in mlxsw_sp_port_dev_addr_setJakub Kicinski1-1/+1
Argument comes from netdev->dev_addr directly, it needs a const. Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-19net: ax88796c: don't write to netdev->dev_addr directlyJakub Kicinski1-8/+10
The future is here, convert the new driver as we are about to make netdev->dev_addr const. Acked-by: Lukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18Merge tag 'regmap-no-bus-update-bits' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmapJakub Kicinski1-0/+1
Mark Brown says: =================== regmap: Allow regmap_update_bits() to be offloaded with no bus Some hardware can do this so let's use that capability. =================== Link: https://lore.kernel.org/all/YZWDOidBOssP10yS@sirena.org.uk/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski87-417/+702
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-18Merge tag 'net-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netLinus Torvalds46-319/+488
Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, mac80211. Current release - regressions: - devlink: don't throw an error if flash notification sent before devlink visible - page_pool: Revert "page_pool: disable dma mapping support...", turns out there are active arches who need it Current release - new code bugs: - amt: cancel delayed_work synchronously in amt_fini() Previous releases - regressions: - xsk: fix crash on double free in buffer pool - bpf: fix inner map state pruning regression causing program rejections - mac80211: drop check for DONT_REORDER in __ieee80211_select_queue, preventing mis-selecting the best effort queue - mac80211: do not access the IV when it was stripped - mac80211: fix radiotap header generation, off-by-one - nl80211: fix getting radio statistics in survey dump - e100: fix device suspend/resume Previous releases - always broken: - tcp: fix uninitialized access in skb frags array for Rx 0cp - bpf: fix toctou on read-only map's constant scalar tracking - bpf: forbid bpf_ktime_get_coarse_ns and bpf_timer_* in tracing progs - tipc: only accept encrypted MSG_CRYPTO msgs - smc: transfer remaining wait queue entries during fallback, fix missing wake ups - udp: validate checksum in udp_read_sock() (when sockmap is used) - sched: act_mirred: drop dst for the direction from egress to ingress - virtio_net_hdr_to_skb: count transport header in UFO, prevent allowing bad skbs into the stack - nfc: reorder the logic in nfc_{un,}register_device, fix unregister - ipsec: check return value of ipv6_skip_exthdr - usb: r8152: add MAC passthrough support for more Lenovo Docks" * tag 'net-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (96 commits) ptp: ocp: Fix a couple NULL vs IS_ERR() checks net: ethernet: dec: tulip: de4x5: fix possible array overflows in type3_infoblock() net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' may be out of bound ipv6: check return value of ipv6_skip_exthdr e100: fix device suspend/resume devlink: Don't throw an error if flash notification sent before devlink visible page_pool: Revert "page_pool: disable dma mapping support..." ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port() octeontx2-af: debugfs: don't corrupt user memory NFC: add NCI_UNREG flag to eliminate the race NFC: reorder the logic in nfc_{un,}register_device NFC: reorganize the functions in nci_request tipc: check for null after calling kmemdup i40e: Fix display error code in dmesg i40e: Fix creation of first queue by omitting it if is not power of two i40e: Fix warning message and call stack during rmmod i40e driver i40e: Fix ping is lost after configuring ADq on VF i40e: Fix changing previously set num_queue_pairs for PFs i40e: Fix NULL ptr dereference on VSI filter sync i40e: Fix correct max_pkt_size on VF RX queue ...
2021-11-18Merge tag 'for-5.16/parisc-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linuxLinus Torvalds1-6/+6
Pull parisc fixes from Helge Deller: "parisc bug and warning fixes and wire up futex_waitv. Fix some warnings which showed up with allmodconfig builds, a revert of a change to the sigreturn trampoline which broke signal handling, wire up futex_waitv and add CONFIG_PRINTK_TIME=y to 32bit defconfig" * tag 'for-5.16/parisc-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Enable CONFIG_PRINTK_TIME=y in 32bit defconfig Revert "parisc: Reduce sigreturn trampoline to 3 instructions" parisc: Wrap assembler related defines inside __ASSEMBLY__ parisc: Wire up futex_waitv parisc: Include stringify.h to avoid build error in crypto/api.c parisc/sticon: fix reverse colors
2021-11-18ptp: ocp: Fix a couple NULL vs IS_ERR() checksDan Carpenter1-4/+5
The ptp_ocp_get_mem() function does not return NULL, it returns error pointers. Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18lan78xx: Introduce NAPI polling supportJohn Efstathiades1-68/+114
This patch introduces a NAPI-style approach for processing completed Rx URBs that contributes to improving driver throughput and reducing CPU load. Packets in completed URBs are copied to NAPI SKBs and passed to the network stack for processing. Each frame passed to the stack is one work item in the NAPI budget. If the NAPI budget is consumed and frames remain, they are added to an overflow queue that is processed at the start of the next NAPI polling cycle. The NAPI handler is also responsible for copying pending Tx data to Tx URBs and submitting them to the USB host controller for transmission. Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18lan78xx: Remove hardware-specific header updateJohn Efstathiades1-35/+16
Remove hardware-specific header length adjustment as it is no longer required. It also breaks generic receive offload (GRO) processing of received TCP frames that results in a TCP ACK being sent for each received frame. Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18lan78xx: Re-order rx_submit() to remove forward declarationJohn Efstathiades1-54/+52
Move position of rx_submit() to remove forward declaration of rx_complete() which is now no longer required. Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18lan78xx: Introduce Rx URB processing improvementsJohn Efstathiades1-116/+166
This patch introduces a new approach to allocating and managing Rx URBs that contributes to improving driver throughput and reducing CPU load. A pool of Rx URBs is created during driver instantiation. All the URBs are initially submitted to the USB host controller for processing. The default URB buffer size is different for each USB bus speed. The chosen sizes provide good USB utilisation with little impact on overall packet latency. Completed URBs are processed in the driver bottom half. The URB buffer contents are copied to a dynamically allocated SKB, which is then passed to the network stack. The URB is then re-submitted to the USB host controller. NOTE: the call to skb_copy() in rx_process() that copies the URB contents to a new SKB is a temporary change to make this patch work in its own right. This call will be removed when the NAPI processing is introduced by patch 6 in this patch set. Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18lan78xx: Introduce Tx URB processing improvementsJohn Efstathiades1-213/+461
This patch introduces a new approach to allocating and managing Tx URBs that contributes to improving driver throughput and reducing CPU load. A pool of Tx URBs is created during driver instantiation. A URB is allocated from the pool when there is data to transmit. The URB is released back to the pool when the data has been transmitted by the device. The default URB buffer size is different for each USB bus speed. The chosen sizes provide good USB utilisation with little impact on overall packet latency. SKBs to be transmitted are added to a pending queue for processing. The driver tracks the available Tx URB buffer space and copies as much pending data as possible into each free URB. Each full URB is then submitted to the USB host controller for transmission. Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18lan78xx: Fix memory allocation bugJohn Efstathiades1-17/+21
Fix memory allocation that fails to check for NULL return. Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18net: dsa: felix: restrict psfp rules on ingress portXiaoliang Yang2-31/+161
PSFP rules take effect on the streams from any port of VSC9959 switch. This patch use ingress port to limit the rule only active on this port. Each stream can only match two ingress source ports in VSC9959. Streams from lowest port gets the configuration of SFID pointed by MAC Table lookup and streams from highest port gets the configuration of (SFID+1) pointed by MAC Table lookup. This patch defines the PSFP rule on highest port as dummy rule, which means that it does not modify the MAC table. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18net: dsa: felix: use vcap policer to set flow meter for psfpXiaoliang Yang1-1/+31
This patch add police action to set flow meter table which is defined in IEEE802.1Qci. Flow metering is two rates two buckets and three color marker to policing the frames, we only enable one rate one bucket in this patch. Flow metering shares a same policer pool with VCAP policers, so the PSFP policer calls ocelot_vcap_policer_add() and ocelot_vcap_policer_del() to set flow meter police. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18net: mscc: ocelot: use index to set vcap policerXiaoliang Yang7-37/+110
Policer was previously automatically assigned from the highest index to the lowest index from policer pool. But police action of tc flower now uses index to set an police entry. This patch uses the police index to set vcap policers, so that one policer can be shared by multiple rules. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-18net: dsa: felix: add stream gate settings for psfpXiaoliang Yang1-4/+213
This patch adds stream gate settings for PSFP. Use SGI table to store stream gate entries. Disable the gate entry when it is not used by any stream. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>