linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: serial: option: add HP LT4220 support
@ 2018-04-11  6:36 Edward Chang
  2018-04-11  6:56 ` Johan Hovold
  0 siblings, 1 reply; 4+ messages in thread
From: Edward Chang @ 2018-04-11  6:36 UTC (permalink / raw)
  To: johan, gregkh, linux-usb, linux-kernel; +Cc: Edward Chang

This patch adds support for HP LT4220

Signed-off-by: Edward Chang <edward.chang.mcs@gmail.com>
---
 drivers/usb/serial/option.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index c3f2522..d866cc0 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1927,6 +1927,8 @@ static int  option_probe(struct usb_serial *serial,
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
+	{ USB_DEVICE_INTERFACE_CLASS(0x03f0, 0x0857, 0xff), /* HP lt4220 */
+	  .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
-- 
1.9.1

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

* Re: [PATCH] usb: serial: option: add HP LT4220 support
  2018-04-11  6:36 [PATCH] usb: serial: option: add HP LT4220 support Edward Chang
@ 2018-04-11  6:56 ` Johan Hovold
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2018-04-11  6:56 UTC (permalink / raw)
  To: Edward Chang; +Cc: johan, gregkh, linux-usb, linux-kernel

On Wed, Apr 11, 2018 at 02:36:52PM +0800, Edward Chang wrote:
> This patch adds support for HP LT4220
> 
> Signed-off-by: Edward Chang <edward.chang.mcs@gmail.com>
> ---

Thanks for the update. Please always include a changelog here when
revising patches so we know what has changed since the previous
version(s). Also include the patch version in the subject line (e.g.
"[PATCH v2] USB: ...").

>  drivers/usb/serial/option.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index c3f2522..d866cc0 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -1927,6 +1927,8 @@ static int  option_probe(struct usb_serial *serial,
>  	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
> +	{ USB_DEVICE_INTERFACE_CLASS(0x03f0, 0x0857, 0xff), /* HP lt4220 */
> +	  .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },

So you dropped the id defines, but this still would not compile due to
the updated blacklist mechanism I mentioned. Take a look at the commit I
referred to for examples of how to specify the blacklist masks.

Thanks,
Johan

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

* Re: [PATCH] usb: serial: option: add HP LT4220 support
  2018-04-03  2:34 Edward Chang
@ 2018-04-10  9:04 ` Johan Hovold
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2018-04-10  9:04 UTC (permalink / raw)
  To: Edward Chang; +Cc: johan, gregkh, linux-usb, linux-kernel

On Tue, Apr 03, 2018 at 10:34:39AM +0800, Edward Chang wrote:
> This patch adds support for HP LT4220. 
> 
> Signed-off-by: Edward Chang <edward.chang.mcs@gmail.com>

> +/* HP products */
> +#define HP_VENDOR_ID				0x03f0
> +#define HP_PRODUCT_LT4220			0x0857
> +
>  struct option_blacklist_info {
>  	/* bitmask of interface numbers blacklisted for send_setup */
>  	const unsigned long sendsetup;
> @@ -2066,6 +2070,8 @@ struct option_blacklist_info {
>  	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
> +	{ USB_DEVICE_INTERFACE_CLASS(HP_VENDOR_ID, HP_PRODUCT_LT4220, USB_CLASS_VENDOR_SPEC),
> +	  .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },

The option blacklisting-implementation has recently been updated, so
this patch would no longer apply. Could you please respin this on top of
Linus's tree or my usb-next branch:

	https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/log/?h=usb-next

which have the following commit

	c3a65808f04a ("USB: serial: option: reimplement interface masking")

Also, I'm trying to move away from adding redundant id-defines, so
please use the numerical values directly in the table and add a short
comment after the entry with the product name instead.

Thanks,
Johan

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

* [PATCH] usb: serial: option: add HP LT4220 support
@ 2018-04-03  2:34 Edward Chang
  2018-04-10  9:04 ` Johan Hovold
  0 siblings, 1 reply; 4+ messages in thread
From: Edward Chang @ 2018-04-03  2:34 UTC (permalink / raw)
  To: johan, gregkh, linux-usb, linux-kernel; +Cc: Edward Chang

This patch adds support for HP LT4220. 

Signed-off-by: Edward Chang <edward.chang.mcs@gmail.com>

---
 drivers/usb/serial/option.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 2d8d915..a8988d5 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -548,6 +548,10 @@ static int  option_probe(struct usb_serial *serial,
 #define WETELECOM_PRODUCT_6802			0x6802
 #define WETELECOM_PRODUCT_WMD300		0x6803
 
+/* HP products */
+#define HP_VENDOR_ID				0x03f0
+#define HP_PRODUCT_LT4220			0x0857
+
 struct option_blacklist_info {
 	/* bitmask of interface numbers blacklisted for send_setup */
 	const unsigned long sendsetup;
@@ -2066,6 +2070,8 @@ struct option_blacklist_info {
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
+	{ USB_DEVICE_INTERFACE_CLASS(HP_VENDOR_ID, HP_PRODUCT_LT4220, USB_CLASS_VENDOR_SPEC),
+	  .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
-- 
1.9.1

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

end of thread, other threads:[~2018-04-11  6:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-11  6:36 [PATCH] usb: serial: option: add HP LT4220 support Edward Chang
2018-04-11  6:56 ` Johan Hovold
  -- strict thread matches above, loose matches on Subject: below --
2018-04-03  2:34 Edward Chang
2018-04-10  9:04 ` Johan Hovold

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).