2.4.2ac8 lost char devices
actually, its not just ps/2 mice -- it seems to be something generic to char devices. agpgartis failing to register itself, too.
what changed with char device handling from ac7 to ac8?
robert love
[email protected]
Hello,
At Fri, 02 Mar 2001 00:42:28 -0500,
Quoted 9 lines · <[email protected]> wrote:
actually, its not just ps/2 mice -- it seems to be something generic to char devices. agpgartis failing to register itself, too.
what changed with char device handling from ac7 to ac8?
robert love
[email protected]
-
misc_register() in drivers/char/misc.c seems to have a problem.
int misc_register(struct miscdevice * misc)
{
static devfs_handle_t devfs_handle;
-
+ struct miscdevice *c;
+
if (misc->next || misc->prev)
return -EBUSY;
down(&misc_sem);+ c = misc_list.next;
+
+ while ((c != &misc_list) && (c->minor != misc->minor))
+ c = c->next;
+ if (c == &misc_list) {
This should be (c != &misc_list)
+ up(&misc_sem);
+ return -EBUSY;
+ }
---
Nobuhiro Tachino
Development Department
Linux Division
Software Group
FUJITSU LIMITED
TEL: +81 559 24 7273
FAX: +81 559 24 6196
E-Mail: [email protected]
PATCH 1/1 ps2fix-2.4.2-A0
Quoted 3 lines · tachino Nobuhiro
+ if (c ==
&misc_list) {This should be (c !=
&misc_list)
indeed, this fixed the ps2 problem for me too. Patch against -ac8 attached.
Ingo
drivers/char/misc.c renamed from drivers/char/misc.c.orig +1 -1
@@ -180,7 +180,7 @@while ((c != &misc_list) && (c->minor != misc->minor)) c = c->next; -if (c == &misc_list) { +if (c != &misc_list) {up (&misc_sem);return -EBUSY ; }
Re: [patch] ps2fix-2.4.2-A0
Quoted 4 lines · Ingo Molnar
Quoted 3 lines
+ if (c ==
&misc_list) {This should be (c !=
&misc_list)
oops, I didn't notice -- ignore the patch I sent a minute ago :)
Regards,
Tigran
Quoted 9 lines · tachino Nobuhiro
Hello,
At Fri, 02 Mar 2001 00:42:28 -0500,
Quoted 4 lines · <[email protected]> wrote:
actually, its not just ps/2 mice -- it seems to be something generic to char devices. agpgartis failing to register itself, too.
Quoted 7 lines
Quoted 5 lines
what changed with char device handling from ac7 to ac8?
robert love
[email protected]
-
misc_register()indrivers/char/misc.cseems to have a problem.
I guess it's too late now to pretend it's not my fault. I foolishly assumed if it would boot for me I couldn't have broken it too badly.
Review
Quoted 7 lines
(quoted diff) +5
-0+ c = misc_list.next; + + while ((c != &misc_list) && (c->minor != misc->minor)) + c = c->next; + if (c == &misc_list) { This should be (c != &misc_list)
Correct. Alan,
drivers/char/misc.c +1 -1
@@ -180,7 +180,7 @@while ((c != &misc_list) && (c->minor != misc->minor)) c = c->next; -if (c == &misc_list) { +if (c != &misc_list) {up (&misc_sem);return -EBUSY ; }