1. 20 2月, 2022 7 次提交
    • O
      net: dsa: microchip: ksz9477: export HW stats over stats64 interface · a7f4f13a
      Oleksij Rempel 提交于
      Provide access to HW offloaded packets over stats64 interface.
      The rx/tx_bytes values needed some fixing since HW is accounting size of
      the Ethernet frame together with FCS.
      Signed-off-by: NOleksij Rempel <o.rempel@pengutronix.de>
      Reviewed-by: NVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7f4f13a
    • R
      net: phylink: remove phylink_config's pcs_poll · 64b4a0f8
      Russell King (Oracle) 提交于
      phylink_config's pcs_poll is no longer used, let's get rid of it.
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64b4a0f8
    • C
      atm: nicstar: Use kcalloc() to simplify code · 92c54a65
      Christophe JAILLET 提交于
      Use kcalloc() instead of kmalloc_array() and a loop to set all the values
      of the array to NULL.
      
      While at it, remove a duplicated assignment to 'scq->num_entries'.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92c54a65
    • R
      dpaa2-eth: Update SINGLE_STEP register access · c4680c97
      Radu Bulie 提交于
      DPAA2 MAC supports 1588 one step timestamping.
      If this option is enabled then for each transmitted PTP event packet,
      the 1588 SINGLE_STEP register is accessed to modify the following fields:
      
      -offset of the correction field inside the PTP packet
      -UDP checksum update bit,  in case the PTP event packet has
       UDP encapsulation
      
      These values can change any time, because there may be multiple
      PTP clients connected, that receive various 1588 frame types:
      - L2 only frame
      - UDP / Ipv4
      - UDP / Ipv6
      - other
      
      The current implementation uses dpni_set_single_step_cfg to update the
      SINLGE_STEP register.
      Using an MC command  on the Tx datapath for each transmitted 1588 message
      introduces high delays, leading to low throughput and consequently to a
      small number of supported PTP clients. Besides these, the nanosecond
      correction field from the PTP packet will contain the high delay from the
      driver which together with the originTimestamp will render timestamp
      values that are unacceptable in a GM clock implementation.
      
      This patch updates the Tx datapath for 1588 messages when single step
      timestamp is enabled and provides direct access to SINGLE_STEP register,
      eliminating the  overhead caused by the dpni_set_single_step_cfg
      MC command. MC version >= 10.32 implements this functionality.
      If the MC version does not have support for returning the
      single step register base address, the driver will use
      dpni_set_single_step_cfg command for updates operations.
      
      All the delay introduced by dpni_set_single_step_cfg
      function will be eliminated (if MC version has support for returning the
      base address of the single step register), improving the egress driver
      performance for PTP packets when single step timestamping is enabled.
      
      Before these changes the maximum throughput for 1588 messages with
      single step hardware timestamp enabled was around 2000pps.
      After the updates the throughput increased up to 32.82 Mbps / 46631.02 pps.
      Signed-off-by: NRadu Bulie <radu-andrei.bulie@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4680c97
    • R
      dpaa2-eth: Update dpni_get_single_step_cfg command · 9572594e
      Radu Bulie 提交于
      dpni_get_single_step_cfg is an MC firmware command used for
      retrieving the contents of SINGLE_STEP 1588 register available
      in a DPMAC.
      
      This patch adds a new version of this command that returns as an extra
      argument the physical base address of the aforementioned register.
      The address will be used to directly modify the contents of the
      SINGLE_STEP register instead of invoking the MC command
      dpni_set_single_step_cgf. The former approach introduced huge delays on
      the TX datapath when one step PTP events were transmitted. This led to low
      throughput and high latencies observed in the PTP correction field.
      Signed-off-by: NRadu Bulie <radu-andrei.bulie@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9572594e
    • V
      net: prestera: flower: fix destroy tmpl in chain · b3ae2d35
      Volodymyr Mytnyk 提交于
      Fix flower destroy template callback to release template
      only for specific tc chain instead of all chain tempaltes.
      
      The issue was intruduced by previous commit that introduced
      multi-chain support.
      
      Fixes: fa5d824c ("net: prestera: acl: add multi-chain support offload")
      Signed-off-by: NVolodymyr Mytnyk <vmytnyk@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3ae2d35
    • M
      mctp i2c: MCTP I2C binding driver · f5b8abf9
      Matt Johnston 提交于
      Provides MCTP network transport over an I2C bus, as specified in
      DMTF DSP0237. All messages between nodes are sent as SMBus Block Writes.
      
      Each I2C bus to be used for MCTP is flagged in devicetree by a
      'mctp-controller' property on the bus node. Each flagged bus gets a
      mctpi2cX net device created based on the bus number. A
      'mctp-i2c-controller' I2C client needs to be added under the adapter. In
      an I2C mux situation the mctp-i2c-controller node must be attached only
      to the root I2C bus. The I2C client will handle incoming I2C slave block
      write data for subordinate busses as well as its own bus.
      
      In configurations without devicetree a driver instance can be attached
      to a bus using the I2C slave new_device mechanism.
      
      The MCTP core will hold/release the MCTP I2C device while responses
      are pending (a 6 second timeout or once a socket is closed, response
      received etc). While held the MCTP I2C driver will lock the I2C bus so
      that the correct I2C mux remains selected while responses are received.
      
      (Ideally we would just lock the mux to keep the current bus selected for
      the response rather than a full I2C bus lock, but that isn't exposed in
      the I2C mux API)
      Signed-off-by: NMatt Johnston <matt@codeconstruct.com.au>
      Signed-off-by: NJeremy Kerr <jk@codeconstruct.com.au>
      Reviewed-by: Wolfram Sang <wsa@kernel.org> # I2C transport parts
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f5b8abf9
  2. 19 2月, 2022 5 次提交
  3. 18 2月, 2022 19 次提交
  4. 17 2月, 2022 9 次提交
    • D
      net: usb: cdc_mbim: avoid altsetting toggling for Telit FN990 · 21e8a963
      Daniele Palmas 提交于
      Add quirk CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE for Telit FN990
      0x1071 composition in order to avoid bind error.
      Signed-off-by: NDaniele Palmas <dnlplm@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21e8a963
    • V
      net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY · 5edb65ea
      Vladimir Oltean 提交于
      Since commit 3116ad06 ("net: bridge: vlan: don't notify to switchdev
      master VLANs without BRENTRY flag"), the bridge no longer emits
      switchdev notifiers for VLANs that don't have the
      BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
      Remove them.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5edb65ea
    • V
      net: ti: am65-cpsw-nuss: remove guards against !BRIDGE_VLAN_INFO_BRENTRY · 1d21c327
      Vladimir Oltean 提交于
      Since commit 3116ad06 ("net: bridge: vlan: don't notify to switchdev
      master VLANs without BRENTRY flag"), the bridge no longer emits
      switchdev notifiers for VLANs that don't have the
      BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
      Remove them.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d21c327
    • V
      net: sparx5: remove guards against !BRIDGE_VLAN_INFO_BRENTRY · 318994d3
      Vladimir Oltean 提交于
      Since commit 3116ad06 ("net: bridge: vlan: don't notify to switchdev
      master VLANs without BRENTRY flag"), the bridge no longer emits
      switchdev notifiers for VLANs that don't have the
      BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
      Remove them.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      318994d3
    • V
      net: lan966x: remove guards against !BRIDGE_VLAN_INFO_BRENTRY · ba43b547
      Vladimir Oltean 提交于
      Since commit 3116ad06 ("net: bridge: vlan: don't notify to switchdev
      master VLANs without BRENTRY flag"), the bridge no longer emits
      switchdev notifiers for VLANs that don't have the
      BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
      Remove them.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba43b547
    • V
      mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY · ddaff504
      Vladimir Oltean 提交于
      Since commit 3116ad06 ("net: bridge: vlan: don't notify to switchdev
      master VLANs without BRENTRY flag"), the bridge no longer emits
      switchdev notifiers for VLANs that don't have the
      BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
      Remove them.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ddaff504
    • V
      net: dsa: felix: update destinations of existing traps with ocelot-8021q · 99348004
      Vladimir Oltean 提交于
      Historically, the felix DSA driver has installed special traps such that
      PTP over L2 works with the ocelot-8021q tagging protocol; commit
      0a6f17c6 ("net: dsa: tag_ocelot_8021q: add support for PTP
      timestamping") has the details.
      
      Then the ocelot switch library also gained more comprehensive support
      for PTP traps through commit 96ca08c0 ("net: mscc: ocelot: set up
      traps for PTP packets").
      
      Right now, PTP over L2 works using ocelot-8021q via the traps it has set
      for itself, but nothing else does. Consolidating the two code blocks
      would make ocelot-8021q gain support for PTP over L4 and tc-flower
      traps, and at the same time avoid some code and TCAM duplication.
      
      The traps are similar in intent, but different in execution, so some
      explanation is required. The traps set up by felix_setup_mmio_filtering()
      are VCAP IS1 filters, which have a PAG that chains them to a VCAP IS2
      filter, and the IS2 is where the 'trap' action resides. The traps set up
      by ocelot_trap_add(), on the other hand, have a single filter, in VCAP
      IS2. The reason for chaining VCAP IS1 and IS2 in Felix was to ensure
      that the hardcoded traps take precedence and cannot be overridden by the
      Ocelot switch library.
      
      So in principle, the PTP traps needed for ocelot-8021q in the Felix
      driver can rely on ocelot_trap_add(), but the filters need to be patched
      to account for a quirk that LS1028A has: the quirk_no_xtr_irq described
      in commit 0a6f17c6 ("net: dsa: tag_ocelot_8021q: add support for PTP
      timestamping"). Live-patching is done by iterating through the trap list
      every time we know it has been updated, and transforming a trap into a
      redirect + CPU copy if ocelot-8021q is in use.
      
      Making the DSA ocelot-8021q tagger work with the Ocelot traps means we
      can eliminate the dedicated OCELOT_VCAP_IS1_TAG_8021Q_PTP_MMIO and
      OCELOT_VCAP_IS2_TAG_8021Q_PTP_MMIO cookies. To minimize the patch delta,
      OCELOT_VCAP_IS2_MRP_TRAP takes the place of OCELOT_VCAP_IS2_TAG_8021Q_PTP_MMIO
      (the alternative would have been to left-shift all cookie numbers by 1).
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99348004
    • V
      net: dsa: felix: remove dead code in felix_setup_mmio_filtering() · d78637a8
      Vladimir Oltean 提交于
      There has been some controversy related to the sanity check that a CPU
      port exists, and commit e8b1d769 ("net: dsa: felix: Fix memory leak
      in felix_setup_mmio_filtering") even "corrected" an apparent memory leak
      as static analysis tools see it.
      
      However, the check is completely dead code, since the earliest point at
      which felix_setup_mmio_filtering() can be called is:
      
      felix_pci_probe
      -> dsa_register_switch
         -> dsa_switch_probe
            -> dsa_tree_setup
               -> dsa_tree_setup_cpu_ports
                  -> dsa_tree_setup_default_cpu
                     -> contains the "DSA: tree %d has no CPU port\n" check
               -> dsa_tree_setup_master
                  -> dsa_master_setup
                     -> sysfs_create_group(&dev->dev.kobj, &dsa_group);
                        -> makes tagging_store() callable
                           -> dsa_tree_change_tag_proto
                              -> dsa_tree_notify
                                 -> dsa_switch_event
                                    -> dsa_switch_change_tag_proto
                                       -> ds->ops->change_tag_protocol
                                          -> felix_change_tag_protocol
                                             -> felix_set_tag_protocol
                                                -> felix_setup_tag_8021q
                                                   -> felix_setup_mmio_filtering
                                                      -> breaks at first CPU port
      
      So probing would have failed earlier if there wasn't any CPU port
      defined.
      
      To avoid all confusion, delete the dead code and replace it with a
      comment.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d78637a8
    • V
      net: mscc: ocelot: annotate which traps need PTP timestamping · 9d75b881
      Vladimir Oltean 提交于
      The ocelot switch library does not need this information, but the felix
      DSA driver does.
      
      As a reminder, the VSC9959 switch in LS1028A doesn't have an IRQ line
      for packet extraction, so to be notified that a PTP packet needs to be
      dequeued, it receives that packet also over Ethernet, by setting up a
      packet trap. The Felix driver needs to install special kinds of traps
      for packets in need of RX timestamps, such that the packets are
      replicated both over Ethernet and over the CPU port module.
      
      But the Ocelot switch library sets up more than one trap for PTP event
      messages; it also traps PTP general messages, MRP control messages etc.
      Those packets don't need PTP timestamps, so there's no reason for the
      Felix driver to send them to the CPU port module.
      
      By knowing which traps need PTP timestamps, the Felix driver can
      adjust the traps installed using ocelot_trap_add() such that only those
      will actually get delivered to the CPU port module.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d75b881