aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net: phy: Support speed selection for PHY loopbackGerhard Engleder2025-03-209-48/+100
| | | | | | | | | | | | | | | | phy_loopback() leaves it to the PHY driver to select the speed of the loopback mode. Thus, the speed of the loopback mode depends on the PHY driver in use. Add support for speed selection to phy_loopback() to enable loopback with defined speeds. Ensure that link up is signaled if speed changes as speed is not allowed to change during link up. Link down and up is necessary for a new speed. Signed-off-by: Gerhard Engleder <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* net: phy: Allow loopback speed selection for PHY driversGerhard Engleder2025-03-208-18/+51
| | | | | | | | | | | | | | | PHY drivers support loopback mode, but it is not possible to select the speed of the loopback mode. The speed is chosen by the set_loopback() operation of the PHY driver. Same is valid for genphy_loopback(). There are PHYs that support loopback with different speeds. Extend set_loopback() to make loopback speed selection possible. Signed-off-by: Gerhard Engleder <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* net: macb: Add __nonstring annotations for unterminated stringsKees Cook2025-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to correctly identify the char array as "not a C string" and thereby eliminate the warning: In file included from ../drivers/net/ethernet/cadence/macb_main.c:42: ../drivers/net/ethernet/cadence/macb.h:1070:35: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 1070 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames"), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/cadence/macb.h:1050:24: note: in definition of macro 'GEM_STAT_TITLE_BITS' 1050 | .stat_string = title, \ | ^~~~~ ../drivers/net/ethernet/cadence/macb.h:1070:9: note: in expansion of macro 'GEM_STAT_TITLE' 1070 | GEM_STAT_TITLE(TX1519CNT, "tx_greater_than_1518_byte_frames"), | ^~~~~~~~~~~~~~ ../drivers/net/ethernet/cadence/macb.h:1097:35: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 1097 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames"), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/cadence/macb.h:1050:24: note: in definition of macro 'GEM_STAT_TITLE_BITS' 1050 | .stat_string = title, \ | ^~~~~ ../drivers/net/ethernet/cadence/macb.h:1097:9: note: in expansion of macro 'GEM_STAT_TITLE' 1097 | GEM_STAT_TITLE(RX1519CNT, "rx_greater_than_1518_byte_frames"), | ^~~~~~~~~~~~~~ Since these strings are copied with memcpy() they do not need to be NUL terminated, and can use __nonstring: memcpy(p, gem_statistics[i].stat_string, ETH_GSTRING_LEN); Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* Merge branch 'netconsole-allow-selection-of-egress-interface-via-mac-address'Paolo Abeni2025-03-199-22/+61
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uday Shankar says: ==================== netconsole: allow selection of egress interface via MAC address This series adds support for selecting a netconsole egress interface by specifying the MAC address (in place of the interface name) in the boot/module parameter. Signed-off-by: Uday Shankar <[email protected]> ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * netconsole: allow selection of egress interface via MAC addressUday Shankar2025-03-193-13/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, netconsole has two methods of configuration - module parameter and configfs. The former interface allows for netconsole activation earlier during boot (by specifying the module parameter on the kernel command line), so it is preferred for debugging issues which arise before userspace is up/the configfs interface can be used. The module parameter syntax requires specifying the egress interface name. This requirement makes it hard to use for a couple reasons: - The egress interface name can be hard or impossible to predict. For example, installing a new network card in a system can change the interface names assigned by the kernel. - When constructing the module parameter, one may have trouble determining the original (kernel-assigned) name of the interface (which is the name that should be given to netconsole) if some stable interface naming scheme is in effect. A human can usually look at kernel logs to determine the original name, but this is very painful if automation is constructing the parameter. For these reasons, allow selection of the egress interface via MAC address when configuring netconsole using the module parameter. Update the netconsole documentation with an example of the new syntax. Selection of egress interface by MAC address via configfs is far less interesting (since when this interface can be used, one should be able to easily convert between MAC address and interface name), so it is left unimplemented. Signed-off-by: Uday Shankar <[email protected]> Reviewed-by: Breno Leitao <[email protected]> Tested-by: Breno Leitao <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * net, treewide: define and use MAC_ADDR_STR_LENUday Shankar2025-03-196-9/+11
|/ | | | | | | | | | | | | | | | There are a few places in the tree which compute the length of the string representation of a MAC address as 3 * ETH_ALEN - 1. Define a constant for this and use it where relevant. No functionality changes are expected. Signed-off-by: Uday Shankar <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Acked-by: Johannes Berg <[email protected]> Reviewed-by: Breno Leitao <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* r8169: switch away from deprecated pcim_iomap_tableHeiner Kallweit2025-03-191-5/+4
| | | | | | | | | | | | Avoid using deprecated pcim_iomap_table by switching to pcim_iomap_region. Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* Merge branch 'net-bring-back-dev_addr_sem'Paolo Abeni2025-03-199-41/+56
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stanislav Fomichev says: ==================== net: bring back dev_addr_sem Kohei reports an issue with dev_addr_sem conversion to netdev instance lock in [0]. Based on the discussion, switching to netdev instance lock to protect the address might not work for the devices that are not using netdev ops lock. Bring dev_addr_sem instance lock back but fix the ordering. 0: https://lore.kernel.org/netdev/[email protected] ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * net: reorder dev_addr_sem lockStanislav Fomichev2025-03-194-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lockdep complains about circular lock in 1 -> 2 -> 3 (see below). Change the lock ordering to be: - rtnl_lock - dev_addr_sem - netdev_ops (only for lower devices!) - team_lock (or other per-upper device lock) 1. rtnl_lock -> netdev_ops -> dev_addr_sem rtnl_setlink rtnl_lock do_setlink IFLA_ADDRESS on lower netdev_ops dev_addr_sem 2. rtnl_lock -> team_lock -> netdev_ops rtnl_newlink rtnl_lock do_setlink IFLA_MASTER on lower do_set_master team_add_slave team_lock team_port_add dev_set_mtu netdev_ops 3. rtnl_lock -> dev_addr_sem -> team_lock rtnl_newlink rtnl_lock do_setlink IFLA_ADDRESS on upper dev_addr_sem netif_set_mac_address team_set_mac_address team_lock 4. rtnl_lock -> netdev_ops -> dev_addr_sem rtnl_lock dev_ifsioc dev_set_mac_address_user __tun_chr_ioctl rtnl_lock dev_set_mac_address_user tap_ioctl rtnl_lock dev_set_mac_address_user dev_set_mac_address_user netdev_lock_ops netif_set_mac_address_user dev_addr_sem v2: - move lock reorder to happen after kmalloc (Kuniyuki) Cc: Kohei Enju <[email protected]> Fixes: df43d8bf1031 ("net: replace dev_addr_sem with netdev instance lock") Signed-off-by: Stanislav Fomichev <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/[email protected] Tested-by: Lei Yang <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * Revert "net: replace dev_addr_sem with netdev instance lock"Stanislav Fomichev2025-03-199-41/+56
|/ | | | | | | | | | | | This reverts commit df43d8bf10316a7c3b1e47e3cc0057a54df4a5b8. Cc: Kohei Enju <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Fixes: df43d8bf1031 ("net: replace dev_addr_sem with netdev instance lock") Signed-off-by: Stanislav Fomichev <[email protected]> Link: https://patch.msgid.link/[email protected] Tested-by: Lei Yang <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
* tc-tests: Update tc police action tests for tc buffer size rounding fixes.Jonathan Lennox2025-03-191-5/+5
| | | | | | | | | | | | | | | | | Before tc's recent change to fix rounding errors, several tests which specified a burst size of "1m" would translate back to being 1048574 bytes (2b less than 1Mb). sprint_size prints this as "1024Kb". With the tc fix, the burst size is instead correctly reported as 1048576 bytes (precisely 1Mb), which sprint_size prints as "1Mb". This updates the expected output in the tests' matchPattern values to accept either the old or the new output. Signed-off-by: Jonathan Lennox <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* net: stmmac: dwmac-rk: Provide FIFO sizes for DWMAC 1000Chen-Yu Tsai2025-03-191-1/+4
| | | | | | | | | | | | | | | | | | | The DWMAC 1000 DMA capabilities register does not provide actual FIFO sizes, nor does the driver really care. If they are not provided via some other means, the driver will work fine, only disallowing changing the MTU setting. Provide the FIFO sizes through the driver's platform data to enable MTU changes. The FIFO sizes are confirmed to be the same across RK3288, RK3328, RK3399 and PX30, based on their respective manuals. It is likely that Rockchip synthesized their DWMAC 1000 with the same parameters on all their chips that have it. Signed-off-by: Chen-Yu Tsai <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* Merge branch 'net-mlx5-hw-steering-cleanups'Paolo Abeni2025-03-194-14/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tariq Toukan says: ==================== net/mlx5: HW Steering cleanups This short series by Yevgeny contains several small HW Steering cleanups: - Patch 1: removing unused FW commands - Patch 2: using list_move() instead of list_del/add - Patch 3: printing the unsupported combination of match fields ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * net/mlx5: HWS, log the unsupported mask in definerYevgeny Kliteynik2025-03-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a user requested to match on an unsupported combination of fields, print the unsupported combination in the error message. Signed-off-by: Yevgeny Kliteynik <[email protected]> Reviewed-by: Vlad Dogaru <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Dawid Osuchowski <[email protected]> Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * net/mlx5: HWS, use list_move() instead of del/addYevgeny Kliteynik2025-03-192-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Wherever applicable, use list_move function instead of list_del + list_add. Signed-off-by: Yevgeny Kliteynik <[email protected]> Reviewed-by: Vlad Dogaru <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Dawid Osuchowski <[email protected]> Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * net/mlx5: HWS, remove unused code for alias flow tablesYevgeny Kliteynik2025-03-192-9/+0
|/ | | | | | | | | | | | | Alias flow tables are not in use by HWS - remove the unused code. Signed-off-by: Yevgeny Kliteynik <[email protected]> Reviewed-by: Vlad Dogaru <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Dawid Osuchowski <[email protected]> Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
* Merge branch 'net-stmmac-deprecate-snps-en-tx-lpi-clockgating-property'Paolo Abeni2025-03-199-9/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Russell King says: ==================== net: stmmac: deprecate "snps,en-tx-lpi-clockgating" property This series deprecates the "snps,en-tx-lpi-clockgating" property for stmmac. MII Transmit clock gating, where the MAC hardware supports gating this clock, is a function of the connected PHY capabilities, which it reports through its status register. GMAC versions that support transmit clock gating twiddle the LPITCSE bit accordingly in the LPI control/status register, which is handled by the GMAC core specific code. So, "snps,en-tx-lpi-clockgating" not something that is a GMAC property, but is a work-around for phylib not providing an interface to determine whether the PHY allows the transmit clock to be disabled. This series converts the two SoCs that make use of this property (which, I hasten to add, is set in the SoC code) to use the PHY capability bit instead of a DT property, then removes the DT property from the .dtsi, deprecates it in the snps,dwmac binding, and finally in the stmmac code. I am expecting some discussion on how to merge this, as I think the order in which these changes is made is important - we don't want to deprecate the old way until the new code has landed. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * net: stmmac: deprecate "snps,en-tx-lpi-clockgating" propertyRussell King (Oracle)2025-03-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Therefore, snps,en-tx-lpi-clockgating is technically incorrect, and this commit adds a warning should a DT be encountered with the property present. However, we keep backwards compatibility. Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Lad Prabhakar <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * dt-bindings: deprecate "snps,en-tx-lpi-clockgating" propertyRussell King (Oracle)2025-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Therefore, snps,en-tx-lpi-clockgating is technically incorrect, so this commit deprecates the property in the binding. Acked-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Lad Prabhakar <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * ARM: dts: stm32: remove "snps,en-tx-lpi-clockgating" propertyRussell King (Oracle)2025-03-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. As commit "net: stmmac: stm32: use PHY capability for TX clock stop" adds the flag to use the PHY capability, remove the DT property that is now unecessary. Cc: Samin Guo <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * riscv: dts: starfive: remove "snps,en-tx-lpi-clockgating" propertyRussell King (Oracle)2025-03-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. As commit "net: stmmac: starfive: use PHY capability for TX clock stop" adds the flag to use the PHY capability, remove the DT property that is now unecessary. Cc: Samin Guo <[email protected]> Acked-by: Conor Dooley <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * net: stmmac: stm32: use PHY capability for TX clock stopRussell King (Oracle)2025-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Add the flag to allow the stmmac core to use the PHY capability. Cc: Christophe Roullier <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * net: stmmac: starfive: use PHY capability for TX clock stopRussell King (Oracle)2025-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Add the flag to allow the stmmac core to use the PHY capability. Cc: Samin Guo <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * net: stmmac: allow platforms to use PHY tx clock stop capabilityRussell King (Oracle)2025-03-193-5/+15
|/ | | | | | | | | | | | Allow platform glue to instruct stmmac to make use of the PHY transmit clock stop capability when deciding whether to allow the transmit clock from the DWMAC core to be stopped. Reviewed-by: Lad Prabhakar <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* Merge tag 'ieee802154-for-net-next-2025-03-10' of ↵Paolo Abeni2025-03-193-48/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2025-03-10 An update from ieee802154 for your *net-next* tree: Andy Shevchenko reworked the ca8210 driver to use the gpiod API and fixed a few problems of the driver along the way. * tag 'ieee802154-for-net-next-2025-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next: dt-bindings: ieee802154: ca8210: Update polarity of the reset pin ieee802154: ca8210: Switch to using gpiod API ieee802154: ca8210: Get platform data via dev_get_platdata() ieee802154: ca8210: Use proper setters and getters for bitwise types ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * dt-bindings: ieee802154: ca8210: Update polarity of the reset pinAndy Shevchenko2025-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | The code has been updated to follow what datasheet says about the polarity of the reset pin, which is active-low. Update the device tree bindings accordingly. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
| * ieee802154: ca8210: Switch to using gpiod APIAndy Shevchenko2025-03-062-38/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). With this, invert the logic of the reset pin which is active-low and add a quirk for the legacy and incorrect device tree descriptions. Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
| * ieee802154: ca8210: Get platform data via dev_get_platdata()Andy Shevchenko2025-03-061-4/+8
| | | | | | | | | | | | | | | | | | | | Access to platform data via dev_get_platdata() getter to make code cleaner. Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
| * ieee802154: ca8210: Use proper setters and getters for bitwise typesAndy Shevchenko2025-03-061-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse complains that the driver doesn't respect the bitwise types: drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in assignment (different base types) drivers/net/ieee802154/ca8210.c:1796:27: expected restricted __le16 [addressable] [assigned] [usertype] pan_id drivers/net/ieee802154/ca8210.c:1796:27: got unsigned short [usertype] drivers/net/ieee802154/ca8210.c:1801:25: warning: incorrect type in assignment (different base types) drivers/net/ieee802154/ca8210.c:1801:25: expected restricted __le16 [addressable] [assigned] [usertype] pan_id drivers/net/ieee802154/ca8210.c:1801:25: got unsigned short [usertype] drivers/net/ieee802154/ca8210.c:1928:28: warning: incorrect type in argument 3 (different base types) drivers/net/ieee802154/ca8210.c:1928:28: expected unsigned short [usertype] dst_pan_id drivers/net/ieee802154/ca8210.c:1928:28: got restricted __le16 [addressable] [usertype] pan_id Use proper setters and getters for bitwise types. Note, in accordance with [1] the protocol is little endian. Link: https://www.cascoda.com/wp-content/uploads/2018/11/CA-8210_datasheet_0418.pdf [1] Reviewed-by: Miquel Raynal <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
* | Merge branch 'net-stmmac-remove-unnecessary-of_get_phy_mode-calls'Paolo Abeni2025-03-189-56/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Russell King says: ==================== net: stmmac: remove unnecessary of_get_phy_mode() calls This series removes unnecessary of_get_phy_mode() calls from the stmmac glue drivers. stmmac_probe_config_dt() / devm_stmmac_probe_config_dt() already gets the interface mode using device_get_phy_mode() and stores it in plat_dat->phy_interface. Therefore, glue drivers using of_get_phy_mode() are just duplicating the work that has already been done. This series adjusts the glue drivers to remove their usage of of_get_phy_mode(). ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: sunxi: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. Set gmac->interface from plat_dat->phy_interface. Reviewed-by: Michal Kubiak <[email protected]> Acked-by: Jernej Skrabec <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: sun8i: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. sun8i was using of_get_phy_mode() to set plat_dat->mac_interface, which defaults to plat_dat->phy_interface when the mac-mode DT property is not present. As nothing in arch/*/boot/dts sets the mac-mode property, it is highly likely that these two will be identical, and thus there is no need for this glue driver to set plat_dat->mac_interface. Reviewed-by: Andre Przywara <[email protected]> Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: sti: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. Pass plat_dat into sti_dwmac_parse_data(), and set dwmac->interface from plat_dat->phy_interface. Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: rk: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. Set bsp_priv->phy_iface from plat->phy_interface. Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: meson8b: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. Set dwmac->phy_mode from plat_dat->phy_interface. Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: ipq806x: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. Pass plat_dat into ipq806x_gmac_of_parse(), and set gmac->phy_mode from plat_dat->phy_interface. Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: anarion: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. Rearrange the initialisation order so we can pass plat_dat into anarion_config_dt(), thereby providing plat_dat->phy_interface as necessary there. Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: mediatek: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it in platform code. Initialise priv_plat->phy_mode from plat->phy_interface inmediatek_dwmac_common_data(). Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
| * | net: stmmac: qcom-ethqos: remove of_get_phy_mode()Russell King (Oracle)2025-03-181-3/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | devm_stmmac_probe_config_dt() already gets the PHY mode from firmware, which is stored in plat_dat->phy_interface. Therefore, we don't need to get it a second time in qcom_ethqos_probe(). Use plat_dat->phy_interface to initialise ethqos->phy_mode. Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
* | tcp: cache RTAX_QUICKACK metric in a hot cache lineEric Dumazet2025-03-183-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tcp_in_quickack_mode() is called from input path for small packets. It calls __sk_dst_get() which reads sk->sk_dst_cache which has been put in sock_read_tx group (for good reasons). Then dst_metric(dst, RTAX_QUICKACK) also needs extra cache line misses. Cache RTAX_QUICKACK in icsk->icsk_ack.dst_quick_ack to no longer pull these cache lines for the cases a delayed ACK is scheduled. After this patch TCP receive path does not longer access sock_read_tx group. Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Jason Xing <[email protected]> Reviewed-by: Neal Cardwell <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* | Merge branch 'inet-frags-fully-use-rcu'Paolo Abeni2025-03-187-84/+89
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric Dumazet says: ==================== inet: frags: fully use RCU While inet reassembly uses RCU, it is acquiring/releasing a refcount on struct inet_frag_queue in fast path, for no good reason. This was mentioned in one patch changelog seven years ago :/ This series is removing these refcount changes, by extending RCU sections. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * | inet: frags: save a pair of atomic operations in reassemblyEric Dumazet2025-03-185-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in commit 648700f76b03 ("inet: frags: use rhashtables for reassembly units"): A followup patch will even remove the refcount hold/release left from prior implementation and save a couple of atomic operations. This patch implements this idea, seven years later. Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * | inet: frags: change inet_frag_kill() to defer refcount updatesEric Dumazet2025-03-187-49/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following patch, we no longer assume inet_frag_kill() callers own a reference. Consuming two refcounts from inet_frag_kill() would lead in UAF. Propagate the pointer to the refs that will be consumed later by the final inet_frag_putn() call. Signed-off-by: Eric Dumazet <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * | ipv4: frags: remove ipq_put()Eric Dumazet2025-03-181-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace ipq_put() with inet_frag_putn() Signed-off-by: Eric Dumazet <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * | inet: frags: add inet_frag_putn() helperEric Dumazet2025-03-187-12/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | inet_frag_putn() can release multiple references in one step. Use it in inet_frags_free_cb(). Replace inet_frag_put(X) with inet_frag_putn(X, 1) Signed-off-by: Eric Dumazet <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* | net: skbuff: Remove unused skb_add_data()Yue Haibing2025-03-181-19/+0
| | | | | | | | | | | | | | | | | | | | | | Since commit a4ea4c477619 ("rxrpc: Don't use a ring buffer for call Tx queue") this function is not used anymore. Signed-off-by: Yue Haibing <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
* | Merge tag 'linux-can-next-for-6.15-20250314' of ↵Paolo Abeni2025-03-187-7/+43
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2025-03-14 this is a pull request of 4 patches for net-next/main. In the first 2 patches by Dimitri Fedrau add CAN transceiver support to the flexcan driver. Frank Li's patch adds i.MX94 support to the flexcan device tree bindings. The last patch is by Davide Caratti and adds protocol counter for AF_CAN sockets. linux-can-next-for-6.15-20250314 * tag 'linux-can-next-for-6.15-20250314' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: add protocol counter for AF_CAN sockets dt-bindings: can: fsl,flexcan: add i.MX94 support can: flexcan: add transceiver capabilities dt-bindings: can: fsl,flexcan: add transceiver capabilities ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
| * | can: add protocol counter for AF_CAN socketsDavide Caratti2025-03-144-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The third column in the output of the following command: | # grep CAN /proc/net/protocols is systematically '0': use sock_prot_inuse_add() to account for the number of sockets for each protocol on top of AF_CAN family. Signed-off-by: Davide Caratti <[email protected]> Link: https://patch.msgid.link/9db5d0e6c11b232ad895885616f1258882a32f61.1741952160.git.dcaratti@redhat.com Signed-off-by: Marc Kleine-Budde <[email protected]>
| * | dt-bindings: can: fsl,flexcan: add i.MX94 supportFrank Li2025-03-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add compatible string "fsl,imx94-flexcan" for the i.MX94 chip, which is backward compatible with i.MX95. Set it to fall back to "fsl,imx95-flexcan". Acked-by: Conor Dooley <[email protected]> Signed-off-by: Frank Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
| * | Merge patch series "can: flexcan: add transceiver capabilities"Marc Kleine-Budde2025-03-143-6/+31
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dimitri Fedrau <[email protected]> says: Currently the flexcan driver does only support adding PHYs by using the "old" regulator bindings. Add support for CAN transceivers as a PHY. Add the capability to ensure that the PHY is in operational state when the link is set to an "up" state. Changes in v4: - Dropped "if: required: phys" in bindings - Link to v3: https://lore.kernel.org/r/20250221-flexcan-add-transceiver-caps-v3-0-a947bde55a62@liebherr.com Changes in v3: - Have xceiver-supply or phys properties in bindings - Switch do dev_err_probe in flexcan_probe when checking error of call devm_phy_optional_get - Link to v2: https://lore.kernel.org/r/20250220-flexcan-add-transceiver-caps-v2-0-a81970f11846@liebherr.com Changes in v2: - Rename variable xceiver to transceiver in struct flexcan_priv and in flexcan_probe - Set priv->can.bitrate_max if transceiver is found - Fix commit messages which claim that transceivers are not supported - Do not print error on EPROBE_DEFER after calling devm_phy_optional_get in flexcan_probe - Link to v1: https://lore.kernel.org/r/20250211-flexcan-add-transceiver-caps-v1-0-c6abb7817b0f@liebherr.com Link: https://patch.msgid.link/20250312-flexcan-add-transceiver-caps-v4-0-29e89ae0225a@liebherr.com Signed-off-by: Marc Kleine-Budde <[email protected]>