aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Sokolov <sokolov@7pikes.com>2015-06-02 04:49:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-29 15:35:29 -0400
commit81440341dbbb9655ba666c62325cceb17dec4621 (patch)
treecbd05574d483b5506f2702ef0204d025f603d554
parentd0a2a8df991b409174b5cc663791de0f95d875c5 (diff)
cdc-acm: Add support of ATOL FPrint fiscal printers
commit 15bf722e6f6c0b884521a0363204532e849deb7f upstream. ATOL FPrint fiscal printers require usb_clear_halt to be executed to work properly. Add quirk to fix the issue. Signed-off-by: Alexey Sokolov <sokolov@7pikes.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/class/cdc-acm.c9
-rw-r--r--drivers/usb/class/cdc-acm.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 5c8f58114677..a086e1d69bc7 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1477,6 +1477,11 @@ skip_countries:
1477 goto alloc_fail8; 1477 goto alloc_fail8;
1478 } 1478 }
1479 1479
1480 if (quirks & CLEAR_HALT_CONDITIONS) {
1481 usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress));
1482 usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress));
1483 }
1484
1480 return 0; 1485 return 0;
1481alloc_fail8: 1486alloc_fail8:
1482 if (acm->country_codes) { 1487 if (acm->country_codes) {
@@ -1756,6 +1761,10 @@ static const struct usb_device_id acm_ids[] = {
1756 .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ 1761 .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
1757 }, 1762 },
1758 1763
1764 { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */
1765 .driver_info = CLEAR_HALT_CONDITIONS,
1766 },
1767
1759 /* Nokia S60 phones expose two ACM channels. The first is 1768 /* Nokia S60 phones expose two ACM channels. The first is
1760 * a modem and is picked up by the standard AT-command 1769 * a modem and is picked up by the standard AT-command
1761 * information below. The second is 'vendor-specific' but 1770 * information below. The second is 'vendor-specific' but
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index ffeb3c83941f..b3b6c9db6fe5 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -133,3 +133,4 @@ struct acm {
133#define NO_DATA_INTERFACE BIT(4) 133#define NO_DATA_INTERFACE BIT(4)
134#define IGNORE_DEVICE BIT(5) 134#define IGNORE_DEVICE BIT(5)
135#define QUIRK_CONTROL_LINE_STATE BIT(6) 135#define QUIRK_CONTROL_LINE_STATE BIT(6)
136#define CLEAR_HALT_CONDITIONS BIT(7)