From: Ville Tervo <ville.tervo@nokia.com>
To: ext Szymon Janc <szymon.janc@tieto.com>
Cc: "linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"par-gunnar.p.hjalmdahl@stericsson.com"
<par-gunnar.p.hjalmdahl@stericsson.com>,
"henrik.possung@stericsson.com" <henrik.possung@stericsson.com>
Subject: Re: [PATCH 04/10] Bluetooth: Use EIO code to report HCI error to userpace
Date: Fri, 18 Feb 2011 09:34:00 +0200 [thread overview]
Message-ID: <20110218073400.GA874@null> (raw)
In-Reply-To: <201102171523.10461.szymon.janc@tieto.com>
Hi,
On Thu, Feb 17, 2011 at 03:23:10PM +0100, ext Szymon Janc wrote:
> Hi,
>
> > On Thu, Feb 17, 2011 at 02:16:35PM +0100, ext Szymon Janc wrote:
> > > Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> > > ---
> > > net/bluetooth/mgmt.c | 7 +++----
> > > 1 files changed, 3 insertions(+), 4 deletions(-)
> >
> > Some kind of explanation why EIO is better than status would be nice.
>
> As I've mentioned in cover letter:
Cover letters does not end up to git log. Proper description helps debugging
later a much if we can easily determine why this was needed and what was the
motivation for this patch.
> It is not possible to distinguish in cmd status if error was from kernel
> or from HCI. Since in mgmt only kernel sends HCI commands their errors
> shouldn't be needed for userspace so report EIO to userspace on HCI error
> (if HCI error is needed for debugging, logs can be added on kernel side)
>
> HCI status codes and kernel error codes overlaps i.e. one can't distinguish
> if error was ENOMEM or HCI Command Disallowed as both have value 12.
>
> For userspace is should be enough to just know that HCI failed, not why.
> (in fact, currently userspace is not able to determine error too...)
This sounds reasonable to me.
--
Ville
next prev parent reply other threads:[~2011-02-18 7:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 13:16 [PATCH 00/10] Support for OOB in mgmt interface Szymon Janc
2011-02-17 13:16 ` [PATCH 01/10] Bluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> Szymon Janc
2011-02-17 14:29 ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 02/10] Bluetooth: Clean up hci_sniff_subrate_evt function Szymon Janc
2011-02-17 14:30 ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 03/10] Bluetooth: Add optional data parameter to mgmt_ev_cmd_status event Szymon Janc
2011-02-17 13:16 ` [PATCH 04/10] Bluetooth: Use EIO code to report HCI error to userpace Szymon Janc
2011-02-17 13:49 ` Ville Tervo
2011-02-17 14:23 ` Szymon Janc
2011-02-18 7:34 ` Ville Tervo [this message]
2011-02-18 9:15 ` [PATCH v2] " Szymon Janc
2011-02-17 13:16 ` [PATCH 05/10] Bluetooth: Add read_local_oob_data management command Szymon Janc
2011-02-17 13:16 ` [PATCH 06/10] Bluetooth: Add add/remove_remote_oob_data management commands Szymon Janc
2011-02-18 11:12 ` [PATCH v2 1/2] " Szymon Janc
2011-02-18 11:12 ` [PATCH v2 2/2] Bluetooth: Enable support for Out of Band authentication Szymon Janc
2011-02-17 13:16 ` [PATCH 07/10] Bluetooth: Fix code style issues and make checkpatch silent about hci_core.h Szymon Janc
2011-02-17 14:43 ` Gustavo F. Padovan
2011-02-17 15:42 ` [PATCH v2] Bluetooth: Fix some code style issues in hci_core.h Szymon Janc
2011-02-17 16:30 ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 08/10] Bluetooth: Fix code style issues and make checkpatch silent about hci_core.c Szymon Janc
2011-02-17 15:46 ` [PATCH v2] Bluetooth: Fix some code style issues in hci_core.c Szymon Janc
2011-02-17 16:32 ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 09/10] Bluetooth: Fix code style issues, make checkpatch less noisy about hci_event.c Szymon Janc
2011-02-17 15:44 ` [PATCH v2] Bluetooth: Fix some code style issues in hci_event.c Szymon Janc
2011-02-17 16:35 ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 10/10] Bluetooth: Log command and status parameters in command status event Szymon Janc
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=20110218073400.GA874@null \
--to=ville.tervo@nokia.com \
--cc=henrik.possung@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=par-gunnar.p.hjalmdahl@stericsson.com \
--cc=szymon.janc@tieto.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.