Re: PATCH usbip small redesign

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 25, 2013 at 06:51:17PM +0100, Daniel Danzberger wrote:
> Hi,
> 
> in the last few weeks I worked on better support of usbip for
> embedded devices running openwrt and ddwrt.
> After compiling the kernel with lockdep, I decided to rewrite the
> current locking logic and some more parts of the usbip driver:
> 
>  - Rewrote debugging code. Removed sysfs debugging flags and
> replaced it with macro code for usual debug messages and verbose
> ones.
>  - Removed sending of unlink urbs. This makes no sense in virtual
> connections ?! Unlink urbs are now given back in vhci's dequeue
> function.
>    This has the advantage that the calling usb device driver code
> does not block until it waits for never returning urbs to complete.
>    I am not very sure if this should stay this way forever ;) But at
> the moment it makes the code much more stable.
>  - Removed usual usb_hcd_giveback_urb() calls. Some urb completion
> callback routines assume to be called in interrupt context and do
> not hold their locks interrupt safe.
>    It's now done by usbip_hcd_giveback_urb. This function disables
> interrupts first.
>  - Some code cleanups.
> 
> After theses changes I can run this driver with no more kernel
> panics and deadlocks.
> 
> But anyway there are some few usb-storage devices that do not work
> correctly yet.
> As far as I debugged it yet, they stop completing after about 12
> submitted urbs on the host side with xhci or ehci. But it works with
> the dwc_otg hcd.
> After a timeout on the vhci side, the usb-storage code calls a
> command_abort function that can lead to a deadlock in the
> usb-storage code.
> A lockdep output of this attached to this mail. However, detach and
> reattach the device make it work.
> 
> I had tested these changes, with 2 x86 machines(kernel 3.2.11 and
> 3.7.2) and openwrt (kernel 3.3.8 and 3.7.2) on two embedded devices
> (ARM and MIPS).
> I have only about 4 usb devices to test with, so please check my
> changes against all your usb devices.
> 
> this patch is done by git diff
> e6577f3189d82a729b13e38f3d135f1becd6d294 from
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> tag v3.7.2

Can you break this patch up into the logical parts and send it to the
list as documented in the file, Documentation/SubmittingPatches so we
can properly review it, and possibly apply them?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux