Hi,

I managed to get a system built connecting and
disconnecting selected USB storage devices in user
space. However one of the issues I did find was that
when RECONNECTING an endpoint it was also connecting
also other devices which I disconnected? The way
around this was to first cycle through those devices I
want to be connected and then cycle through those
devices which I wanted to be disconnected. I was using
Fedora 4.

Thanks,
Garyc

--- [EMAIL PROTECTED]
wrote:

> Send linux-usb-devel mailing list submissions to
>       [email protected]
> 
> To subscribe or unsubscribe via the World Wide Web,
> visit
> 
>
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
> or, via email, send a message with subject or body
> 'help' to
>       [EMAIL PROTECTED]
> 
> You can reach the person managing the list at
>       [EMAIL PROTECTED]
> 
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of linux-usb-devel digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: usblp suspend failure with 2.6.15-rc5
> (Alan Stern)
>    2. [PATCH] usblp: add suspend/resume support
> (Alan Stern)
>    3. Re: [PATCH] usblp: add suspend/resume support
> (Greg KH)
>    4. Re: Error recovery in Xen's paravirtualizing
> USB driver for Linux (Greg KH)
> 
> --__--__--
> 
> Message: 1
> Date: Fri, 9 Dec 2005 21:19:53 -0500 (EST)
> From: Alan Stern <[EMAIL PROTECTED]>
> To: Carl-Daniel Hailfinger
> <[EMAIL PROTECTED]>
> cc: USB development list
> <[email protected]>
> Subject: Re: [linux-usb-devel] usblp suspend failure
> with 2.6.15-rc5
> 
> On Sat, 10 Dec 2005, Carl-Daniel Hailfinger wrote:
> 
> > I can suspend and resume successfully using your
> latest patch. Previous
> > patch had been reversed prior to the test as you
> suggested.
> 
> Good.
> 
> > > However it's probably too late for this to go
> into 2.6.15 -- more likely 
> > > it won't appear until 2.6.16.
> > 
> > That's unfortunate. With either of your patches,
> suspend worked again for
> > me. May I ask you to try to submit your patch
> anyway, perhaps it will end
> > up in 2.6.15 (and I'd be happy).
> 
> I will submit it.  We'll see what happens.
> 
> > dmesg excerpt follows:
> > 
> > usb 1-2: new full speed USB device using uhci_hcd
> and address 2
> > drivers/usb/class/usblp.c: usblp0: USB
> Bidirectional printer dev 2 if 0 alt 0 proto 2 vid
> 0x04E8 pid 0x3242
> > usbcore: registered new driver usblp
> > drivers/usb/class/usblp.c: v0.13: USB Printer
> Device Class driver
> > PM: Preparing system for mem sleep
> > Stopping tasks:
> ==========================================|
> > [...ACPI stuff...]
> > PM: Entering mem sleep
> > Back to C!
> > PM: Finishing wakeup.
> > [...ACPI stuff...]
> > Restarting tasks...<6>usb 1-2: USB disconnect,
> address 2
> > drivers/usb/class/usblp.c: usblp0: removed
> >   done
> > usb 1-2: new full speed USB device using uhci_hcd
> and address 3
> > drivers/usb/class/usblp.c: usblp0: USB
> Bidirectional printer dev 3 if 0 alt 0 proto 2 vid
> 0x04E8 pid 0x3242
> > 
> > One question remains: Is the USB disconnect after
> resume expected and
> > if so, is there any functional difference between
> the two patches?
> 
> The USB disconnect is partially expected.  It
> depends very much on the
> details of your particular platform: what the BIOS
> does and whether power
> is provided to the USB controller during suspend. 
> On systems where the
> BIOS is sane and power is maintained, the disconnect
> won't occur.  On
> other systems (and there are plenty of them), all
> the USB connections will
> effectively be destroyed by a suspend.  When the
> system resumes it will
> appear that all the devices have disconnected and
> reconnected -- just like
> you see above.
> 
> There are some differences between the two patches,
> but they are very
> minor and shouldn't affect you.  The main difference
> is that the first
> patch changed the system's behavior with respect to
> _any_ USB driver
> without suspend/resume support, whereas the second
> patch changes only the
> usblp driver (by adding suspend/resume support). 
> The other differences
> have to do with the driver's behavior if you try to
> suspend while
> something is actually being printed, and I think
> those differences will
> show up only on a PowerPC system.
> 
> Alan Stern
> 
> 
> 
> --__--__--
> 
> Message: 2
> Date: Fri, 9 Dec 2005 21:40:50 -0500 (EST)
> From: Alan Stern <[EMAIL PROTECTED]>
> To: Greg KH <[EMAIL PROTECTED]>
> cc: Carl-Daniel Hailfinger
> <[EMAIL PROTECTED]>, 
>     USB development list
> <[email protected]>
> Subject: [linux-usb-devel] [PATCH] usblp: add
> suspend/resume support
> 
> Greg:
> 
> This patch (as619) adds support for suspend/resume
> to the usblp driver.  
> 
> Alan Stern
> 
> 
> 
> Signed-off-by: Alan Stern
> <[EMAIL PROTECTED]>
> 
> ---
> 
> In 2.6.15, any USB driver without such support will
> prevent the system
> from suspending.  So it would be nice, although it's
> certainly not
> critical, if this could be added to Linus's tree
> before 2.6.15 is
> released.
> 
> I'm afraid we may see a flurry of "USB in 2.6.15
> broke suspend" bug 
> reports...  :-(
> 
> Index: usb-2.6/drivers/usb/class/usblp.c
>
===================================================================
> --- usb-2.6.orig/drivers/usb/class/usblp.c
> +++ usb-2.6/drivers/usb/class/usblp.c
> @@ -54,6 +54,7 @@
>  #include <linux/init.h>
>  #include <linux/slab.h>
>  #include <linux/lp.h>
> +#include <linux/suspend.h>
>  #undef DEBUG
>  #include <linux/usb.h>
>  
> @@ -152,6 +153,7 @@ struct usblp {
>       unsigned char           used;                   /* True if open */
>       unsigned char           present;                /* True if not
> disconnected */
>       unsigned char           bidir;                  /* interface is
> bidirectional */
> +     unsigned char           suspended;              /* Obvious... */
>       unsigned char           *device_id_string;      /* IEEE 1284
> DEVICE ID string (ptr) */
>                                                       /* first 2 bytes are 
> (big-endian) length */
>  };
> @@ -386,7 +388,8 @@ static int usblp_open(struct
> inode *inod
>       if (usblp->bidir) {
>               usblp->readcount = 0;
>               usblp->readurb->dev = usblp->dev;
> -             if (usb_submit_urb(usblp->readurb, GFP_KERNEL) <
> 0) {
> 
=== message truncated ===



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to