linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Problem with udev & Vodafone UMTS card
Date: Wed, 02 Feb 2005 04:13:26 +0000	[thread overview]
Message-ID: <20050202041326.GA31572@vrfy.org> (raw)
In-Reply-To: <87ekga9alm.fsf@yerbouti.a42.de>

On Wed, Feb 02, 2005 at 02:44:05AM +0100, Marc Packenius wrote:
> Greg KH <greg@kroah.com> writes:
> > On Mon, Jan 24, 2005 at 05:17:53PM +0100, Kay Sievers wrote:
> >> On Mon, 2005-01-24 at 16:58 +0100, Marc Packenius wrote:
> >> > Kay Sievers <kay.sievers@vrfy.org> writes:
> >> > > On Mon, 2005-01-24 at 15:15 +0100, Marc Packenius wrote:
> >> > >> after installing udev on a Debian/sid-powered Toshiba Satellite
> >> > >> notebook, the Vodafone UMTS card stopped working.
> >> > >> 
> >> > >> This pc-card includes a USB controller and feeds three serial character
> >> > >> devices when installed properly. They're called "/dev/ttyUSB[0-2]".
> >> > >> 
> >> > >> When using udev, those device nodes are not created properly, instead
> >> > >> the dev directory shows files with the filename "/dev/<NULL>[0-2]", e.g. 
> >> > >> "/dev/<NULL>0".
> >> > 
> >> > >> => /var/log/daemon.log <=
> >> > >> Jan 24 14:59:35 mudshark udev[3157]: creating device node '/dev/<NULL>0'
> >> > >> Jan 24 14:59:35 mudshark udev[3169]: creating device node '/dev/<NULL>1'
> >> > >> Jan 24 14:59:35 mudshark udev[3179]: creating device node '/dev/<NULL>2'
> >> 
> >> That's a kernel bug and not a udev issue. You may try to work around
> >> this by placing:
> >> KERNEL="<NULL>*", NAME="ttyUSB%n"
> >> 
> >> in a /etc/udev/rules.d/ file.
> >> 
> >> Greg, any idea what is causing this in the serial driver?
> 
> > No I do not.  What kernel version is this?  What driver is this (the
> > usb-serial generic driver, or some other usb-serial driver?)
> 
> That's with kernels that I built locally on a Debian/sid system. I can
> reproduce the behaviour with Debian-patched 2.6.8 to 2.6.10 and vanilla
> 2.6.10.
> 
> The driver is usb-serial generic. Inserting the card and loading the
> driver using
> 
>   modprobe -v usbserial vendor=0xaf0 product=0x5000

This patch may fix it. We call the probe function before the driver
struct is initialized. You may be able to work around this bug by
loading the module without the card inserted.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>

=== drivers/usb/serial/usb-serial.c 1.128 vs edited ==--- 1.128/drivers/usb/serial/usb-serial.c	2004-12-21 02:15:10 +01:00
+++ edited/drivers/usb/serial/usb-serial.c	2005-02-02 04:51:32 +01:00
@@ -1286,6 +1286,19 @@ static int __init usb_serial_init(void)
 	if (!usb_serial_tty_driver)
 		return -ENOMEM;
 
+	usb_serial_tty_driver->owner = THIS_MODULE;
+	usb_serial_tty_driver->driver_name = "usbserial";
+	usb_serial_tty_driver->devfs_name = "usb/tts/";
+	usb_serial_tty_driver->name = 	"ttyUSB";
+	usb_serial_tty_driver->major = SERIAL_TTY_MAJOR;
+	usb_serial_tty_driver->minor_start = 0;
+	usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
+	usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL;
+	usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+	usb_serial_tty_driver->init_termios = tty_std_termios;
+	usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+	tty_set_operations(usb_serial_tty_driver, &serial_ops);
+
 	/* Initialize our global data */
 	for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
 		serial_table[i] = NULL;
@@ -1304,18 +1317,6 @@ static int __init usb_serial_init(void)
 		goto exit_generic;
 	}
 
-	usb_serial_tty_driver->owner = THIS_MODULE;
-	usb_serial_tty_driver->driver_name = "usbserial";
-	usb_serial_tty_driver->devfs_name = "usb/tts/";
-	usb_serial_tty_driver->name = 	"ttyUSB";
-	usb_serial_tty_driver->major = SERIAL_TTY_MAJOR;
-	usb_serial_tty_driver->minor_start = 0;
-	usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
-	usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL;
-	usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
-	usb_serial_tty_driver->init_termios = tty_std_termios;
-	usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-	tty_set_operations(usb_serial_tty_driver, &serial_ops);
 	result = tty_register_driver(usb_serial_tty_driver);
 	if (result) {
 		err("%s - tty_register_driver failed", __FUNCTION__);



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2005-02-02  4:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-24 14:15 Problem with udev & Vodafone UMTS card Marc Packenius
2005-01-24 14:30 ` Kay Sievers
2005-01-24 15:58 ` Marc Packenius
2005-01-24 16:17 ` Kay Sievers
2005-01-31  8:20 ` Greg KH
2005-02-02  1:44 ` Marc Packenius
2005-02-02  4:13 ` Kay Sievers [this message]
2005-02-03 23:38 ` Greg KH
2005-02-05  2:02 ` Marc Packenius

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=20050202041326.GA31572@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).