Re: [PATCH v3 1/5] Bluetooth: ISO: Don't initiate CIS connections if there are no buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pauli,

On Thu, Aug 14, 2025 at 11:26 AM Pauli Virtanen <pav@xxxxxx> wrote:
>
> Hi,
>
> ke, 2025-08-13 kello 17:15 -0400, Luiz Augusto von Dentz kirjoitti:
> > From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> >
> > If the controller has no buffers left return -ENOBUFF to indicate that
> > iso_cnt might be out of sync.
> >
> > Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> > ---
> >  net/bluetooth/iso.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
> > index 5ce823ca3aaf..dff3fc4917d6 100644
> > --- a/net/bluetooth/iso.c
> > +++ b/net/bluetooth/iso.c
> > @@ -458,6 +458,13 @@ static int iso_connect_cis(struct sock *sk)
> >               goto unlock;
> >       }
> >
> > +     /* Check if there are available buffers for output/TX. */
> > +     if (iso_pi(sk)->qos.ucast.out.sdu && !hci_conn_num(hdev, CIS_LINK) &&
> > +         (hdev->iso_pkts && !hdev->iso_cnt)) {
>
> Also && !hci_conn_num(hdev, BIS_LINK) so it doesn't fail if a BIS is
> saturating the buffers?

Right, will add that on v5.

> Does PA_LINK have ISO packet TX/RX?

Don't think so but since it is used while establishing the BIS I guess
it is safer that we check that as well.

> > +             err = -ENOBUFS;
> > +             goto unlock;
> > +     }
> > +
> >       /* Just bind if DEFER_SETUP has been set */
> >       if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
> >               hcon = hci_bind_cis(hdev, &iso_pi(sk)->dst,
>
> --
> Pauli Virtanen



-- 
Luiz Augusto von Dentz





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux