From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg KH <gregkh@linuxfoundation.org>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Mark Ferrell <mferrell@uplogix.com>
Subject: [ 14/16] usb: serial: mos7840: Fixup mos7840_chars_in_buffer()
Date: Sun, 19 Aug 2012 20:56:13 -0700 [thread overview]
Message-ID: <20120820035459.663079685@linuxfoundation.org> (raw)
In-Reply-To: <20120820035457.653002510@linuxfoundation.org>
From: Greg KH <gregkh@linuxfoundation.org>
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Ferrell <mferrell@uplogix.com>
commit 5c263b92f828af6a8cf54041db45ceae5af8f2ab upstream.
* Use the buffer content length as opposed to the total buffer size. This can
be a real problem when using the mos7840 as a usb serial-console as all
kernel output is truncated during boot.
Signed-off-by: Mark Ferrell <mferrell@uplogix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/mos7840.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -1191,9 +1191,12 @@ static int mos7840_chars_in_buffer(struc
}
spin_lock_irqsave(&mos7840_port->pool_lock, flags);
- for (i = 0; i < NUM_URBS; ++i)
- if (mos7840_port->busy[i])
- chars += URB_TRANSFER_BUFFER_SIZE;
+ for (i = 0; i < NUM_URBS; ++i) {
+ if (mos7840_port->busy[i]) {
+ struct urb *urb = mos7840_port->write_urb_pool[i];
+ chars += urb->transfer_buffer_length;
+ }
+ }
spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
dbg("%s - returns %d", __func__, chars);
return chars;
next prev parent reply other threads:[~2012-08-20 3:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 3:55 [ 00/16] 3.0.42-stable review Greg Kroah-Hartman
2012-08-20 3:56 ` [ 01/16] s390/compat: fix mmap compat system calls Greg Kroah-Hartman
2012-08-20 3:56 ` [ 02/16] fuse: verify all ioctl retry iov elements Greg Kroah-Hartman
2012-08-20 3:56 ` [ 03/16] xen: mark local pages as FOREIGN in the m2p_override Greg Kroah-Hartman
2012-08-20 3:56 ` [ 04/16] drm/i915: correctly order the ring init sequence Greg Kroah-Hartman
2012-08-21 5:13 ` Herton Ronaldo Krzesinski
2012-08-21 6:42 ` Daniel Vetter
2012-08-21 13:11 ` Herton Ronaldo Krzesinski
2012-08-21 16:55 ` Daniel Vetter
2012-08-22 4:50 ` Herton Ronaldo Krzesinski
2012-08-22 22:44 ` Herton Ronaldo Krzesinski
2012-08-23 8:10 ` Daniel Vetter
2012-08-23 16:18 ` Herton Ronaldo Krzesinski
2012-08-20 3:56 ` [ 05/16] drm/radeon: do not reenable crtc after moving vram start address Greg Kroah-Hartman
2012-08-20 3:56 ` [ 06/16] ext4: avoid kmemcheck complaint from reading uninitialized memory Greg Kroah-Hartman
2012-08-20 3:56 ` [ 07/16] xhci: Add Etron XHCI_TRUST_TX_LENGTH quirk Greg Kroah-Hartman
2012-08-20 3:56 ` [ 08/16] xhci: Increase reset timeout for Renesas 720201 host Greg Kroah-Hartman
2012-08-20 3:56 ` [ 09/16] xhci: Switch PPT ports to EHCI on shutdown Greg Kroah-Hartman
2012-08-20 3:56 ` [ 10/16] USB: add USB_VENDOR_AND_INTERFACE_INFO() macro Greg Kroah-Hartman
2012-08-20 3:56 ` [ 11/16] USB: support the new interfaces of Huawei Data Card devices in option driver Greg Kroah-Hartman
2012-08-20 3:56 ` [ 12/16] USB: option: add ZTE K5006-Z Greg Kroah-Hartman
2012-08-20 3:56 ` [ 13/16] USB: ftdi_sio: Add VID/PID for Kondo Serial USB Greg Kroah-Hartman
2012-08-20 3:56 ` Greg Kroah-Hartman [this message]
2012-08-20 3:56 ` [ 15/16] rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb Greg Kroah-Hartman
2012-08-20 3:56 ` [ 16/16] IB/srp: Fix a race condition Greg Kroah-Hartman
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=20120820035459.663079685@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mferrell@uplogix.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.