All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Bluetooth: Fix spurious error message
@ 2018-03-29  9:41 Szymon Janc
  2018-04-11  7:33 ` Szymon Janc
  2018-04-18  7:04 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Szymon Janc @ 2018-03-29  9:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

This message was debug message before 2064ee332e4c1b7495cf68b. Looks
like it was changed by accident in that patch. This is causing some
error messages when doing BR/EDR discovery since Inquiry Command
generates Command Status event, not Command Complete.

I'm sending this as RFC for now since while things seem to work fine
despite this condition (and it was like that for quite some time) it
feels like this is indeed case that should be handled by HCI request
code.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
---
 net/bluetooth/hci_event.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index cd3bbb766c24..3f111343f57b 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -5207,8 +5207,7 @@ static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode,
 	}
 
 	if (hdr->evt != HCI_EV_CMD_COMPLETE) {
-		bt_dev_err(hdev, "last event is not cmd complete (0x%2.2x)",
-			   hdr->evt);
+		BT_DBG("last event is not cmd complete (0x%2.2x)", hdr->evt);
 		return false;
 	}
 
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC] Bluetooth: Fix spurious error message
  2018-03-29  9:41 [RFC] Bluetooth: Fix spurious error message Szymon Janc
@ 2018-04-11  7:33 ` Szymon Janc
  2018-04-18  7:04 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2018-04-11  7:33 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

On Thursday, 29 March 2018 11:41:17 CEST Szymon Janc wrote:
> This message was debug message before 2064ee332e4c1b7495cf68b. Looks
> like it was changed by accident in that patch. This is causing some
> error messages when doing BR/EDR discovery since Inquiry Command
> generates Command Status event, not Command Complete.
> 
> I'm sending this as RFC for now since while things seem to work fine
> despite this condition (and it was like that for quite some time) it
> feels like this is indeed case that should be handled by HCI request
> code.
> 
> Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
> ---
>  net/bluetooth/hci_event.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index cd3bbb766c24..3f111343f57b 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -5207,8 +5207,7 @@ static bool hci_get_cmd_complete(struct hci_dev *hdev,
> u16 opcode, }
> 
>  	if (hdr->evt != HCI_EV_CMD_COMPLETE) {
> -		bt_dev_err(hdev, "last event is not cmd complete (0x%2.2x)",
> -			   hdr->evt);
> +		BT_DBG("last event is not cmd complete (0x%2.2x)", hdr->evt);
>  		return false;
>  	}

Any thoughts on this?

-- 
pozdrawiam
Szymon Janc



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Bluetooth: Fix spurious error message
  2018-03-29  9:41 [RFC] Bluetooth: Fix spurious error message Szymon Janc
  2018-04-11  7:33 ` Szymon Janc
@ 2018-04-18  7:04 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2018-04-18  7:04 UTC (permalink / raw)
  To: Szymon Janc, Johan Hedberg; +Cc: linux-bluetooth

Hi Szymon,

> This message was debug message before 2064ee332e4c1b7495cf68b. Looks
> like it was changed by accident in that patch. This is causing some
> error messages when doing BR/EDR discovery since Inquiry Command
> generates Command Status event, not Command Complete.
> 
> I'm sending this as RFC for now since while things seem to work fine
> despite this condition (and it was like that for quite some time) it
> feels like this is indeed case that should be handled by HCI request
> code.
> 
> Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
> ---
> net/bluetooth/hci_event.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index cd3bbb766c24..3f111343f57b 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -5207,8 +5207,7 @@ static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode,
> 	}
> 
> 	if (hdr->evt != HCI_EV_CMD_COMPLETE) {
> -		bt_dev_err(hdev, "last event is not cmd complete (0x%2.2x)",
> -			   hdr->evt);
> +		BT_DBG("last event is not cmd complete (0x%2.2x)", hdr->evt);
> 		return false;
> 	}

I changed this intentionally since it looked like an error to me. However Johan needs to have a look at this and we need to get a proper fix. Just hiding it behind a debug statement is not helping.

Regards

Marcel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-18  7:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29  9:41 [RFC] Bluetooth: Fix spurious error message Szymon Janc
2018-04-11  7:33 ` Szymon Janc
2018-04-18  7:04 ` Marcel Holtmann

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.