linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jan Steinhoff <mail@jan-steinhoff.de>
Cc: Oliver Neukum <oneukum@suse.de>, Jiri Kosina <jkosina@suse.cz>,
	Alessandro Rubini <rubini@cvml.unipv.it>,
	linux-input@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: Synaptics USB device driver
Date: Wed, 4 Jan 2012 22:36:11 -0800	[thread overview]
Message-ID: <20120105063611.GB31895@core.coreip.homeip.net> (raw)
In-Reply-To: <20120105060138.704cfb16@greyhound>

On Thu, Jan 05, 2012 at 06:01:38AM +0000, Jan Steinhoff wrote:
> On Wed, 4 Jan 2012 02:05:53 -0800
> Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > On Wed, Jan 04, 2012 at 10:56:20AM +0100, Oliver Neukum wrote:
> > > Am Mittwoch, 4. Januar 2012, 10:41:03 schrieb Dmitry Torokhov:
> > > > +static int synusb_probe(struct usb_interface *intf,
> > > > +			const struct usb_device_id *id)
> > > > +{
> [...]
> > > > +	synusb->urb = usb_alloc_urb(0, GFP_KERNEL);
> > > > +	if (!synusb->urb) {
> > > > +		error = -ENOMEM;
> > > > +		goto err_free_mem;
> > > > +	}
> > > > +
> > > > +	synusb->data = usb_alloc_coherent(udev,
> > > > SYNUSB_RECV_SIZE, GFP_KERNEL,
> > > > +
> > > > &synusb->urb->transfer_dma);
> > > > +	if (!synusb->data) {
> > > > +		error = -ENOMEM;
> > > > +		goto err_free_urb;
> > > > +	}
> > > > +
> > > > +	usb_fill_int_urb(synusb->urb, udev,
> > > > +			 usb_rcvintpipe(udev,
> > > > ep->bEndpointAddress),
> > > > +			 synusb->data, SYNUSB_RECV_SIZE,
> > > > +			 synusb_irq, synusb,
> > > > +			 ep->bInterval);
> > > > +	synusb->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
> > > 
> > > According to the comment in the original driver you must submit the
> > > URB. Are you sure not doing so is save?
> > 
> > Seems to work here...
> 
> Let me comment on this issue in more detail, so you can better judge
> what is the "right" solution here.
> 
> Both ways actually work. But, at least for the cPad, the device will
> pretend it got reconnected if the int urb is not fetched (while not
> suspended, of course). This means it would disconnect if no input device
> is opened (AFAIK most X.org input drivers close the devices when one
> switches to console) and one touches the pad (actually, a slight breeze
> of air might be enough, it is very sensitive!). Another annoying side
> effect in the case of the cPad is that the background light flashes on
> every reconnect.

OK, then maybe we should have cPad start transfers immediately and let
other devices do it in open. There is no reason to do work if nobody
interested in it...

Another option is to move configuring interface to open()?

Thanks.

-- 
Dmitry

  reply	other threads:[~2012-01-05  6:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 18:40 [PATCH] input: Synaptics USB device driver Jan Steinhoff
2012-01-04  8:25 ` Oliver Neukum
2012-01-05  2:46   ` Jan Steinhoff
2012-01-04  8:55 ` Jiri Kosina
2012-01-04  9:20   ` Oliver Neukum
2012-01-04  9:41     ` Dmitry Torokhov
2012-01-04  9:56       ` Oliver Neukum
2012-01-04 10:05         ` Dmitry Torokhov
2012-01-05  6:01           ` Jan Steinhoff
2012-01-05  6:36             ` Dmitry Torokhov [this message]
2012-01-05 14:22               ` Jan Steinhoff
2012-01-10  9:43                 ` Dmitry Torokhov
2012-01-12  0:08                   ` Jan Steinhoff
2012-01-18  5:25                     ` Dmitry Torokhov
2012-01-05  5:39       ` Jan Steinhoff
2012-01-05  6:34         ` Dmitry Torokhov

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=20120105063611.GB31895@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mail@jan-steinhoff.de \
    --cc=oneukum@suse.de \
    --cc=rubini@cvml.unipv.it \
    /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).