<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/serial/generic.c, branch linux-2.6.35.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2011-03-31T18:57:38+00:00</updated>
<entry>
<title>USB: serial: handle Data Carrier Detect changes</title>
<updated>2011-03-31T18:57:38+00:00</updated>
<author>
<name>Libor Pechacek</name>
<email>lpechacek@suse.cz</email>
</author>
<published>2011-01-14T13:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee3c0087cd62cd7dd83410726c18bbec3803c8dc'/>
<id>urn:sha1:ee3c0087cd62cd7dd83410726c18bbec3803c8dc</id>
<content type='text'>
commit d14fc1a74e846d7851f24fc9519fe87dc12a1231 upstream.

Alan's commit 335f8514f200e63d689113d29cb7253a5c282967 introduced
.carrier_raised function in several drivers.  That also means
tty_port_block_til_ready can now suspend the process trying to open the serial
port when Carrier Detect is low and put it into tty_port.open_wait queue.  We
need to wake up the process when Carrier Detect goes high and trigger TTY
hangup when CD goes low.

Some of the devices do not report modem status line changes, or at least we
don't understand the status message, so for those we remove .carrier_raised
again.

Signed-off-by: Libor Pechacek &lt;lpechacek@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>USB: serial: fix stalled writes</title>
<updated>2010-08-13T20:31:01+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-08-04T13:45:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a561f2ed8e6e5c428bae18af3f48045211add08'/>
<id>urn:sha1:4a561f2ed8e6e5c428bae18af3f48045211add08</id>
<content type='text'>
commit b58af4066d240b18b43f202e07b9ec7461d90b17 upstream.

As David VomLehn points out, it was possible to receive an interrupt
before clearing the free-urb flag which could lead to the urb being
incorrectly marked as busy.

For the same reason, move tx_bytes accounting so that it will never be
negative.

Note that the free-flags set and clear operations do not need any
additional locking as they are manipulated while USB_SERIAL_WRITE_BUSY
is set.

Reported-by: David VomLehn &lt;dvomlehn@cisco.com&gt;
Tested-by: David VomLehn &lt;dvomlehn@cisco.com&gt;
Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: add special case for processing of empty read urbs</title>
<updated>2010-05-20T20:21:48+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-05-15T15:53:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56a1df46c19150db0a9b0f0c14e0b1d42e7f32d4'/>
<id>urn:sha1:56a1df46c19150db0a9b0f0c14e0b1d42e7f32d4</id>
<content type='text'>
Return immediately from generic process_read_urb if urb is empty.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: remove multi-urb write from generic driver</title>
<updated>2010-05-20T20:21:42+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-05-05T21:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c23e5fc1f7dba228558b4a46e68f7af89515b13c'/>
<id>urn:sha1:c23e5fc1f7dba228558b4a46e68f7af89515b13c</id>
<content type='text'>
Remove multi-urb write from the generic driver and simplify the
prepare_write_buffer prototype:

	int (*prepare_write_buffer)(struct usb_serial_port *port,
						void *dest, size_t size);

The default implementation simply fills dest with data from port write
fifo but drivers can override it if they need to process the outgoing
data (e.g. add headers).

Turn ftdi_sio into a generic fifo-based driver, which lowers CPU usage
significantly for small writes while retaining maximum throughput.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: reimplement generic fifo-based writes</title>
<updated>2010-05-20T20:21:42+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-05-05T21:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27c7acf22047fbe4ec4cc36b7c2610dba227697c'/>
<id>urn:sha1:27c7acf22047fbe4ec4cc36b7c2610dba227697c</id>
<content type='text'>
Reimplement fifo-based writes in the generic driver using a multiple
pre-allocated urb scheme.

In contrast to multi-urb writes, no allocations (of urbs or buffers) are
made during run-time and there is less pressure on the host stack
queues as currently only two urbs are used (implementation is generic
and can handle more than two urbs as well, though).

Initial tests using ftdi_sio show that the implementation achieves the
same (maximum) throughput at high baudrates as multi-urb writes. The CPU
usage is much lower than for multi-urb writes for small write requests
and only slightly higher for large (e.g. 2k) requests (due to extra copy
via fifo?).

Also outperforms multi-urb writes for small write requests on an
embedded arm-9 system, where multi-urb writes are CPU-bound at high
baudrates (perf reveals that a lot of time is spent in the host stack
enqueue function -- could perhaps be a bug as well).

Keeping the original write_urb, buffer and flag for now as there are
other drivers depending on them.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: generalise write buffer preparation</title>
<updated>2010-05-20T20:21:35+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-03-17T22:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eaa3bcb06aed1ac1d6d9e3edd3b5f72ea57a6ac0'/>
<id>urn:sha1:eaa3bcb06aed1ac1d6d9e3edd3b5f72ea57a6ac0</id>
<content type='text'>
Generalise write buffer preparation.

This allows for drivers to manipulate (e.g. add headers) to bulk out
data before it is sent.

This adds a new function pointer to usb_serial_driver:

int (*prepare_write_buffer)(struct usb_serial_port *port,
		void **dest, size_t size, const void *src, size_t count);

The function is generic and can be used with either kfifo-based or
multi-urb writes:

If *dest is NULL the implementation should allocate dest.
If src is NULL the implementation should use the port write fifo.

If not set, a generic implementation is used which simply uses memcpy or
kfifo_out.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: re-implement multi-urb writes in generic driver</title>
<updated>2010-05-20T20:21:35+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-03-17T22:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25d514ca227e1ac81d0906a4ccf2aa171f50a600'/>
<id>urn:sha1:25d514ca227e1ac81d0906a4ccf2aa171f50a600</id>
<content type='text'>
Use dynamic transfer buffer sizes since it is more efficient to let the
host controller do the partitioning to fit endpoint size. This way we
also do not use more than one urb per write request.

Replace max_in_flight_urbs with multi_urb_write flag in struct
usb_serial_driver to enable multi-urb writes.

Use MAX_TX_URBS=40 and a max buffer size of PAGE_SIZE to prevent DoS
attacks.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: allow custom multi-urb write bulk callbacks</title>
<updated>2010-05-20T20:21:34+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-03-17T22:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40f92f0dcd9b215c48c53a226328e8e36615e367'/>
<id>urn:sha1:40f92f0dcd9b215c48c53a226328e8e36615e367</id>
<content type='text'>
Allow drivers to implement their own multi-urb write bulk callbacks as
we do for single urb writes.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: clean up generic write start busy test</title>
<updated>2010-05-20T20:21:34+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-03-17T22:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=50a5f70cee11636908711abd339f5c5933375a7d'/>
<id>urn:sha1:50a5f70cee11636908711abd339f5c5933375a7d</id>
<content type='text'>
Submit write urb if it is not already in use and we have buffered data.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: serial: clean up some error and debug messages in generic driver</title>
<updated>2010-05-20T20:21:34+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2010-03-17T22:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a1405e22563151de79fdc83aa5e5815d10f0291'/>
<id>urn:sha1:1a1405e22563151de79fdc83aa5e5815d10f0291</id>
<content type='text'>
Clean up error messages on usb_submit_urb failure.
Remove debug message on zero-length writes.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
