Re: 2.6.0-test11 -- Failed to open /dev/ttyS0: No such device

From: Steve Youngs
Date: Sun Nov 30 2003 - 21:19:44 EST


|--==> "JK" == Jacek Kawa <jfk@xxxxxxxxxxxxxxxxxxxxx> writes:

JK> Steve Youngs wrote:
>>I _think_ this patch will bring back auto-loading of the serial module
>>for you. Please let me know how it goes.

JK> Well: patched, installed new serial_core.ko, then depmod -a, and
JK> try to access ttySwhatever.

As Russell said, the patch was wrong, revert it. Sorry about that, my
bad. I really shouldn't try to hack the kernel late at night while
I'm hacking other things at the same time.

I'm pretty sure that the problem has its roots in...

diff -Nru a/fs/char_dev.c b/fs/char_dev.c
--- a/fs/char_dev.c Sun Nov 23 17:33:38 2003
+++ b/fs/char_dev.c Sun Nov 23 17:33:38 2003
@@ -434,7 +434,7 @@

static struct kobject *base_probe(dev_t dev, int *part, void *data)
{
- request_module("char-major-%d", MAJOR(dev));
+ request_module("char-major-%d-%d", MAJOR(dev), MINOR(dev));
return NULL;
}

...from Rusty, which went into 2.6.0-test10.

Does this work any better?

--- linux-2.6.0-test11/drivers/serial/8250.c 2003-11-27 11:03:42.000000000 +1000
+++ linux-2.6.0-test11-sy/drivers/serial/8250.c 2003-12-01 11:40:44.000000000 +1000
@@ -34,6 +34,7 @@
#include <linux/serial.h>
#include <linux/serialP.h>
#include <linux/delay.h>
+#include <linux/device.h>

#include <asm/io.h>
#include <asm/irq.h>
@@ -2195,3 +2196,4 @@
MODULE_PARM(force_rsa, "1-" __MODULE_STRING(PORT_RSA_MAX) "i");
MODULE_PARM_DESC(force_rsa, "Force I/O ports for RSA");
#endif
+MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR);



--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Ashes to ashes, dust to dust. |
| The proof of the pudding, is under the crust. |
|------------------------------<sryoungs@xxxxxxxxxxxxxx>---|

Attachment: pgp00000.pgp
Description: PGP signature