linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: core: additional Device Classes to debug/usb/devices
@ 2020-06-01  9:56 Rob Gill
  2020-06-01 12:39 ` kbuild test robot
  2020-06-01 15:13 ` kbuild test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Rob Gill @ 2020-06-01  9:56 UTC (permalink / raw)
  To: linux-usb; +Cc: Rob Gill

Several newer USB Device classes are not presently reported individually at
/sys/kernel/debug/usb/devices, (reported as "unk."). This patch adds the
following classes: 0fh (Personal Healthcare devices), 10h (USB Type-C combined
Audio/Video devices) 11h (USB billboard), 12h (USB Type-C Bridge). As defined
at [https://www.usb.org/defined-class-codes]

Corresponding classes defined in include/linux/usb/ch9.h.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
---
 drivers/usb/core/devices.c   | 4 ++++
 include/uapi/linux/usb/ch9.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index 44f28a114..2ef50a1d4 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -133,6 +133,10 @@ static const struct class_info clas_info[] = {
 	{USB_CLASS_CSCID,		"scard"},
 	{USB_CLASS_CONTENT_SEC,		"c-sec"},
 	{USB_CLASS_VIDEO,		"video"},
+	{USB_CLASS_PERSONAL_HEALTHCARE,	"perhc"},
+	{USB_CLASS_AUDIO_VIDEO,		"av"},
+	{USB_CLASS_BILLBOARD,		"blbrd"},
+	{USB_CLASS_USB_TYPE_C_BRIDGE,	"bridg"}
 	{USB_CLASS_WIRELESS_CONTROLLER,	"wlcon"},
 	{USB_CLASS_MISC,		"misc"},
 	{USB_CLASS_APP_SPEC,		"app."},
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index 2b623f36a..456ab0c2b 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -326,6 +326,10 @@ struct usb_device_descriptor {
 #define USB_CLASS_CONTENT_SEC		0x0d	/* content security */
 #define USB_CLASS_VIDEO			0x0e
 #define USB_CLASS_WIRELESS_CONTROLLER	0xe0
+#define USB_CLASS_PERSONAL_HEALTHCARE	0x0f
+#define USB_CLASS_AUDIO_VIDEO		0x10
+#define USB_CLASS_BILLBOARD		0x11
+#define USB_CLASS_USB_TYPE_C_BRIDGE	0x12
 #define USB_CLASS_MISC			0xef
 #define USB_CLASS_APP_SPEC		0xfe
 #define USB_CLASS_VENDOR_SPEC		0xff
-- 
2.17.1



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

* Re: [PATCH] USB: core: additional Device Classes to debug/usb/devices
  2020-06-01  9:56 [PATCH] USB: core: additional Device Classes to debug/usb/devices Rob Gill
@ 2020-06-01 12:39 ` kbuild test robot
  2020-06-01 15:13 ` kbuild test robot
  1 sibling, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-06-01 12:39 UTC (permalink / raw)
  To: Rob Gill, linux-usb; +Cc: kbuild-all, Rob Gill

[-- Attachment #1: Type: text/plain, Size: 4021 bytes --]

Hi Rob,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on balbi-usb/testing/next peter.chen-usb/ci-for-usb-next v5.7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rob-Gill/USB-core-additional-Device-Classes-to-debug-usb-devices/20200601-175717
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/usb/core/devices.c:140:2: error: expected '}' before '{' token
140 |  {USB_CLASS_WIRELESS_CONTROLLER, "wlcon"},
|  ^
drivers/usb/core/devices.c:121:46: note: to match this '{'
121 | static const struct class_info clas_info[] = {
|                                              ^

vim +140 drivers/usb/core/devices.c

^1da177e4c3f41 Linus Torvalds        2005-04-16  120  
44526f91b887a7 Carlos Sánchez Acosta 2010-04-14  121  static const struct class_info clas_info[] = {
44526f91b887a7 Carlos Sánchez Acosta 2010-04-14  122  	/* max. 5 chars. per name string */
^1da177e4c3f41 Linus Torvalds        2005-04-16  123  	{USB_CLASS_PER_INTERFACE,	">ifc"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  124  	{USB_CLASS_AUDIO,		"audio"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  125  	{USB_CLASS_COMM,		"comm."},
^1da177e4c3f41 Linus Torvalds        2005-04-16  126  	{USB_CLASS_HID,			"HID"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  127  	{USB_CLASS_PHYSICAL,		"PID"},
bf7fbb022f0a3d Frans Pop             2009-06-26  128  	{USB_CLASS_STILL_IMAGE,		"still"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  129  	{USB_CLASS_PRINTER,		"print"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  130  	{USB_CLASS_MASS_STORAGE,	"stor."},
bf7fbb022f0a3d Frans Pop             2009-06-26  131  	{USB_CLASS_HUB,			"hub"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  132  	{USB_CLASS_CDC_DATA,		"data"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  133  	{USB_CLASS_CSCID,		"scard"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  134  	{USB_CLASS_CONTENT_SEC,		"c-sec"},
165fe97ed6107d Craig W. Nadler       2007-06-15  135  	{USB_CLASS_VIDEO,		"video"},
073bfb12268740 Rob Gill              2020-06-01  136  	{USB_CLASS_PERSONAL_HEALTHCARE,	"perhc"},
073bfb12268740 Rob Gill              2020-06-01  137  	{USB_CLASS_AUDIO_VIDEO,		"av"},
073bfb12268740 Rob Gill              2020-06-01  138  	{USB_CLASS_BILLBOARD,		"blbrd"},
073bfb12268740 Rob Gill              2020-06-01  139  	{USB_CLASS_USB_TYPE_C_BRIDGE,	"bridg"}
bf7fbb022f0a3d Frans Pop             2009-06-26 @140  	{USB_CLASS_WIRELESS_CONTROLLER,	"wlcon"},
bf7fbb022f0a3d Frans Pop             2009-06-26  141  	{USB_CLASS_MISC,		"misc"},
bf7fbb022f0a3d Frans Pop             2009-06-26  142  	{USB_CLASS_APP_SPEC,		"app."},
bf7fbb022f0a3d Frans Pop             2009-06-26  143  	{USB_CLASS_VENDOR_SPEC,		"vend."},
^1da177e4c3f41 Linus Torvalds        2005-04-16  144  	{-1,				"unk."}		/* leave as last */
^1da177e4c3f41 Linus Torvalds        2005-04-16  145  };
^1da177e4c3f41 Linus Torvalds        2005-04-16  146  

:::::: The code at line 140 was first introduced by commit
:::::: bf7fbb022f0a3da27a2bcf8d7c973c813d942384 USB: add missing class descriptions used in usb/devices file

:::::: TO: Frans Pop <elendil@planet.nl>
:::::: CC: Greg Kroah-Hartman <gregkh@suse.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 72285 bytes --]

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

* Re: [PATCH] USB: core: additional Device Classes to debug/usb/devices
  2020-06-01  9:56 [PATCH] USB: core: additional Device Classes to debug/usb/devices Rob Gill
  2020-06-01 12:39 ` kbuild test robot
@ 2020-06-01 15:13 ` kbuild test robot
  1 sibling, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-06-01 15:13 UTC (permalink / raw)
  To: Rob Gill, linux-usb; +Cc: kbuild-all, clang-built-linux, Rob Gill

[-- Attachment #1: Type: text/plain, Size: 4308 bytes --]

Hi Rob,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on balbi-usb/testing/next v5.7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rob-Gill/USB-core-additional-Device-Classes-to-debug-usb-devices/20200601-175717
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2388a096e7865c043e83ece4e26654bd3d1a20d5)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/usb/core/devices.c:140:2: error: expected '}'
{USB_CLASS_WIRELESS_CONTROLLER, "wlcon"},
^
drivers/usb/core/devices.c:121:46: note: to match this '{'
static const struct class_info clas_info[] = {
^
1 error generated.

vim +140 drivers/usb/core/devices.c

^1da177e4c3f41 Linus Torvalds        2005-04-16  120  
44526f91b887a7 Carlos Sánchez Acosta 2010-04-14  121  static const struct class_info clas_info[] = {
44526f91b887a7 Carlos Sánchez Acosta 2010-04-14  122  	/* max. 5 chars. per name string */
^1da177e4c3f41 Linus Torvalds        2005-04-16  123  	{USB_CLASS_PER_INTERFACE,	">ifc"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  124  	{USB_CLASS_AUDIO,		"audio"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  125  	{USB_CLASS_COMM,		"comm."},
^1da177e4c3f41 Linus Torvalds        2005-04-16  126  	{USB_CLASS_HID,			"HID"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  127  	{USB_CLASS_PHYSICAL,		"PID"},
bf7fbb022f0a3d Frans Pop             2009-06-26  128  	{USB_CLASS_STILL_IMAGE,		"still"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  129  	{USB_CLASS_PRINTER,		"print"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  130  	{USB_CLASS_MASS_STORAGE,	"stor."},
bf7fbb022f0a3d Frans Pop             2009-06-26  131  	{USB_CLASS_HUB,			"hub"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  132  	{USB_CLASS_CDC_DATA,		"data"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  133  	{USB_CLASS_CSCID,		"scard"},
^1da177e4c3f41 Linus Torvalds        2005-04-16  134  	{USB_CLASS_CONTENT_SEC,		"c-sec"},
165fe97ed6107d Craig W. Nadler       2007-06-15  135  	{USB_CLASS_VIDEO,		"video"},
073bfb12268740 Rob Gill              2020-06-01  136  	{USB_CLASS_PERSONAL_HEALTHCARE,	"perhc"},
073bfb12268740 Rob Gill              2020-06-01  137  	{USB_CLASS_AUDIO_VIDEO,		"av"},
073bfb12268740 Rob Gill              2020-06-01  138  	{USB_CLASS_BILLBOARD,		"blbrd"},
073bfb12268740 Rob Gill              2020-06-01  139  	{USB_CLASS_USB_TYPE_C_BRIDGE,	"bridg"}
bf7fbb022f0a3d Frans Pop             2009-06-26 @140  	{USB_CLASS_WIRELESS_CONTROLLER,	"wlcon"},
bf7fbb022f0a3d Frans Pop             2009-06-26  141  	{USB_CLASS_MISC,		"misc"},
bf7fbb022f0a3d Frans Pop             2009-06-26  142  	{USB_CLASS_APP_SPEC,		"app."},
bf7fbb022f0a3d Frans Pop             2009-06-26  143  	{USB_CLASS_VENDOR_SPEC,		"vend."},
^1da177e4c3f41 Linus Torvalds        2005-04-16  144  	{-1,				"unk."}		/* leave as last */
^1da177e4c3f41 Linus Torvalds        2005-04-16  145  };
^1da177e4c3f41 Linus Torvalds        2005-04-16  146  

:::::: The code at line 140 was first introduced by commit
:::::: bf7fbb022f0a3da27a2bcf8d7c973c813d942384 USB: add missing class descriptions used in usb/devices file

:::::: TO: Frans Pop <elendil@planet.nl>
:::::: CC: Greg Kroah-Hartman <gregkh@suse.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 73488 bytes --]

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

* Re: [PATCH] USB: core: additional Device Classes to debug/usb/devices
@ 2020-06-01 21:17 Rob Gill
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Gill @ 2020-06-01 21:17 UTC (permalink / raw)
  To: linux-usb; +Cc: Rob Gill

Several newer USB Device classes are not presently reported individually at
/sys/kernel/debug/usb/devices, (reported as "unk."). This patch adds the
following classes: 0fh (Personal Healthcare devices), 10h (USB Type-C combined
Audio/Video devices) 11h (USB billboard), 12h (USB Type-C Bridge). As defined
at [https://www.usb.org/defined-class-codes]

Corresponding classes defined in include/linux/usb/ch9.h.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
---
 drivers/usb/core/devices.c   | 4 ++++
 include/uapi/linux/usb/ch9.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index 44f28a114..2ef50a1d4 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -133,6 +133,10 @@ static const struct class_info clas_info[] = {
 	{USB_CLASS_CSCID,		"scard"},
 	{USB_CLASS_CONTENT_SEC,		"c-sec"},
 	{USB_CLASS_VIDEO,		"video"},
+	{USB_CLASS_PERSONAL_HEALTHCARE,	"perhc"},
+	{USB_CLASS_AUDIO_VIDEO,		"av"},
+	{USB_CLASS_BILLBOARD,		"blbrd"},
+	{USB_CLASS_USB_TYPE_C_BRIDGE,	"bridg"},
 	{USB_CLASS_WIRELESS_CONTROLLER,	"wlcon"},
 	{USB_CLASS_MISC,		"misc"},
 	{USB_CLASS_APP_SPEC,		"app."},
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index 2b623f36a..456ab0c2b 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -326,6 +326,10 @@ struct usb_device_descriptor {
 #define USB_CLASS_CONTENT_SEC		0x0d	/* content security */
 #define USB_CLASS_VIDEO			0x0e
 #define USB_CLASS_WIRELESS_CONTROLLER	0xe0
+#define USB_CLASS_PERSONAL_HEALTHCARE	0x0f
+#define USB_CLASS_AUDIO_VIDEO		0x10
+#define USB_CLASS_BILLBOARD		0x11
+#define USB_CLASS_USB_TYPE_C_BRIDGE	0x12
 #define USB_CLASS_MISC			0xef
 #define USB_CLASS_APP_SPEC		0xfe
 #define USB_CLASS_VENDOR_SPEC		0xff
-- 
2.17.1



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

end of thread, other threads:[~2020-06-01 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01  9:56 [PATCH] USB: core: additional Device Classes to debug/usb/devices Rob Gill
2020-06-01 12:39 ` kbuild test robot
2020-06-01 15:13 ` kbuild test robot
2020-06-01 21:17 Rob Gill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).