From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Greg KH <greg@kroah•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
Stefani Seibold <stefani@seibold•net>
Subject: linux-next: manual merge of the usb tree with Linus' tree
Date: Thu, 24 Dec 2009 09:30:36 +1100 [thread overview]
Message-ID: <20091224093036.2ba1ecf5.sfr@canb.auug.org.au> (raw)
Hi Greg,
Today's linux-next merge of the usb tree got a conflict in
drivers/usb/serial/generic.c between commit
119eecc831a42bd090543568932e440c6831f1bb ("Fix usb_serial_probe() problem
introduced by the recent kfifo changes") from Linus' tree and commit
40b2ba0dfb62bed0f7cc6f699053d18ca4553e91 ("USB: serial: mct_usb232: add
drain on close") from the usb tree.
I fixed it up (see below) and can carry the fix for a while. The result
needs checking.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
diff --cc drivers/usb/serial/generic.c
index f1ea3a3,3eea1d8..0000000
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@@ -386,12 -386,15 +386,15 @@@ int usb_serial_generic_chars_in_buffer(
dbg("%s - port %d", __func__, port->number);
+ spin_lock_irqsave(&port->lock, flags);
if (serial->type->max_in_flight_urbs) {
- spin_lock_irqsave(&port->lock, flags);
chars = port->tx_bytes_flight;
- spin_unlock_irqrestore(&port->lock, flags);
- } else if (serial->num_bulk_out)
+ } else if (serial->num_bulk_out) {
+ /* This overcounts badly, but is good enough for drain wait. */
- chars = __kfifo_len(port->write_fifo);
+ chars = kfifo_len(&port->write_fifo);
+ chars += port->write_urb_busy * port->bulk_out_size;
+ }
+ spin_unlock_irqrestore(&port->lock, flags);
dbg("%s - returns %d", __func__, chars);
return chars;
next reply other threads:[~2009-12-23 22:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 22:30 Stephen Rothwell [this message]
2009-12-23 23:38 ` linux-next: manual merge of the usb tree with Linus' tree Greg KH
2009-12-24 0:22 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2013-01-21 4:07 Stephen Rothwell
2013-01-21 21:02 ` Greg KH
2013-01-25 20:52 ` Greg KH
2011-02-07 4:08 Stephen Rothwell
2011-02-09 2:31 ` Xu, Andiry
2011-02-09 5:42 ` Xu, Andiry
2011-02-17 18:04 ` Greg KH
2010-12-16 3:01 Stephen Rothwell
2010-12-16 3:08 ` Greg KH
2010-12-16 8:05 ` Felipe Balbi
2010-12-16 8:45 ` Felipe Balbi
2010-12-16 15:52 ` Greg KH
2010-12-16 15:55 ` Felipe Balbi
2010-12-16 17:44 ` Greg KH
2010-12-16 18:14 ` Greg KH
2010-12-16 22:33 ` Stephen Rothwell
2010-12-06 1:47 Stephen Rothwell
2010-12-07 4:43 ` Greg KH
2010-12-07 5:49 ` Felipe Balbi
[not found] <20100805132208.74bf6ab9.sfr@canb.auug.org.au>
2010-08-05 10:17 ` Jiri Kosina
2010-08-05 10:35 ` Michał Nazarewicz
2010-08-05 22:36 ` Greg KH
2009-09-23 6:38 Stephen Rothwell
2009-09-23 12:38 ` Jason Wessel
2009-09-23 12:50 ` Stephen Rothwell
2009-09-23 13:20 ` 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=20091224093036.2ba1ecf5.sfr@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=greg@kroah$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=stefani@seibold$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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