linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Henrik Rydberg" <rydberg@euromail.se>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-input@vger.kernel.org
Subject: Re: [RFC/RFT] Reset bcm5974 into wellspring mode when it forgets
Date: Tue, 19 Mar 2013 23:20:59 +0100	[thread overview]
Message-ID: <20130319222059.GA8007@polaris.bitmath.org> (raw)
In-Reply-To: <1363531802.26810.13.camel@shinybook.infradead.org>

Hi David,

> 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.

The driver always had suspend/resume, but it is true that the EFI
booting did create a problem with the reset_resume method, so we went
back to rebinding the device. In addition to that problem, there has
been reports in the past that seem to indicate a few exemplars of
faulty hardware.

> 
> > > +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()?

I was thinking about the work function entering the wellspring_mode
function without the pm lock, but your observation seems correct, too :-)

> > 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 :)

But it would be good to know why your machine is special. As you say,
the patch is not really tested, so we don't even know if it will fix
the problem.

> >  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.

Ok, if you manage to hit the problem with a second version of this
patch, I will take it.

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2013-03-19 22:16 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
2013-03-19 22:20     ` Henrik Rydberg [this message]

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=20130319222059.GA8007@polaris.bitmath.org \
    --to=rydberg@euromail.se \
    --cc=dwmw2@infradead.org \
    --cc=linux-input@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).