Skip to contentSkip to conversation

No more vcs1 and vcsa1 in 2.6.30.N

DISCUSSION Gerardo Exequiel Pozzi 2 participants 3 messages Jul 10, 2009 – Jul 11, 2009 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

Hello.

Since upgrade my system to 2.6.30[.1]. I don't have anymore /sys/devices/virtual/vc/vcs1 and /sys/devices/virtual/vc/vcs1 in consequence not have anymore the corresponding char devs in /dev.

The problem is with this commit: {vcs: hook sysfs devices into object lifetime instead of "binding"} [#1]
Reverting it solves the issue.

[#1]
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=4995f8ef9d3aac72745e12419d7fbaa8d01b1d81

Cheers,

Please CC to me, not subscribed to LKML. Thanks.

Signature · 4 lines
Gerardo Exequiel Pozzi ( djgera )
http://www.djgera.com.ar
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219  76ED 39AB 221B 1B8C 330D
#1 lore raw
Quoted 3 lines · Gerardo Exequiel Pozzi

Since upgrade my system to 2.6.30[.1]. I don't have anymore /sys/devices/virtual/vc/vcs1 and /sys/devices/virtual/vc/vcs1 in consequence not have anymore the corresponding char devs in /dev.

Seems we missed the consoles, which are always pre-allocated, and not created on demand. Does this help?

Thanks,
Kay

drivers/char/vc_screen.c +4 -0
index d94d25c..c1791a6 100644
@@ -495,11 +495,15 @@ void vcs_remove_sysfs(int index)
 
 int __init vcs_init(void)
 {
+	unsigned int i;
+
 	if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
 		panic("unable to get major %d for vcs device", VCS_MAJOR);
 	vc_class = class_create(THIS_MODULE, "vc");
 
 	device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
 	device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
+	for (i = 0; i < MIN_NR_CONSOLES; i++)
+		vcs_make_sysfs(i);
 	return 0;
 }
#2 lore raw
Quoted 27 lines · Kay Sievers
Quoted 4 lines · Gerardo Exequiel Pozzi

Since upgrade my system to 2.6.30[.1]. I don't have anymore /sys/devices/virtual/vc/vcs1 and /sys/devices/virtual/vc/vcs1 in consequence not have anymore the corresponding char devs in /dev.

Seems we missed the consoles, which are always pre-allocated, and not created on demand. Does this help?

Thanks,
Kay

drivers/char/vc_screen.c +2 -0
index d94d25c..c1791a6 100644
@@ -495,11 +495,15 @@ void vcs_remove_sysfs(int index)
 
 int __init vcs_init(void)
 {
+	unsigned int i;
+

drivers/char/vc_screen.c void vcs_remove_sysfs(int index) · line 509

Quoted 10 lines
drivers/char/vc_screen.c +2 -0
 	if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
 		panic("unable to get major %d for vcs device", VCS_MAJOR);
 	vc_class = class_create(THIS_MODULE, "vc");
 
 	device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
 	device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
+	for (i = 0; i < MIN_NR_CONSOLES; i++)
+		vcs_make_sysfs(i);
 	return 0;
 }

Yes, the problem is solved applying this patch. Thanks for the quick fix Kay.

Good Luck!

Signature · 4 lines
Gerardo Exequiel Pozzi ( djgera )
http://www.djgera.com.ar
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219  76ED 39AB 221B 1B8C 330D