1. 15 Jul, 2024 10 commits
    • Sean Wang's avatar
      Bluetooth: btmtk: apply the common btmtk_fw_get_filename · 7f935b21
      Sean Wang authored
      Apply the common btmtk_fw_get_filename to avoid the similar coding in each
      driver.
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      7f935b21
    • Sean Wang's avatar
      Bluetooth: btmtk: add the function to get the fw name · 00f993fd
      Sean Wang authored
      Include a shared function to get the firmware name, to prevent repeating
      code for similar chipsets.
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      00f993fd
    • Kiran K's avatar
      Bluetooth: btintel: Refactor btintel_set_ppag() · 0a3e2eca
      Kiran K authored
      Current flow iterates the ACPI table associated with Bluetooth
      controller looking for PPAG method. Method name can be directly passed
      to acpi_evaluate_object function instead of iterating the table.
      
      Fixes: c585a92b ("Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG)")
      Signed-off-by: default avatarKiran K <kiran.k@intel.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      0a3e2eca
    • Luke Wang's avatar
      Bluetooth: btnxpuart: Shutdown timer and prevent rearming when driver unloading · 0d0df1e7
      Luke Wang authored
      When unload the btnxpuart driver, its associated timer will be deleted.
      If the timer happens to be modified at this moment, it leads to the
      kernel call this timer even after the driver unloaded, resulting in
      kernel panic.
      Use timer_shutdown_sync() instead of del_timer_sync() to prevent rearming.
      
      panic log:
        Internal error: Oops: 0000000086000007 [#1] PREEMPT SMP
        Modules linked in: algif_hash algif_skcipher af_alg moal(O) mlan(O) crct10dif_ce polyval_ce polyval_generic   snd_soc_imx_card snd_soc_fsl_asoc_card snd_soc_imx_audmux mxc_jpeg_encdec v4l2_jpeg snd_soc_wm8962 snd_soc_fsl_micfil   snd_soc_fsl_sai flexcan snd_soc_fsl_utils ap130x rpmsg_ctrl imx_pcm_dma can_dev rpmsg_char pwm_fan fuse [last unloaded:   btnxpuart]
        CPU: 5 PID: 723 Comm: memtester Tainted: G           O       6.6.23-lts-next-06207-g4aef2658ac28 #1
        Hardware name: NXP i.MX95 19X19 board (DT)
        pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
        pc : 0xffff80007a2cf464
        lr : call_timer_fn.isra.0+0x24/0x80
      ...
        Call trace:
         0xffff80007a2cf464
         __run_timers+0x234/0x280
         run_timer_softirq+0x20/0x40
         __do_softirq+0x100/0x26c
         ____do_softirq+0x10/0x1c
         call_on_irq_stack+0x24/0x4c
         do_softirq_own_stack+0x1c/0x2c
         irq_exit_rcu+0xc0/0xdc
         el0_interrupt+0x54/0xd8
         __el0_irq_handler_common+0x18/0x24
         el0t_64_irq_handler+0x10/0x1c
         el0t_64_irq+0x190/0x194
        Code: ???????? ???????? ???????? ???????? (????????)
        ---[ end trace 0000000000000000 ]---
        Kernel panic - not syncing: Oops: Fatal exception in interrupt
        SMP: stopping secondary CPUs
        Kernel Offset: disabled
        CPU features: 0x0,c0000000,40028143,1000721b
        Memory Limit: none
        ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---
      Signed-off-by: default avatarLuke Wang <ziniu.wang_1@nxp.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      0d0df1e7
    • Neeraj Sanjay Kale's avatar
      Bluetooth: btnxpuart: Handle FW Download Abort scenario · e3c48910
      Neeraj Sanjay Kale authored
      This adds a new flag BTNXPUART_FW_DOWNLOAD_ABORT which handles the
      situation where driver is removed while firmware download is in
      progress.
      
      logs:
      modprobe btnxpuart
      [65239.230431] Bluetooth: hci0: ChipID: 7601, Version: 0
      [65239.236670] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se
      rmmod btnxpuart
      [65241.425300] Bluetooth: hci0: FW Download Aborted
      Signed-off-by: default avatarNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
      Tested-by: default avatarGuillaume Legoupil <guillaume.legoupil@nxp.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      e3c48910
    • Neeraj Sanjay Kale's avatar
      Bluetooth: btnxpuart: Enable status prints for firmware download · 2684dd61
      Neeraj Sanjay Kale authored
      This enables prints for firmware download which can help automation
      tests to verify firmware download functionality.
      
      dmesg logs before:
      modprobe btnxpuart
      [ 1999.187264] Bluetooth: MGMT ver 1.22
      
      dmesg logs with this patch:
      modprobe btnxpuart
      [16179.758515] Bluetooth: hci0: ChipID: 7601, Version: 0
      [16179.764748] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se
      [16181.217490] Bluetooth: hci0: FW Download Complete: 372696 bytes
      [16182.701398] Bluetooth: MGMT ver 1.22
      Signed-off-by: default avatarNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
      Tested-by: default avatarGuillaume Legoupil <guillaume.legoupil@nxp.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      2684dd61
    • Neeraj Sanjay Kale's avatar
      Bluetooth: btnxpuart: Fix Null pointer dereference in btnxpuart_flush() · c68bbf5e
      Neeraj Sanjay Kale authored
      This adds a check before freeing the rx->skb in flush and close
      functions to handle the kernel crash seen while removing driver after FW
      download fails or before FW download completes.
      
      dmesg log:
      [   54.634586] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000080
      [   54.643398] Mem abort info:
      [   54.646204]   ESR = 0x0000000096000004
      [   54.649964]   EC = 0x25: DABT (current EL), IL = 32 bits
      [   54.655286]   SET = 0, FnV = 0
      [   54.658348]   EA = 0, S1PTW = 0
      [   54.661498]   FSC = 0x04: level 0 translation fault
      [   54.666391] Data abort info:
      [   54.669273]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
      [   54.674768]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
      [   54.674771]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
      [   54.674775] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000048860000
      [   54.674780] [0000000000000080] pgd=0000000000000000, p4d=0000000000000000
      [   54.703880] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
      [   54.710152] Modules linked in: btnxpuart(-) overlay fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine authenc libdes crct10dif_ce polyval_ce polyval_generic snd_soc_imx_spdif snd_soc_imx_card snd_soc_ak5558 snd_soc_ak4458 caam secvio error snd_soc_fsl_micfil snd_soc_fsl_spdif snd_soc_fsl_sai snd_soc_fsl_utils imx_pcm_dma gpio_ir_recv rc_core sch_fq_codel fuse
      [   54.744357] CPU: 3 PID: 72 Comm: kworker/u9:0 Not tainted 6.6.3-otbr-g128004619037 #2
      [   54.744364] Hardware name: FSL i.MX8MM EVK board (DT)
      [   54.744368] Workqueue: hci0 hci_power_on
      [   54.757244] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [   54.757249] pc : kfree_skb_reason+0x18/0xb0
      [   54.772299] lr : btnxpuart_flush+0x40/0x58 [btnxpuart]
      [   54.782921] sp : ffff8000805ebca0
      [   54.782923] x29: ffff8000805ebca0 x28: ffffa5c6cf1869c0 x27: ffffa5c6cf186000
      [   54.782931] x26: ffff377b84852400 x25: ffff377b848523c0 x24: ffff377b845e7230
      [   54.782938] x23: ffffa5c6ce8dbe08 x22: ffffa5c6ceb65410 x21: 00000000ffffff92
      [   54.782945] x20: ffffa5c6ce8dbe98 x19: ffffffffffffffac x18: ffffffffffffffff
      [   54.807651] x17: 0000000000000000 x16: ffffa5c6ce2824ec x15: ffff8001005eb857
      [   54.821917] x14: 0000000000000000 x13: ffffa5c6cf1a02e0 x12: 0000000000000642
      [   54.821924] x11: 0000000000000040 x10: ffffa5c6cf19d690 x9 : ffffa5c6cf19d688
      [   54.821931] x8 : ffff377b86000028 x7 : 0000000000000000 x6 : 0000000000000000
      [   54.821938] x5 : ffff377b86000000 x4 : 0000000000000000 x3 : 0000000000000000
      [   54.843331] x2 : 0000000000000000 x1 : 0000000000000002 x0 : ffffffffffffffac
      [   54.857599] Call trace:
      [   54.857601]  kfree_skb_reason+0x18/0xb0
      [   54.863878]  btnxpuart_flush+0x40/0x58 [btnxpuart]
      [   54.863888]  hci_dev_open_sync+0x3a8/0xa04
      [   54.872773]  hci_power_on+0x54/0x2e4
      [   54.881832]  process_one_work+0x138/0x260
      [   54.881842]  worker_thread+0x32c/0x438
      [   54.881847]  kthread+0x118/0x11c
      [   54.881853]  ret_from_fork+0x10/0x20
      [   54.896406] Code: a9be7bfd 910003fd f9000bf3 aa0003f3 (b940d400)
      [   54.896410] ---[ end trace 0000000000000000 ]---
      Signed-off-by: default avatarNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
      Tested-by: default avatarGuillaume Legoupil <guillaume.legoupil@nxp.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      c68bbf5e
    • Hector Martin's avatar
      Bluetooth: hci_bcm4377: Increase boot timeout · 3b867602
      Hector Martin authored
      BCM4388 takes over 2 seconds to boot, so increase the timeout.
      Signed-off-by: default avatarHector Martin <marcan@marcan.st>
      Reviewed-by: default avatarSven Peter <sven@svenpeter.dev>
      Signed-off-by: default avatarSven Peter <sven@svenpeter.dev>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      3b867602
    • Sven Peter's avatar
      Bluetooth: hci_bcm4377: Use correct unit for timeouts · 56c695a8
      Sven Peter authored
      BCM4377_TIMEOUT is always used to wait for completitions and their API
      expects a timeout in jiffies instead of msecs.
      
      Fixes: 8a061276 ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards")
      Signed-off-by: default avatarSven Peter <sven@svenpeter.dev>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      56c695a8
    • Luiz Augusto von Dentz's avatar
      Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection · 0ece498c
      Luiz Augusto von Dentz authored
      This makes MGMT_OP_LOAD_CONN_PARAM update existing connection by
      dectecting the request is just for one connection, parameters already
      exists and there is a connection.
      
      Since this is a new behavior the revision is also updated to enable
      userspace to detect it.
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      0ece498c
  2. 14 Jul, 2024 4 commits
    • Jakub Kicinski's avatar
      Merge branch 'introduce-en7581-ethernet-support' · ecb1e1dc
      Jakub Kicinski authored
      Lorenzo Bianconi says:
      
      ====================
      Introduce EN7581 ethernet support
      
      Add airoha_eth driver in order to introduce ethernet support for
      Airoha EN7581 SoC available on EN7581 development board.
      EN7581 mac controller is mainly composed by Frame Engine (FE) and
      QoS-DMA (QDMA) modules. FE is used for traffic offloading (just basic
      functionalities are supported now) while QDMA is used for DMA operation
      and QOS functionalities between mac layer and the dsa switch (hw QoS is
      not available yet and it will be added in the future).
      Currently only hw lan features are available, hw wan will be added with
      subsequent patches.
      ====================
      
      Link: https://patch.msgid.link/cover.1720818878.git.lorenzo@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ecb1e1dc
    • Lorenzo Bianconi's avatar
      net: airoha: Introduce ethernet support for EN7581 SoC · 23020f04
      Lorenzo Bianconi authored
      Add airoha_eth driver in order to introduce ethernet support for
      Airoha EN7581 SoC available on EN7581 development board (en7581-evb).
      EN7581 mac controller is mainly composed by the Frame Engine (PSE+PPE)
      and QoS-DMA (QDMA) modules. FE is used for traffic offloading (just
      basic functionalities are currently supported) while QDMA is used for
      DMA operations and QOS functionalities between the mac layer and the
      external modules conncted to the FE GDM ports (e.g MT7530 DSA switch
      or external phys).
      A general overview of airoha_eth architecture is reported below:
      
                     ┌───────┐                                     ┌───────┐
                     │ QDMA2 │                                     │ QDMA1 │
                     └───┬───┘                                     └───┬───┘
                         │                                             │
                 ┌───────▼─────────────────────────────────────────────▼────────┐
                 │                                                              │
                 │       P5                                            P0       │
                 │                                                              │
                 │                                                              │
                 │                                                              │    ┌──────┐
                 │                                                           P3 ├────► GDM3 │
                 │                                                              │    └──────┘
                 │                                                              │
                 │                                                              │
      ┌─────┐    │                                                              │
      │ PPE ◄────┤ P4                          PSE                              │
      └─────┘    │                                                              │
                 │                                                              │
                 │                                                              │
                 │                                                              │    ┌──────┐
                 │                                                           P9 ├────► GDM4 │
                 │                                                              │    └──────┘
                 │                                                              │
                 │                                                              │
                 │                                                              │
                 │        P2                                           P1       │
                 └─────────┬───────────────────────────────────────────┬────────┘
                           │                                           │
                       ┌───▼──┐                                     ┌──▼───┐
                       │ GDM2 │                                     │ GDM1 │
                       └──────┘                                     └──┬───┘
                                                                       │
                                                                  ┌────▼─────┐
                                                                  │  MT7530  │
                                                                  └──────────┘
      
      Currently only hw LAN features (QDMA1+GDM1) are available while hw WAN
      (QDMA2+GDM{2,3,4}) ones will be added with subsequent patches introducing
      traffic offloading support.
      Tested-by: default avatarBenjamin Larsson <benjamin.larsson@genexis.eu>
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Link: https://patch.msgid.link/274945d2391c195098ab180a46d0617b18b9e42c.1720818878.git.lorenzo@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      23020f04
    • Lorenzo Bianconi's avatar
      dt-bindings: net: airoha: Add EN7581 ethernet controller · 6bc8719c
      Lorenzo Bianconi authored
      Introduce device-tree binding documentation for Airoha EN7581 ethernet
      mac controller.
      Reviewed-by: default avatarRob Herring (Arm) <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Link: https://patch.msgid.link/7dfecf8aa4e6519562a94455b95c49e1b3c858a0.1720818878.git.lorenzo@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6bc8719c
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 861f34e6
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      ice: Switch API optimizations
      
      Marcin Szycik says:
      
      Optimize the process of creating a recipe in the switch block by removing
      duplicate switch ID words and changing how result indexes are fitted into
      recipes. In many cases this can decrease the number of recipes required to
      add a certain set of rules, potentially allowing a more varied set of rules
      to be created. Total rule count will also increase, since less words will
      be left unused/wasted. There are only 64 rules available in total, so every
      one counts.
      
      After this modification, many fields and some structs became unused or were
      simplified, resulting in overall simpler implementation.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
        ice: Add tracepoint for adding and removing switch rules
        ice: Remove unused members from switch API
        ice: Optimize switch recipe creation
        ice: remove unused recipe bookkeeping data
        ice: Simplify bitmap setting in adding recipe
        ice: Remove reading all recipes before adding a new one
        ice: Remove unused struct ice_prot_lkup_ext members
      ====================
      
      Link: https://patch.msgid.link/20240711181312.2019606-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      861f34e6
  3. 13 Jul, 2024 26 commits