Input: sunkbd concern
Hi,
I have been looking at sunkbd.c and it seems that it attaches not only to ports that speak SUNKBD protocol but also to ports that do not specify any protocol:
if ((serio->type & SERIO_PROTO) && (serio->type & SERIO_PROTO) != SERIO_SUNKBD) return;
Was that an oversight or it was done intentionally?
Thanks!
Signature · 1 line
Dmitry
Quoted 8 lines · On Fri, 22 Oct 2004 18:33:04 -0500 Dmitry Torokhov <[email protected]>…
I have been looking at
sunkbd.cand it seems that it attaches not only to ports that speak SUNKBD protocol but also to ports that do not specify any protocol:if ((serio->type & SERIO_PROTO) && (serio->type & SERIO_PROTO) != SERIO_SUNKBD) return;Was that an oversight or it was done intentionally?
I believe it is intentional.
If SERIO_PROTO bits are all clear, this is supposed to have a special meaning in that any keyboard driver can claim the serio line.
So if it's the "wildcard" zero value, or specifically SERIO_SUNKBD, we'll attach to it.
Quoted 12 lines · David S. Miller
Quoted 8 lines · On Fri, 22 Oct 2004 18:33:04 -0500 Dmitry Torokhov <[email protected]>…
I have been looking at
sunkbd.cand it seems that it attaches not only to ports that speak SUNKBD protocol but also to ports that do not specify any protocol:if ((serio->type & SERIO_PROTO) && (serio->type & SERIO_PROTO) != SERIO_SUNKBD) return;Was that an oversight or it was done intentionally?
Quoted 9 lines
I believe it is intentional.
If
SERIO_PROTObits are all clear, this is supposed to have a special meaning in that any keyboard driver can claim the serio line.So if it's the "wildcard" zero value, or specifically
SERIO_SUNKBD, we'll attach to it.
I would buy if I see another keyboard doing this, but so far only sunkbd does this. The rest of keyboards connecting to a RS232-type ports require exact protocol match...
The background is that I am trying to create a bus "match" function for serio and trying to understand the requirements...
Signature · 1 line
Dmitry
Quoted 23 lines · Dmitry Torokhov
Quoted 12 lines · David S. Miller
Quoted 8 lines · On Fri, 22 Oct 2004 18:33:04 -0500 Dmitry Torokhov <[email protected]>…
I have been looking at
sunkbd.cand it seems that it attaches not only to ports that speak SUNKBD protocol but also to ports that do not specify any protocol:if ((serio->type & SERIO_PROTO) && (serio->type & SERIO_PROTO) != SERIO_SUNKBD) return;Was that an oversight or it was done intentionally?
Quoted 9 lines
I believe it is intentional.
If
SERIO_PROTObits are all clear, this is supposed to have a special meaning in that any keyboard driver can claim the serio line.So if it's the "wildcard" zero value, or specifically
SERIO_SUNKBD, we'll attach to it.
Quoted 6 lines
I would buy if I see another keyboard doing this, but so far only sunkbd does this. The rest of keyboards connecting to a RS232-type ports require exact protocol match...
The background is that I am trying to create a bus "match" function for serio and trying to understand the requirements...
IIRC my intention was that if the driver can autoprobe for the device, it shouldn't require 'inputattach' to specify the protocol, which is the case of sunkbd, but not other serial port keyboards.
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR
Quoted 28 lines · Vojtech Pavlik
Quoted 27 lines · Dmitry Torokhov
Quoted 12 lines · David S. Miller
Quoted 8 lines · On Fri, 22 Oct 2004 18:33:04 -0500 Dmitry Torokhov <[email protected]>…
I have been looking at
sunkbd.cand it seems that it attaches not only to ports that speak SUNKBD protocol but also to ports that do not specify any protocol:if ((serio->type & SERIO_PROTO) && (serio->type & SERIO_PROTO) != SERIO_SUNKBD) return;Was that an oversight or it was done intentionally?
Quoted 9 lines
I believe it is intentional.
If
SERIO_PROTObits are all clear, this is supposed to have a special meaning in that any keyboard driver can claim the serio line.So if it's the "wildcard" zero value, or specifically
SERIO_SUNKBD, we'll attach to it.I would buy if I see another keyboard doing this, but so far only sunkbd does this. The rest of keyboards connecting to a RS232-type ports require exact protocol match...
Quoted 7 lines
Quoted 2 lines
The background is that I am trying to create a bus "match" function for serio and trying to understand the requirements...
IIRC my intention was that if the driver can autoprobe for the device, it shouldn't require 'inputattach' to specify the protocol, which is the case of sunkbd, but not other serial port keyboards.
Ok, I see now. Thanks!
Signature · 1 line
Dmitry