Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] H4 loss of synchronization recovery
Date: Wed, 06 Apr 2005 15:28:36 +0200	[thread overview]
Message-ID: <1112794116.9047.33.camel@pegasus> (raw)
In-Reply-To: <Pine.GSO.4.33.0504061449280.13712-100000@horus.imag.fr>

Hi Catalin,

> Attached you have the updated patch for recovering from
> H4 synchronization loss (sending the reset command after a
> hardware error event and reseting stack state).
> 
> Here's a summary of the changes:
>   - the procedure is only perfomed when the underlying transport
> is HCI_UART
>   - the counters are reset not by a command, but from the hdev struct
>   - the "scan enable", "authentication enable", "encrypt mode" variables
> are restored to their previous values from hdev->flags
>   - if there was an ongoing inquiry, it has been killed by the reset, so
> the HCI_INQUIRY flag is cleared
>   - I added an hci_req_cancel
> 
> I have tested the patch with the buggy BT module in the iPaq h5550 and it
> works as expected.

please change some things for me to clean this patch.

1. The "{" after the function name must be at the next line.

2. Name the reset function hci_reset_dev().

It is not H:4 specific, even if you only call it in that case. And since
the parameter is hci_dev it should not start with hci_dev_*. In this
case you would expect a device id.

3. There is no need to preset "auth" and "encrypt".

4. For "auth" and "encrypt" use constructs like this:

	auth = test_bit(HCI_AUTH, &hdev->flags) ? AUTH_ENABLED : AUTH_DISABLED

To decrease the stack size, you can also use the same variable for
"auth", "encrypt" and "scan".


And what do we do if the transport if BCSP? In this case the type is
also HCI_UART.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      reply	other threads:[~2005-04-06 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06 13:08 [Bluez-devel] [PATCH] H4 loss of synchronization recovery Catalin Drula
2005-04-06 13:28 ` Marcel Holtmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1112794116.9047.33.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox