Skip to content
Permalink
Aswath-Govindr…
Switch branches/tags

Commits on Apr 14, 2021

  1. can: m_can: Add support for transceiver as phy

    Add support for implementing transceiver node as phy. The max_bitrate is
    obtained by getting a phy attribute.
    
    Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
    Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
    Faiz-Abbas authored and intel-lab-lkp committed Apr 14, 2021
  2. dt-bindings: net: can: Document transceiver implementation as phy

    Some transceivers need a configuration step (for example, pulling the
    standby or enable lines) for them to start sending messages. The
    transceiver can be implemented as a phy with the configuration done in the
    phy driver. The bit rate limitation can the be obtained by the driver using
    the phy node.
    
    Document the above implementation in the bosch mcan bindings
    
    Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
    Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
    Faiz-Abbas authored and intel-lab-lkp committed Apr 14, 2021
  3. phy: phy-can-transceiver: Add support for generic CAN transceiver driver

    The driver adds support for generic CAN transceivers. Currently
    the modes supported by this driver are standby and normal modes for TI
    TCAN1042 and TCAN1043 CAN transceivers.
    
    The transceiver is modelled as a phy with pins controlled by gpios, to put
    the transceiver in various device functional modes. It also gets the phy
    attribute max_link_rate for the usage of CAN drivers.
    
    Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
    Aswath-Govindraju authored and intel-lab-lkp committed Apr 14, 2021
  4. dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

    Add binding documentation for TI TCAN104x CAN transceivers.
    
    Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
    Aswath-Govindraju authored and intel-lab-lkp committed Apr 14, 2021
  5. phy: Add API for devm_of_phy_optional_get_by_index

    Add API for devm_of_phy_optional_get_by_index, to obtain a reference to an
    optional phy by index.
    
    Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
    Aswath-Govindraju authored and intel-lab-lkp committed Apr 14, 2021
  6. phy: core: Reword the comment specifying the units of max_link_rate t…

    …o be Mbps
    
    In some subsystems (eg. CAN, SPI), the max link rate supported can be less
    than 1 Mbps and if the unit for max_link_rate is Mbps then it can't be
    used. Therefore, leave the decision of units to be used, to the producer
    and consumer.
    
    Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
    Aswath-Govindraju authored and intel-lab-lkp committed Apr 14, 2021

Commits on Apr 13, 2021

  1. can: peak_usb: pcan_usb: replace open coded endianness conversion of …

    …unaligned data
    
    This patch replaces the open coded endianness conversion of unaligned
    data by the appropriate get/put_unaligned_leXX() variants.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-11-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  2. can: peak_usb: pcan_usb_get_serial(): unconditionally assign serial_n…

    …umber
    
    The function serial_number is only called from one location with a
    valid serial_number pointer. Remove not needed NULL pointer check.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-10-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  3. can: peak_usb: pcan_usb_get_serial(): make use of le32_to_cpup()

    This patch replaces the memcpy() + le32_to_cpu() by le32_to_cpup().
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-9-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  4. can: peak_usb: pcan_usb_get_serial(): remove error message from error…

    … path
    
    The caller of pcan_usb_get_serial() already prints an error message,
    so remove this one and return immediately.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-8-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  5. can: peak_usb: pcan_usb_{,pro}_get_device_id(): remove unneeded check…

    … for device_id
    
    The callback struct peak_usb_adapter::dev_get_device_id, which is
    implemented by the functions pcan_usb_{,pro}_get_device_id() is only
    ever called with a valid device_id pointer.
    
    This patch removes the unneeded check if the device_id pointer is
    valid.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-7-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  6. can: peak_usb: peak_usb_probe(): make use of driver_info

    There's no need to iterate over all supported adapters to find the
    struct peak_usb_adapter that describes the currently probed devices's
    capabilities. The driver core gives us the information for free, if we
    assign it to the struct usb_device_id::driver_info.
    
    This patch assigns the usb_device_id::driver_info and converts
    peak_usb_probe() to make use of it. This reduces the driver size by
    100 bytes on ARCH=arm.
    
    | add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-124 (-124)
    | Function                                     old     new   delta
    | peak_usb_adapters_list                        24       -     -24
    | peak_usb_probe                               236     136    -100
    | Total: Before=25263, After=25139, chg -0.49%
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-6-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  7. can: peak_usb: remove write only variable struct peak_usb_adapter::ts…

    …_period
    
    The variable struct peak_usb_adapter::ts_period is only ever written
    to. This patch removes it from the driver.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-5-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  8. can: peak_usb: remove unused variables from struct peak_usb_device

    This patch removes the unused variables struct
    peak_usb_device::echo_skb and struct peak_usb_device::bus_load from
    the driver.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-4-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  9. can: peak_usb: pcan_usb_pro.h: remove double space in indention

    This patch replaces the double space indention after the u8 with a
    single space in pcan_usb_pro.h.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-3-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  10. can: peak_usb: fix checkpatch warnings

    This patch cleans several checkpatch warnings in the peak_usb driver.
    
    Link: https://lore.kernel.org/r/20210406111622.1874957-2-mkl@pengutronix.de
    Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Apr 13, 2021
  11. can: etas_es58x: add support for the ETAS ES58X_FD CAN USB interfaces

    This patch add support for the ES582.1 and ES584.1 interfaces from
    ETAS GmbH (https://www.etas.com/en/products/es58x.php).
    
    Link: https://lore.kernel.org/r/20210410095948.233305-4-mailhol.vincent@wanadoo.fr
    Co-developed-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
    Signed-off-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
    Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    vincent-mailhol authored and marckleinebudde committed Apr 13, 2021
  12. can: etas_es58x: add support for ETAS ES581.4 CAN USB interface

    This patch adds support for the ES581.4 interface from ETAS
    GmbH (https://www.etas.com/en/products/es58x.php).
    
    Link: https://lore.kernel.org/r/20210410095948.233305-3-mailhol.vincent@wanadoo.fr
    Co-developed-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
    Signed-off-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
    Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    vincent-mailhol authored and marckleinebudde committed Apr 13, 2021
  13. can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces

    This patch adds the core support for various USB CAN interfaces from
    ETAS GmbH (https://www.etas.com/en/products/es58x.php). The next
    patches add the glue code drivers for the individual interfaces.
    
    Link: https://lore.kernel.org/r/20210410095948.233305-2-mailhol.vincent@wanadoo.fr
    Co-developed-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
    Signed-off-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
    Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    vincent-mailhol authored and marckleinebudde committed Apr 13, 2021
  14. dt-bindings: net: can: rcar_can: Document r8a77961 support

    Document SoC specific bindings for R-Car M3-W+ (r8a77961) SoC.
    
    Also as R8A7796 is now called R8A77960 so that update those
    references.
    
    Link: https://lore.kernel.org/r/20210409000020.2317696-1-yoshihiro.shimoda.uh@renesas.com
    Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Acked-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    shimoday authored and marckleinebudde committed Apr 13, 2021

Commits on Apr 12, 2021

  1. net: ethernet: ravb: Enable optional refclk

    For devices that use a programmable clock for the AVB reference clock,
    the driver may need to enable them.  Add code to find the optional clock
    and enable it when available.
    
    Signed-off-by: Adam Ford <aford173@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    aford173 authored and davem330 committed Apr 12, 2021
  2. dt-bindings: net: renesas,etheravb: Add additional clocks

    The AVB driver assumes there is an external crystal, but it could
    be clocked by other means.  In order to enable a programmable
    clock, it needs to be added to the clocks list and enabled in the
    driver.  Since there currently only one clock, there is no
    clock-names list either.
    
    Update bindings to add the additional optional clock, and explicitly
    name both of them.
    
    Signed-off-by: Adam Ford <aford173@gmail.com>
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Acked-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    aford173 authored and davem330 committed Apr 12, 2021
  3. Merge branch 'enetc-ptp'

    Yangbo Lu says:
    
    ====================
    enetc: support PTP Sync packet one-step timestamping
    
    This patch-set is to add support for PTP Sync packet one-step timestamping.
    Since ENETC single-step register has to be configured dynamically per
    packet for correctionField offeset and UDP checksum update, current
    one-step timestamping packet has to be sent only when the last one
    completes transmitting on hardware. So, on the TX, this patch handles
    one-step timestamping packet as below:
    
    - Trasmit packet immediately if no other one in transfer, or queue to
      skb queue if there is already one in transfer.
      The test_and_set_bit_lock() is used here to lock and check state.
    - Start a work when complete transfer on hardware, to release the bit
      lock and to send one skb in skb queue if has.
    
    Changes for v2:
    	- Rebased.
    	- Fixed issues from patchwork checks.
    	- netif_tx_lock for one-step timestamping packet sending.
    Changes for v3:
    	- Used system workqueue.
    	- Set bit lock when transmitted one-step packet, and scheduled
    	  work when completed. The worker cleared the bit lock, and
    	  transmitted one skb in skb queue if has, instead of a loop.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  4. enetc: support PTP Sync packet one-step timestamping

    This patch is to add support for PTP Sync packet one-step timestamping.
    Since ENETC single-step register has to be configured dynamically per
    packet for correctionField offeset and UDP checksum update, current
    one-step timestamping packet has to be sent only when the last one
    completes transmitting on hardware. So, on the TX, this patch handles
    one-step timestamping packet as below:
    
    - Trasmit packet immediately if no other one in transfer, or queue to
      skb queue if there is already one in transfer.
      The test_and_set_bit_lock() is used here to lock and check state.
    - Start a work when complete transfer on hardware, to release the bit
      lock and to send one skb in skb queue if has.
    
    And the configuration for one-step timestamping on ENETC before
    transmitting is,
    
    - Set one-step timestamping flag in extension BD.
    - Write 30 bits current timestamp in tstamp field of extension BD.
    - Update PTP Sync packet originTimestamp field with current timestamp.
    - Configure single-step register for correctionField offeset and UDP
      checksum update.
    
    Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
    Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    yangbolu1991 authored and davem330 committed Apr 12, 2021
  5. enetc: mark TX timestamp type per skb

    Mark TX timestamp type per skb on skb->cb[0], instead of
    global variable for all skbs. This is a preparation for
    one step timestamp support.
    
    For one-step timestamping enablement, there will be both
    one-step and two-step PTP messages to transfer. And a skb
    queue is needed for one-step PTP messages making sure
    start to send current message only after the last one
    completed on hardware. (ENETC single-step register has to
    be dynamically configured per message.) So, marking TX
    timestamp type per skb is required.
    
    Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
    Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    yangbolu1991 authored and davem330 committed Apr 12, 2021
  6. Merge branch 'ibmvnic-errors'

    Lijun Pan says:
    
    ====================
    ibmvnic: improve error printing
    
    Patch 1 prints reset reason as a string.
    Patch 2 prints adapter state as a string.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  7. ibmvnic: print adapter state as a string

    The adapter state can be added or deleted over different versions
    of the source code. Print a string instead of a number.
    
    Signed-off-by: Lijun Pan <lijunp213@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Lijun Pan authored and davem330 committed Apr 12, 2021
  8. ibmvnic: print reset reason as a string

    The reset reason can be added or deleted over different versions
    of the source code. Print a string instead of a number.
    
    Signed-off-by: Lijun Pan <lijunp213@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Lijun Pan authored and davem330 committed Apr 12, 2021
  9. ibmvnic: clean up the remaining debugfs data structures

    Commit e704f04 ("ibmvnic: Remove debugfs support") did not
    clean up everything. Remove the remaining code.
    
    Signed-off-by: Lijun Pan <lijunp213@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Lijun Pan authored and davem330 committed Apr 12, 2021
  10. Merge branch 'netns-sysctl-isolation'

    Jonathon Reinhart says:
    
    ====================
    Ensuring net sysctl isolation
    
    This patchset is the result of an audit of /proc/sys/net to prove that
    it is safe to be mouted read-write in a container when a net namespace
    is in use. See [1].
    
    The first commit adds code to detect sysctls which are not netns-safe,
    and can "leak" changes to other net namespaces.
    
    My manual audit found, and the above feature confirmed, that there are
    two nf_conntrack sysctls which are in fact not netns-safe.
    
    I considered sending the latter to netfilter-devel, but I think it's
    better to have both together on net-next: Adding only the former causes
    undesirable warnings in the kernel log.
    
    [1]: opencontainers/runc#2826
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  11. netfilter: conntrack: Make global sysctls readonly in non-init netns

    These sysctls point to global variables:
    - NF_SYSCTL_CT_MAX (&nf_conntrack_max)
    - NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max)
    - NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user)
    
    Because their data pointers are not updated to point to per-netns
    structures, they must be marked read-only in a non-init_net ns.
    Otherwise, changes in any net namespace are reflected in (leaked into)
    all other net namespaces. This problem has existed since the
    introduction of net namespaces.
    
    The current logic marks them read-only only if the net namespace is
    owned by an unprivileged user (other than init_user_ns).
    
    Commit d0febd8 ("netfilter: conntrack: re-visit sysctls in
    unprivileged namespaces") "exposes all sysctls even if the namespace is
    unpriviliged." Since we need to mark them readonly in any case, we can
    forego the unprivileged user check altogether.
    
    Fixes: d0febd8 ("netfilter: conntrack: re-visit sysctls in unprivileged namespaces")
    Signed-off-by: Jonathon Reinhart <Jonathon.Reinhart@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    JonathonReinhart authored and davem330 committed Apr 12, 2021
  12. net: Ensure net namespace isolation of sysctls

    This adds an ensure_safe_net_sysctl() check during register_net_sysctl()
    to validate that sysctl table entries for a non-init_net netns are
    sufficiently isolated. To be netns-safe, an entry must adhere to at
    least (and usually exactly) one of these rules:
    
    1. It is marked read-only inside the netns.
    2. Its data pointer does not point to kernel/module global data.
    
    An entry which fails both of these checks is indicative of a bug,
    whereby a child netns can affect global net sysctl values.
    
    If such an entry is found, this code will issue a warning to the kernel
    log, and force the entry to be read-only to prevent a leak.
    
    To test, simply create a new netns:
    
        $ sudo ip netns add dummy
    
    As it sits now, this patch will WARN for two sysctls which will be
    addressed in a subsequent patch:
    - /proc/sys/net/netfilter/nf_conntrack_max
    - /proc/sys/net/netfilter/nf_conntrack_expect_max
    
    Signed-off-by: Jonathon Reinhart <Jonathon.Reinhart@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    JonathonReinhart authored and davem330 committed Apr 12, 2021
  13. nfc: pn533: remove redundant assignment

    In many places,first assign a value to a variable and then return
    the variable. which is redundant, we should directly return the value.
    in pn533_rf_field funciton,return rc also in the if statement, so we
    use return 0 to replace the last return rc.
    
    Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    wengjianfeng authored and davem330 committed Apr 12, 2021
  14. Merge branch 'bnxt_en-error-recovery'

    Michael Chan says:
    
    ====================
    bnxt_en: Error recovery fixes.
    
    This series adds some fixes and enhancements to the error recovery
    logic.  The health register logic is improved and we also add missing
    code to free and re-create VF representors in the firmware after
    error recovery.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  15. bnxt_en: Free and allocate VF-Reps during error recovery.

    During firmware recovery, VF-Rep configuration in the firmware is lost.
    Fix it by freeing and (re)allocating VF-Reps in FW at relevant points
    during the error recovery process.
    
    Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    sbasavapatna authored and davem330 committed Apr 12, 2021
Older