Commit ce126644 authored by Julian Calaby's avatar Julian Calaby Committed by Greg Kroah-Hartman

USB: cdc_acm: Silence "It is not a modem." error for pbLua devices

The pbLua console port is known to not be a modem, so it is
unnecessary to be told this when it is plugged in.

Add NOT_A_MODEM quirk to tell the driver that we know this already
and hence not to warn us, and mark the pbLua console port.
Signed-off-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7c5d8c39
...@@ -1010,7 +1010,7 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1010,7 +1010,7 @@ static int acm_probe(struct usb_interface *intf,
case USB_CDC_CALL_MANAGEMENT_TYPE: case USB_CDC_CALL_MANAGEMENT_TYPE:
call_management_function = buffer[3]; call_management_function = buffer[3];
call_interface_num = buffer[4]; call_interface_num = buffer[4];
if ((call_management_function & 3) != 3) if ( (quirks & NOT_A_MODEM) == 0 && (call_management_function & 3) != 3)
dev_err(&intf->dev, "This device cannot do calls on its own. It is not a modem.\n"); dev_err(&intf->dev, "This device cannot do calls on its own. It is not a modem.\n");
break; break;
default: default:
...@@ -1595,7 +1595,9 @@ static struct usb_device_id acm_ids[] = { ...@@ -1595,7 +1595,9 @@ static struct usb_device_id acm_ids[] = {
/* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */ /* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */
/* Support Lego NXT using pbLua firmware */ /* Support Lego NXT using pbLua firmware */
{ USB_DEVICE(0x0694, 0xff00), }, { USB_DEVICE(0x0694, 0xff00),
.driver_info = NOT_A_MODEM,
},
/* control interfaces with various AT-command sets */ /* control interfaces with various AT-command sets */
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
......
...@@ -136,3 +136,4 @@ struct acm { ...@@ -136,3 +136,4 @@ struct acm {
#define NO_UNION_NORMAL 1 #define NO_UNION_NORMAL 1
#define SINGLE_RX_URB 2 #define SINGLE_RX_URB 2
#define NO_CAP_LINE 4 #define NO_CAP_LINE 4
#define NOT_A_MODEM 8
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment