Skip to content
Permalink
Manish-Mandlik…
Switch branches/tags

Commits on Oct 13, 2021

  1. bluetooth: Add support to handle MSFT Monitor Device event

    MSFT Monitor Device event indicates that the controller has either
    started or stopped monitoring a Bluetooth device. This event is used by
    the bluetoothd to notify clients with DeviceFound/DeviceLost.
    
    Whenever the controller starts monitoring a device, 'Device Tracked'
    flag in the 'Device Found' event is set and 'Monitor_Handle' indicates
    the matched monitor id. When the controller stops monitoring the device,
    the 'Device Lost' event is sent to the bluetoothd.
    
    Test performed:
    - verified by logs that Monitor Device is received from the controller
      and sent to the bluetoothd when the controller starts/stops monitoring
      a bluetooth device.
    
    Signed-off-by: Manish Mandlik <mmandlik@google.com>
    liveusr authored and intel-lab-lkp committed Oct 13, 2021
  2. Bluetooth: btusb: Fix application of sizeof to pointer

    The coccinelle check report:
    "./drivers/bluetooth/btusb.c:2239:36-42:
    ERROR: application of sizeof to pointer".
    Using the real size to fix it.
    
    Fixes: 5a87679 ("Bluetooth: btusb: Support public address configuration for MediaTek Chip.")
    Reported-by: Zeal Robot <zealci@zte.com.cn>
    Signed-off-by: David Yang <davidcomponentone@gmail.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    David Yang authored and holtmann committed Oct 13, 2021

Commits on Oct 12, 2021

  1. Bluetooth: L2CAP: Fix not initializing sk_peer_pid

    In order to group sockets being connected using L2CAP_MODE_EXT_FLOWCTL
    the pid is used but sk_peer_pid was not being initialized as it is
    currently only done for af_unix.
    
    Fixes: b48596d ("Bluetooth: L2CAP: Add get_peer_pid callback")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Vudentz authored and holtmann committed Oct 12, 2021
  2. Bluetooth: hci_sock: purge socket queues in the destruct() callback

    The receive path may take the socket right before hci_sock_release(),
    but it may enqueue the packets to the socket queues after the call to
    skb_queue_purge(), therefore the socket can be destroyed without clear
    its queues completely.
    
    Moving these skb_queue_purge() to the hci_sock_destruct() will fix this
    issue, because nothing is referencing the socket at this point.
    
    Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
    Reported-by: syzbot+4c4ffd1e1094dae61035@syzkaller.appspotmail.com
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    ita93 authored and holtmann committed Oct 12, 2021

Commits on Oct 7, 2021

  1. Bluetooth: mgmt: Fix Experimental Feature Changed event

    This patch fixes the controller index in the Experimental Features
    Changed event for the offload_codec and the quality_report features to
    use the actual hdev index instead of non-controller index(0xffff) so the
    client can receive the event and know which controller the event is for.
    
    Fixes: ad93315 ("Bluetooth: Add offload feature under experimental flag")
    Fixes: ae7d925 ("Bluetooth: Support the quality report events")
    Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    tedd-an authored and holtmann committed Oct 7, 2021
  2. Bluetooth: hci_vhci: Fix to set the force_wakeup value

    This patch sets the wakeup state of the vhci driver when the
    force_wakeup is updated.
    
    Fixes: 60edfad ("Bluetooth: hci_vhci: Add force_prevent_wake entry")
    Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    tedd-an authored and holtmann committed Oct 7, 2021
  3. Bluetooth: Read codec capabilities only if supported

    Read codec capabilities only if HCI_READ_LOCAL_CODEC_CAPABILITIES
    command is supported. If capablities are not supported, then
    cache codec data without caps.
    
    Signed-off-by: Kiran K <kiran.k@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    kirankrishnappa-intel authored and holtmann committed Oct 7, 2021

Commits on Oct 6, 2021

  1. Bluetooth: Fix handling of SUSPEND_DISCONNECTING

    When SUSPEND_DISCONNECTING bit is set that means Disconnect is pending
    but the code was evaluating if the list is empty before calling
    hci_conn_del which does the actual cleanup and remove the connection
    from the list thus the bit is never cleared causing the suspend
    procedure to always timeout when there are connections to be
    disconnected:
    
    Suspend/Resume - Success 5 (Pairing - Legacy) - waiting done
      Set the system into Suspend via force_suspend
    = mgmt-tester: Suspend/Resume - Success 5 (Pairing -..   17:03:13.200458
    = mgmt-tester: Set the system into Suspend via force_suspend    17:03:13.205812
    < HCI Command: Write Scan E.. (0x03|0x001a) plen 1  torvalds#122 [hci0] 17:03:13.213561
            Scan enable: No Scans (0x00)
    > HCI Event: Command Complete (0x0e) plen 4         torvalds#123 [hci0] 17:03:13.214710
          Write Scan Enable (0x03|0x001a) ncmd 1
            Status: Success (0x00)
    < HCI Command: Disconnect (0x01|0x0006) plen 3      torvalds#124 [hci0] 17:03:13.215830
            Handle: 42
            Reason: Remote Device Terminated due to Power Off (0x15)
    > HCI Event: Command Status (0x0f) plen 4           torvalds#125 [hci0] 17:03:13.216602
          Disconnect (0x01|0x0006) ncmd 1
            Status: Success (0x00)
    > HCI Event: Disconnect Complete (0x05) plen 4      torvalds#126 [hci0] 17:03:13.217342
            Status: Success (0x00)
            Handle: 42
            Reason: Remote Device Terminated due to Power Off (0x15)
    @ MGMT Event: Device Disconn.. (0x000c) plen 8  {0x0002} [hci0] 17:03:13.217688
            BR/EDR Address: 00:AA:01:01:00:00 (Intel Corporation)
            Reason: Connection terminated by local host for suspend (0x05)
    @ MGMT Event: Device Disconn.. (0x000c) plen 8  {0x0001} [hci0] 17:03:13.217688
            BR/EDR Address: 00:AA:01:01:00:00 (Intel Corporation)
            Reason: Connection terminated by local host for suspend (0x05)
    Suspend/Resume - Success 5 (Pairing - Legacy) - test timed out
    = mgmt-tester: Suspend/Resume - Success 5 (Pairing -..   17:03:13.939317
    Suspend/Resume - Success 5 (Pairing - Legacy) - teardown
    = mgmt-tester: Suspend/Resume - Success 5 (Pairing -..   17:03:13.947267
    [   13.284291] Bluetooth: hci0: Timed out waiting for suspend events
    [   13.287324] Bluetooth: hci0: Suspend timeout bit: 6
    
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Vudentz authored and holtmann committed Oct 6, 2021
  2. Bluetooth: hci_vhci: Fix calling hci_{suspend,resume}_dev

    Defer calls to hci_{suspend,resume}_dev to work so it doesn't block the
    processing of the events.
    
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Vudentz authored and holtmann committed Oct 6, 2021

Commits on Oct 5, 2021

  1. Merge tag 'for-net-next-2021-10-01' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/bluetooth/bluetooth-next
    
    Luiz Augusto von Dentz says:
    
    ====================
    bluetooth-next pull request for net-next:
    
     - Add support for MediaTek MT7922 and MT7921
     - Enable support for AOSP extention in Qualcomm WCN399x and Realtek
       8822C/8852A.
     - Add initial support for link quality and audio/codec offload.
     - Rework of sockets sendmsg to avoid locking issues.
     - Add vhci suspend/resume emulation.
    
    ====================
    
    Link: https://lore.kernel.org/r/20211001230850.3635543-1-luiz.dentz@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Oct 5, 2021
  2. net: usb: use eth_hw_addr_set() for dev->addr_len cases

    Convert usb drivers from memcpy(... dev->addr_len)
    to eth_hw_addr_set():
    
      @@
      expression dev, np;
      @@
      - memcpy(dev->dev_addr, np, dev->addr_len)
      + eth_hw_addr_set(dev, np)
    
    Manually checked these are either usbnet or pure etherdevs.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 5, 2021
  3. ethernet: use eth_hw_addr_set() for dev->addr_len cases

    Convert all Ethernet drivers from memcpy(... dev->addr_len)
    to eth_hw_addr_set():
    
      @@
      expression dev, np;
      @@
      - memcpy(dev->dev_addr, np, dev->addr_len)
      + eth_hw_addr_set(dev, np)
    
    In theory addr_len may not be ETH_ALEN, but we don't expect
    non-Ethernet devices to live under this directory, and only
    the following cases of setting addr_len exist:
     - cxgb4 for mgmt device,
    and the drivers which set it to ETH_ALEN: s2io, mlx4, vxge.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 5, 2021
  4. Merge branch 'mlx4-const-dev_addr'

    Jakub Kicinski says:
    
    ====================
    mlx4: prep for constant dev->dev_addr
    
    This patch converts mlx4 for dev->dev_addr being const. It converts
    to use of common helpers but also removes some seemingly unnecessary
    idiosyncrasies.
    
    Please review.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Oct 5, 2021
  5. mlx4: constify args for const dev_addr

    netdev->dev_addr will become const soon. Make sure all
    functions which pass it around mark appropriate args
    as const.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 5, 2021
  6. mlx4: remove custom dev_addr clearing

    mlx4_en_u64_to_mac() takes the dev->dev_addr pointer and writes
    to it byte by byte. It also clears the two bytes _after_ ETH_ALEN
    which seems unnecessary. dev->addr_len is set to ETH_ALEN just
    before the call.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 5, 2021
  7. mlx4: replace mlx4_u64_to_mac() with u64_to_ether_addr()

    mlx4_u64_to_mac() predates the common helper but doesn't
    make the argument constant.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 5, 2021
  8. mlx4: replace mlx4_mac_to_u64() with ether_addr_to_u64()

    mlx4_mac_to_u64() predates and opencodes ether_addr_to_u64().
    It doesn't make the argument constant so it'll be problematic
    when dev->dev_addr becomes a const. Convert to the generic helper.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 5, 2021
  9. netlink: remove netlink_broadcast_filtered

    No users in tree since commit a349843 ("netns: restrict uevents"),
    so remove this functionality.
    
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Florian Westphal authored and davem330 committed Oct 5, 2021
  10. Merge tag 'mlx5-updates-2021-10-04' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/saeed/linux
    
    Saeed Mahameed says:
    
    ====================
    mlx5-updates-2021-10-04
    
    Misc updates for mlx5 driver
    
    1) Add TX max rate support for MQPRIO channel mode
    2) Trivial TC action and modify header refactoring
    3) TC support for accept action in fdb offloads
    4) Allow single IRQ for PCI functions
    
    5) Bridge offload: Pop PVID VLAN header on egress miss
    
    Vlad Buslov says:
    =================
    
    With current architecture of mlx5 bridge offload it is possible for a
    packet to match in ingress table by source MAC (resulting VLAN header push
    in case of port with configured PVID) and then miss in egress table when
    destination MAC is not in FDB. Due to the lack of hardware learning in
    NICs, this, in turn, results packet going to software data path with PVID
    VLAN already added by hardware. This doesn't break software bridge since it
    accepts either untagged packets or packets with any provisioned VLAN on
    ports with PVID, but can break ingress TC, if affected part of Ethernet
    header is matched by classifier.
    
    Improve compatibility with software TC by restoring the packet header on
    egress miss. Effectively, this change implements atomicity of mlx5 bridge
    offload implementation - packet is either modified and redirected to
    destination port or appears unmodified in software.
    
    =================
    
    =================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Oct 5, 2021
  11. net: bgmac: support MDIO described in DT

    Check ethernet controller DT node for "mdio" subnode and use it with
    of_mdiobus_register() when present. That allows specifying MDIO and its
    PHY devices in a standard DT based way.
    
    This is required for BCM53573 SoC support. That family is sometimes
    called Northstar (by marketing?) but is quite different from it. It uses
    different CPU(s) and many different hw blocks.
    
    One of shared blocks in BCM53573 is Ethernet controller. Switch however
    is not SRAB accessible (as it Northstar) but is MDIO attached.
    
    Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Rafał Miłecki authored and davem330 committed Oct 5, 2021
  12. net: bgmac: improve handling PHY

    1. Use info from DT if available
    
    It allows describing for example a fixed link. It's more accurate than
    just guessing there may be one (depending on a chipset).
    
    2. Verify PHY ID before trying to connect PHY
    
    PHY addr 0x1e (30) is special in Broadcom routers and means a switch
    connected as MDIO devices instead of a real PHY. Don't try connecting to
    it.
    
    Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Rafał Miłecki authored and davem330 committed Oct 5, 2021
  13. ethernet: ehea: add missing cast

    We need to cast the pointer, unlike memcpy() eth_hw_addr_set()
    does not take void *. The driver already casts &port->mac_addr
    to u8 * in other places.
    
    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Fixes: a96d317 ("ethernet: use eth_hw_addr_set()")
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 5, 2021
  14. sparc: Fix typo.

    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Oct 5, 2021
  15. net/mlx5: Enable single IRQ for PCI Function

    Prior to this patch the driver requires two IRQs to function properly,
    one required IRQ for control and at least one required IRQ for IO.
    
    This requirement can be relaxed to one as the driver now allows
    sharing of IRQs, so control and IO EQs can share the same irq.
    
    This is needed for high scale amount of VFs.
    
    Signed-off-by: Shay Drory <shayd@nvidia.com>
    Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    shayshyi authored and Saeed Mahameed committed Oct 5, 2021
  16. net/mlx5: Shift control IRQ to the last index

    Control IRQ is the first IRQ vector. This complicates handling of
    completion irqs as we need to offset them by one.
    in the next patch, there are scenarios where completion and control EQs
    will share the same irq. for example: functions with single IRQ. To ease
    such scenarios, we shift control IRQ to the end of the irq array.
    
    Signed-off-by: Shay Drory <shayd@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    shayshyi authored and Saeed Mahameed committed Oct 5, 2021
  17. net/mlx5: Bridge, pop VLAN on egress table miss

    Create lowest priority flow group in egress table with single rule that
    matches on special reg_c1 value that is set on ingress VLAN push with
    single action that pops VLAN. The flow destination is skip table that is
    used to skip any further processing of packet in FDB bridge priority.
    
    Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
    Reviewed-by: Paul Blakey <paulb@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    vbuslov authored and Saeed Mahameed committed Oct 5, 2021
  18. net/mlx5: Bridge, mark reg_c1 when pushing VLAN

    On ingress VLAN push also assign value 0x7FE to reg_c1 tunnel id+opts
    bits (tunnel id 0, which is not a valid tunnel id, and option 0x7FE which
    was reserved by one of previous patches in the series). In following patch
    the reg value is matched on egress miss to restore the packet to its
    original state by removing the VLAN before passing it to the software data
    path.
    
    Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
    Reviewed-by: Paul Blakey <paulb@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    vbuslov authored and Saeed Mahameed committed Oct 5, 2021
  19. net/mlx5: Bridge, extract VLAN pop code to dedicated functions

    Following patches in series need to pop VLAN when packet misses on egress.
    To reuse existing bridge VLAN pop handling code, extract it to dedicated
    helpers mlx5_esw_bridge_pkt_reformat_vlan_pop_supported() and
    mlx5_esw_bridge_pkt_reformat_vlan_pop_create().
    
    Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
    Reviewed-by: Paul Blakey <paulb@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    vbuslov authored and Saeed Mahameed committed Oct 5, 2021
  20. net/mlx5: Bridge, refactor eswitch instance usage

    Several functions in bridge.c excessively obtain pointer to parent eswitch
    instance by dereferencing br_offloads->esw on every usage and following
    patches in this series add even more usages of eswitch. Introduce local
    variable 'esw' and use it instead.
    
    Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
    Reviewed-by: Paul Blakey <paulb@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    vbuslov authored and Saeed Mahameed committed Oct 5, 2021
  21. net/mlx5e: Support accept action

    Support TC generic 'accept' action in mlx5 by introducing
    MLX5_ESW_ATTR_FLAG_ACCEPT attribute flag. Flag has similar semantics to
    existing MLX5_ESW_ATTR_FLAG_SLOW_PATH flag, however, dedicated flag is
    required because existing 'slow path' flag can be flipped by tunneling
    subsystem when neighbor changes state.
    
    Introduce new helper function mlx5_esw_attr_flags_skip() to check whether
    attribute flags for 'slow path' or 'accept' action are set and use it in
    eswitch code instead of direct bit manipulation.
    
    Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
    Reviewed-by: Paul Blakey <paulb@nvidia.com>
    Reviewed-by: Roi Dayan <roid@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    vbuslov authored and Saeed Mahameed committed Oct 5, 2021
  22. net/mlx5e: Specify out ifindex when looking up encap route

    There is a use case that the local and remote VTEPs are in the same
    host. Currently, the out ifindex is not specified when looking up the
    encap route for offloads. So in this case, a local route is returned
    and the route dev is lo.
    
    Actual tunnel interface can be created with a parameter "dev" [1],
    which specifies the physical device to use for tunnel endpoint
    communication. Pass this parameter to driver when looking up encap
    route for offloads. So that a unicast route will be returned.
    
    [1] ip link add name vxlan1 type vxlan id 100 dev enp4s0f0 remote 1.1.1.1 dstport 4789
    
    Signed-off-by: Chris Mi <cmi@nvidia.com>
    Reviewed-by: Maor Dickman <maord@nvidia.com>
    Reviewed-by: Roi Dayan <roid@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Chris Mi authored and Saeed Mahameed committed Oct 5, 2021
  23. net/mlx5e: Reserve a value from TC tunnel options mapping

    Reserve one more value from TC tunnel options range to be used by bridge
    offload in following patches.
    
    Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
    Reviewed-by: Paul Blakey <paulb@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    vbuslov authored and Saeed Mahameed committed Oct 5, 2021
  24. net/mlx5e: Move parse fdb check into actions_match_supported_fdb()

    The parse fdb/nic actions funcs parse the actions and then call
    actions_match_supported() for final check.
    Move related check in parse_tc_fdb_actions() into
    actions_match_supported_fdb() for more organized code.
    
    Signed-off-by: Roi Dayan <roid@nvidia.com>
    Reviewed-by: Maor Dickman <maord@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    roidayan authored and Saeed Mahameed committed Oct 5, 2021
  25. net/mlx5e: Split actions_match_supported() into a sub function

    There will probably be more checks, some for nic flows, some for fdb
    flows and some are shared checks. Split it for fdb and nic to avoid
    the function getting too big.
    
    Signed-off-by: Roi Dayan <roid@nvidia.com>
    Reviewed-by: Maor Dickman <maord@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    roidayan authored and Saeed Mahameed committed Oct 5, 2021
  26. net/mlx5e: Move mod hdr allocation to a single place

    Move mod hdr allocation chunk from parse_tc_fdb_actions() and
    parse_tc_nic_actions() to a shared function.
    
    Signed-off-by: Roi Dayan <roid@nvidia.com>
    Reviewed-by: Maor Dickman <maord@nvidia.com>
    Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    roidayan authored and Saeed Mahameed committed Oct 5, 2021
Older