Re: [PATCH v4 RESEND] usb: cdc-wdm: make reset work with blocking IO

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

 



On Fri, Feb 10, 2012 at 10:50:35AM -0800, Greg KH wrote:
> On Fri, Feb 10, 2012 at 07:36:15PM +0100, Bjørn Mork wrote:
> > Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> writes:
> > 
> > > On Fri, Feb 10, 2012 at 09:44:08AM +0100, Bjørn Mork wrote:
> > >> Add a flag to tell wdm_read/wdm_write that a reset is in progress,
> > >> and wake any blocking read/write before taking the mutexes.  This
> > >> allows the device to reset without waiting for blocking IO to
> > >> finish.
> > >> 
> > >> Signed-off-by: Bjørn Mork <bjorn@xxxxxxx>
> > >> Acked-by: Oliver Neukum <oneukum@xxxxxxx>
> > >> ---
> > >> Hello Greg,
> > >> 
> > >> I just received an ack in private mail from Oliver for this
> > >> patch.  Please apply to usb-next.
> > >
> > > I would, but it fails to apply:
> > >
> > > patching file drivers/usb/class/cdc-wdm.c
> > > Hunk #2 succeeded at 340 (offset -1 lines).
> > > Hunk #3 succeeded at 423 (offset -1 lines).
> > > Hunk #4 FAILED at 868.
> > > Hunk #5 succeeded at 865 (offset -14 lines).
> > > Hunk #6 succeeded at 883 with fuzz 2 (offset -14 lines).
> > > 1 out of 6 hunks FAILED -- saving rejects to file drivers/usb/class/cdc-wdm.c.rej
> > >
> > > What went wrong?
> > 
> > I suspect I have missed something important somewhere.
> > 
> > I must admit that the patch was actually against linux-next.  I just
> > assumed that any patch against this driver which was there would be in
> > your usb-next.  Big mistake.  I see now that there are some patches in
> > your usb-linus branch which are not in your usb-next branch:
> > 
> > bjorn@nemi:/usr/local/src/git/linux$ git log --oneline v3.2..usb/usb-linus -- drivers/usb/class/cdc-wdm.c
> > 15699e6 USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE
> > 655e247 USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
> > 62aaf24 USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal
> > e8537bd USB: cdc-wdm: use two mutexes to allow simultaneous read and write
> > c428b70 USB: cdc-wdm: updating desc->length must be protected by spin_lock
> > 65db430 USB: convert drivers/usb/* to use module_usb_driver()
> > 
> > bjorn@nemi:/usr/local/src/git/linux$ git log --oneline v3.2..usb/usb-next -- drivers/usb/class/cdc-wdm.c
> > fec67b4 usb: cdc-wdm: Add device-id for Huawei 3G/LTE modems
> > 820c629 USB: cdc-wdm: avoid printing odd-looking "cdc-wdm-176" names
> > 7e3054a USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE
> > 8143a89 USB: cdc-wdm: kill the now unnecessary bMaxPacketSize0 field and udev variable
> > 8457d99 USB: cdc-wdm: no need to use usb_alloc_coherent
> > cafbe85 USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
> > 19b85b3 USB: cdc-wdm: no need to fill the in request URB every time it's submitted
> > 65db430 USB: convert drivers/usb/* to use module_usb_driver()
> > 
> > 
> > The main reason this patch failed was because the 
> > "USB: cdc-wdm: use two mutexes to allow simultaneous read and write"
> > is missing.
> > 
> > I am more than happy to fix up the mess I've caused, but am afraid I'll
> > need a hint or two on how exactly...
> 
> Hm, let me merge the two together and then this patch should apply, give
> me a few hours, doing the same thing right now for the other trees I
> manage...

Yes, you are right, merging them together lets this patch then apply
cleanly, I'll queue it up now, thanks for figuring this out and letting
me know.

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