All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Alexey Sokolov <sokolov@7pikes.com>,
	oliver@neukum.org, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] cdc-acm: Add support of ATOL FPrint fiscal printers
Date: Tue, 02 Jun 2015 11:07:26 +0300	[thread overview]
Message-ID: <556D643E.20903@codethink.co.uk> (raw)
In-Reply-To: <20150602080526.GC6379@user-VirtualBox>

On 02/06/15 11:05, Alexey Sokolov wrote:
> 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>
> ---
>  drivers/usb/class/cdc-acm.c | 9 +++++++++
>  drivers/usb/class/cdc-acm.h | 1 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
> index 5c8f581..9d8a321 100644
> --- 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));
> +	}
> +

Given quirks looks like a bitfield, it would be better if this is

	if (quirks & CLEAR_HALT_CONDITIONS) {


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

  reply	other threads:[~2015-06-02  8:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02  8:05 [PATCH 1/1] cdc-acm: Add support of ATOL FPrint fiscal printers Alexey Sokolov
2015-06-02  8:07 ` Ben Dooks [this message]
2015-06-02  8:12 ` Oliver Neukum
2015-06-02  8:49 Alexey Sokolov

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=556D643E.20903@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=sokolov@7pikes.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.