Skip to content
  1. Feb 08, 2023
  2. Feb 07, 2023
    • Paolo Abeni's avatar
      Merge tag 'linux-can-next-for-6.3-20230206' of... · 61d731e6
      Paolo Abeni authored
      Merge tag 'linux-can-next-for-6.3-20230206' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can-next 2023-02-06
      
      this is a pull request of 47 patches for net-next/master.
      
      The first two patch is by Oliver Hartkopp. One adds missing error
      checking to the CAN_GW protocol, the other adds a missing CAN address
      family check to the CAN ISO TP protocol.
      
      Thomas Kopp contributes a performance optimization to the mcp251xfd
      driver.
      
      The next 11 patches are by Geert Uytterhoeven and add support for
      R-Car V4H systems to the rcar_canfd driver.
      
      Stephane Grosjean and Lukas Magel contribute 8 patches to the peak_usb
      driver, which add support for configurable CAN channel ID.
      
      The last 17 patches are by me and target the CAN bit timing
      configuration. The bit timing is cleaned up, error messages are
      improved and forwarded to user space via NL_SET_ERR_MSG_FMT() instead
      of netdev_err(), and the SJW handling is updated, including the
      definition of a new default value that will benefit CAN-FD
      controllers, by increasing their oscillator tolerance.
      
      * tag 'linux-can-next-for-6.3-20230206' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (47 commits)
        can: bittiming: can_validate_bitrate(): report error via netlink
        can: bittiming: can_calc_bittiming(): convert from netdev_err() to NL_SET_ERR_MSG_FMT()
        can: bittiming: can_calc_bittiming(): clean up SJW handling
        can: bittiming: can_sjw_set_default(): use Phase Seg2 / 2 as default for SJW
        can: bittiming: can_sjw_check(): check that SJW is not longer than either Phase Buffer Segment
        can: bittiming: can_sjw_check(): report error via netlink and harmonize error value
        can: bittiming: can_fixup_bittiming(): report error via netlink and harmonize error value
        can: bittiming: factor out can_sjw_set_default() and can_sjw_check()
        can: bittiming: can_changelink() pass extack down callstack
        can: netlink: can_changelink(): convert from netdev_err() to NL_SET_ERR_MSG_FMT()
        can: netlink: can_validate(): validate sample point for CAN and CAN-FD
        can: dev: register_candev(): bail out if both fixed bit rates and bit timing constants are provided
        can: dev: register_candev(): ensure that bittiming const are valid
        can: bittiming: can_get_bittiming(): use direct return and remove unneeded else
        can: bittiming: can_fixup_bittiming(): set effective tq
        can: bittiming: can_fixup_bittiming(): use CAN_SYNC_SEG instead of 1
        can: bittiming(): replace open coded variants of can_bit_time()
        can: peak_usb: Reorder include directives alphabetically
        can: peak_usb: align CAN channel ID format in log with sysfs attribute
        can: peak_usb: export PCAN CAN channel ID as sysfs device attribute
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20230206131620.2758724-1-mkl@pengutronix.de
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      61d731e6
    • Vladimir Oltean's avatar
      ethtool: mm: fix get_mm() return code not propagating to user space · ca8e4cbf
      Vladimir Oltean authored
      
      
      If ops->get_mm() returns a non-zero error code, we goto out_complete,
      but there, we return 0. Fix that to propagate the "ret" variable to the
      caller. If ops->get_mm() succeeds, it will always return 0.
      
      Fixes: 2b30f829 ("net: ethtool: add support for MAC Merge layer")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230206094932.446379-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      ca8e4cbf
    • Eddy Tao's avatar
      net: openvswitch: reduce cpu_used_mask memory · 15ea59a0
      Eddy Tao authored
      
      
      Use actual CPU number instead of hardcoded value to decide the size
      of 'cpu_used_mask' in 'struct sw_flow'. Below is the reason.
      
      'struct cpumask cpu_used_mask' is embedded in struct sw_flow.
      Its size is hardcoded to CONFIG_NR_CPUS bits, which can be
      8192 by default, it costs memory and slows down ovs_flow_alloc.
      
      To address this:
       Redefine cpu_used_mask to pointer.
       Append cpumask_size() bytes after 'stat' to hold cpumask.
       Initialization cpu_used_mask right after stats_last_writer.
      
      APIs like cpumask_next and cpumask_set_cpu never access bits
      beyond cpu count, cpumask_size() bytes of memory is enough.
      
      Signed-off-by: default avatarEddy Tao <taoyuan_eddy@hotmail.com>
      Acked-by: default avatarEelco Chaudron <echaudro@redhat.com>
      Link: https://lore.kernel.org/r/OS3P286MB229570CCED618B20355D227AF5D59@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      15ea59a0
    • Arnd Bergmann's avatar
      amd-xgbe: fix mismatched prototype · bbe64186
      Arnd Bergmann authored
      
      
      The forward declaration was introduced with a prototype that does
      not match the function definition:
      
      drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:2166:13: error: conflicting types for 'xgbe_phy_perform_ratechange' due to enum/integer mismatch; have 'void(struct xgbe_prv_data *, enum xgbe_mb_cmd,  enum xgbe_mb_subcmd)' [-Werror=enum-int-mismatch]
       2166 | static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata,
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:391:13: note: previous declaration of 'xgbe_phy_perform_ratechange' with type 'void(struct xgbe_prv_data *, unsigned int,  unsigned int)'
        391 | static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata,
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Ideally there should not be any forward declarations here, which
      would make it easier to show that there is no unbounded recursion.
      I tried fixing this but could not figure out how to avoid the
      recursive call.
      
      As a hotfix, address only the broken prototype to fix the build
      problem instead.
      
      Fixes: 4f3b20bf ("amd-xgbe: add support for rx-adaptation")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Acked-by: default avatarShyam Sundar S K <Shyam-sundar.S-k@amd.com>
      Link: https://lore.kernel.org/r/20230203121553.2871598-1-arnd@kernel.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bbe64186
    • Colin Foster's avatar
      net: mscc: ocelot: un-export unused regmap symbols · b1ca2f1b
      Colin Foster authored
      
      
      There are no external users of the vsc7514_*_regmap[] symbols or
      vsc7514_vcap_* functions. They were exported in commit 32ecd22b ("net:
      mscc: ocelot: split register definitions to a separate file") with the
      intention of being used, but the actual structure used in commit
      2efaca41 ("net: mscc: ocelot: expose vsc7514_regmap definition") ended
      up being all that was needed.
      
      Bury these unnecessary symbols.
      
      Signed-off-by: default avatarColin Foster <colin.foster@in-advantage.com>
      Suggested-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20230204182056.25502-1-colin.foster@in-advantage.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b1ca2f1b
    • Jakub Kicinski's avatar
      Merge branch 'aux-bus-v11' of https://github.com/ajitkhaparde1/linux · 9ac543c0
      Jakub Kicinski authored
      Ajit Khaparde says:
      
      ====================
      bnxt: Add Auxiliary driver support
      
      Add auxiliary device driver for Broadcom devices.
      The bnxt_en driver will register and initialize an aux device
      if RDMA is enabled in the underlying device.
      The bnxt_re driver will then probe and initialize the
      RoCE interfaces with the infiniband stack.
      
      We got rid of the bnxt_en_ops which the bnxt_re driver used to
      communicate with bnxt_en.
      Similarly  We have tried to clean up most of the bnxt_ulp_ops.
      In most of the cases we used the functions and entry points provided
      by the auxiliary bus driver framework.
      And now these are the minimal functions needed to support the functionality.
      
      We will try to work on getting rid of the remaining if we find any
      other viable option in future.
      
      * 'aux-bus-v11' of https://github.com/ajitkhaparde1/linux:
        bnxt_en: Remove runtime interrupt vector allocation
        RDMA/bnxt_re: Remove the sriov config callback
        bnxt_en: Remove struct bnxt access from RoCE driver
        bnxt_en: Use auxiliary bus calls over proprietary calls
        bnxt_en: Use direct API instead of indirection
        bnxt_en: Remove usage of ulp_id
        RDMA/bnxt_re: Use auxiliary driver interface
        bnxt_en: Add auxiliary driver support
      ====================
      
      Link: https://lore.kernel.org/r/20230202033809.3989-1-ajit.khaparde@broadcom.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9ac543c0
  3. Feb 06, 2023