1. 31 Jan, 2022 24 commits
  2. 29 Jan, 2022 5 commits
  3. 28 Jan, 2022 11 commits
    • Jakub Kicinski's avatar
      Merge tag 'for-net-next-2022-01-28' of... · 0a781172
      Jakub Kicinski authored
      Merge tag 'for-net-next-2022-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
      
      Luiz Augusto von Dentz says:
      
      ====================
      bluetooth-next pull request for net-next:
      
       - Add support for RTL8822C hci_ver 0x08
       - Add support for RTL8852AE part 0bda:2852
       - Fix WBS setting for Intel legacy ROM products
       - Enable SCO over I2S ib mt7921s
       - Increment management interface revision
      
      * tag 'for-net-next-2022-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (30 commits)
        Bluetooth: Increment management interface revision
        Bluetooth: hci_sync: Fix queuing commands when HCI_UNREGISTER is set
        Bluetooth: hci_h5: Add power reset via gpio in h5_btrtl_open
        Bluetooth: btrtl: Add support for RTL8822C hci_ver 0x08
        Bluetooth: hci_event: Fix HCI_EV_VENDOR max_len
        Bluetooth: hci_core: Rate limit the logging of invalid SCO handle
        Bluetooth: hci_event: Ignore multiple conn complete events
        Bluetooth: msft: fix null pointer deref on msft_monitor_device_evt
        Bluetooth: btmtksdio: mask out interrupt status
        Bluetooth: btmtksdio: run sleep mode by default
        Bluetooth: btmtksdio: lower log level in btmtksdio_runtime_[resume|suspend]()
        Bluetooth: mt7921s: fix btmtksdio_[drv|fw]_pmctrl()
        Bluetooth: mt7921s: fix bus hang with wrong privilege
        Bluetooth: btmtksdio: refactor btmtksdio_runtime_[suspend|resume]()
        Bluetooth: mt7921s: fix firmware coredump retrieve
        Bluetooth: hci_serdev: call init_rwsem() before p->open()
        Bluetooth: Remove kernel-doc style comment block
        Bluetooth: btusb: Whitespace fixes for btusb_setup_csr()
        Bluetooth: btusb: Add one more Bluetooth part for the Realtek RTL8852AE
        Bluetooth: btintel: Fix WBS setting for Intel legacy ROM products
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20220128205915.3995760-1-luiz.dentz@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0a781172
    • Jisheng Zhang's avatar
      net: stmmac: dwmac-sun8i: make clk really gated during rpm suspended · b76bbb34
      Jisheng Zhang authored
      Currently, the dwmac-sun8i's stmmaceth clk isn't disabled even if the
      the device has been runtime suspended. The reason is the driver gets
      the "stmmaceth" clk as tx_clk and enabling it during probe. But
      there's no other usage of tx_clk except preparing and enabling, so
      we can remove tx_clk and its usage then rely on the common routine
      stmmac_probe_config_dt() to prepare and enable the stmmaceth clk
      during driver initialization, and benefit from the runtime pm feature
      after probed.
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b76bbb34
    • Colin Ian King's avatar
      net/fsl: xgmac_mdio: Fix spelling mistake "frequecy" -> "frequency" · 34a79c5d
      Colin Ian King authored
      There is a spelling mistake in a dev_err message. Fix it.
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34a79c5d
    • David S. Miller's avatar
      Merge branch 'dsa-realtek-MDIO' · 7c263e9d
      David S. Miller authored
      Luiz Angelo Daros de Luca says:
      
      ====================
      net: dsa: realtek: MDIO interface and RTL8367S,RTL8367RB-VB
      
      The old realtek-smi driver was linking subdrivers into a single
      realtek-smi.ko After this series, each subdriver will be an independent
      module required by either realtek-smi (platform driver) or the new
      realtek-mdio (mdio driver). Both interface drivers (SMI or MDIO) are
      independent, and they might even work side-by-side, although it will be
      difficult to find such device. The subdriver can be individually
      selected but only at buildtime, saving some storage space for custom
      embedded systems.
      
      Existing realtek-smi devices continue to work untouched during the
      tests. The realtek-smi was moved into a realtek subdirectory, but it
      normally does not break things.
      
      I couldn't identify a fixed relation between port numbers (0..9) and
      external interfaces (0..2), and I'm not sure if it is fixed for each
      chip version or a device configuration. Until there is more info about
      it, there is a new port property "realtek,ext-int" that can inform the
      external interface.
      
      The rtl8365mb might now handle multiple CPU ports and extint ports not
      used as CPU ports. RTL8367S has an SGMII external interface, but my test
      device (TP-Link Archer C5v4) uses only the second RGMII interface. We
      need a test device with more external ports to test these features.
      The driver still cannot handle SGMII ports.
      
      RTL8367RB-VB support was added using information from Frank Wunderlich
      <frank-w@public-files.de> but I didn't test it myself.
      
      The rtl8365mb was tested with a MDIO-connected RTL8367S (TP-Link Acher
      C5v4) and a SMI-connected RTL8365MB-VC switch (Asus RT-AC88U)
      
      The rtl8366rb subdriver was not tested with this patch series, but it
      was only slightly touched. It would be nice to test it, especially in an
      MDIO-connected switch.
      
      Best,
      
      Luiz
      
      Changelog:
      
      v1-v2)
      - formatting fixes
      - dropped the rtl8365mb->rtl8367c rename
      - other suggestions
      
      v2-v3)
      * realtek-mdio.c:
        - cleanup realtek-mdio.c (BUG_ON, comments and includes)
        - check devm_regmap_init return code
        - removed realtek,rtl8366s string from realtek-mdio
      * realtek-smi.c:
        - removed void* type cast
      * rtl8365mb.c:
        - using macros to identify EXT interfaces
        - rename some extra extport->extint cases
        - allow extint as non cpu (not tested)
        - allow multple cpu ports (not tested)
        - dropped cpu info from struct rtl8365mb
      * dropped dt-bindings changes (dealing outside this series)
      * formatting issues fixed
      
      v3-v4)
      * fix cover message numbering 0/13 -> 0/11
      * use static for realtek_mdio_read_reg
        - Reported-by: kernel test robot <lkp@intel.com>
      * use dsa_switch_for_each_cpu_port
      * mention realtek_smi_{variant,ops} to realtek_{variant,ops}
        in commit message
      
      v5) sent again v4 branch. Sorry
      
      v4-v6)
      - added support for RTL8367RB-VB
      - cleanup mdio_{read,write}, removing misterious START_OP, checking and
        returning errors
      - renamed priv->phy_id to priv->mdio_addr
      - duplicated priv->ds_ops into ds_ops_{smi,mdio}. ds_ops_smi must not
        set
        phy_read or else both dsa and this driver might free slave_mii.
      Dropped
        401fd75c92f37
      - Map port to extint using code instead of device-tree property. Added
        comment
        about port number, port description and external interfaces. Dropped
        'realtek,ext-int' device-tree property
      - Redacted the non-cpu ext port commit message, not highlighting the
        possibility of using multiple CPU ports as it was just a byproduct.
      - In a possible case of multiple cpu ports, use the first one as the
        trap port.
        Dropped 'realtek,trap-port' device-tree property
      - Some formatting fixes
      - BUG: rtl8365mb_phy_mode_supported was still checking for a cpu port
        and not
        an external interface
      - BUG: fix trapdoor masking for port>7. Got a compiler error with a
        bigger
        constant value
      - WARN: completed kdoc for rtl8366rb_drop_untagged()
      - WARN: removed marks from incomplete kdoc
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7c263e9d
    • Luiz Angelo Daros de Luca's avatar
      net: dsa: realtek: rtl8365mb: fix trap_door > 7 · 078ae1bd
      Luiz Angelo Daros de Luca authored
      Trap door number is a 4-bit number divided in two regions (3 and 1-bit).
      Both values were not masked properly. This bug does not affect supported
      devices as they use up to port 7 (ext2). It would only be a problem if
      the driver becomes compatible with 10-port switches like RTL8370MB and
      RTL8310SR.
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      078ae1bd
    • Luiz Angelo Daros de Luca's avatar
      net: dsa: realtek: rtl8365mb: allow non-cpu extint ports · 6147631c
      Luiz Angelo Daros de Luca authored
      External interfaces can be configured, even if they are not CPU ports.
      The first CPU port will also be the trap port (for receiving trapped
      frames from the switch).
      
      The CPU information was dropped from chip data as it was not used
      outside setup. The only other place it was used is when it wrongly
      checks for CPU port when it should check for extint.
      
      The supported modes check now uses port type and not port usage.
      
      As a byproduct, more than one CPU can be configured. although this
      might not work well with DSA setups. Also, this driver is still only
      blindly forwarding all traffic to CPU port(s).
      
      This change was not tested in a device with multiple active external
      interfaces ports.
      
      realtek_priv->cpu_port is now only used by rtl8366rb.c
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6147631c
    • Luiz Angelo Daros de Luca's avatar
      net: dsa: realtek: rtl8365mb: add RTL8367RB-VB support · 84a10aec
      Luiz Angelo Daros de Luca authored
      RTL8367RB-VB is a 5+2 port 10/100/1000M Ethernet switch.
      It is similar to RTL8367S but in this version, both
      external interfaces are RGMII.
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84a10aec
    • Luiz Angelo Daros de Luca's avatar
      net: dsa: realtek: rtl8365mb: add RTL8367S support · d40f607c
      Luiz Angelo Daros de Luca authored
      Realtek's RTL8367S, a 5+2 port 10/100/1000M Ethernet switch.
      It shares the same driver family (RTL8367C) with other models
      as the RTL8365MB-VC. Its compatible string is "realtek,rtl8367s".
      
      It was tested only with MDIO interface (realtek-mdio), although it might
      work out-of-the-box with SMI interface (using realtek-smi).
      
      This patch was based on an unpublished patch from Alvin Šipraga
      <alsi@bang-olufsen.dk>.
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Tested-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      Reviewed-by: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d40f607c
    • Luiz Angelo Daros de Luca's avatar
      net: dsa: realtek: rtl8365mb: use DSA CPU port · 7fa8af30
      Luiz Angelo Daros de Luca authored
      Instead of a fixed CPU port, assume that DSA is correct.
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Tested-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      Reviewed-by: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7fa8af30
    • Luiz Angelo Daros de Luca's avatar
    • Luiz Angelo Daros de Luca's avatar
      net: dsa: realtek: rtl8365mb: rename extport to extint · d18b59f4
      Luiz Angelo Daros de Luca authored
      "extport" 0, 1, 2 was used to reference external ports id (ext0, ext1,
      ext2). Meanwhile, port 0..9 is used as switch ports, including external
      ports. "extport" was renamed to extint to make it clear it does not mean
      the port number but the external interface number id.
      
      The macros that map extint numbers to registers addresses now use inline
      ifs instead of binary arithmetic.
      
      Realtek uses in docs and drivers EXT_PORT0 (GMAC1) and EXT_PORT1
      (GMAC2), with EXT_PORT0 being converted to ext_id == 1 and so on. It
      might introduce some confusing while reading datasheets but it will not
      be exposed to users.
      
      "extint" was hardcoded to 1. However, some chips have multiple external
      interfaces. It's not right to assume the CPU port uses extint 1 nor that
      all extint are CPU ports. Now it came from a map between port number and
      external interface id number.
      
      This patch still does not allow multiple CPU ports nor extint as a non
      CPU port.
      Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d18b59f4