Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2018 15:06:19 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r333982 - head/sys/dev/usb/template
Message-ID:  <201805211506.w4LF6JeQ023224@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Mon May 21 15:06:19 2018
New Revision: 333982
URL: https://svnweb.freebsd.org/changeset/base/333982

Log:
  Use USB Vendor Identifiers and Product Identifiers provided by V-USB
  (https://github.com/obdev/v-usb/blob/master/usbdrv/USB-IDs-for-free.txt).
  Previously we were using an invalid (not assigned to us) VID.
  
  Reviewed by:	hselasky@
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/usb/template/usb_template.h
  head/sys/dev/usb/template/usb_template_audio.c
  head/sys/dev/usb/template/usb_template_cdce.c
  head/sys/dev/usb/template/usb_template_kbd.c
  head/sys/dev/usb/template/usb_template_midi.c
  head/sys/dev/usb/template/usb_template_modem.c
  head/sys/dev/usb/template/usb_template_mouse.c
  head/sys/dev/usb/template/usb_template_msc.c
  head/sys/dev/usb/template/usb_template_mtp.c
  head/sys/dev/usb/template/usb_template_multi.c
  head/sys/dev/usb/template/usb_template_phone.c
  head/sys/dev/usb/template/usb_template_serialnet.c

Modified: head/sys/dev/usb/template/usb_template.h
==============================================================================
--- head/sys/dev/usb/template/usb_template.h	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template.h	Mon May 21 15:06:19 2018	(r333982)
@@ -33,7 +33,12 @@
 #define	_USB_TEMPLATE_H_
 
 #ifndef USB_TEMPLATE_VENDOR
-#define	USB_TEMPLATE_VENDOR	0x0001
+/*
+ * https://github.com/obdev/v-usb/blob/master/usbdrv/USB-IDs-for-free.txt
+ */
+#define	USB_TEMPLATE_VENDOR		0x16c0
+#define	USB_TEMPLATE_MANUFACTURER	\
+	"The FreeBSD Project (https://www.FreeBSD.org)"
 #endif
 
 typedef const void *(usb_temp_get_string_desc_t)(uint16_t lang_id, uint8_t string_index);

Modified: head/sys/dev/usb/template/usb_template_audio.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_audio.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_audio.c	Mon May 21 15:06:19 2018	(r333982)
@@ -79,11 +79,11 @@ enum {
 };
 
 #define	AUDIO_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	AUDIO_DEFAULT_PRODUCT_ID	0x000A
+#define	AUDIO_DEFAULT_PRODUCT_ID	0x05dc
 #define	AUDIO_DEFAULT_MIXER		"Mixer interface"
 #define	AUDIO_DEFAULT_RECORD		"Record interface"
 #define	AUDIO_DEFAULT_PLAYBACK		"Playback interface"
-#define	AUDIO_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	AUDIO_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	AUDIO_DEFAULT_PRODUCT		"Audio Test Device"
 #define	AUDIO_DEFAULT_SERIAL_NUMBER	"March 2008"
 

Modified: head/sys/dev/usb/template/usb_template_cdce.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_cdce.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_cdce.c	Mon May 21 15:06:19 2018	(r333982)
@@ -80,12 +80,12 @@ enum {
 };
 
 #define	ETH_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	ETH_DEFAULT_PRODUCT_ID		0x0001
+#define	ETH_DEFAULT_PRODUCT_ID		0x05dc
 #define	ETH_DEFAULT_MAC			"2A02030405060789AB"
 #define	ETH_DEFAULT_CONTROL		"USB Ethernet Comm Interface"
 #define	ETH_DEFAULT_DATA		"USB Ethernet Data Interface"
 #define	ETH_DEFAULT_CONFIG		"Default Config"
-#define	ETH_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	ETH_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	ETH_DEFAULT_PRODUCT		"USB Ethernet Adapter"
 #define	ETH_DEFAULT_SERIAL_NUMBER	"December 2007"
 

Modified: head/sys/dev/usb/template/usb_template_kbd.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_kbd.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_kbd.c	Mon May 21 15:06:19 2018	(r333982)
@@ -77,9 +77,9 @@ enum {
 };
 
 #define	KBD_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	KBD_DEFAULT_PRODUCT_ID		0x00CB
+#define	KBD_DEFAULT_PRODUCT_ID		0x27db
 #define	KBD_DEFAULT_INTERFACE		"Keyboard Interface"
-#define	KBD_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	KBD_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	KBD_DEFAULT_PRODUCT		"Keyboard Test Device"
 #define	KBD_DEFAULT_SERIAL_NUMBER	"March 2008"
 

Modified: head/sys/dev/usb/template/usb_template_midi.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_midi.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_midi.c	Mon May 21 15:06:19 2018	(r333982)
@@ -76,9 +76,9 @@ enum {
 };
 
 #define	MIDI_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	MIDI_DEFAULT_PRODUCT_ID		0x00BB
+#define	MIDI_DEFAULT_PRODUCT_ID		0x27de
 #define	MIDI_DEFAULT_INTERFACE		"MIDI interface"
-#define	MIDI_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	MIDI_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	MIDI_DEFAULT_PRODUCT		"MIDI Test Device"
 #define	MIDI_DEFAULT_SERIAL_NUMBER	"March 2008"
 

Modified: head/sys/dev/usb/template/usb_template_modem.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_modem.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_modem.c	Mon May 21 15:06:19 2018	(r333982)
@@ -77,9 +77,9 @@ enum {
 };
 
 #define	MODEM_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	MODEM_DEFAULT_PRODUCT_ID	0x000E
+#define	MODEM_DEFAULT_PRODUCT_ID	0x27dd
 #define	MODEM_DEFAULT_INTERFACE		"Modem interface"
-#define	MODEM_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	MODEM_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	MODEM_DEFAULT_PRODUCT		"Modem Test Device"
 #define	MODEM_DEFAULT_SERIAL_NUMBER	"March 2008"
 

Modified: head/sys/dev/usb/template/usb_template_mouse.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_mouse.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_mouse.c	Mon May 21 15:06:19 2018	(r333982)
@@ -77,9 +77,9 @@ enum {
 };
 
 #define	MOUSE_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	MOUSE_DEFAULT_PRODUCT_ID	0x00AE
+#define	MOUSE_DEFAULT_PRODUCT_ID	0x27da
 #define	MOUSE_DEFAULT_INTERFACE		"Mouse interface"
-#define	MOUSE_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	MOUSE_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	MOUSE_DEFAULT_PRODUCT		"Mouse Test Interface"
 #define	MOUSE_DEFAULT_SERIAL_NUMBER	"March 2008"
 

Modified: head/sys/dev/usb/template/usb_template_msc.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_msc.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_msc.c	Mon May 21 15:06:19 2018	(r333982)
@@ -77,10 +77,10 @@ enum {
 };
 
 #define	MSC_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	MSC_DEFAULT_PRODUCT_ID		0x0012
+#define	MSC_DEFAULT_PRODUCT_ID		0x05dc
 #define	MSC_DEFAULT_INTERFACE		"USB Mass Storage Interface"
 #define	MSC_DEFAULT_CONFIGURATION	"Default Config"
-#define	MSC_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	MSC_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	MSC_DEFAULT_PRODUCT		"USB Memory Stick"
 #define	MSC_DEFAULT_SERIAL_NUMBER	"March 2008"
 

Modified: head/sys/dev/usb/template/usb_template_mtp.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_mtp.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_mtp.c	Mon May 21 15:06:19 2018	(r333982)
@@ -86,10 +86,10 @@ enum {
 };
 
 #define	MTP_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	MTP_DEFAULT_PRODUCT_ID		0x0011
+#define	MTP_DEFAULT_PRODUCT_ID		0x05dc
 #define	MTP_DEFAULT_INTERFACE		"USB MTP Interface"
 #define	MTP_DEFAULT_CONFIGURATION	"Default Config"
-#define	MTP_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	MTP_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	MTP_DEFAULT_PRODUCT		"USB MTP"
 #define	MTP_DEFAULT_SERIAL_NUMBER	"June 2008"
 

Modified: head/sys/dev/usb/template/usb_template_multi.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_multi.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_multi.c	Mon May 21 15:06:19 2018	(r333982)
@@ -90,14 +90,14 @@ enum {
 };
 
 #define	MULTI_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	MULTI_DEFAULT_PRODUCT_ID	0x0001
+#define	MULTI_DEFAULT_PRODUCT_ID	0x05dc
 #define	MULTI_DEFAULT_MODEM		"Virtual serial console"
 #define	MULTI_DEFAULT_ETH_MAC		"2A02030405060789AB"
 #define	MULTI_DEFAULT_ETH_CONTROL	"Ethernet Comm Interface"
 #define	MULTI_DEFAULT_ETH_DATA		"Ethernet Data Interface"
 #define	MULTI_DEFAULT_STORAGE		"Mass Storage Interface"
 #define	MULTI_DEFAULT_CONFIGURATION	"Default configuration"
-#define	MULTI_DEFAULT_MANUFACTURER	"The FreeBSD Project"
+#define	MULTI_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	MULTI_DEFAULT_PRODUCT		"Multifunction Device"
 #define	MULTI_DEFAULT_SERIAL_NUMBER	"May 2018"
 

Modified: head/sys/dev/usb/template/usb_template_phone.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_phone.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_phone.c	Mon May 21 15:06:19 2018	(r333982)
@@ -80,12 +80,12 @@ enum {
 };
 
 #define	PHONE_DEFAULT_VENDOR_ID		USB_TEMPLATE_VENDOR
-#define	PHONE_DEFAULT_PRODUCT_ID	0xb001
+#define	PHONE_DEFAULT_PRODUCT_ID	0x05dc
 #define	PHONE_DEFAULT_MIXER		"Mixer interface"
 #define	PHONE_DEFAULT_RECORD		"Record interface"
 #define	PHONE_DEFAULT_PLAYBACK		"Playback interface"
 #define	PHONE_DEFAULT_HID		"HID interface"
-#define	PHONE_DEFAULT_MANUFACTURER	"FreeBSD foundation"
+#define	PHONE_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	PHONE_DEFAULT_PRODUCT		"USB Phone Device"
 #define	PHONE_DEFAULT_SERIAL_NUMBER	"March 2008"
 

Modified: head/sys/dev/usb/template/usb_template_serialnet.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_serialnet.c	Mon May 21 14:53:22 2018	(r333981)
+++ head/sys/dev/usb/template/usb_template_serialnet.c	Mon May 21 15:06:19 2018	(r333982)
@@ -89,13 +89,13 @@ enum {
 };
 
 #define	SERIALNET_DEFAULT_VENDOR_ID	USB_TEMPLATE_VENDOR
-#define	SERIALNET_DEFAULT_PRODUCT_ID	0x0001
+#define	SERIALNET_DEFAULT_PRODUCT_ID	0x05dc
 #define	SERIALNET_DEFAULT_MODEM		"USB Modem Interface"
 #define	SERIALNET_DEFAULT_ETH_MAC	"2A02030405060789AB"
 #define	SERIALNET_DEFAULT_ETH_CONTROL	"USB Ethernet Comm Interface"
 #define	SERIALNET_DEFAULT_ETH_DATA	"USB Ethernet Data Interface"
 #define	SERIALNET_DEFAULT_CONFIGURATION	"Default configuration"
-#define	SERIALNET_DEFAULT_MANUFACTURER	"The FreeBSD Project"
+#define	SERIALNET_DEFAULT_MANUFACTURER	USB_TEMPLATE_MANUFACTURER
 #define	SERIALNET_DEFAULT_PRODUCT	"SERIALNET"
 #define	SERIALNET_DEFAULT_SERIAL_NUMBER	"January 2015"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805211506.w4LF6JeQ023224>