public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.31-rc3: replugging USB serial converter uses new device node
@ 2009-07-18 20:04 Ferenc Wagner
  2009-07-21 11:38 ` Ferenc Wagner
  2009-07-23  8:21 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Ferenc Wagner @ 2009-07-18 20:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: alan

Hi,

Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
keeps increasing on each replug.  Output of udevadm monitor:

==poff==
UEVENT[1247946169.580772] remove   /devices/virtual/net/ppp0 (net)
UDEV  [1247946169.589775] remove   /devices/virtual/net/ppp0 (net)
==unplug==
UEVENT[1247946186.700698] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2/tty/ttyUSB2 (tty)
UEVENT[1247946186.700737] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2 (usb-serial)
UEVENT[1247946186.700749] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
UEVENT[1247946186.700760] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.6 (usb_device)
UEVENT[1247946186.700771] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
UDEV  [1247946186.701535] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2/tty/ttyUSB2 (tty)
UDEV  [1247946186.705822] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2 (usb-serial)
UDEV  [1247946186.711662] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
UDEV  [1247946186.715237] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.6 (usb_device)
UDEV  [1247946186.718872] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
==replug==
UEVENT[1247946199.654628] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
UDEV  [1247946199.660946] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
UEVENT[1247946199.661096] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
UEVENT[1247946199.688206] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3 (usb-serial)
UEVENT[1247946199.688254] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3/tty/ttyUSB3 (tty)
UEVENT[1247946199.688266] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.7 (usb_device)
UDEV  [1247946199.710642] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
UDEV  [1247946199.713898] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3 (usb-serial)
UDEV  [1247946199.729618] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.7 (usb_device)
UDEV  [1247946199.739566] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3/tty/ttyUSB3 (tty)
==pon==
UEVENT[1247946268.571857] add      /devices/virtual/net/ppp0 (net)
UDEV  [1247946268.593127] add      /devices/virtual/net/ppp0 (net)

Dmesg is available at http://pastebin.com/d516e3e00.
-- 
Regards,
Feri.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.31-rc3: replugging USB serial converter uses new device node
  2009-07-18 20:04 2.6.31-rc3: replugging USB serial converter uses new device node Ferenc Wagner
@ 2009-07-21 11:38 ` Ferenc Wagner
  2009-07-23  8:21 ` Andrew Morton
  1 sibling, 0 replies; 8+ messages in thread
From: Ferenc Wagner @ 2009-07-21 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: alan

Ferenc Wagner <wferi@niif.hu> writes:

> Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
> keeps increasing on each replug.

I forgot to stress that the number increases if I use the device
before unplug only.  Simply yanking/replugging the connector makes the
same device number disappear/reappear.  Maybe pppd does something
special, which makes the old device "stick", even though pppd dies at
the end of the session.
-- 
Feri.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.31-rc3: replugging USB serial converter uses new device node
  2009-07-18 20:04 2.6.31-rc3: replugging USB serial converter uses new device node Ferenc Wagner
  2009-07-21 11:38 ` Ferenc Wagner
@ 2009-07-23  8:21 ` Andrew Morton
  2009-07-23 10:25   ` Ferenc Wagner
  2009-07-23 14:44   ` Alan Stern
  1 sibling, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2009-07-23  8:21 UTC (permalink / raw)
  To: Ferenc Wagner; +Cc: linux-kernel, alan, linux-usb

(cc linux-usb)

On Sat, 18 Jul 2009 22:04:57 +0200 Ferenc Wagner <wferi@niif.hu> wrote:

> Hi,
> 
> Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
> keeps increasing on each replug.  Output of udevadm monitor:
> 
> ==poff==
> UEVENT[1247946169.580772] remove   /devices/virtual/net/ppp0 (net)
> UDEV  [1247946169.589775] remove   /devices/virtual/net/ppp0 (net)
> ==unplug==
> UEVENT[1247946186.700698] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2/tty/ttyUSB2 (tty)
> UEVENT[1247946186.700737] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2 (usb-serial)
> UEVENT[1247946186.700749] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
> UEVENT[1247946186.700760] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.6 (usb_device)
> UEVENT[1247946186.700771] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
> UDEV  [1247946186.701535] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2/tty/ttyUSB2 (tty)
> UDEV  [1247946186.705822] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2 (usb-serial)
> UDEV  [1247946186.711662] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
> UDEV  [1247946186.715237] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.6 (usb_device)
> UDEV  [1247946186.718872] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
> ==replug==
> UEVENT[1247946199.654628] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
> UDEV  [1247946199.660946] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
> UEVENT[1247946199.661096] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
> UEVENT[1247946199.688206] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3 (usb-serial)
> UEVENT[1247946199.688254] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3/tty/ttyUSB3 (tty)
> UEVENT[1247946199.688266] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.7 (usb_device)
> UDEV  [1247946199.710642] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
> UDEV  [1247946199.713898] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3 (usb-serial)
> UDEV  [1247946199.729618] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.7 (usb_device)
> UDEV  [1247946199.739566] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3/tty/ttyUSB3 (tty)
> ==pon==
> UEVENT[1247946268.571857] add      /devices/virtual/net/ppp0 (net)
> UDEV  [1247946268.593127] add      /devices/virtual/net/ppp0 (net)
> 
> Dmesg is available at http://pastebin.com/d516e3e00.

Can anyone say whether this is expected behaviour?

Does it actually cause any observeable problems?  I expect things will
get ugly once it runs out of range.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.31-rc3: replugging USB serial converter uses new device node
  2009-07-23  8:21 ` Andrew Morton
@ 2009-07-23 10:25   ` Ferenc Wagner
  2009-07-23 14:44   ` Alan Stern
  1 sibling, 0 replies; 8+ messages in thread
From: Ferenc Wagner @ 2009-07-23 10:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, alan, linux-usb

Andrew Morton <akpm@linux-foundation.org> writes:

> On Sat, 18 Jul 2009 22:04:57 +0200 Ferenc Wagner <wferi@niif.hu> wrote:
>
>> Hi,
>> 
>> Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
>> keeps increasing on each replug.  Output of udevadm monitor:
>> 
>> ==poff==
>> UEVENT[1247946169.580772] remove   /devices/virtual/net/ppp0 (net)
>> UDEV  [1247946169.589775] remove   /devices/virtual/net/ppp0 (net)
>> ==unplug==
>> UEVENT[1247946186.700698] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2/tty/ttyUSB2 (tty)
>> UEVENT[1247946186.700737] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2 (usb-serial)
>> UEVENT[1247946186.700749] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
>> UEVENT[1247946186.700760] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.6 (usb_device)
>> UEVENT[1247946186.700771] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
>> UDEV  [1247946186.701535] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2/tty/ttyUSB2 (tty)
>> UDEV  [1247946186.705822] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB2 (usb-serial)
>> UDEV  [1247946186.711662] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
>> UDEV  [1247946186.715237] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.6 (usb_device)
>> UDEV  [1247946186.718872] remove   /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
>> ==replug==
>> UEVENT[1247946199.654628] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
>> UDEV  [1247946199.660946] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1 (usb)
>> UEVENT[1247946199.661096] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
>> UEVENT[1247946199.688206] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3 (usb-serial)
>> UEVENT[1247946199.688254] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3/tty/ttyUSB3 (tty)
>> UEVENT[1247946199.688266] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.7 (usb_device)
>> UDEV  [1247946199.710642] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0 (usb)
>> UDEV  [1247946199.713898] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3 (usb-serial)
>> UDEV  [1247946199.729618] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/usb_device/usbdev3.7 (usb_device)
>> UDEV  [1247946199.739566] add      /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB3/tty/ttyUSB3 (tty)
>> ==pon==
>> UEVENT[1247946268.571857] add      /devices/virtual/net/ppp0 (net)
>> UDEV  [1247946268.593127] add      /devices/virtual/net/ppp0 (net)
>> 
>> Dmesg is available at http://pastebin.com/d516e3e00.
>
> Can anyone say whether this is expected behaviour?
> Does it actually cause any observeable problems?

The main problem is that I have to change my ppp config before each
pon.  I guess it could be solved by some udev trickery, but didn't
want to go that route before getting sure it's expected behaviour,
which I find improbable as it depends on a pppd run in the middle.
That's also why I didn't report it as an USB problem originally.
-- 
Thanks,
Feri.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.31-rc3: replugging USB serial converter uses new device node
  2009-07-23  8:21 ` Andrew Morton
  2009-07-23 10:25   ` Ferenc Wagner
@ 2009-07-23 14:44   ` Alan Stern
  2009-07-23 15:11     ` Kay Sievers
  2009-07-23 17:48     ` Andrew Morton
  1 sibling, 2 replies; 8+ messages in thread
From: Alan Stern @ 2009-07-23 14:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ferenc Wagner, linux-kernel, alan, linux-usb

On Thu, 23 Jul 2009, Andrew Morton wrote:

> (cc linux-usb)
> 
> On Sat, 18 Jul 2009 22:04:57 +0200 Ferenc Wagner <wferi@niif.hu> wrote:
> 
> > Hi,
> > 
> > Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
> > keeps increasing on each replug.  Output of udevadm monitor:
...
> > Dmesg is available at http://pastebin.com/d516e3e00.
> 
> Can anyone say whether this is expected behaviour?

It depends on whether a program is still holding the old device file 
open when the replug occurs.

> Does it actually cause any observeable problems?  I expect things will
> get ugly once it runs out of range.

The numbers will get reused after the corresponding device files are
closed.

For further discussion, see this thread:

	http://marc.info/?t=124828810800002&r=1&w=2

Alan Stern


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.31-rc3: replugging USB serial converter uses new device node
  2009-07-23 14:44   ` Alan Stern
@ 2009-07-23 15:11     ` Kay Sievers
  2009-07-23 17:48     ` Andrew Morton
  1 sibling, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2009-07-23 15:11 UTC (permalink / raw)
  To: Alan Stern; +Cc: Andrew Morton, Ferenc Wagner, linux-kernel, alan, linux-usb

On Thu, Jul 23, 2009 at 16:44, Alan Stern<stern@rowland.harvard.edu> wrote:
> On Thu, 23 Jul 2009, Andrew Morton wrote:
>> On Sat, 18 Jul 2009 22:04:57 +0200 Ferenc Wagner <wferi@niif.hu> wrote:

>> > Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
>> > keeps increasing on each replug.  Output of udevadm monitor:
> ...
>> > Dmesg is available at http://pastebin.com/d516e3e00.
>>
>> Can anyone say whether this is expected behaviour?
>
> It depends on whether a program is still holding the old device file
> open when the replug occurs.
>
>> Does it actually cause any observeable problems?  I expect things will
>> get ugly once it runs out of range.
>
> The numbers will get reused after the corresponding device files are
> closed.

You might find a symlink for ttyUSB devices to the actual device node,
which does not depend on the kernel name, in:
  /dev/serial/
  |-- by-id
  |   `-- usb-067b_2303-if00-port0 -> ../../ttyUSB0
  `-- by-path
      `-- pci-0000:00:1d.7-usb-0:1.1.3.2:1.0-port0 -> ../../ttyUSB0

> For further discussion, see this thread:
>
>        http://marc.info/?t=124828810800002&r=1&w=2

I can't find the original message to reply, but the device node is
always deleted and re-created when the device goes away and comes
back.

Thanks,
Kay

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.31-rc3: replugging USB serial converter uses new device node
  2009-07-23 14:44   ` Alan Stern
  2009-07-23 15:11     ` Kay Sievers
@ 2009-07-23 17:48     ` Andrew Morton
  2009-07-23 18:21       ` Alan Stern
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2009-07-23 17:48 UTC (permalink / raw)
  To: Alan Stern; +Cc: Ferenc Wagner, linux-kernel, alan, linux-usb

On Thu, 23 Jul 2009 10:44:13 -0400 (EDT) Alan Stern <stern@rowland.harvard.edu> wrote:

> On Thu, 23 Jul 2009, Andrew Morton wrote:
> 
> > (cc linux-usb)
> > 
> > On Sat, 18 Jul 2009 22:04:57 +0200 Ferenc Wagner <wferi@niif.hu> wrote:
> > 
> > > Hi,
> > > 
> > > Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
> > > keeps increasing on each replug.  Output of udevadm monitor:
> ...
> > > Dmesg is available at http://pastebin.com/d516e3e00.
> > 
> > Can anyone say whether this is expected behaviour?
> 
> It depends on whether a program is still holding the old device file 
> open when the replug occurs.

But this is new behaviour in 2.6.31-rcX.  Was something changed in this area?

> > Does it actually cause any observeable problems?  I expect things will
> > get ugly once it runs out of range.
> 
> The numbers will get reused after the corresponding device files are
> closed.
> 
> For further discussion, see this thread:
> 
> 	http://marc.info/?t=124828810800002&r=1&w=2
> 
> Alan Stern

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.31-rc3: replugging USB serial converter uses new device node
  2009-07-23 17:48     ` Andrew Morton
@ 2009-07-23 18:21       ` Alan Stern
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Stern @ 2009-07-23 18:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ferenc Wagner, linux-kernel, alan, linux-usb

On Thu, 23 Jul 2009, Andrew Morton wrote:

> > > > Since upgrading to 2.6.31-rc3 from 2.6.30, my ttyUSB device number
> > > > keeps increasing on each replug.  Output of udevadm monitor:
> > ...
> > > > Dmesg is available at http://pastebin.com/d516e3e00.
> > > 
> > > Can anyone say whether this is expected behaviour?
> > 
> > It depends on whether a program is still holding the old device file 
> > open when the replug occurs.
> 
> But this is new behaviour in 2.6.31-rcX.  Was something changed in this area?

The tty core and usb-serial have both undergone extensive changes, 
courtesy of Alan Cox.

Alan Stern


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-07-23 18:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-18 20:04 2.6.31-rc3: replugging USB serial converter uses new device node Ferenc Wagner
2009-07-21 11:38 ` Ferenc Wagner
2009-07-23  8:21 ` Andrew Morton
2009-07-23 10:25   ` Ferenc Wagner
2009-07-23 14:44   ` Alan Stern
2009-07-23 15:11     ` Kay Sievers
2009-07-23 17:48     ` Andrew Morton
2009-07-23 18:21       ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox