Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1062896ybv; Thu, 13 Feb 2020 15:05:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxND6s57I/CYRhcNlfPJ4pJalyf+PdNr+i52sD39GBbBaMvWr6K3D2m9LpzU9cnZxqHBXAQ X-Received: by 2002:aca:1b11:: with SMTP id b17mr4668541oib.45.1581635119096; Thu, 13 Feb 2020 15:05:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581635119; cv=none; d=google.com; s=arc-20160816; b=RTxWqZuxfV8yDr3nHRxdC3pYeFnu0SLlfYO914u5dnV7JJlFGdoVQID5dhpMsn99xn N3RF9FBw8gZ1WWIZHs+YRTLczjUkuhuHw23kpuUdPvkqwYf0Wcu3xEOZyNm3hMcKfy5v OGnEDUuSeCtVKI8kkSmFRtWxfxmiXh1H00R0UpbsuGIACrNO2QyCRiPDAexzMtZKOJv4 cHou6UN1U4twYFUXLkoKyaf4lSVhfHDcmUGKm/3G/UluJg0q4St9bxjqUEEIXticNgo7 PCIxZRGqp6b7iFCoIk2MJ1sCBF7TfSZFluxpqlR3KAbgAKorPFX1zIBGqf+GLIUN9ZiL g5oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:to:from:subject:message-id; bh=zy6tGB/Z7QaVazVQ8tfoKLeWGXJAsdunpVr8xLXdUUg=; b=WKhlJUwHbR4beW1wXkBOPxZB8jVy/PaE5VpwaEuBPLsB7WB9e52SxcsaFzoH3fJUEn rOloQGRiT9AE03CG87R4lAwQNh+Kbpie1hs6jvNotZgwvyhttkkUMaDnIsbi9iL0Fg+T a/SrlvyX+fPNzT/b4LoRNQV0Tz39tbkk5DVZRi2yVwTzxmBndbv1qE7hDT1QzDICPdle +B9a6wPYZhY+9TfmW1nqcJQ/DF77I0S7J5zPS2WMOgXmeQAR8nvtzzg/D7iBuO4UDw7Q +XovAxzsmYUYEV+z52P80QL9zTBWKbTGmF01gCiNXsMUvD0ognqJP+wY+6HunOEb0xux 9EtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p186si1916451oih.172.2020.02.13.15.04.49; Thu, 13 Feb 2020 15:05:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbgBMXEo (ORCPT + 99 others); Thu, 13 Feb 2020 18:04:44 -0500 Received: from mga18.intel.com ([134.134.136.126]:31346 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgBMXEn (ORCPT ); Thu, 13 Feb 2020 18:04:43 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2020 15:04:42 -0800 X-IronPort-AV: E=Sophos;i="5.70,438,1574150400"; d="scan'208";a="347827816" Received: from han1-xps-13-9350.jf.intel.com ([10.54.74.61]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2020 15:04:42 -0800 Message-ID: Subject: Re: [RFC v3] Bluetooth: Add debugfs option to enable runtime debug statements From: Tedd Ho-Jeong An To: Marcel Holtmann , Bluez mailing list Date: Thu, 13 Feb 2020 15:03:31 -0800 In-Reply-To: References: <20200203153603.61931-1-marcel@holtmann.org> Organization: Intel Corporation Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, On Thu, 2020-02-13 at 08:27 +0100, Marcel Holtmann wrote: > Hi, > > > Signed-off-by: Marcel Holtmann > > --- > > include/net/bluetooth/bluetooth.h | 10 +++++ > > net/bluetooth/Kconfig | 7 +++ > > net/bluetooth/af_bluetooth.c | 2 + > > net/bluetooth/lib.c | 73 +++++++++++++++++++++++++++++++ > > 4 files changed, 92 insertions(+) > > does anybody have any comments on this. It is not the final solution, but as > an interim it might be a good start. > I did quick test and it worked fine. Below is the testing output. Let me know if need further testing.. root@tester-VirtualBox:/sys/kernel/debug/bluetooth# dmesg -c root@tester-VirtualBox:/sys/kernel/debug/bluetooth# cat debug_enable N root@tester-VirtualBox:/sys/kernel/debug/bluetooth# echo 'Y' > debug_enable root@tester-VirtualBox:/sys/kernel/debug/bluetooth# hciconfig -a hci0: Type: Primary Bus: USB BD Address: 9C:DA:3E:F2:8E:46 ACL MTU: 1021:4 SCO MTU: 96:6 UP RUNNING RX bytes:1367 acl:0 sco:0 events:68 errors:0 TX bytes:3729 acl:0 sco:0 commands:68 errors:0 Features: 0xbf 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'tester-VirtualBox' Class: 0x0c0000 Service Classes: Rendering, Capturing Device Class: Miscellaneous, HCI Version: 5.0 (0x9) Revision: 0x100 LMP Version: 5.0 (0x9) Subversion: 0x100 Manufacturer: Intel Corp. (2) root@tester-VirtualBox:/sys/kernel/debug/bluetooth# dmesg [ 891.432216] Bluetooth: sock 00000000ec80bfe5 [ 891.432448] Bluetooth: cmd 800448d2 arg 565442b6c260 [ 891.432465] Bluetooth: channel 2 len 36 [ 891.432480] Bluetooth: cmd 800448d3 arg 565441d4b860 [ 891.432485] Bluetooth: 0 [ 891.432489] Bluetooth: hci0 orig refcnt 5 [ 891.432493] Bluetooth: hci0 orig refcnt 6 [ 891.434491] Bluetooth: sock 00000000a8d1e746 [ 891.434511] Bluetooth: sock 00000000a8d1e746 sk 00000000ea127ff9 [ 891.434514] Bluetooth: 0 [ 891.434517] Bluetooth: hci0 orig refcnt 5 [ 891.434527] Bluetooth: channel 2 len 36 [ 891.434538] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.434546] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.434558] Bluetooth: sock 00000000a8d1e746 sk 00000000ea127ff9 [ 891.434577] Bluetooth: hci0 cmd_cnt 1 cmd queued 1 [ 891.434584] Bluetooth: hci0 type 1 len 3 [ 891.434588] Bluetooth: hdev 00000000124fe225 len 3 [ 891.434593] Bluetooth: hci0 [ 891.532680] Bluetooth: intf 00000000ed2b072f [ 891.532682] Bluetooth: intf 00000000600468f3 [ 891.532683] Bluetooth: hci0 [ 891.532696] Bluetooth: hci0 [ 891.532702] Bluetooth: hci0 [ 891.533095] Bluetooth: hci0 urb 0000000015f7b113 status 0 count 3 [ 891.534575] Bluetooth: hci0 urb 00000000f939b99d status 0 count 64 [ 891.535214] Bluetooth: hci0 urb 00000000f939b99d status 0 count 64 [ 891.535885] Bluetooth: hci0 urb 00000000f939b99d status 0 count 64 [ 891.536831] Bluetooth: hci0 urb 00000000f939b99d status 0 count 62 [ 891.536852] Bluetooth: hci0 [ 891.536854] Bluetooth: hdev 00000000124fe225 len 254 [ 891.536860] Bluetooth: hci0 Event packet [ 891.536862] Bluetooth: hci0 status 0x00 [ 891.536864] Bluetooth: opcode 0x0c14 status 0x00 [ 891.536865] Bluetooth: hci0 opcode 0x0c14 [ 891.536880] Bluetooth: sock 00000000a8d1e746, sk 00000000ea127ff9 [ 891.536885] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.536905] Bluetooth: sock 00000000a8d1e746 sk 00000000ea127ff9 [ 891.536907] Bluetooth: channel 2 len 10 [ 891.536909] Bluetooth: hci0 orig refcnt 6 [ 891.536921] Bluetooth: sock 000000004b3ad07d [ 891.536927] Bluetooth: sock 000000004b3ad07d sk 00000000ea127ff9 [ 891.536928] Bluetooth: 0 [ 891.536929] Bluetooth: hci0 orig refcnt 5 [ 891.536932] Bluetooth: channel 2 len 36 [ 891.536935] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.536937] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.536941] Bluetooth: sock 000000004b3ad07d sk 00000000ea127ff9 [ 891.536946] Bluetooth: hci0 cmd_cnt 1 cmd queued 1 [ 891.536948] Bluetooth: hci0 type 1 len 3 [ 891.536949] Bluetooth: hdev 00000000124fe225 len 3 [ 891.536950] Bluetooth: hci0 [ 891.537315] Bluetooth: hci0 urb 00000000bf489ae9 status 0 count 3 [ 891.537789] Bluetooth: hci0 urb 00000000f939b99d status 0 count 9 [ 891.537807] Bluetooth: hci0 [ 891.537808] Bluetooth: hdev 00000000124fe225 len 9 [ 891.537812] Bluetooth: hci0 Event packet [ 891.537813] Bluetooth: hci0 status 0x00 [ 891.537814] Bluetooth: hci0 class 0x0c0000 [ 891.537816] Bluetooth: opcode 0x0c23 status 0x00 [ 891.537817] Bluetooth: hci0 opcode 0x0c23 [ 891.537827] Bluetooth: sock 000000004b3ad07d, sk 00000000ea127ff9 [ 891.537832] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.537853] Bluetooth: sock 000000004b3ad07d sk 00000000ea127ff9 [ 891.537855] Bluetooth: channel 2 len 10 [ 891.537856] Bluetooth: hci0 orig refcnt 6 [ 891.537865] Bluetooth: sock 00000000847c4083 [ 891.537870] Bluetooth: sock 00000000847c4083 sk 00000000ea127ff9 [ 891.537871] Bluetooth: 0 [ 891.537872] Bluetooth: hci0 orig refcnt 5 [ 891.537874] Bluetooth: channel 2 len 36 [ 891.537877] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.537879] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.537882] Bluetooth: sock 00000000847c4083 sk 00000000ea127ff9 [ 891.537886] Bluetooth: hci0 cmd_cnt 1 cmd queued 1 [ 891.537888] Bluetooth: hci0 type 1 len 3 [ 891.537889] Bluetooth: hdev 00000000124fe225 len 3 [ 891.537890] Bluetooth: hci0 [ 891.538149] Bluetooth: hci0 urb 00000000bf489ae9 status 0 count 3 [ 891.538822] Bluetooth: hci0 urb 00000000f939b99d status 0 count 14 [ 891.538854] Bluetooth: hci0 [ 891.538856] Bluetooth: hdev 00000000124fe225 len 14 [ 891.538862] Bluetooth: hci0 Event packet [ 891.538864] Bluetooth: hci0 status 0x00 [ 891.538866] Bluetooth: opcode 0x1001 status 0x00 [ 891.538868] Bluetooth: hci0 opcode 0x1001 [ 891.538883] Bluetooth: sock 00000000847c4083, sk 00000000ea127ff9 [ 891.538889] Bluetooth: sk 00000000ea127ff9, opt 2 [ 891.538924] Bluetooth: sock 00000000847c4083 sk 00000000ea127ff9 [ 891.538927] Bluetooth: channel 2 len 10 [ 891.538930] Bluetooth: hci0 orig refcnt 6 [ 891.539051] Bluetooth: sock 00000000ec80bfe5 sk 0000000035240669 [ 891.539053] Bluetooth: channel 2 len 10 [ 893.959807] Bluetooth: intf 00000000600468f3 [ 893.961620] Bluetooth: hci0 urb 00000000f939b99d status -2 count 0 [ 893.963498] Bluetooth: hci0 urb 00000000abc1f0d6 status -2 count 0 [ 893.964657] Bluetooth: hci0 urb 000000002a96d38f status -2 count 0 [ 893.964993] Bluetooth: intf 00000000ed2b072f root@tester-VirtualBox:/sys/kernel/debug/bluetooth# dmesg -c > /dev/null 2>&1 root@tester-VirtualBox:/sys/kernel/debug/bluetooth# echo 'N' > debug_enable root@tester-VirtualBox:/sys/kernel/debug/bluetooth# hciconfig -a hci0: Type: Primary Bus: USB BD Address: 9C:DA:3E:F2:8E:46 ACL MTU: 1021:4 SCO MTU: 96:6 UP RUNNING RX bytes:1644 acl:0 sco:0 events:71 errors:0 TX bytes:3738 acl:0 sco:0 commands:71 errors:0 Features: 0xbf 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'tester-VirtualBox' Class: 0x0c0000 Service Classes: Rendering, Capturing Device Class: Miscellaneous, HCI Version: 5.0 (0x9) Revision: 0x100 LMP Version: 5.0 (0x9) Subversion: 0x100 Manufacturer: Intel Corp. (2) root@tester-VirtualBox:/sys/kernel/debug/bluetooth# dmesg root@tester-VirtualBox:/sys/kernel/debug/bluetooth# > I have not seen any kbuild issues popping up. However I like to get some > Tested-By, Reviewed-By lines added to the patch and I can send a patch version > with proper commit message if there is interest in getting this upstream. > > Regards > > Marcel >