linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Raymano Garibaldi" <raymano@faunos.com>
To: "Alan Stern" <stern@rowland.harvard.edu>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	"Denys Vlasenko" <vda.linux@googlemail.com>,
	"Kernel development list" <linux-kernel@vger.kernel.org>,
	"USB development list" <linux-usb-devel@lists.sourceforge.net>,
	kirk@faunos.com
Subject: Re: [linux-usb-devel] [BUG] USB_PERSIST
Date: Thu, 29 Nov 2007 21:37:28 -0700	[thread overview]
Message-ID: <1618816c0711292037w34bd383av6cf32bfbd8d45707@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0711291102290.4516-100000@iolanthe.rowland.org>

On 11/29/07, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Thu, 29 Nov 2007, Raymano Garibaldi wrote:
>
> > The feature does work as long as the device remains plugged in and
> > that is what I have said in my previous postings too. What I'm saying
> > that should work and worked under 2.6.21 and is not working currently
> > is the ability to unplug and plug back in the device while the
> > computer is suspended before resuming without losing the mount.
>
> Okay, guess I misunderstood what you wrote before.
>
> The patch below for 2.6.23 should do what you want (and more besides).
> It forces the USB Persist feature to apply to all persist-enabled
> devices, whether they were unplugged or not.
>
> There's no chance of this getting accepted into the official kernel in
> such a simple form, but at least it will allow you to do what you want.
>
> Alan Stern
>
>
> --- 2.6.23/drivers/usb/core/driver.c1   2007-11-29 10:57:36.000000000 -0500
> +++ 2.6.23/drivers/usb/core/driver.c    2007-11-29 11:01:44.000000000 -0500
> @@ -1550,6 +1550,9 @@
>                 if (!(udev->reset_resume && udev->do_remote_wakeup))
>                         return -EPERM;
>         }
> +
> +       /* Force all system resumes to be reset-resumes */
> +       udev->reset_resume = 1;
>         return usb_external_resume_device(udev);
>  }
>
>
>

Alan,

Thank you! Thank you! Thank you!

Who'd have thought such a simple patch could make someone so happy?

That did the trick. I just tried it and it works beautifully whether
the device remains plugged in during suspend or if it's unplugged and
plugged back in during suspend and before resume.

Now if this could only become the default behavior ;-)

Thanks again,
Raymano G.

      parent reply	other threads:[~2007-11-30  4:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19  4:14 [BUG] USB_PERSIST Raymano Garibaldi
2007-11-19  4:37 ` Denys Vlasenko
2007-11-19  6:18   ` Raymano Garibaldi
2007-11-21  0:04     ` Raymano Garibaldi
2007-11-25  6:39       ` Andrew Morton
2007-11-25 16:06         ` [linux-usb-devel] " Alan Stern
2007-11-26  5:17           ` Raymano Garibaldi
2007-11-26 15:16             ` Alan Stern
2007-11-26 18:43               ` Raymano Garibaldi
2007-11-26 22:17                 ` Alan Stern
2007-11-28  6:02                   ` Raymano Garibaldi
2007-11-28 22:14                     ` Alan Stern
2007-11-29 11:53                       ` Raymano Garibaldi
2007-11-29 16:08                         ` Alan Stern
2007-11-29 19:01                           ` Mark Lord
2007-11-29 19:07                             ` Alan Stern
2007-11-30  4:37                           ` Raymano Garibaldi [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=1618816c0711292037w34bd383av6cf32bfbd8d45707@mail.gmail.com \
    --to=raymano@faunos.com \
    --cc=akpm@linux-foundation.org \
    --cc=kirk@faunos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    --cc=vda.linux@googlemail.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 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).