<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/serial, branch v2.6.30</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>usb-serial: fix crash when sub-driver updates firmware</title>
<updated>2009-05-28T20:54:43+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2009-05-27T15:25:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0a3c8549ea7e94d74a41096d42bc6cdf43d183bf'/>
<id>0a3c8549ea7e94d74a41096d42bc6cdf43d183bf</id>
<content type='text'>
This patch (as1244) fixes a crash in usb-serial that occurs when a
sub-driver returns a positive value from its attach method, indicating
that new firmware was loaded and the device will disconnect and
reconnect.  The usb-serial core then skips the step of registering the
port devices; when the disconnect occurs, the attempt to unregister
the ports fails dramatically.

This problem shows up with Keyspan devices and it might affect others
as well.

When the attach method returns a positive value, the patch sets
num_ports to 0.  This tells usb_serial_disconnect() not to try
unregistering any of the ports; instead they are cleaned up by
destroy_serial().

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as1244) fixes a crash in usb-serial that occurs when a
sub-driver returns a positive value from its attach method, indicating
that new firmware was loaded and the device will disconnect and
reconnect.  The usb-serial core then skips the step of registering the
port devices; when the disconnect occurs, the attempt to unregister
the ports fails dramatically.

This problem shows up with Keyspan devices and it might affect others
as well.

When the attach method returns a positive value, the patch sets
num_ports to 0.  This tells usb_serial_disconnect() not to try
unregistering any of the ports; instead they are cleaned up by
destroy_serial().

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Fix oops on close of hot-unplugged FTDI serial converter</title>
<updated>2009-05-18T15:37:15+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2009-05-18T12:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=80193195f87ebca6d7417516d6edeb3969631c15'/>
<id>80193195f87ebca6d7417516d6edeb3969631c15</id>
<content type='text'>
Commit c45d6320 ("fix reference counting of ftdi_private") stopped
ftdi_sio_port_remove() from directly freeing the port-private data, with
the intention if the port was still open, it would be freed when
ftdi_close() is eventually called and releases the last refcount on the
structure.

That's all very well, but ftdi_sio_port_remove() still contains a call
to usb_set_serial_port_data(port, NULL) -- so by the time we get to
ftdi_close() for the port which was unplugged, it _still_ oopses on
dereferencing that NULL pointer, as it did before (and does in 2.6.29).

The fix is just not to clear the private data in ftdi_sio_port_remove().
Then the refcount is properly reduced to zero when the final kref_put()
happens in ftdi_close().

Remove a bogus comment too, while we're at it. And stop doing things
inside "if (priv)" -- it must _always_ be there.

Based loosely on an earlier patch by Daniel Mack, and suggestions by
Alan Stern.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Tested-by: Daniel Mack &lt;daniel@caiaq.de&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit c45d6320 ("fix reference counting of ftdi_private") stopped
ftdi_sio_port_remove() from directly freeing the port-private data, with
the intention if the port was still open, it would be freed when
ftdi_close() is eventually called and releases the last refcount on the
structure.

That's all very well, but ftdi_sio_port_remove() still contains a call
to usb_set_serial_port_data(port, NULL) -- so by the time we get to
ftdi_close() for the port which was unplugged, it _still_ oopses on
dereferencing that NULL pointer, as it did before (and does in 2.6.29).

The fix is just not to clear the private data in ftdi_sio_port_remove().
Then the refcount is properly reduced to zero when the final kref_put()
happens in ftdi_close().

Remove a bogus comment too, while we're at it. And stop doing things
inside "if (priv)" -- it must _always_ be there.

Based loosely on an earlier patch by Daniel Mack, and suggestions by
Alan Stern.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Tested-by: Daniel Mack &lt;daniel@caiaq.de&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb-serial: ftdi_sio: fix reference counting of ftdi_private</title>
<updated>2009-05-09T02:34:57+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2009-04-30T14:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c45d63202fbaccef7ef7946c03f27f72c809b1cc'/>
<id>c45d63202fbaccef7ef7946c03f27f72c809b1cc</id>
<content type='text'>
This patch (as1238) adds proper reference counting for ftdi_sio's
private data structure.  Without it, the driver will free the
structure while it is still in use if the user unplugs the serial
device before closing the device file.

The patch also replaces a slightly dangerous
cancel_delayed_work/flush_scheduled_work pair with
cancel_delayed_work_sync, which is always safer.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Daniel Mack &lt;daniel@caiaq.de&gt;
Tested-by: Daniel Mack &lt;daniel@caiaq.de&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as1238) adds proper reference counting for ftdi_sio's
private data structure.  Without it, the driver will free the
structure while it is still in use if the user unplugs the serial
device before closing the device file.

The patch also replaces a slightly dangerous
cancel_delayed_work/flush_scheduled_work pair with
cancel_delayed_work_sync, which is always safer.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Daniel Mack &lt;daniel@caiaq.de&gt;
Tested-by: Daniel Mack &lt;daniel@caiaq.de&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: ftdi_sio: add vendor/product id for the Marvell SheevaPlug</title>
<updated>2009-05-09T02:34:56+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2009-04-24T02:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1002bb77c0b7f1241a5108ffa04d836ddc5060c0'/>
<id>1002bb77c0b7f1241a5108ffa04d836ddc5060c0</id>
<content type='text'>
For reference:
http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp

Signed-off-by: Nicolas Pitre &lt;nico@marvell.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For reference:
http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp

Signed-off-by: Nicolas Pitre &lt;nico@marvell.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: removal of tty-&gt;low_latency hack dating back to the old serial code</title>
<updated>2009-04-23T21:15:29+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2009-04-20T15:28:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2400a2bfbd0e912193fe3b077f492d4980141813'/>
<id>2400a2bfbd0e912193fe3b077f492d4980141813</id>
<content type='text'>
This removes tty-&gt;low_latency from all USB serial drivers that push
data into the tty layer at hard interrupt context. It's no longer needed
and actually harmful.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes tty-&gt;low_latency from all USB serial drivers that push
data into the tty layer at hard interrupt context. It's no longer needed
and actually harmful.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: sierra driver bug fix for composite interface</title>
<updated>2009-04-23T21:15:29+00:00</updated>
<author>
<name>Elina Pasheva</name>
<email>epasheva@sierrawireless.com</email>
</author>
<published>2009-04-22T00:54:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=212b8f0c3f5a2280bfa1d6ab13a6fe98552becaa'/>
<id>212b8f0c3f5a2280bfa1d6ab13a6fe98552becaa</id>
<content type='text'>
This patch fixes a problem in sierra_send_setup() function when
composite devices are used. One should not be sending ACM commands to
interfaces that are OBEX. Doing this causes an apparent failure as the
ACM command has to time out before the interface can start being used.

Signed-off-by: Elina Pasheva &lt;epasheva@sierrawireless.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a problem in sierra_send_setup() function when
composite devices are used. One should not be sending ACM commands to
interfaces that are OBEX. Doing this causes an apparent failure as the
ACM command has to time out before the interface can start being used.

Signed-off-by: Elina Pasheva &lt;epasheva@sierrawireless.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>USB: fix mos7840 problem with minor numbers</title>
<updated>2009-04-23T21:15:28+00:00</updated>
<author>
<name>Tony Cook</name>
<email>tony-cook@bigpond.com</email>
</author>
<published>2009-04-18T13:12:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=37768adf9a1d49aeac0db1ba3dc28b3274b7b789'/>
<id>37768adf9a1d49aeac0db1ba3dc28b3274b7b789</id>
<content type='text'>
This patch fixes a problem with any mos7840 device where the use of the field "minor" before it is
initialised results in all the devices being overlaid in memory (minor = 0 for all instances)

Contributed by: Phillip Branch

Signed-off-by: Tony Cook &lt;tony-cook@bigpond.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a problem with any mos7840 device where the use of the field "minor" before it is
initialised results in all the devices being overlaid in memory (minor = 0 for all instances)

Contributed by: Phillip Branch

Signed-off-by: Tony Cook &lt;tony-cook@bigpond.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: mos7840: add new device id</title>
<updated>2009-04-23T21:15:27+00:00</updated>
<author>
<name>Tony Cook</name>
<email>tony-cook@bigpond.com</email>
</author>
<published>2009-04-18T13:12:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e9b8cffa923e8eb3fe70ea05d3fcfffc90a71a57'/>
<id>e9b8cffa923e8eb3fe70ea05d3fcfffc90a71a57</id>
<content type='text'>
add USB ids for the mos7840 based ATEN International serial devices.

Contributed by: Phillip Branch


Signed-off-by: Tony Cook &lt;tony-cook@bigpond.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add USB ids for the mos7840 based ATEN International serial devices.

Contributed by: Phillip Branch


Signed-off-by: Tony Cook &lt;tony-cook@bigpond.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: fix lifetime and locking problems</title>
<updated>2009-04-23T21:15:26+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2009-04-14T15:31:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2d93148ab6988cad872e65d694c95e8944e1b626'/>
<id>2d93148ab6988cad872e65d694c95e8944e1b626</id>
<content type='text'>
This patch (as1229) fixes a few lifetime and locking problems in the
usb-serial driver.  The main symptom is that an invalid kevent is
created when the serial device is unplugged while a connection is
active.

	Ports should be unregistered when device is disconnected,
	not when the parent usb_serial structure is deallocated.

	Each open file should hold a reference to the corresponding
	port structure, and the reference should be released when
	the file is closed.

	serial-&gt;disc_mutex should be acquired in serial_open(), to
	resolve the classic race between open and disconnect.

	serial_close() doesn't need to hold both serial-&gt;disc_mutex
	and port-&gt;mutex at the same time.

	Release the subdriver's module reference only after releasing
	all the other references, in case one of the release routines
	needs to invoke some code in the subdriver module.

	Replace a call to flush_scheduled_work() (which is prone to
	deadlocks) with cancel_work_sync().  Also, add a call to
	cancel_work_sync() in the disconnect routine.

	Reduce the scope of serial-&gt;disc_mutex in serial_disconnect().
	The only place it really needs to protect is where the
	"disconnected" flag is set.

This fixes the bug reported in

	http://bugs.freedesktop.org/show_bug.cgi?id=20703

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Dan Williams &lt;dcbw@redhat.com&gt;
Tested-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Reviewed-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as1229) fixes a few lifetime and locking problems in the
usb-serial driver.  The main symptom is that an invalid kevent is
created when the serial device is unplugged while a connection is
active.

	Ports should be unregistered when device is disconnected,
	not when the parent usb_serial structure is deallocated.

	Each open file should hold a reference to the corresponding
	port structure, and the reference should be released when
	the file is closed.

	serial-&gt;disc_mutex should be acquired in serial_open(), to
	resolve the classic race between open and disconnect.

	serial_close() doesn't need to hold both serial-&gt;disc_mutex
	and port-&gt;mutex at the same time.

	Release the subdriver's module reference only after releasing
	all the other references, in case one of the release routines
	needs to invoke some code in the subdriver module.

	Replace a call to flush_scheduled_work() (which is prone to
	deadlocks) with cancel_work_sync().  Also, add a call to
	cancel_work_sync() in the disconnect routine.

	Reduce the scope of serial-&gt;disc_mutex in serial_disconnect().
	The only place it really needs to protect is where the
	"disconnected" flag is set.

This fixes the bug reported in

	http://bugs.freedesktop.org/show_bug.cgi?id=20703

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Dan Williams &lt;dcbw@redhat.com&gt;
Tested-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Reviewed-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>USB device codes for Motorola phone.</title>
<updated>2009-04-17T17:50:26+00:00</updated>
<author>
<name>Dr. Greg Wettstein</name>
<email>greg@enjellic.com</email>
</author>
<published>2009-04-11T14:12:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d45e230bf03850f17394a760dfa003d986a67729'/>
<id>d45e230bf03850f17394a760dfa003d986a67729</id>
<content type='text'>
The v950 appears to be a ruggedized version of the Motorola Razor
phone.  Tethering to the phone to use it in 'phone as modem' mode
requires the use of the specialized moto-modem driver which layers
over the usb-serial driver.  Support for the v950 was added simply
adding the device ID's for the phone.

Signed-off-by: Dr. Greg Wettstein &lt;greg@enjellic.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The v950 appears to be a ruggedized version of the Motorola Razor
phone.  Tethering to the phone to use it in 'phone as modem' mode
requires the use of the specialized moto-modem driver which layers
over the usb-serial driver.  Support for the v950 was added simply
adding the device ID's for the phone.

Signed-off-by: Dr. Greg Wettstein &lt;greg@enjellic.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
