<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/bluetooth/btmtk.h, branch v7.0.10</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-07-15T14:13:17+00:00</updated>
<entry>
<title>Bluetooth: btmtk: Mark all stub functions as inline</title>
<updated>2024-07-15T14:13:17+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2024-07-10T17:56:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23e88450bb04f6b44ce4cacbd76cd775e426a5b2'/>
<id>urn:sha1:23e88450bb04f6b44ce4cacbd76cd775e426a5b2</id>
<content type='text'>
Several recent patches added static stubs to btmtk.h without the inline
keyword, which causes instances of -Wunused-function when those stubs
are not used anywhere in a file that includes the header:

  In file included from drivers/bluetooth/btusb.c:28:
  drivers/bluetooth/btmtk.h:254:13: warning: 'btmtk_fw_get_filename' defined but not used [-Wunused-function]
    254 | static void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id,
        |             ^~~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:249:12: warning: 'btmtk_process_coredump' defined but not used [-Wunused-function]
    249 | static int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
        |            ^~~~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:243:12: warning: 'btmtk_register_coredump' defined but not used [-Wunused-function]
    243 | static int btmtk_register_coredump(struct hci_dev *hdev, const char *name,
        |            ^~~~~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:233:12: warning: 'btmtk_setup_firmware' defined but not used [-Wunused-function]
    233 | static int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname,
        |            ^~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:227:12: warning: 'btmtk_setup_firmware_79xx' defined but not used [-Wunused-function]
    227 | static int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
        |            ^~~~~~~~~~~~~~~~~~~~~~~~~

Add inline to all the stubs in btmtk.h (even ones that do not currently
have any warnings associated with them) to ensure there are never unused
function warnings from these stubs, as is customary for the kernel.

Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: mediatek: add ISO data transmission functions</title>
<updated>2024-07-15T14:11:52+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ceac1cb0259de682d78f5c784ef8e0b13022e9d9'/>
<id>urn:sha1:ceac1cb0259de682d78f5c784ef8e0b13022e9d9</id>
<content type='text'>
This patch implements functions for ISO data send and receive in btusb
driver for MediaTek's controller.

MediaTek defines a specific interrupt endpoint for ISO data transmissin
because the characteristics of interrupt endpoint are similar to the
application of ISO data which can support guaranteed transmissin
bandwidth, enough maximum data length and error checking mechanism.

Driver sets up ISO interface and endpoints in btusb_mtk_setup and clears
the setup in btusb_mtk_shutdown. These flow can't move to btmtk.c due to
btusb_driver is only defined in btusb.c when claiming/relaesing interface.
ISO packet anchor stops when driver suspending and resubmit interrupt urb
for ISO data when driver resuming.

Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: move btusb_recv_acl_mtk to btmtk.c</title>
<updated>2024-07-15T14:11:50+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6dc22ab9f085ae165e4ce89d61fb426f94e8a969'/>
<id>urn:sha1:6dc22ab9f085ae165e4ce89d61fb426f94e8a969</id>
<content type='text'>
Move btusb_recv_acl_mtk from btusb.c to btmtk.c which holds
vendor specific stuff and would make btusb.c clean.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: move btusb_mtk_[setup, shutdown] to btmtk.c</title>
<updated>2024-07-15T14:11:48+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c5e8c52e3cafaa6f71efd44a42a674271e5b3ad'/>
<id>urn:sha1:5c5e8c52e3cafaa6f71efd44a42a674271e5b3ad</id>
<content type='text'>
Move btusb_mtk_[setup, shutdown] and related function from
btusb.c to btmtk.c which holds vendor specific stuff and
would make btusb.c clean.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c</title>
<updated>2024-07-15T14:11:46+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d019930b0049fc2648a6b279893d8ad330596e81'/>
<id>urn:sha1:d019930b0049fc2648a6b279893d8ad330596e81</id>
<content type='text'>
Move btusb_mtk_hci_wmt_sync from btusb.c to btmtk.c which holds
vendor specific stuff and would make btusb.c clean.

Add usb.h header to btmtksdio.c/btmtkuart.c for usb related element
defined in btmtk.h

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: rename btmediatek_data</title>
<updated>2024-07-15T14:11:42+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3e6236053958a8f1c7c7a885d9cecdd383e4615'/>
<id>urn:sha1:d3e6236053958a8f1c7c7a885d9cecdd383e4615</id>
<content type='text'>
Rename btmediatek_data to have a consistent prefix throughout the driver.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: add the function to get the fw name</title>
<updated>2024-07-15T01:33:26+00:00</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2024-05-15T23:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00f993fdec06c8f036a1b9c8ee6b004c17143bd1'/>
<id>urn:sha1:00f993fdec06c8f036a1b9c8ee6b004c17143bd1</id>
<content type='text'>
Include a shared function to get the firmware name, to prevent repeating
code for similar chipsets.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: Add MODULE_FIRMWARE() for MT7922</title>
<updated>2024-03-06T22:27:11+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-02-27T10:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e465a07cdf444140f16bc57025c23fcafdde997'/>
<id>urn:sha1:3e465a07cdf444140f16bc57025c23fcafdde997</id>
<content type='text'>
Since dracut refers to the module info for defining the required
firmware files and btmtk driver doesn't provide the firmware info for
MT7922, the generate initrd misses the firmware, resulting in the
broken Bluetooth.

This patch simply adds the MODULE_FIRMWARE() for the missing entry
for covering that.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1214133
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Reviewed-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: Fix kernel crash when processing coredump</title>
<updated>2023-08-11T18:48:58+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2023-07-13T07:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e72e3b12c1ee73e8cb180f0bff204a9eb51621a'/>
<id>urn:sha1:0e72e3b12c1ee73e8cb180f0bff204a9eb51621a</id>
<content type='text'>
There may be a potential kernel crash risk if 'skb-&gt;len
- MTK_COREDUMP_END_LEN' value is less than 0 when doing
memcmp in btmtk_process_coredump().
Check the value is valid before doing memcmp.

[215.021695] Unable to handle kernel paging request at
             virtual address ffffff939fffd3c5
[215.021781] Mem abort info:
[215.021805]   ESR = 0x96000005
[215.021833]   EC = 0x25: DABT (current EL), IL = 32 bits
[215.021861]   SET = 0, FnV = 0
[215.021875]   EA = 0, S1PTW = 0
[215.021886] Data abort info:
[215.021899]   ISV = 0, ISS = 0x00000005
[215.021912]   CM = 0, WnR = 0
[215.021929] swapper pgtable: 4k pages, 39-bit VAs,
             pgdp=00000000410de000
[215.021943] [ffffff939fffd3c5] pgd=0000000000000000,
             p4d=0000000000000000, pud=0000000000000000
[215.021979] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[215.022496] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.186#3
             (HASH:ad23 4)
[215.022511] Hardware name: MediaTek Tomato board (DT)
[215.022530] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--)
[215.022556] pc : __pi_memcmp+0xd0/0x1b8
[215.022579] lr : btmtk_process_coredump+0xb0/0x5f8 [btmtk]
[215.022593] sp : ffffffc010003d40
[215.022607] x29: ffffffc010003d40 x28: 0000000000000006
[215.022633] x27: ffffffda696350c0 x26: 0000000000000002
[215.022659] x25: 00000000000003ff x24: ffffff9360cca804
[215.022685] x23: 0000000000000000 x22: ffffff9365638500
[215.022710] x21: ffffff9365638700 x20: 0000000000000000
[215.022736] x19: ffffff936002e000 x18: 0000000000000000
[215.022761] x17: 0000000000000180 x16: ffffffda6881b8b4
[215.022787] x15: 0000000000000001 x14: 0000000000002d00
[215.022812] x13: 0000000000060000 x12: 0000000000000181
[215.022837] x11: 0000000000000006 x10: fffffffffffffffd
[215.022862] x9 : 0000000000000006 x8 : 0000000000000003
[215.022887] x7 : 0000000000000000 x6 : 0000000000000000
[215.022913] x5 : ffffff93656387b8 x4 : 0000000000000000
[215.022938] x3 : ffffffc010003c18 x2 : 0000000000000006
[215.022963] x1 : ffffffda09d4124a x0 : ffffff939fffd3c5
[215.022989] Call trace:
[215.023012]  __pi_memcmp+0xd0/0x1b8
[215.023053]  btusb_recv_acl_mtk+0x64/0x90 [btusb (HASH:dc6b 5)]
[215.023087]  btusb_recv_bulk+0x118/0x170 [btusb (HASH:dc6b 5)]
[215.023121]  btusb_bulk_complete+0x8c/0x148 [btusb (HASH:dc6b 5)]
[215.023144]  __usb_hcd_giveback_urb+0xbc/0x148
[215.023164]  usb_giveback_urb_bh+0xb4/0x190
[215.023184]  tasklet_action_common+0x98/0x1a0
[215.023201]  tasklet_action+0x2c/0x38
[215.023220]  __do_softirq+0xe0/0x38c
[215.023241]  invoke_softirq+0x34/0x6c
[215.023258]  irq_exit+0x6c/0xb0
[215.023279]  __handle_domain_irq+0x98/0xd4
[215.023296]  gic_handle_irq+0x5c/0x11c
[215.023313]  el1_irq+0xd0/0x180
[215.023332]  cpuidle_enter_state+0xac/0x338
[215.023349]  cpuidle_enter+0x40/0x70
[215.023366]  do_idle+0x150/0x278
[215.023384]  cpu_startup_entry+0x2c/0x58
[215.023401]  rest_init+0xdc/0xec
[215.023419]  arch_call_rest_init+0x18/0x24
[215.023435]  start_kernel+0x334/0x400
[215.023460] Code: 91002129 eb09010a 9a89810b cb0b0042 (38401403)
[215.023478] ---[ end trace 28668fd20c7a90cd ]

Fixes: 2822cd0173ad ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support")
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Co-developed-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: mediatek: add MediaTek devcoredump support</title>
<updated>2023-08-11T18:41:56+00:00</updated>
<author>
<name>Jing Cai</name>
<email>jing.cai@mediatek.com</email>
</author>
<published>2023-06-28T22:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b70151328781a89c89e4cf3fae21fc0e98d869e'/>
<id>urn:sha1:0b70151328781a89c89e4cf3fae21fc0e98d869e</id>
<content type='text'>
This patch implement function .coredump() and dmp_hdr() in btusb
driver for MediaTek controller.  FW core dump was triggered by FW
specific event to show something unexpected happened in the controller.

The driver would be responsible for collecting and uploading the device
core dump pieces in hci driver using core dump API. Once we finished
the whole process, the driver would reset the controller to recover the
kind of fatal error.

Co-developed-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Co-developed-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Jing Cai &lt;jing.cai@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
</feed>
