Hello,

I want to trace what happens when a file is copied to
a usb storage device. The linux "cp" command will
perform an open on
the path given and obtain the inode which is used to
access the usb device. Can somebody tell me what
driver is used that has the write function or an ioctl
call to the driver?
Is it in usb_storage? I'm assuming that there is a
write function in the driver module.

Basically I want to understand what happens when a
write is made to a usb device and the drivers
involved. If someone could point me to a document with
this info that would be great.

Thanks,
Garyc

--- [EMAIL PROTECTED]
wrote:

> Send linux-usb-devel mailing list submissions to
>       linux-usb-devel@lists.sourceforge.net
> 
> 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: More USB stack hangs after sporadic
> disconnect (Greg KH)
>    2. usb: make bias writeable in libusual (Pete
> Zaitcev)
>    3. Re: [QUESTION] HCD's suspend implementation
> (Franck)
>    4. New Breed of Stock Trader (Claudette Sheridan)
>    5. Re: Gadgetfs issues (David Brownell)
>    6. Re: [QUESTION] HCD's suspend implementation
> (Alan Stern)
>    7. Re: Gadgetfs issues (Alan Stern)
>    8. [patch 4/4] UHCI: add missing memory barriers
> (Greg Kroah-Hartman)
>    9. Re: [QUESTION] HCD's suspend implementation
> (Franck)
>   10. Re: [QUESTION] HCD's suspend implementation
> (Olav Kongas)
>   11. Re: [QUESTION] HCD's suspend implementation
> (Alan Stern)
>   12. Re: [QUESTION] HCD's suspend implementation
> (Olav Kongas)
> 
> --__--__--
> 
> Message: 1
> Date: Thu, 15 Dec 2005 22:57:14 -0800
> From: Greg KH <[EMAIL PROTECTED]>
> To: "Scott D. Davilla" <[EMAIL PROTECTED]>
> Cc: linux-usb-devel@lists.sourceforge.net
> Subject: Re: [linux-usb-devel] More USB stack hangs
> after sporadic disconnect
> 
> On Thu, Dec 15, 2005 at 01:16:24PM -0500, Scott D.
> Davilla wrote:
> >     We too are having long term problems with a
> spontaneous USB 
> > disconnect hanging khubd. The only way to fix is a
> reboot. The 
> > hardware is VIA EPIA 1GHz Nehemiah running a stock
> 2.6.14.3 kernel 
> > with latest 117 test VIA bios. It's not a specific
> USB driver problem 
> > as is occurs with various USB devices (pen drive,
> FX2, etc). All are 
> > ehci devices. It's not power, connector, cable or
> grounding related. 
> > The disconnects only happen running Linux, running
> Win2K or WinXP 
> > never sees a spontaneous disconnect. The problem
> also takes from 4 to 
> > 36 hours to occur. This is the important part of
> trying to reproduce 
> > the disconnect, you must leave the ehci device
> connected for a long 
> > time, sometimes for up to two days. System load
> does not matter. The 
> > issue is that same with all versions of kernels
> that we have tried up 
> > to the current 2.6.14.3.
> > 
> > I'm looking for help in discovering why the
> disconnect happens and 
> > possible solutions. We can do the grunt work here,
> I'm just looking 
> > for pointers from the Linux USB experts on where
> look and what to 
> > start looking for.
> > 
> > From what I gather in praying to google over the
> last six months, 
> > many VIA chipset Linux users are seeing hints of
> this problem. We 
> > have some systems that never disconnect (rare),
> some that disconnect 
> > quickly (also rare), some that take much longer
> (the rest). All the 
> > systems are have identical hardware, identical
> software.
> 
> Via usb controllers are known to have problems :(
> 
> If you insert a ehci pci card in the machine, does
> the same problem
> happen?
> 
> And, what are the kernel log messages that happen
> when the disconnect
> happens (if you enable CONFIG_USB_DEBUG, it would
> help.)
> 
> thanks,
> 
> greg k-h
> 
> 
> --__--__--
> 
> Message: 2
> Date: Fri, 16 Dec 2005 00:39:36 -0800
> From: Pete Zaitcev <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: linux-usb-devel@lists.sourceforge.net,
> [EMAIL PROTECTED]
> Organization: Red Hat, Inc.
> Subject: [linux-usb-devel] usb: make bias writeable
> in libusual
> 
> Make the bias parameter writeable. Writing the
> parameter does not trigger
> a rebind of currently attached storage devices.
> 
> Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>
> 
> ---
> 
> ---
>
linux-2.6.14-1.1740_FC5/drivers/usb/storage/libusual.c
> 2005-12-06 23:47:49.000000000 -0800
> +++ linux-2.6.14-lem/drivers/usb/storage/libusual.c
> 2005-12-15 23:47:48.000000000 -0800
> @@ -24,10 +24,9 @@ static DEFINE_SPINLOCK(usu_lock);
>  /*
>   */
>  #define USB_US_DEFAULT_BIAS  USB_US_TYPE_STOR
> +static atomic_t usu_bias =
> ATOMIC_INIT(USB_US_DEFAULT_BIAS);
>  
>  #define BIAS_NAME_SIZE  (sizeof("usb-storage"))
> -static char bias[BIAS_NAME_SIZE];
> -static int usb_usual_bias;
>  static const char *bias_names[3] = { "none",
> "usb-storage", "ub" };
>  
>  static DECLARE_MUTEX_LOCKED(usu_init_notify);
> @@ -35,7 +34,6 @@ static
> DECLARE_COMPLETION(usu_end_notify
>  static atomic_t total_threads = ATOMIC_INIT(0);
>  
>  static int usu_probe_thread(void *arg);
> -static int parse_bias(const char *bias_s);
>  
>  /*
>   * The table.
> @@ -107,7 +105,7 @@ int usb_usual_check_type(const
> struct us
>       if (id_type == caller_type)
>               return 0;
>       /* Drivers grab devices biased to them */
> -     if (id_type == USB_US_TYPE_NONE && caller_type ==
> usb_usual_bias)
> +     if (id_type == USB_US_TYPE_NONE && caller_type ==
> atomic_read(&usu_bias))
>               return 0;
>       return -ENODEV;
>  }
> @@ -124,7 +122,7 @@ static int usu_probe(struct
> usb_interfac
>  
>       type = USB_US_TYPE(id->driver_info);
>       if (type == 0)
> -             type = usb_usual_bias;
> +             type = atomic_read(&usu_bias);
>  
>       spin_lock_irqsave(&usu_lock, flags);
>       if ((stat[type].fls &
> (USU_MOD_FL_THREAD|USU_MOD_FL_PRESENT)) != 0) {
> @@ -206,9 +204,6 @@ static int __init
> usb_usual_init(void)
>  {
>       int rc;
>  
> -     bias[BIAS_NAME_SIZE-1] = 0;
> -     usb_usual_bias = parse_bias(bias);
> -
>       rc = usb_register(&usu_driver);
>       up(&usu_init_notify);
>       return rc;
> @@ -231,36 +226,42 @@ static void __exit
> usb_usual_exit(void)
>  
> 
=== 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
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to