Merge tag 'for-net-2025-01-29' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btusb: mediatek: Add locks for usb_driver_claim_interface() - L2CAP: accept zero as a special value for MTU auto-selection - btusb: Fix possible infinite recursion of btusb_reset - Add ABI doc for sysfs reset - btnxpuart: Fix glitches seen in dual A2DP streaming * tag 'for-net-2025-01-29' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streaming Bluetooth: Add ABI doc for sysfs reset Bluetooth: Fix possible infinite recursion of btusb_reset Bluetooth: btusb: mediatek: Add locks for usb_driver_claim_interface() ==================== Link: https://patch.msgid.link/20250129210057.1318963-1-luiz.dentz@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
9
Documentation/ABI/stable/sysfs-class-bluetooth
Normal file
9
Documentation/ABI/stable/sysfs-class-bluetooth
Normal file
@@ -0,0 +1,9 @@
|
||||
What: /sys/class/bluetooth/hci<index>/reset
|
||||
Date: 14-Jan-2025
|
||||
KernelVersion: 6.13
|
||||
Contact: linux-bluetooth@vger.kernel.org
|
||||
Description: This write-only attribute allows users to trigger the vendor reset
|
||||
method on the Bluetooth device when arbitrary data is written.
|
||||
The reset may or may not be done through the device transport
|
||||
(e.g., UART/USB), and can also be done through an out-of-band
|
||||
approach such as GPIO.
|
||||
@@ -4078,6 +4078,7 @@ S: Supported
|
||||
W: http://www.bluez.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
|
||||
F: Documentation/ABI/stable/sysfs-class-bluetooth
|
||||
F: include/net/bluetooth/
|
||||
F: net/bluetooth/
|
||||
|
||||
|
||||
@@ -1381,13 +1381,12 @@ static void btnxpuart_tx_work(struct work_struct *work)
|
||||
|
||||
while ((skb = nxp_dequeue(nxpdev))) {
|
||||
len = serdev_device_write_buf(serdev, skb->data, skb->len);
|
||||
serdev_device_wait_until_sent(serdev, 0);
|
||||
hdev->stat.byte_tx += len;
|
||||
|
||||
skb_pull(skb, len);
|
||||
if (skb->len > 0) {
|
||||
skb_queue_head(&nxpdev->txq, skb);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (hci_skb_pkt_type(skb)) {
|
||||
|
||||
@@ -899,11 +899,6 @@ static void btusb_reset(struct hci_dev *hdev)
|
||||
struct btusb_data *data;
|
||||
int err;
|
||||
|
||||
if (hdev->reset) {
|
||||
hdev->reset(hdev);
|
||||
return;
|
||||
}
|
||||
|
||||
data = hci_get_drvdata(hdev);
|
||||
/* This is not an unbalanced PM reference since the device will reset */
|
||||
err = usb_autopm_get_interface(data->intf);
|
||||
@@ -2639,8 +2634,15 @@ static void btusb_mtk_claim_iso_intf(struct btusb_data *data)
|
||||
struct btmtk_data *btmtk_data = hci_get_priv(data->hdev);
|
||||
int err;
|
||||
|
||||
/*
|
||||
* The function usb_driver_claim_interface() is documented to need
|
||||
* locks held if it's not called from a probe routine. The code here
|
||||
* is called from the hci_power_on workqueue, so grab the lock.
|
||||
*/
|
||||
device_lock(&btmtk_data->isopkt_intf->dev);
|
||||
err = usb_driver_claim_interface(&btusb_driver,
|
||||
btmtk_data->isopkt_intf, data);
|
||||
device_unlock(&btmtk_data->isopkt_intf->dev);
|
||||
if (err < 0) {
|
||||
btmtk_data->isopkt_intf = NULL;
|
||||
bt_dev_err(data->hdev, "Failed to claim iso interface");
|
||||
|
||||
@@ -710,12 +710,12 @@ static bool l2cap_valid_mtu(struct l2cap_chan *chan, u16 mtu)
|
||||
{
|
||||
switch (chan->scid) {
|
||||
case L2CAP_CID_ATT:
|
||||
if (mtu < L2CAP_LE_MIN_MTU)
|
||||
if (mtu && mtu < L2CAP_LE_MIN_MTU)
|
||||
return false;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (mtu < L2CAP_DEFAULT_MIN_MTU)
|
||||
if (mtu && mtu < L2CAP_DEFAULT_MIN_MTU)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user