mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: greg@kroah.com
Cc: stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 2/4] ftd_sio usb: move status check
Date: Mon, 11 May 2009 15:24:08 -0500	[thread overview]
Message-ID: <1242073450-3794-3-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1242073450-3794-2-git-send-email-jason.wessel@windriver.com>

Alan Stern commented that the private driver counts must be updated
regard less of the status return on the urb when the write call back
is executed.

This patch alters the behavior to update the private driver counts by
simply moving the status check to after the driver count update.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 drivers/usb/serial/ftdi_sio.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 0ab8474..3a1b84d 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1755,11 +1755,6 @@ static void ftdi_write_bulk_callback(struct urb *urb)
 
 	dbg("%s - port %d", __func__, port->number);
 
-	if (status) {
-		dbg("nonzero write bulk status received: %d", status);
-		return;
-	}
-
 	priv = usb_get_serial_port_data(port);
 	if (!priv) {
 		dbg("%s - bad port private data pointer - exiting", __func__);
@@ -1777,6 +1772,11 @@ static void ftdi_write_bulk_callback(struct urb *urb)
 	priv->tx_outstanding_bytes -= countback;
 	spin_unlock_irqrestore(&priv->tx_lock, flags);
 
+	if (status) {
+		dbg("nonzero write bulk status received: %d", status);
+		return;
+	}
+
 	usb_serial_port_softint(port);
 } /* ftdi_write_bulk_callback */
 
-- 
1.6.3.rc0.1.gf800


  reply	other threads:[~2009-05-11 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 20:24 [PATCH 0/4] usb_debug serial, ftdi_sio serial and sysrq Jason Wessel
2009-05-11 20:24 ` [PATCH 1/4] usb_debug, usb_generic_serial: implement multi urb write Jason Wessel
2009-05-11 20:24   ` Jason Wessel [this message]
2009-05-11 20:24     ` [PATCH 3/4] usb_debug,usb_generic_serial: implement sysrq and serial break Jason Wessel
2009-05-11 20:24       ` [PATCH 4/4] ftd_sio usb: implement sysrq handling on break Jason Wessel
2009-05-12 17:02       ` [PATCH 3/4] usb_debug,usb_generic_serial: implement sysrq and serial break Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1242073450-3794-3-git-send-email-jason.wessel@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome