linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: digi_acceleport: Fix broken unthrottle.
@ 2009-09-29 10:39 Johan Hovold
  2009-09-29 11:20 ` Oliver Neukum
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2009-09-29 10:39 UTC (permalink / raw)
  To: Peter Berger, Al Borchers
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Oliver Neukum

This patch fixes a regression introduced in
39892da44b21b5362eb848ca424d73a25ccc488f.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
---

Hi, 

This patch is untested as I haven't got the hardware, but seems
straight-forward to me. 

Can you verify, Oliver?

Thanks,
Johan


 drivers/usb/serial/digi_acceleport.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index ab3dd99..68e80be 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -898,16 +898,16 @@ static void digi_rx_unthrottle(struct tty_struct *tty)
 
 	spin_lock_irqsave(&priv->dp_port_lock, flags);
 
-	/* turn throttle off */
-	priv->dp_throttled = 0;
-	priv->dp_throttle_restart = 0;
-
 	/* restart read chain */
 	if (priv->dp_throttle_restart) {
 		port->read_urb->dev = port->serial->dev;
 		ret = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	}
 
+	/* turn throttle off */
+	priv->dp_throttled = 0;
+	priv->dp_throttle_restart = 0;
+
 	spin_unlock_irqrestore(&priv->dp_port_lock, flags);
 
 	if (ret)
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: digi_acceleport: Fix broken unthrottle.
  2009-09-29 10:39 [PATCH] USB: digi_acceleport: Fix broken unthrottle Johan Hovold
@ 2009-09-29 11:20 ` Oliver Neukum
  2009-09-29 11:35   ` Johan Hovold
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2009-09-29 11:20 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Peter Berger, Al Borchers, Greg Kroah-Hartman, linux-usb,
	linux-kernel

Am Dienstag, 29. September 2009 12:39:23 schrieb Johan Hovold:
> This patch is untested as I haven't got the hardware, but seems
> straight-forward to me.
>
> Can you verify, Oliver?

I would prefer to see a check in usb-serial.c::serial_unthrottle()

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: digi_acceleport: Fix broken unthrottle.
  2009-09-29 11:20 ` Oliver Neukum
@ 2009-09-29 11:35   ` Johan Hovold
  2009-09-29 12:28     ` Oliver Neukum
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2009-09-29 11:35 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Johan Hovold, Peter Berger, Al Borchers, Greg Kroah-Hartman,
	linux-usb, linux-kernel

On Tue, Sep 29, 2009 at 01:20:44PM +0200, Oliver Neukum wrote:
> Am Dienstag, 29. September 2009 12:39:23 schrieb Johan Hovold:
> > This patch is untested as I haven't got the hardware, but seems
> > straight-forward to me.
> >
> > Can you verify, Oliver?
> 
> I would prefer to see a check in usb-serial.c::serial_unthrottle()

This is completely unrelated to the unthrottle issue discussed elsewhere. :)

The digi_acceleport unthrottle code should (and used to) check
priv->dp_throttle_restart to determine whether to resubmit and then
cleared the flag. The commit mentioned mistakenly, I assume, reversed this.
Plain bug. Right?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: digi_acceleport: Fix broken unthrottle.
  2009-09-29 11:35   ` Johan Hovold
@ 2009-09-29 12:28     ` Oliver Neukum
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Neukum @ 2009-09-29 12:28 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Peter Berger, Al Borchers, Greg Kroah-Hartman, linux-usb,
	linux-kernel

Am Dienstag, 29. September 2009 13:35:18 schrieb Johan Hovold:
> On Tue, Sep 29, 2009 at 01:20:44PM +0200, Oliver Neukum wrote:
> > Am Dienstag, 29. September 2009 12:39:23 schrieb Johan Hovold:
> > > This patch is untested as I haven't got the hardware, but seems
> > > straight-forward to me.
> > >
> > > Can you verify, Oliver?
> >
> > I would prefer to see a check in usb-serial.c::serial_unthrottle()
>
> This is completely unrelated to the unthrottle issue discussed elsewhere.
> :)
>
> The digi_acceleport unthrottle code should (and used to) check
> priv->dp_throttle_restart to determine whether to resubmit and then
> cleared the flag. The commit mentioned mistakenly, I assume, reversed this.
> Plain bug. Right?

Eek. Yes, sorry. Unthrotteling as I currently made it cannot work.
Your fix is completely correct.

	Regards
		Oliver

Acked-by: Oliver Neukum <oliver@neukum.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-29 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-29 10:39 [PATCH] USB: digi_acceleport: Fix broken unthrottle Johan Hovold
2009-09-29 11:20 ` Oliver Neukum
2009-09-29 11:35   ` Johan Hovold
2009-09-29 12:28     ` Oliver Neukum

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).