linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Henrik Rydberg <rydberg@euromail.se>
Cc: linux-input@vger.kernel.org
Subject: Re: [RFC/RFT] Reset bcm5974 into wellspring mode when it forgets
Date: Sun, 17 Mar 2013 14:50:02 +0000	[thread overview]
Message-ID: <1363531802.26810.13.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20130316193143.GA6050@polaris.bitmath.org>

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

On Sat, 2013-03-16 at 20:31 +0100, Henrik Rydberg wrote:
> What do you mean by "fix for this on suspend/resume"? The driver
> always returns to normal mode at suspend, and sets wellspring mode at
> resume.

Yes, that's exactly what I mean. And in the early days when the driver
didn't have a resume method, users were seeing exactly this 'bad
trackpad package, length: 8' message on resume. Adding the
suspend/resume methods fixed that — and that's why I'm assuming that a
switch back into wellspring mode is going to be sufficient to fix what
I'm seeing too. Unloading and reloading the module certainly is.

> > +static void bcm5974_mode_workfn(struct work_struct *work)
> > +{
> > +	struct bcm5974 *dev = container_of(work, struct bcm5974, reset_work);
> > +
> > +	dev_info(&dev->intf->dev, "Reset into wellspring mode...\n");
> > +	bcm5974_wellspring_mode(dev, true);
> > +}
> > +
> 
> This looks racy.

Racy with what? Oh, I see... we should probably move the
cancel_work_sync() from bcm5974_disconnect() to bcm5974_pause_traffic()?

> In general, It does not really make sense for the transaction mode to
> change under our feet without anything in the usb layer knowing about
> it.

If hardware always made sense, the world would be a much better place :)

>  Maybe there is a reset state cycle which does not get handle
> properly in the driver?

I don't believe so. A USB reset would end up with the bcm5974_probe()
method being called again, and everything would work fine. The device
may have reset its mode, but the USB bus doesn't seem to notice
anything. When it happens, there are no USB messages; it just starts
spewing the 'bad trackpad package' messages.

-- 
dwmw2


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]

  reply	other threads:[~2013-03-17 14:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 14:30 [RFC/RFT] Reset bcm5974 into wellspring mode when it forgets David Woodhouse
2013-03-16 19:31 ` Henrik Rydberg
2013-03-17 14:50   ` David Woodhouse [this message]
2013-03-19 22:20     ` Henrik Rydberg

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=1363531802.26810.13.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=rydberg@euromail.se \
    /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).