From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Alexey Sokolov <sokolov@7pikes.com>
Subject: [PATCH 4.1 11/11] cdc-acm: Add support of ATOL FPrint fiscal printers
Date: Fri, 26 Jun 2015 18:09:14 -0700 [thread overview]
Message-ID: <20150627010900.173332378@linuxfoundation.org> (raw)
In-Reply-To: <20150627010859.834155797@linuxfoundation.org>
4.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Sokolov <sokolov@7pikes.com>
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>
---
drivers/usb/class/cdc-acm.c | 9 +++++++++
drivers/usb/class/cdc-acm.h | 1 +
2 files changed, 10 insertions(+)
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1477,6 +1477,11 @@ skip_countries:
goto alloc_fail8;
}
+ if (quirks & CLEAR_HALT_CONDITIONS) {
+ usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress));
+ usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress));
+ }
+
return 0;
alloc_fail8:
if (acm->country_codes) {
@@ -1756,6 +1761,10 @@ static const struct usb_device_id acm_id
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},
+ { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */
+ .driver_info = CLEAR_HALT_CONDITIONS,
+ },
+
/* Nokia S60 phones expose two ACM channels. The first is
* a modem and is picked up by the standard AT-command
* information below. The second is 'vendor-specific' but
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -133,3 +133,4 @@ struct acm {
#define NO_DATA_INTERFACE BIT(4)
#define IGNORE_DEVICE BIT(5)
#define QUIRK_CONTROL_LINE_STATE BIT(6)
+#define CLEAR_HALT_CONDITIONS BIT(7)
next prev parent reply other threads:[~2015-06-27 1:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-27 1:09 [PATCH 4.1 00/11] 4.1.1-stable review Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 01/11] x86/boot: Fix overflow warning with 32-bit binutils Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 02/11] perf: Fix ring_buffer_attach() RCU sync, again Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 03/11] perf/x86: Add more Broadwell model numbers Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 04/11] perf/x86/intel/bts: Fix DS area sharing with x86_pmu events Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 05/11] perf/x86: Honor the architectural performance monitoring version Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 06/11] perf tools: Fix build breakage if prefix= is specified Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 07/11] Bluetooth: ath3k: Add support of 04ca:300d AR3012 device Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 08/11] ath3k: Add support of 0489:e076 " Greg Kroah-Hartman
2015-06-27 1:09 ` [PATCH 4.1 09/11] ath3k: add support of 13d3:3474 " Greg Kroah-Hartman
2015-06-27 1:09 ` Greg Kroah-Hartman [this message]
2015-06-27 3:13 ` [PATCH 4.1 00/11] 4.1.1-stable review Shuah Khan
2015-06-27 15:37 ` Greg Kroah-Hartman
2015-06-27 6:07 ` Guenter Roeck
2015-06-27 15:38 ` Greg Kroah-Hartman
2015-06-27 8:18 ` Sudip Mukherjee
2015-06-27 15:38 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150627010900.173332378@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sokolov@7pikes.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).