You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
(235) |
Apr
(30) |
May
(32) |
Jun
(86) |
Jul
(81) |
Aug
(108) |
Sep
(27) |
Oct
(22) |
Nov
(34) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(78) |
Feb
(10) |
Mar
(81) |
Apr
(27) |
May
(13) |
Jun
(105) |
Jul
(78) |
Aug
(52) |
Sep
(59) |
Oct
(90) |
Nov
(127) |
Dec
(49) |
2002 |
Jan
(102) |
Feb
(72) |
Mar
(54) |
Apr
(98) |
May
(25) |
Jun
(23) |
Jul
(123) |
Aug
(14) |
Sep
(52) |
Oct
(65) |
Nov
(48) |
Dec
(48) |
2003 |
Jan
(22) |
Feb
(25) |
Mar
(29) |
Apr
(12) |
May
(16) |
Jun
(11) |
Jul
(20) |
Aug
(20) |
Sep
(43) |
Oct
(84) |
Nov
(98) |
Dec
(56) |
2004 |
Jan
(28) |
Feb
(39) |
Mar
(41) |
Apr
(28) |
May
(88) |
Jun
(17) |
Jul
(43) |
Aug
(57) |
Sep
(54) |
Oct
(42) |
Nov
(32) |
Dec
(58) |
2005 |
Jan
(80) |
Feb
(31) |
Mar
(65) |
Apr
(41) |
May
(20) |
Jun
(34) |
Jul
(62) |
Aug
(73) |
Sep
(81) |
Oct
(48) |
Nov
(57) |
Dec
(57) |
2006 |
Jan
(63) |
Feb
(24) |
Mar
(18) |
Apr
(9) |
May
(22) |
Jun
(29) |
Jul
(47) |
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Vojtech P. <vo...@su...> - 2002-07-30 13:23:10
|
On Tue, Jul 30, 2002 at 12:29:18PM +0200, Vojtech Pavlik wrote: You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. 'bk pull bk://linux-input.bkbits.net/linux-input' should work as well. =================================================================== ChangeSet@1.528, 2002-07-30 15:02:05+02:00, bh...@bi... Change the EVIOC?ABS ioctls to use structs rather than arrays of ints. =================================================================== drivers/input/evdev.c | 27 +++++++++++++++++---------- include/linux/input.h | 12 ++++++++++-- 2 files changed, 27 insertions(+), 12 deletions(-) =================================================================== diff -Nru a/drivers/input/evdev.c b/drivers/input/evdev.c --- a/drivers/input/evdev.c Tue Jul 30 15:21:38 2002 +++ b/drivers/input/evdev.c Tue Jul 30 15:21:38 2002 @@ -233,6 +233,7 @@ struct evdev_list *list = file->private_data; struct evdev *evdev = list->evdev; struct input_dev *dev = evdev->handle.dev; + struct input_absinfo abs; int t, u; if (!evdev->exist) return -ENODEV; @@ -378,11 +379,14 @@ int t = _IOC_NR(cmd) & ABS_MAX; - if (put_user(dev->abs[t], ((int *) arg) + 0)) return -EFAULT; - if (put_user(dev->absmin[t], ((int *) arg) + 1)) return -EFAULT; - if (put_user(dev->absmax[t], ((int *) arg) + 2)) return -EFAULT; - if (put_user(dev->absfuzz[t], ((int *) arg) + 3)) return -EFAULT; - if (put_user(dev->absflat[t], ((int *) arg) + 4)) return -EFAULT; + abs.value = dev->abs[t]; + abs.minimum = dev->absmin[t]; + abs.maximum = dev->absmax[t]; + abs.fuzz = dev->absfuzz[t]; + abs.flat = dev->absflat[t]; + + if (copy_to_user((void *) arg, &abs, sizeof(struct input_absinfo))) + return -EFAULT; return 0; } @@ -391,11 +395,14 @@ int t = _IOC_NR(cmd) & ABS_MAX; - if (get_user(dev->abs[t], ((int *) arg) + 0)) return -EFAULT; - if (get_user(dev->absmin[t], ((int *) arg) + 1)) return -EFAULT; - if (get_user(dev->absmax[t], ((int *) arg) + 2)) return -EFAULT; - if (get_user(dev->absfuzz[t], ((int *) arg) + 3)) return -EFAULT; - if (get_user(dev->absflat[t], ((int *) arg) + 4)) return -EFAULT; + if (copy_from_user(&abs, (void *) arg, sizeof(struct input_absinfo))) + return -EFAULT; + + dev->abs[t] = abs.value; + dev->absmin[t] = abs.minimum; + dev->absmax[t] = abs.maximum; + dev->absfuzz[t] = abs.fuzz; + dev->absflat[t] = abs.flat; return 0; } diff -Nru a/include/linux/input.h b/include/linux/input.h --- a/include/linux/input.h Tue Jul 30 15:21:38 2002 +++ b/include/linux/input.h Tue Jul 30 15:21:38 2002 @@ -63,6 +63,14 @@ __u16 version; }; +struct input_absinfo { + int value; + int minimum; + int maximum; + int fuzz; + int flat; +}; + #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ @@ -79,8 +87,8 @@ #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ -#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, int[5]) /* get abs value/limits */ -#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, int[5]) /* set abs value/limits */ +#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ +#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ =================================================================== This BitKeeper patch contains the following changesets: 1.528 ## Wrapped with gzip_uu ## begin 664 bkpatch20030 M'XL(`.*21CT``\U6;6_;-A#^+/Z*`P*L=A)+)/7NP%W2).V,%4C@+-N';0AH MB;+8VI(A48Z3:?]]U$L<VW.=-=V`R8:DXQV/#Q\]=](!W.8\ZVN+])/D08P. MX(<TEWTM+W*N!X_*'J6ILHTXG7&CC3+&GPV1S`N)E/^:R2"&!<_ROD9T<S4B M'^:\KXTN/]Q^/!LA-!C`><R2";_A$@8#)--LP:9A?LID/$T3768LR6=<,CU( M9^4JM*084_6SB6MBVRF)@RVW#$A("+,(#S&U/,="+;#3%O;V?#47^[9%G=+T M'=-"%T!TFWJ`J8%=P\1`[#ZF?6P?56<,XYAE"MI83.9I$NH)ESHKX(A"#Z-W M\.]"/T=!RPS(F,/ES\.K\^_/WMV`2`,YS=5JH#8%N<R*0.:0J45YID)9`BS+ MV$,.:00BD;F.?@33I]1'U\]4H]Y7'@AAAM';%S8IDF!:A-R8BJ18-EK0X_4- M^Q8I'<LB7AF9=.Q1TW$BCCG#WFYR]V54]!&SRJPHM'SW17!A)BHY-DD,O@CY M0@_6P%GJ4CH*I%MRWXN('UCC,&"6ZT=?`+<GXS,X;%'LU$+?&?ZRZ+\!]ZH` MY+V8BDDL]2*XKPIA'W)J$\MT*EJI;^.Z*(C]MYJ@^VN"N-`C_TU5C+@LLD0D M$V"M_-MBR/(Y"SB('!(1\*P2?LW]%?2R^_JO='R]^S&\HB"&U+2!(*W%4*>[ M8^-<)%$*ZGJ"+DR/@(V&IF>#AS1UJ&%=T5%P4'+@B]Y;-?"K_/UDY9R)1,R* MV9I;C6Q&L.5V!%MN1$3%X^.:NS(W_5,FU_W*K/V_U1$B@DZ0SA_N9'I7D=KI M+%(1PF%7]97),7RG9AQ#+AYY&G5V;;W;[=9YM*Q^3M"[?']V^_&GB@W?JMGP MO9:-U5)1ELZ:Q9KTFTN^9K%F+VL4JPVOR#_9<#8$M_Z6_ZV(FN"GB(;_S8B6 MXS:DLK;\#<=/?F6=U"UA9WM[N25\0Y]%GU)5<XD>\H07RU.A6D*AYWQOHZ4> M(=C"7HEMUW>:CF!^=4?`T*/_[]=D\Q[9:A<[B7E-NW"J)K"S6?R!-`4!GK19 MW3_KL+96FJNL5E[U;:VD/RN]7W@4*!IZICH?A#P224O'!T5'1RW5U;2[X=6H M\^;RS3'@I87A")IBWE58FF8<PD1]E*F!!IEB8"84AX?&9OZ;C?R_/.4/_D'^ =_`OY5U^+0<R#SWDQ&[B1XY*0,_07/W.9&9H*```` ` end -- Vojtech Pavlik SuSE Labs |
From: Vojtech P. <vo...@su...> - 2002-07-30 10:29:29
|
You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. 'bk pull bk://linux-input.bkbits.net/linux-input' should work as well. =================================================================== ChangeSet@1.527, 2002-07-30 11:54:26+02:00, vo...@su... This simplifies the software autorepeat code in input/input.c, also killing a race which could be the cause of autorepeat not stopping after a key was released. =================================================================== input.c | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) =================================================================== diff -Nru a/drivers/input/input.c b/drivers/input/input.c --- a/drivers/input/input.c Tue Jul 30 12:26:59 2002 +++ b/drivers/input/input.c Tue Jul 30 12:26:59 2002 @@ -100,18 +100,14 @@ if (code > KEY_MAX || !test_bit(code, dev->keybit) || !!test_bit(code, dev->key) == value) return; - if (value == 2) break; + if (value == 2) + break; change_bit(code, dev->key); - if (test_bit(EV_REP, dev->evbit) && dev->timer.function) { - if (value) { - mod_timer(&dev->timer, jiffies + dev->rep[REP_DELAY]); - dev->repeat_key = code; - break; - } - if (dev->repeat_key == code) - del_timer(&dev->timer); + if (test_bit(EV_REP, dev->evbit) && value) { + dev->repeat_key = code; + mod_timer(&dev->timer, jiffies + dev->rep[REP_DELAY]); } break; @@ -204,8 +200,13 @@ static void input_repeat_key(unsigned long data) { struct input_dev *dev = (void *) data; + + if (!test_bit(dev->repeat_key, dev->key)) + return; + input_event(dev, EV_KEY, dev->repeat_key, 2); input_sync(dev); + mod_timer(&dev->timer, jiffies + dev->rep[REP_PERIOD]); } @@ -268,6 +269,7 @@ * * Returns nothing. */ + #define input_find_and_remove(type, initval, targ, next) \ do { \ type **ptr; \ @@ -513,7 +515,7 @@ * Kill any pending repeat timers. */ - del_timer(&dev->timer); + del_timer_sync(&dev->timer); /* * Notify handlers. =================================================================== This BitKeeper patch contains the following changesets: 1.527 ## Wrapped with gzip_uu ## begin 664 bkpatch11222 M'XL(`/-I1CT``[54?V_:,!#]&W^*FRI5185@.TY"J:C:#;15JS1$UTG3-B&3 M7)J4D+#8`;'EP\\)E'6H6[5?222?[;OG=W?/.8`;A7FOL<SN-/H1.8!7F=*] MABH46OX7,Q]GF9EWHFR.G:U79SKKQ.FBT,3LCZ3V(UABKGH-9MF[%;U>8*\Q M'KZ\N;H8$]+OPXM(IK=XC1KZ?:*S?"F30)U+'259:NE<IFJ.6EI^-B]WKB6G ME)O789Y-';=D+A5>Z;.`,2D8!I2+KBO(EMCYEO9^O(FE7<I,O*!".&0`S'*X M!Y1WJ->Q*3#6<T2/N\>4]RB%/3@X9M"FY#G\6](OB`]OHUB!BN>+)`YC5*`C M!)6%>B5S!%F8`W&!4H.?!0AQ"G79-\6W_)8!D(G*8!8G29S>@H1<^@BK*#8- M\+,B"6"*-:8O32J0A0\QTTP;`*6SQ:(.#C7F!F*&:UA)!3DF*!4&%GD-]HEK M"S+ZWD+2_LV'$"HI.7NBA$$>5TKJ_)#F@W(*,Y2N<$^<D@==FP=!Z`6FLQBR M_:;]"JO2PXDCF%T*P;E3J_-1]Z>5^A>,=ZK5JSB);R-M%?[J*>;<84;'7)3" MHQZME<SXOI"9_5,A<VBS_R/EZXV*U_NR;8'Z7$@5W:O3R#''2E2;VK^!=KZJ M/R.2T>-M^`.U#1BU@9'+:N"DT6C$(1R9C`LT/07>K)8:TQSE[+3R]:!K?)D` M^]Y7H]*3::R/AN\FX^&H!0$NVV>X-$M-.#R$&JL)7VN@>F^3\Z2Z/_TZ\]-Z M;YX%$QW/,3\ZK-UJNP5W<5C?^&.X#_Y@CID,AE<7[S\U3\DEIRX(\I'4;)[M MZ.P=M>5EK&:54XZZR--3$V;BNZ8`E>'1VA@XS*U*LAD,YV3#:Z+6J?^0G#E] 9]QOW(_1GJICW`S>8^HQ2\@UFTX*M,P8````` ` end -- Vojtech Pavlik SuSE Labs |
From: Vojtech P. <vo...@su...> - 2002-07-30 10:27:59
|
Hi! You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. 'bk pull bk://linux-input.bkbits.net/linux-input' should work as well. =================================================================== ChangeSet@1.448.1.1, 2002-07-28 14:04:15+03:00, joh...@it... Small fix to assign continuous values to KEY_*. =================================================================== input.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) =================================================================== diff -Nru a/include/linux/input.h b/include/linux/input.h --- a/include/linux/input.h Tue Jul 30 12:25:20 2002 +++ b/include/linux/input.h Tue Jul 30 12:25:20 2002 @@ -473,11 +473,11 @@ #define KEY_RESTART 0x198 #define KEY_SLOW 0x199 #define KEY_SHUFFLE 0x19a -#define KEY_BREAK 0x1ab +#define KEY_BREAK 0x19b #define KEY_PREVIOUS 0x19c #define KEY_DIGITS 0x19d #define KEY_TEEN 0x19e -#define KEY_TWEN 0x1af +#define KEY_TWEN 0x19f #define KEY_MAX 0x1ff =================================================================== This BitKeeper patch contains the following changesets: 1.448.1.1 ## Wrapped with gzip_uu ## begin 664 bkpatch11183 M'XL(`)!I1CT``[64:VO;,!2&/UN_0I!O*Y$E6;[$D)%>PC92MI"NC'T:BBS' M;ARY6'(NPS]^LM,TI;0-NUD&<:37Q^_1>5`/WFI9Q<ZZO#-29*`'/Y;:Q(ZN MM43BIXUG96EC-RM7TGU0N?.EFZO[V@"[/^5&9'`M*QT[!'F/*V9W+V-G-OYP M>WT^`V`XA)<95PMY(PT<#H$IJS4O$CWB)BM*A4S%E5Y)PY$H5\VCM*$84SM\ M$GK8#QH28!8V@B2$<$9D@BF+`@8>C(W,)B_R1690+3;6_O,\(?4)\P+L-S[U M_!!<08(8BQ!!!&+JXM"E$20LQBPF_AGV8HSA76ES*)1()>OM*+>I:Z0E/".P MC\$%_+=U7`(!;U:\*&":;VUNR+7.%PJ*4IE<U66MH?U;+76[-QE___$.@0GT M*0D#,#T>,.C_Y@,`YAB\/U%-KD11)](MK)7MG@"4/:ULP$@3,$:B)O7H/*)> M$*022XZC5X[QK90AC0C!#$<-]L-!T"'THOPT3G]A_%6TWG2^QXQ:YY'M3(L9 MH<\)P]$)PBCLT_]"V/Z;Y(!2F78H7<S&YQ/(5=)%7[^-/[>055);`_)`8&YV MK7XI=P<2.P#;_GR!_6K3O9:GZ<NM^@,PKU@80`(^[:=>(M-<R:-AQ\%;,IA; E680[63<]E;65[%7I\;X2F11+7:^&<^$-`C_$X!=E/SR="@4````` ` end -- Vojtech Pavlik SuSE Labs |
From: Johann D. <joh...@la...> - 2002-07-28 11:30:36
|
Brad Hards wrote: > On Sun, 28 Jul 2002 18:22, Vojtech Pavlik wrote: > > [...] > >>__u* is used extensively in the input API anyway, so you'd have to >>explain it to userspace programmers nevertheless. So I prefer keeping >>the input.h include use just one type of explicit sized types. > > So do I, and it had better be a standard type. > > Note that the input API does *NOT* use __u* extensively. In fact > if you take out the force feedback stuff (which Johannes already (Just a detail: my name is Johann) > agreed to change:), this is the *only* _u* usage in any part of the > input API. > I did this change in the past, but it was undone (not by me), as it would break user-space applications. I definitely agree to use uint16_t. > >>Sure, we can change them all to uint*_t, but then do it all at once and >>provide a satisfactory explanation for it. ;) > > I am doing it all. Johannes agreed to the change, and I did the only > other required entry. If Johannes agrees, I'll do the trivial changes > for force-feedback. Ok with me. > The reason why I am not doing it all at once is to provide patches > that do one API change at a time. Or, depending on how you look > at it, I did the only change all-at-once, and you reverted it :) > > Brad > -- Johann Deneux |
From: Brad H. <bh...@bi...> - 2002-07-28 09:17:28
|
On Sun, 28 Jul 2002 18:51, Russell King wrote: > On Sun, Jul 28, 2002 at 06:29:02PM +1000, Brad Hards wrote: > > master.kernel.org:/home/torvalds/BK/tools apparently has some > > scripts - I don't have access. > > http://gkernel.bkbits.net/BK-kernel-tools 404s for me - seems to need a :8080 in there. http://gkernel.bkbits.net:8080/BK-kernel-tools/src?nav=index.html -- http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black. |
From: Russell K. <rm...@ar...> - 2002-07-28 08:51:45
|
On Sun, Jul 28, 2002 at 06:29:02PM +1000, Brad Hards wrote: > master.kernel.org:/home/torvalds/BK/tools apparently has some > scripts - I don't have access. http://gkernel.bkbits.net/BK-kernel-tools -- Russell King (rm...@ar...) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html |
From: Vojtech P. <vo...@su...> - 2002-07-28 08:50:13
|
On Sun, Jul 28, 2002 at 06:42:18PM +1000, Brad Hards wrote: > > > I am not happy about the change from uint16_t to __u16, which you appear > > > to have made before sending this to Linus. > > > > > > That is a broken change - there is a standard type, and you've changed > > > it to a non-standard type. This is confusing to userspace programmers, > > > and I cannot provide a satisfactory explaination for this in > > > documentation. > > > > > > Please change it back. > > > > Well, I know this has been discussed back and forth. > And I was right last time too :-) > > > __u16 is a kernel type and is defined if you #include <linux/input.h>. > > uint16_t isn't. > __u16 is no more a kernel type than uint16_t. > It is a one line fix: include <linux/types.h> instead of <asm/types.h> > Which you probably should be doing anyway, since there is no > reason to rely on any assembler types in <linux/input.h> > > > __u* is used extensively in the input API anyway, so you'd have to > > explain it to userspace programmers nevertheless. So I prefer keeping > > the input.h include use just one type of explicit sized types. > So do I, and it had better be a standard type. > > Note that the input API does *NOT* use __u* extensively. In fact > if you take out the force feedback stuff (which Johannes already > agreed to change:), this is the *only* _u* usage in any part of the > input API. > > > Sure, we can change them all to uint*_t, but then do it all at once and > > provide a satisfactory explanation for it. ;) > I am doing it all. Johannes agreed to the change, and I did the only > other required entry. If Johannes agrees, I'll do the trivial changes > for force-feedback. Please do then. Together with the change of <asm/types.h> to <linux/types.h>. I hope it doesn't conflict if the user also #includes "stdint.h" in the userspace program, though. > The reason why I am not doing it all at once is to provide patches > that do one API change at a time. Or, depending on how you look > at it, I did the only change all-at-once, and you reverted it :) -- Vojtech Pavlik SuSE Labs |
From: Brad H. <bh...@bi...> - 2002-07-28 08:46:51
|
On Sun, 28 Jul 2002 18:22, Vojtech Pavlik wrote: > On Sun, Jul 28, 2002 at 05:45:37PM +1000, Brad Hards wrote: <snip> > > I am not happy about the change from uint16_t to __u16, which you appear > > to have made before sending this to Linus. > > > > That is a broken change - there is a standard type, and you've changed > > it to a non-standard type. This is confusing to userspace programmers, > > and I cannot provide a satisfactory explaination for this in > > documentation. > > > > Please change it back. > > Well, I know this has been discussed back and forth. And I was right last time too :-) > __u16 is a kernel type and is defined if you #include <linux/input.h>. > uint16_t isn't. __u16 is no more a kernel type than uint16_t. It is a one line fix: include <linux/types.h> instead of <asm/types.h> Which you probably should be doing anyway, since there is no reason to rely on any assembler types in <linux/input.h> > __u* is used extensively in the input API anyway, so you'd have to > explain it to userspace programmers nevertheless. So I prefer keeping > the input.h include use just one type of explicit sized types. So do I, and it had better be a standard type. Note that the input API does *NOT* use __u* extensively. In fact if you take out the force feedback stuff (which Johannes already agreed to change:), this is the *only* _u* usage in any part of the input API. > Sure, we can change them all to uint*_t, but then do it all at once and > provide a satisfactory explanation for it. ;) I am doing it all. Johannes agreed to the change, and I did the only other required entry. If Johannes agrees, I'll do the trivial changes for force-feedback. The reason why I am not doing it all at once is to provide patches that do one API change at a time. Or, depending on how you look at it, I did the only change all-at-once, and you reverted it :) Brad -- http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black. |
From: Vojtech P. <vo...@su...> - 2002-07-28 08:39:21
|
On Sun, Jul 28, 2002 at 06:29:02PM +1000, Brad Hards wrote: > On Sun, 28 Jul 2002 18:08, Vojtech Pavlik wrote: > > On Sun, Jul 28, 2002 at 05:32:53PM +1000, Brad Hards wrote: > > > "current" is a bad idea. I used curr_value. > > How about just "value" then? > If you want shorter, "curr" would be more understandable. > As you pointed out, all the structure elements are values. > Someone else might have a better name than "curr" though. I just want it simple. > > I'm stil fighting with BK to use something else than my e-mail address > > in the changesets. So far I've always put the author of the patch into > > the BK comment at least, but still haven't found how to change the cset > > author. > It depends on an environment variable (see BK hacking howto in the > 2.5 tree). Cool, I've read this in the past, but didn't remember this one. > Like you, I am still strugling with BK. Hence the conventional > patches. > > > If you find out, please tell me. Or anybody else. > > > > Thanks. > master.kernel.org:/home/torvalds/BK/tools apparently has some > scripts - I don't have access. I don't either. -- Vojtech Pavlik SuSE Labs |
From: Brad H. <bh...@bi...> - 2002-07-28 08:33:40
|
On Sun, 28 Jul 2002 18:08, Vojtech Pavlik wrote: > On Sun, Jul 28, 2002 at 05:32:53PM +1000, Brad Hards wrote: > > "current" is a bad idea. I used curr_value. > How about just "value" then? If you want shorter, "curr" would be more understandable. As you pointed out, all the structure elements are values. Someone else might have a better name than "curr" though. > I'm stil fighting with BK to use something else than my e-mail address > in the changesets. So far I've always put the author of the patch into > the BK comment at least, but still haven't found how to change the cset > author. It depends on an environment variable (see BK hacking howto in the 2.5 tree). Like you, I am still strugling with BK. Hence the conventional patches. > If you find out, please tell me. Or anybody else. > > Thanks. master.kernel.org:/home/torvalds/BK/tools apparently has some scripts - I don't have access. -- http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black. |
From: Vojtech P. <vo...@su...> - 2002-07-28 08:23:11
|
On Sun, Jul 28, 2002 at 05:45:37PM +1000, Brad Hards wrote: > On Tue, 23 Jul 2002 02:04, Vojtech Pavlik wrote: > > On Sun, Jul 21, 2002 at 08:50:56PM +1000, Brad Hards wrote: > > > G'day, > > > > > > The attached patch basically implements: > > > +struct input_devinfo { > > > + uint16_t bustype; > > > + uint16_t vendor; > > > + uint16_t product; > > > + uint16_t version; > > > +}; > > > + > > > > > > -#define EVIOCGID _IOR('E', 0x02, short[4]) > > > /* get device ID */ +#define EVIOCGID _IOR('E', 0x02, > > > struct input_devinfo) /* get device ID */ > > > > > > It affects just about every input driver, as a result of some associated > > > cleanups that I applied, and its about 40K uncompressed - hence the gzip. > > > > > > Is there anything that would stop this being applied? > > > > No, the patch is OK. > I am not happy about the change from uint16_t to __u16, which you appear > to have made before sending this to Linus. > > That is a broken change - there is a standard type, and you've changed > it to a non-standard type. This is confusing to userspace programmers, and > I cannot provide a satisfactory explaination for this in documentation. > > Please change it back. Well, I know this has been discussed back and forth. __u16 is a kernel type and is defined if you #include <linux/input.h>. uint16_t isn't. __u* is used extensively in the input API anyway, so you'd have to explain it to userspace programmers nevertheless. So I prefer keeping the input.h include use just one type of explicit sized types. Sure, we can change them all to uint*_t, but then do it all at once and provide a satisfactory explanation for it. ;) -- Vojtech Pavlik SuSE Labs |
From: Vojtech P. <vo...@su...> - 2002-07-28 08:08:35
|
On Sun, Jul 28, 2002 at 05:32:53PM +1000, Brad Hards wrote: > On Fri, 26 Jul 2002 01:08, Vojtech Pavlik wrote: > > On Fri, Jul 26, 2002 at 12:47:20AM +1000, Brad Hards wrote: > > No problem. Send me a patch that does it for both the EVIOSGABS and > > EVIOCSABS and I'll take it. You can either just do it in evdev.c, or > > change every driver to use the struct. > I am just doing the evdev.c (ie the ABI) at this stage. I may look at the > internal representation later. > Patch against 2.5.29. Looks OK? Yes. > > > I could live with curr, min and max instead of *_value, but it > > > would be nicer if it was a bit more descriptive. > > > > You can make it current, minimum, and maximum, if you wish. I'm a > > minimalist when it comes to naming, and I don't really think "_value" is > > bringing much information here. All of them are values after all. > "current" is a bad idea. I used curr_value. How about just "value" then? > Also, it is nice if you can retain the attributions (so I can get some > ego satisfaction, and so people know who to blame). This is generally > done by maintainers - any chance you can do this too? I'm stil fighting with BK to use something else than my e-mail address in the changesets. So far I've always put the author of the patch into the BK comment at least, but still haven't found how to change the cset author. If you find out, please tell me. Or anybody else. Thanks. -- Vojtech Pavlik SuSE Labs |
From: Brad H. <bh...@bi...> - 2002-07-28 07:50:09
|
On Tue, 23 Jul 2002 02:04, Vojtech Pavlik wrote: > On Sun, Jul 21, 2002 at 08:50:56PM +1000, Brad Hards wrote: > > G'day, > > > > The attached patch basically implements: > > +struct input_devinfo { > > + uint16_t bustype; > > + uint16_t vendor; > > + uint16_t product; > > + uint16_t version; > > +}; > > + > > > > -#define EVIOCGID _IOR('E', 0x02, short[4]) > > /* get device ID */ +#define EVIOCGID _IOR('E', 0x02, > > struct input_devinfo) /* get device ID */ > > > > It affects just about every input driver, as a result of some associated > > cleanups that I applied, and its about 40K uncompressed - hence the gzip. > > > > Is there anything that would stop this being applied? > > No, the patch is OK. I am not happy about the change from uint16_t to __u16, which you appear to have made before sending this to Linus. That is a broken change - there is a standard type, and you've changed it to a non-standard type. This is confusing to userspace programmers, and I cannot provide a satisfactory explaination for this in documentation. Please change it back. Brad -- http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black. |
From: Brad H. <bh...@bi...> - 2002-07-28 07:37:31
|
On Fri, 26 Jul 2002 01:08, Vojtech Pavlik wrote: > On Fri, Jul 26, 2002 at 12:47:20AM +1000, Brad Hards wrote: > No problem. Send me a patch that does it for both the EVIOSGABS and > EVIOCSABS and I'll take it. You can either just do it in evdev.c, or > change every driver to use the struct. I am just doing the evdev.c (ie the ABI) at this stage. I may look at the internal representation later. Patch against 2.5.29. Looks OK? > > I could live with curr, min and max instead of *_value, but it > > would be nicer if it was a bit more descriptive. > > You can make it current, minimum, and maximum, if you wish. I'm a > minimalist when it comes to naming, and I don't really think "_value" is > bringing much information here. All of them are values after all. "current" is a bad idea. I used curr_value. Also, it is nice if you can retain the attributions (so I can get some ego satisfaction, and so people know who to blame). This is generally done by maintainers - any chance you can do this too? Brad -- http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black. |
From: Johann D. <joh...@la...> - 2002-07-27 20:11:14
|
A-hem, I see I made a *very* stupid mistake :( I imported into linuxconsole a directory that was intended to be stored on *my* disc. Lesson of the day: do not set CVSROOT, always use cvs -d when importing something. James, if you can and want to erase this extraneous linux-ff directory, please feel free to do it. I'm really sorry about this. -- Johann Deneux (looking for a deep hole where to hide...) |
From: James S. <jsi...@tr...> - 2002-07-27 20:02:02
|
On Thu, 25 Jul 2002, Ewan Mac Mahon wrote: > On Wed, 24 Jul 2002, James Simmons wrote: > > > > To the people with the devfs issues. Please send me a log of what > > exactly happened and a detail ksymoop if you can. I just tried it on my > > system with devfs enabled and it works for me. > > It doesn't oops, it just doesn't register the devices so you can't open > gettys on them. Other than that the kernel boots fine and you can log in > over the network. Doing that you can see a couple of big difference in > /dev: I tracked down the problem. Originally the code initialized the VT tty early before kmalloc. So we had this: console_driver.flags |= TTY_DRIVER_NO_DEVFS; Now in tty_register_driver, which was called right afterwards, we have this bit of code. if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) { for(i = 0; i < driver->num; i++) tty_register_devfs(driver, 0, driver->minor_start + i); } In the old code code the above was never called. Instead the code in con_init_devfs was called. Now in the new code we don't have TTY_DRIVER_NO_DEVFS set so the above is called. The problem is the default flag that is passed into tty_register_devfs. It is automatically 0 whereas before it was DEVFS_FL_AOPEN_NOTIFY. The problem is the flag being passed. I tried out devfs and found the problem is only root is now only allowed to access vc/X. This is the problem. I haven't figured out a solution yet. Any ideas anyone? |
From: Vojtech P. <vo...@su...> - 2002-07-25 15:23:45
|
On Thu, Jul 25, 2002 at 08:12:02AM -0700, Larry McVoy wrote: > On Thu, Jul 25, 2002 at 04:38:16PM +0200, Vojtech Pavlik wrote: > > 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also > > Make that > > bk pull bk://linux-input.bkbits.net/linux-input > or > bk pull http://linux-input.bkbits.net/linux-input > > the 8080 port is for BK/Web. Thanks. -- Vojtech Pavlik SuSE Labs |
From: Larry M. <lm...@bi...> - 2002-07-25 15:12:09
|
On Thu, Jul 25, 2002 at 04:38:16PM +0200, Vojtech Pavlik wrote: > 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also Make that bk pull bk://linux-input.bkbits.net/linux-input or bk pull http://linux-input.bkbits.net/linux-input the 8080 port is for BK/Web. Cheers, -- --- Larry McVoy lm at bitmover.com http://www.bitmover.com/lm |
From: Vojtech P. <vo...@su...> - 2002-07-25 15:09:33
|
On Fri, Jul 26, 2002 at 12:47:20AM +1000, Brad Hards wrote: > > ChangeSet@1.448, 2002-07-25 16:36:05+02:00, vo...@tw... > > Add EVIOCSABS() ioctl to change the abs* informative > > values on input devices. This is something the X peoople > > really wanted. > Grr. I was just working on modifying this ioctl() to return > something better than int[5], which is pretty ugly. > > How about something along these lines (I have the rest of it - its > just trivial changes to evdev.c)? No problem. Send me a patch that does it for both the EVIOSGABS and EVIOCSABS and I'll take it. You can either just do it in evdev.c, or change every driver to use the struct. > I could live with curr, min and max instead of *_value, but it > would be nicer if it was a bit more descriptive. You can make it current, minimum, and maximum, if you wish. I'm a minimalist when it comes to naming, and I don't really think "_value" is bringing much information here. All of them are values after all. -- Vojtech Pavlik SuSE Labs |
From: Brad H. <bh...@bi...> - 2002-07-25 14:51:45
|
On Fri, 26 Jul 2002 00:38, Vojtech Pavlik wrote: > Hi! > > You can import this changeset into BK by piping this whole message to: > '| bk receive [path to repository]' or apply the patch as usual. > 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also > work. > > =================================================================== > > ChangeSet@1.448, 2002-07-25 16:36:05+02:00, vo...@tw... > Add EVIOCSABS() ioctl to change the abs* informative > values on input devices. This is something the X peoople > really wanted. Grr. I was just working on modifying this ioctl() to return something better than int[5], which is pretty ugly. How about something along these lines (I have the rest of it - its just trivial changes to evdev.c)? I could live with curr, min and max instead of *_value, but it would be nicer if it was a bit more descriptive. Brad diff -Naur -X dontdiff linux-2.5.27-eventapi/include/linux/input.h linux-2.5.27-eventapi2/include/linux/input.h --- linux-2.5.27-eventapi/include/linux/input.h Tue Jul 23 21:36:37 2002 +++ linux-2.5.27-eventapi2/include/linux/input.h Fri Jul 26 00:17:57 2002 @@ -63,6 +63,14 @@ uint16_t version; }; +struct input_absinfo { + int curr_value; + int min_value; + int max_value; + int fuzz; + int flat; +}; + #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ #define EVIOCGID _IOR('E', 0x02, struct input_devinfo) /* get device ID */ #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ @@ -79,7 +87,7 @@ #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ -#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, int[5]) /* get abs value/limits */ +#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ -- http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black. |
From: Vojtech P. <vo...@su...> - 2002-07-25 14:38:27
|
Hi! You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also work. =================================================================== ChangeSet@1.448, 2002-07-25 16:36:05+02:00, vo...@tw... Add EVIOCSABS() ioctl to change the abs* informative values on input devices. This is something the X peoople really wanted. Rename input_devinfo to input_id, it's shorter and more to the point. Remove superfluous printks in uinput.c Clean up return values in evdev.c ioctl. =================================================================== drivers/input/evdev.c | 53 ++++++++++++++++++++++++++++------------------- drivers/input/uinput.c | 12 ---------- include/linux/gameport.h | 2 - include/linux/input.h | 9 ++++--- include/linux/uinput.h | 2 - 5 files changed, 40 insertions(+), 38 deletions(-) diff -Nru a/drivers/input/evdev.c b/drivers/input/evdev.c --- a/drivers/input/evdev.c Thu Jul 25 16:36:22 2002 +++ b/drivers/input/evdev.c Thu Jul 25 16:36:22 2002 @@ -233,7 +233,7 @@ struct evdev_list *list = file->private_data; struct evdev *evdev = list->evdev; struct input_dev *dev = evdev->handle.dev; - int retval, t, u; + int t, u; if (!evdev->exist) return -ENODEV; @@ -243,20 +243,20 @@ return put_user(EV_VERSION, (int *) arg); case EVIOCGID: - return copy_to_user((void *) arg, &dev->id, sizeof(struct input_devinfo)); + return copy_to_user((void *) arg, &dev->id, sizeof(struct input_id)); case EVIOCGREP: - if ((retval = put_user(dev->rep[0], ((int *) arg) + 0))) return retval; - if ((retval = put_user(dev->rep[1], ((int *) arg) + 1))) return retval; + if (put_user(dev->rep[0], ((int *) arg) + 0)) return -EFAULT; + if (put_user(dev->rep[1], ((int *) arg) + 1)) return -EFAULT; return 0; case EVIOCSREP: - if ((retval = get_user(dev->rep[0], ((int *) arg) + 0))) return retval; - if ((retval = get_user(dev->rep[1], ((int *) arg) + 1))) return retval; + if (get_user(dev->rep[0], ((int *) arg) + 0)) return -EFAULT; + if (get_user(dev->rep[1], ((int *) arg) + 1)) return -EFAULT; return 0; case EVIOCGKEYCODE: - if ((retval = get_user(t, ((int *) arg) + 0))) return retval; + if (get_user(t, ((int *) arg) + 0)) return -EFAULT; if (t < 0 || t > dev->keycodemax) return -EINVAL; switch (dev->keycodesize) { case 1: u = *(u8*)(dev->keycode + t); break; @@ -264,13 +264,13 @@ case 4: u = *(u32*)(dev->keycode + t * 4); break; default: return -EINVAL; } - if ((retval = put_user(u, ((int *) arg) + 1))) return retval; + if (put_user(u, ((int *) arg) + 1)) return -EFAULT; return 0; case EVIOCSKEYCODE: - if ((retval = get_user(t, ((int *) arg) + 0))) return retval; + if (get_user(t, ((int *) arg) + 0)) return -EFAULT; if (t < 0 || t > dev->keycodemax) return -EINVAL; - if ((retval = get_user(u, ((int *) arg) + 1))) return retval; + if (get_user(u, ((int *) arg) + 1)) return -EFAULT; switch (dev->keycodesize) { case 1: *(u8*)(dev->keycode + t) = u; break; case 2: *(u16*)(dev->keycode + t * 2) = u; break; @@ -284,13 +284,11 @@ struct ff_effect effect; int err; - if (copy_from_user((void*)(&effect), (void*)arg, sizeof(effect))) { + if (copy_from_user((void*)(&effect), (void*)arg, sizeof(effect))) return -EFAULT; - } err = dev->upload_effect(dev, &effect); - if (put_user(effect.id, &(((struct ff_effect*)arg)->id))) { + if (put_user(effect.id, &(((struct ff_effect*)arg)->id))) return -EFAULT; - } return err; } else return -ENOSYS; @@ -302,8 +300,8 @@ else return -ENOSYS; case EVIOCGEFFECTS: - if ((retval = put_user(dev->ff_effects_max, (int*) arg))) - return retval; + if (put_user(dev->ff_effects_max, (int*) arg)) + return -EFAULT; return 0; default: @@ -380,11 +378,24 @@ int t = _IOC_NR(cmd) & ABS_MAX; - if ((retval = put_user(dev->abs[t], ((int *) arg) + 0))) return retval; - if ((retval = put_user(dev->absmin[t], ((int *) arg) + 1))) return retval; - if ((retval = put_user(dev->absmax[t], ((int *) arg) + 2))) return retval; - if ((retval = put_user(dev->absfuzz[t], ((int *) arg) + 3))) return retval; - if ((retval = put_user(dev->absflat[t], ((int *) arg) + 4))) return retval; + if (put_user(dev->abs[t], ((int *) arg) + 0)) return -EFAULT; + if (put_user(dev->absmin[t], ((int *) arg) + 1)) return -EFAULT; + if (put_user(dev->absmax[t], ((int *) arg) + 2)) return -EFAULT; + if (put_user(dev->absfuzz[t], ((int *) arg) + 3)) return -EFAULT; + if (put_user(dev->absflat[t], ((int *) arg) + 4)) return -EFAULT; + + return 0; + } + + if ((_IOC_NR(cmd) & ~ABS_MAX) == _IOC_NR(EVIOCSABS(0))) { + + int t = _IOC_NR(cmd) & ABS_MAX; + + if (get_user(dev->abs[t], ((int *) arg) + 0)) return -EFAULT; + if (get_user(dev->absmin[t], ((int *) arg) + 1)) return -EFAULT; + if (get_user(dev->absmax[t], ((int *) arg) + 2)) return -EFAULT; + if (get_user(dev->absfuzz[t], ((int *) arg) + 3)) return -EFAULT; + if (get_user(dev->absflat[t], ((int *) arg) + 4)) return -EFAULT; return 0; } diff -Nru a/drivers/input/uinput.c b/drivers/input/uinput.c --- a/drivers/input/uinput.c Thu Jul 25 16:36:22 2002 +++ b/drivers/input/uinput.c Thu Jul 25 16:36:22 2002 @@ -357,7 +357,6 @@ .read = uinput_read, .write = uinput_write, .poll = uinput_poll, -// fasync: uinput_fasync, .ioctl = uinput_ioctl, }; @@ -369,16 +368,7 @@ static int __init uinput_init(void) { - int retval; - - retval = misc_register(&uinput_misc); - - if (!retval) { - printk(KERN_INFO "%s: User level driver support for input subsystem loaded\n", UINPUT_NAME); - printk(KERN_INFO "%s: Aristeu Sergio Rozanski Filho <ar...@ca...>\n", UINPUT_NAME); - } - - return retval; + return misc_register(&uinput_misc); } static void __exit uinput_exit(void) diff -Nru a/include/linux/gameport.h b/include/linux/gameport.h --- a/include/linux/gameport.h Thu Jul 25 16:36:22 2002 +++ b/include/linux/gameport.h Thu Jul 25 16:36:22 2002 @@ -39,7 +39,7 @@ char *name; char *phys; - struct input_devinfo id; + struct input_id id; int io; int speed; diff -Nru a/include/linux/input.h b/include/linux/input.h --- a/include/linux/input.h Thu Jul 25 16:36:22 2002 +++ b/include/linux/input.h Thu Jul 25 16:36:22 2002 @@ -56,7 +56,7 @@ * IOCTLs (0x00 - 0x7f) */ -struct input_devinfo { +struct input_id { __u16 bustype; __u16 vendor; __u16 product; @@ -64,7 +64,7 @@ }; #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ -#define EVIOCGID _IOR('E', 0x02, struct input_devinfo) /* get device ID */ +#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCSREP _IOW('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ @@ -80,6 +80,7 @@ #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, int[5]) /* get abs value/limits */ +#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, int[5]) /* set abs value/limits */ #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ @@ -754,7 +755,7 @@ char *name; char *phys; char *uniq; - struct input_devinfo id; + struct input_id id; unsigned long evbit[NBITS(EV_MAX)]; unsigned long keybit[NBITS(KEY_MAX)]; @@ -829,7 +830,7 @@ unsigned long flags; - struct input_devinfo id; + struct input_id id; unsigned long evbit[NBITS(EV_MAX)]; unsigned long keybit[NBITS(KEY_MAX)]; diff -Nru a/include/linux/uinput.h b/include/linux/uinput.h --- a/include/linux/uinput.h Thu Jul 25 16:36:22 2002 +++ b/include/linux/uinput.h Thu Jul 25 16:36:22 2002 @@ -64,7 +64,7 @@ #define UINPUT_MAX_NAME_SIZE 80 struct uinput_user_dev { char name[UINPUT_MAX_NAME_SIZE]; - struct input_devinfo id; + struct input_id id; int ff_effects_max; int absmax[ABS_MAX + 1]; int absmin[ABS_MAX + 1]; =================================================================== This BitKeeper patch contains the following changesets: + ## Wrapped with gzip_uu ## begin 664 bkpatch23969 M'XL(`.8,0#T``\V8?6_;-A#&_[8^Q0$%4BN-;9)Z3Y&B69QUP;JU2-NM0%<8 MBD3%6FW)D"@G3;U]]AU)V7'\EMA=ACF!!9#R3\>[1X^.>@(?2EX<-L;YGX)' M?>,)_)27XK`AKM)!>MD7[2JZ:D<W.'Z>YSC>Z>=#WJG/[EQ\Z:39J!(&SK\- M1=2',2_*PP9M6[,1\77$#QOGIZ\^O#X^-XRC(SCIA]DE?\<%'!T9(B_&X2`N M7X:B/\BSMBC"K!QR$;:C?#B9G3IAA##\<ZAG$<>=4)?8WB2B,:6A37E,F.V[ MME$']G(A_$6.QQQJ$Q\Y#K-<Q^@";=NV#X1UB-=A#E#WT'(/B?.,L$-"8`T6 MGCG0(L8/\.\NXL2(X#B.X?2WLS<G[XY_>-<T(<TC,<#K0*1@(/H<PHMR'](L MR8MA*-(QQY]A%!4O(<]`U05B/DXC7K;A?3\M`?]++)_HI]FE(GR$$<_ST4#^ MM.#A8/`5KL),\+B-`^<\"X=<@WH2A%>2$>B!-#Z`5#Q%8C\O!"\@S&(8Y@4' M_"F>)?&C/,V$1@WS,8>R&O$B&51Y5<*HP+DO&%,&E2*V(SSQ9,!#'!AA-*(J MLNEZ\"0^QA#:D4Y$&XR?`4OG>,;;6SD9K2T_AD%"8KRXIWQI%@VJF'<&:59= M:[VW^_.E#&PZ<6V;^I/$8A<^*LI-..$A\=<)9Q-3:=-R"9L0Q_?<>\.+BU3> M=!K2J=,T%YZ-AXF+87H3'O@)#2+[(HY"VPN2M>%M8-Z&1UG@R.P];(W5W452 MBU*;HOH1Z#H3)V:!F]@QC3B/*5M[QVV&SD)SF&-O6]A+%/L(I;Q86WM"\#;% MF_7B(F%.$/C<IS8GZY.W&3N7/\LC[H;\W2W"]":YFS]W8F$2K4D<.@XE8>!% MH>LRA^\&O56>2_#6DEZ]4@GW^_9WB'*MA]\C2D:H$TBF396?4WO)SME]=FXQ M:#'Z^(8.Z-E0<B&D$>^CC]=&UYY:(#J@=OP[/MA&U]-WW1MH%5?J'UWL[>HJ M[6"'7?0NH,:9/C30H4$<0/4<)VP]H0Z-1J..*\I'7WLB[U781#2;XSR-8=^$ ML+@\@#T,HO5"/B;*](;G2;,4116)V>/#-!4V`(98A^`!L6D"33FM>`I0\-$G M\OD`FDT9C8:;\`R(:4Z3TSK]\?C#Z_?/UP/H"@!=`>BB;^AXG-MX+OEWQK,, MV"*>0*5='19QXF%1=)GK*8@Z+.:H>F@D'E40==@Y$L_2$&L%Y,&1^'HY?KT< M15%"3(I\."?%?;.YQY.$1\)$M!Y1TJP%6<^9IF3*!'=9H!<9T#GT+%7Z_+:4 M]%ZS.=5SDO3TA(*;4O(:&<A%=M$7I*(LXJY3^`Q0]H;A-4:*.:A38*H@EC)@ M^18XR)09\)?C5%0TE4\"928_#]3J:LHPS33H(<593PFO5U/8-I2DNKE1F$6* MM15E$(J5%'L%Y8_Y$A!%_4L/2G:SAX[>^_6\&0UC$_;@;S3WWB_''TU\1,)T M[K:/Q\2;\*UF*G>%V]-J1$V87GG90':M[!)EI\HN4W:I[!)EI\HN4[:IK&QO MUO5J]W<XW]<\KFUR[FL>;21[Q)]0&UL+U><$V[<Y%%J/T^346\8[3_JYG>-" M!Z#:&=4$+[0SZY*P2T=C,^GHZKNQ<'U(XU4JJ/<4VTI@JXWA`^N_M+VACLM0 M4XS83#>Y=/OJ.]"R_X,65V_4Y3Y=[F(W5KA>YB[EU?V1^EZL[C>CJQL?]?TD MYDF:<1W@J[-NHX&^>]Y\>OKT`,@U80>+ZC0;G7U`AZG?H<!9%_8[QIG/%F'* MV=%\3(7\?8J,"/H.#A\@47QR/N,T`K'IAUF_C\L?IJ*4W*[GJ%CU8:52N[ZE MM*P/:\6\>H<GU?P8&\W=H&ACENU1.F&H':WD'79KTL8>R\?4^RI^C:CIFRHI M9;4MWKCWFKW+VD'+N/56':.']26RO5-=:/W8&J9EU"OX95H*?.#MZ>OTY*BY MRL2J.1=[C!<TNT%GCR_'(KZNN_7_>WRM?>.IW$R]6MIH9]5W^-F<8ZV^PZ>O 9U:,^C[Z4U?"(!8Z;1`$U_@$GS:7VRQ<````` ` end -- Vojtech Pavlik SuSE Labs |
From: Vojtech P. <vo...@su...> - 2002-07-25 14:11:47
|
Hi! You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also work. =================================================================== ChangeSet@1.447, 2002-07-25 16:08:56+02:00, vo...@tw... Because the Linux Input core follows the USB HID standard where it comes to directions of movement and rotation, a mouse wheel should be positive where it "rotates forward, away from the user". We had the opposite in psmouse.c. Fixed this. =================================================================== psmouse.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -Nru a/drivers/input/mouse/psmouse.c b/drivers/input/mouse/psmouse.c --- a/drivers/input/mouse/psmouse.c Thu Jul 25 16:09:18 2002 +++ b/drivers/input/mouse/psmouse.c Thu Jul 25 16:09:18 2002 @@ -102,7 +102,7 @@ case 1: /* Mouse extra info */ input_report_rel(dev, packet[2] & 0x80 ? REL_HWHEEL : REL_WHEEL, - (int) (packet[2] & 7) - (int) (packet[2] & 8)); + (int) (packet[2] & 8) - (int) (packet[2] & 7)); input_report_key(dev, BTN_SIDE, (packet[2] >> 4) & 1); input_report_key(dev, BTN_EXTRA, (packet[2] >> 5) & 1); @@ -111,7 +111,7 @@ case 3: /* TouchPad extra info */ input_report_rel(dev, packet[2] & 0x08 ? REL_HWHEEL : REL_WHEEL, - (int) ((packet[2] >> 4) & 7) - (int) ((packet[2] >> 4) & 8)); + (int) ((packet[2] >> 4) & 8) - (int) ((packet[2] >> 4) & 7)); packet[0] = packet[2] | 0x08; break; @@ -135,14 +135,14 @@ */ if (psmouse->type == PSMOUSE_IMPS || psmouse->type == PSMOUSE_GENPS) - input_report_rel(dev, REL_WHEEL, (signed char) packet[3]); + input_report_rel(dev, REL_WHEEL, -(signed char) packet[3]); /* * Scroll wheel and buttons on IntelliMouse Explorer */ if (psmouse->type == PSMOUSE_IMEX) { - input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 7) - (int) (packet[3] & 8)); + input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[3] & 7)); input_report_key(dev, BTN_SIDE, (packet[3] >> 4) & 1); input_report_key(dev, BTN_EXTRA, (packet[3] >> 5) & 1); } =================================================================== This BitKeeper patch contains the following changesets: + ## Wrapped with gzip_uu ## begin 664 bkpatch22758 M'XL(`(X&0#T``[65;4_;,!#'7]>?X@32U@J:.(GS0*<B!G10K=*J(L2+"2$W MN9",-(X2MX4I'WZ.6Q7&@#TPTDI6[^'G._M_Z3:<5UCV6@OQ36*8D&TX%97L MM>0RS=+K1!KS<&F$WY5](H2RFXF8H;F.-J<W9IH7<TF4?\QEF,`"RZK7L@QG M8Y%W!?9:D\')^>CCA)!^'XX2GE_C&4KH]XD4Y8)G477`99*)W)`ESZL92FZ$ M8E9O0FN;4EM]7,MWJ.O5ED>97X=69%F<61A1FP4>(^O"#AZ5_YCCVZYEVXX; MU*[M^#8Y!LM@S`=JF]0W;1<LKT>#GNOM4+M'*3R#A1T+NI0<PO]MXHB$<(@A MGU<(,D$8I?G\%H;-04,H2H189)E85MIY?G8(I\-CJ"3/(UY&L$Q0A:120=3F MJ*($1&F)H4Q%7H&(8286.,-<@LJ`4DC>>':!*T>SI0)@!E4BYEFD(%.$0E2I M3!>X8<.63E/P6)1+M:O*7O([B$LQTU4I3KEEP`5"PAM(8Q.%YJC\'(I*[V6$ M!GQ*;S%2`6EED,^@[L-SR?A>(Z3[EP\AE%.R_]R=U5&9-B)="=?499B;<M;R MH([ET(#9-0T\ZM53?SIU@\@)8F2NC?@JMI(>HX'KU$[`+*8'XL6T9DC>L)=7 ML54OENO93/7B>'MZC/9^&2+G=T/$H,O>9(B4M(!GF5;?2M7W@V"H%UV!\3S+ M[@P8OE?B5MVF<:JT.)R-STQ[5P&:`3G!O/G9B'-U8U^@6R[U5XEM_/+E_8-Z MCRVJCHX,5TNK>=II+CO0+GAX@_*K?0GO(.A`%YZP^YW.!X6PF$;HY2'B0>S^ M/K#.(](3[C70"310+ZV6[O6JQ$*4S9*U(USLPF0PNKHX'0Q&N]!M5^EUKLXR M3'C9@376N=0LMNJ/N7_&^KE+YYGNG4WWFW^>,,'PIIK/^EZ`;CSU]\@/^0N@ %3.X&```` ` end -- Vojtech Pavlik SuSE Labs |
From: Ewan M. M. <ec...@yo...> - 2002-07-25 13:33:41
|
On Wed, 24 Jul 2002, James Simmons wrote: > > To the people with the devfs issues. Please send me a log of what > exactly happened and a detail ksymoop if you can. I just tried it on my > system with devfs enabled and it works for me. It doesn't oops, it just doesn't register the devices so you can't open gettys on them. Other than that the kernel boots fine and you can log in over the network. Doing that you can see a couple of big difference in /dev: 2.5.28 without fix: $ ls -l /dev/vc total 0 crw------- 1 root root 4, 0 Jan 1 1970 0 $ ls -l /dev/tty* crw-rw-rw- 1 root root 5, 0 Jan 1 1970 /dev/tty lr-xr-xr-x 1 root root 4 Jul 25 14:17 /dev/tty0 -> vc/0 Whereas with the fix to add a call to con_init_devfs() near the end of vty_init() it all works and you can see the following: ls -l /dev/vc total 0 crw------- 1 root root 4, 0 Jan 1 1970 0 crw------- 1 root root 4, 1 Jul 25 14:09 1 crw------- 1 root root 4, 10 Jan 1 1970 10 crw------- 1 root root 4, 11 Jan 1 1970 11 etc... crw------- 1 root root 4, 63 Jan 1 1970 63 $ ls -l /dev/tty* crw-rw-rw- 1 root root 5, 0 Jan 1 1970 /dev/tty lr-xr-xr-x 1 root root 4 Jul 25 14:25 /dev/tty0 -> vc/0 lr-xr-xr-x 1 root root 4 Jul 25 14:25 /dev/tty1 -> vc/1 lr-xr-xr-x 1 root root 5 Jul 25 14:25 /dev/tty10 -> vc/10 lr-xr-xr-x 1 root root 5 Jul 25 14:25 /dev/tty11 -> vc/11 etc... lr-xr-xr-x 1 root root 5 Jul 25 14:25 /dev/tty63 -> vc/63 If the system can still see static device nodes for the devices it can, of course, still ue them even with devfs built into the kernel. Ewan |
From: Vojtech P. <vo...@su...> - 2002-07-25 12:26:11
|
On Thu, Jul 25, 2002 at 02:03:42PM +0200, Vojtech Pavlik wrote: Hi! You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also work. =================================================================== ChangeSet@1.446, 2002-07-25 14:23:58+02:00, vo...@tw... Add support for AT keyboards connected over a PS/2 to Serial converter to atkbd.c - trivial. Remove ps2serkbd, because it's not needed anymore. b/drivers/input/keyboard/Config.help | 12 - b/drivers/input/keyboard/Config.in | 1 b/drivers/input/keyboard/Makefile | 1 b/drivers/input/keyboard/atkbd.c | 19 +- drivers/input/keyboard/ps2serkbd.c | 299 ----------------------------------- 5 files changed, 14 insertions(+), 318 deletions(-) diff -Nru a/drivers/input/keyboard/Config.help b/drivers/input/keyboard/Config.help --- a/drivers/input/keyboard/Config.help Thu Jul 25 14:24:31 2002 +++ b/drivers/input/keyboard/Config.help Thu Jul 25 14:24:31 2002 @@ -7,7 +7,8 @@ CONFIG_KEYBOARD_ATKBD Say Y here if you want to use the standard AT keyboard. Usually you'll need this, unless you have a different type keyboard (USB, - ADB or other). + ADB or other). This also works for AT keyboards connected over + a PS/2 to serial converter. If unsure, say Y. @@ -24,15 +25,6 @@ This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). The module will be called sunkbd.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_KEYBOARD_PS2SERKBD - Say Y here if you want to use a PS/2 to Serial converter with a - keyboard attached to it. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called ps2serkbd.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. CONFIG_KEYBOARD_XTKBD diff -Nru a/drivers/input/keyboard/Config.in b/drivers/input/keyboard/Config.in --- a/drivers/input/keyboard/Config.in Thu Jul 25 14:24:31 2002 +++ b/drivers/input/keyboard/Config.in Thu Jul 25 14:24:31 2002 @@ -6,7 +6,6 @@ dep_tristate ' AT keyboard support' CONFIG_KEYBOARD_ATKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO dep_tristate ' Sun Type 4 and Type 5 keyboard support' CONFIG_KEYBOARD_SUNKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO -dep_tristate ' PS/2 to Serial converter support' CONFIG_KEYBOARD_PS2SERKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO dep_tristate ' XT Keyboard support' CONFIG_KEYBOARD_XTKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO dep_tristate ' Newton keyboard' CONFIG_KEYBOARD_NEWTON $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO diff -Nru a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile --- a/drivers/input/keyboard/Makefile Thu Jul 25 14:24:31 2002 +++ b/drivers/input/keyboard/Makefile Thu Jul 25 14:24:31 2002 @@ -6,7 +6,6 @@ obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o -obj-$(CONFIG_KEYBOARD_PS2SERKBD) += ps2serkbd.o obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c --- a/drivers/input/keyboard/atkbd.c Thu Jul 25 14:24:31 2002 +++ b/drivers/input/keyboard/atkbd.c Thu Jul 25 14:24:31 2002 @@ -129,6 +129,7 @@ signed char ack; unsigned char emul; unsigned short id; + unsigned char write; }; /* @@ -146,7 +147,7 @@ #endif /* Interface error. Request that the keyboard resend. */ - if (flags & (SERIO_FRAME | SERIO_PARITY)) { + if ((flags & (SERIO_FRAME | SERIO_PARITY)) && atkbd->write) { printk("atkbd.c: frame/parity error: %02x\n", flags); serio_write(serio, ATKBD_CMD_RESEND); return; @@ -265,7 +266,7 @@ struct atkbd *atkbd = dev->private; char param[2]; - if (!atkbd->serio->write) + if (!atkbd->write) return -1; switch (type) { @@ -449,15 +450,19 @@ struct atkbd *atkbd; int i; - if ((serio->type & SERIO_TYPE) != SERIO_8042) - return; + if ((serio->type & SERIO_TYPE) != SERIO_8042 && + (((serio->type & SERIO_TYPE) != SERIO_RS232) || (serio->type & SERIO_PROTO) != SERIO_PS2SER)) + return; if (!(atkbd = kmalloc(sizeof(struct atkbd), GFP_KERNEL))) return; memset(atkbd, 0, sizeof(struct atkbd)); - if (serio->write) { + if ((serio->type & SERIO_TYPE) == SERIO_8042 && serio->write) + atkbd->write = 1; + + if (atkbd->write) { atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); atkbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL); } else atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP); @@ -475,7 +480,7 @@ return; } - if (serio->write) { + if (atkbd->write) { if (atkbd_probe(atkbd)) { serio_close(serio); @@ -518,7 +523,7 @@ printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys); - if (serio->write) + if (atkbd->write) atkbd_initialize(atkbd); } diff -Nru a/drivers/input/keyboard/ps2serkbd.c b/drivers/input/keyboard/ps2serkbd.c --- a/drivers/input/keyboard/ps2serkbd.c Thu Jul 25 14:24:31 2002 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,299 +0,0 @@ -/* - * based on: sunkbd.c and ps2serkbd.c - * - * $Id: ps2serkbd.c,v 1.5 2001/09/25 10:12:07 vojtech Exp $ - */ - -/* - * PS/2 keyboard via adapter at serial port driver for Linux - */ - -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <linux/delay.h> -#include <linux/slab.h> -#include <linux/module.h> -#include <linux/interrupt.h> -#include <linux/init.h> -#include <linux/input.h> -#include <linux/serio.h> -#include <linux/tqueue.h> - -#define ATKBD_CMD_SETLEDS 0x10ed -#define ATKBD_CMD_GSCANSET 0x11f0 -#define ATKBD_CMD_SSCANSET 0x10f0 -#define ATKBD_CMD_GETID 0x02f2 -#define ATKBD_CMD_ENABLE 0x00f4 -#define ATKBD_CMD_RESET_DIS 0x00f5 -#define ATKBD_CMD_SETALL_MB 0x00f8 -#define ATKBD_CMD_EX_ENABLE 0x10ea -#define ATKBD_CMD_EX_SETLEDS 0x20eb - -#define ATKBD_RET_ACK 0xfa -#define ATKBD_RET_NAK 0xfe - -#define ATKBD_KEY_UNKNOWN 0 -#define ATKBD_KEY_BAT 251 -#define ATKBD_KEY_EMUL0 252 -#define ATKBD_KEY_EMUL1 253 -#define ATKBD_KEY_RELEASE 254 -#define ATKBD_KEY_NULL 255 - -static unsigned char ps2serkbd_set2_keycode[512] = { - 0, 67, 65, 63, 61, 59, 60, 88, 0, 68, 66, 64, 62, 15, 41, 85, - 0, 56, 42, 0, 29, 16, 2, 89, 0, 0, 44, 31, 30, 17, 3, 90, - 0, 46, 45, 32, 18, 5, 4, 91, 0, 57, 47, 33, 20, 19, 6, 0, - 0, 49, 48, 35, 34, 21, 7, 0, 0, 0, 50, 36, 22, 8, 9, 0, - 0, 51, 37, 23, 24, 11, 10, 0, 0, 52, 53, 38, 39, 25, 12, 0, - 122, 89, 40,120, 26, 13, 0, 0, 58, 54, 28, 27, 0, 43, 0, 0, - 85, 86, 90, 91, 92, 93, 14, 94, 95, 79, 0, 75, 71,121, 0,123, - 82, 83, 80, 76, 77, 72, 1, 69, 87, 78, 81, 74, 55, 73, 70, 99, - 252, 0, 0, 65, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 252,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, - 0, 0, 92, 90, 85, 0,137, 0, 0, 0, 0, 91, 89,144,115, 0, - 136,100,255, 0, 97,149,164, 0,156, 0, 0,140,115, 0, 0,125, - 0,150, 0,154,152,163,151,126,112,166, 0,140, 0,147, 0,127, - 159,167,139,160,163, 0, 0,116,158, 0,150,165, 0, 0, 0,142, - 157, 0,114,166,168, 0, 0, 0,155, 0, 98,113, 0,148, 0,138, - 0, 0, 0, 0, 0, 0,153,140, 0, 0, 96, 0, 0, 0,143, 0, - 133, 0,116, 0,143, 0,174,133, 0,107, 0,105,102, 0, 0,112, - 110,111,108,112,106,103, 0,119, 0,118,109, 0, 99,104,119 -}; - -/* - * Per-keyboard data. - */ - -struct ps2serkbd { - unsigned char keycode[512]; - struct input_dev dev; - struct serio *serio; - char name[64]; - char phys[32]; - struct tq_struct tq; - unsigned char cmdbuf[4]; - unsigned char cmdcnt; - unsigned char set; - char release; - char ack; - char emul; - char error; - unsigned short id; -}; - -/* - * ps2serkbd_interrupt() is called by the low level driver when a character - * is received. - */ - -static void ps2serkbd_interrupt(struct serio *serio, unsigned char data, unsigned int flags) -{ - static int event_count=0; - struct ps2serkbd* ps2serkbd = serio->private; - int code=data; - -#if 0 - printk(KERN_WARNING "ps2serkbd.c(%8d): (scancode %#x)\n", event_count, data); -#endif - event_count++; - - switch (code) { - case ATKBD_RET_ACK: - ps2serkbd->ack = 1; - return; - case ATKBD_RET_NAK: - ps2serkbd->ack = -1; - return; - } - - if (ps2serkbd->cmdcnt) { - ps2serkbd->cmdbuf[--ps2serkbd->cmdcnt] = code; - return; - } - - switch (ps2serkbd->keycode[code]) { - case ATKBD_KEY_BAT: - queue_task(&ps2serkbd->tq, &tq_immediate); - mark_bh(IMMEDIATE_BH); - return; - case ATKBD_KEY_EMUL0: - ps2serkbd->emul = 1; - return; - case ATKBD_KEY_EMUL1: - ps2serkbd->emul = 2; - return; - case ATKBD_KEY_RELEASE: - ps2serkbd->release = 1; - return; - } - - if (ps2serkbd->emul) { - if (--ps2serkbd->emul) return; - code |= 0x100; - } - - switch (ps2serkbd->keycode[code]) { - case ATKBD_KEY_NULL: - break; - case ATKBD_KEY_UNKNOWN: - printk(KERN_WARNING "ps2serkbd.c: Unknown key (set %d, scancode %#x) %s.\n", - ps2serkbd->set, code, ps2serkbd->release ? "released" : "pressed"); - break; - default: - input_report_key(&ps2serkbd->dev, ps2serkbd->keycode[code], !ps2serkbd->release); - input_sync(&ps2serkbd->dev); - } - - ps2serkbd->release = 0; -} - -/* - * ps2serkbd_event() handles events from the input module. - */ - -static int ps2serkbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) -{ - switch (type) { - - case EV_LED: - - return 0; - } - - return -1; -} - -static int ps2serkbd_initialize(struct ps2serkbd *ps2serkbd) -{ - return 0; -} - -static void ps2serkbd_reinit(void *data) -{ -} - - -static void ps2serkbd_connect(struct serio *serio, struct serio_dev *dev) -{ - struct ps2serkbd *ps2serkbd; - int i; - - if ((serio->type & SERIO_TYPE) != SERIO_RS232) - return; - - if ((serio->type & SERIO_PROTO) && (serio->type & SERIO_PROTO) != SERIO_PS2SER) - return; - - - if (!(ps2serkbd = kmalloc(sizeof(struct ps2serkbd), GFP_KERNEL))) - return; - - memset(ps2serkbd, 0, sizeof(struct ps2serkbd)); - - ps2serkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); - ps2serkbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL); - - ps2serkbd->serio = serio; - - ps2serkbd->dev.keycode = ps2serkbd->keycode; - ps2serkbd->dev.event = ps2serkbd_event; - ps2serkbd->dev.private = ps2serkbd; - - ps2serkbd->tq.routine = ps2serkbd_reinit; - ps2serkbd->tq.data = ps2serkbd; - - serio->private = ps2serkbd; - - if (serio_open(serio, dev)) { - kfree(ps2serkbd); - return; - } - - if (ps2serkbd_initialize(ps2serkbd) < 0) { - serio_close(serio); - kfree(ps2serkbd); - return; - } - - ps2serkbd->set = 4; - - if (ps2serkbd->set == 4) { - ps2serkbd->dev.ledbit[0] |= 0; - sprintf(ps2serkbd->name, "AT Set 2 Extended keyboard\n"); - } - memcpy(ps2serkbd->keycode, ps2serkbd_set2_keycode, sizeof(ps2serkbd->keycode)); - - sprintf(ps2serkbd->phys, "%s/input0", serio->phys); - - ps2serkbd->dev.name = ps2serkbd->name; - ps2serkbd->dev.phys = ps2serkbd->phys; - ps2serkbd->dev.id.bustype = BUS_RS232; - ps2serkbd->dev.id.vendor = SERIO_PS2SER; - ps2serkbd->dev.id.product = ps2serkbd->set; - ps2serkbd->dev.id.version = ps2serkbd->id; - - for (i = 0; i < 512; i++) - if (ps2serkbd->keycode[i] && ps2serkbd->keycode[i] <= 250) - set_bit(ps2serkbd->keycode[i], ps2serkbd->dev.keybit); - - input_register_device(&ps2serkbd->dev); -} - -/* - * ps2serkbd_disconnect() unregisters and closes behind us. - */ - -static void ps2serkbd_disconnect(struct serio *serio) -{ - struct ps2serkbd *ps2serkbd = serio->private; - input_unregister_device(&ps2serkbd->dev); - serio_close(serio); - kfree(ps2serkbd); -} - -static struct serio_dev ps2serkbd_dev = { -interrupt: - ps2serkbd_interrupt, -connect: - ps2serkbd_connect, -disconnect: - ps2serkbd_disconnect -}; - -/* - * The functions for insering/removing us as a module. - */ - -int __init ps2serkbd_init(void) -{ - serio_register_device(&ps2serkbd_dev); - return 0; -} - -void __exit ps2serkbd_exit(void) -{ - serio_unregister_device(&ps2serkbd_dev); -} - -module_init(ps2serkbd_init); -module_exit(ps2serkbd_exit); =================================================================== This BitKeeper patch contains the following changesets: + ## Wrapped with gzip_uu ## begin 664 bkpatch20801 M'XL(`/_M/ST``\U8;6_B1A#^C'_%G$Y*@ZZ8?;?-B>BXD+;H>@J"W(>3*E6+ MO007L)%M$J6U^ML[M@GA2-+PTIQ*HJRQAV=F9YY]9LA;^)*:I%6[B?_(C#^Q MWL(O<9JU:MEM.`NO)YF]]&]M_T^\/XACO-^<Q'/37%DW1]-F&"V6F87/^SKS M)W!CDK15HS9?W\GN%J95&US\_.77SL"RVFTXG^CHV@Q-!NVVE<7)C9X%Z0>= M369Q9&>)CM*YR;3MQ_-\;9HS0AC^2.IP(E5.%1%.[M.`4BVH"0@3KA+6*K`/ M6^%OXSA,T@*-Y;@*S^H"M8500%B3.$TF@8H6XRWIOB.L10@\`POO)#2(]1'^ MVTV<6SYT@@#2Y6(1)QF,XP0Z5S`U=Z-8)T$*?AQ%QL],`#'F&S3TATV&0<#0 M)*&>X<?1`I]D^!#OZFPZ"FP?&I`EX0T:V#`P<_PH+%*&U<>G/\+(^'J9&@BS M'U($B.(,(F,"]*&CNWF<&-OZ!))QAUG]API:C3U?ED4TL<Z>RV@>8(1(H8I6 MS?LM-U=;6%6/<,J)*TA./9?2?#0*/,.("2A7GL./PRZ8P;B4B"V5MW^DYW$T M#J_M,-J.52K'D[FG#>$&$SNF2HT]YUCX=;B*>](Y.-R)F2VV`Q8.7N74=3!2 MYHT-,2(0\G@'ZY"%\@C?/^3/>FK&X<QLQTN(0T7N&5?[RC7:%=)%0AR)O@Z6 M%V=V_V#7)VR;O#0G@A*5&S8RRA6^UAYC@@?/.O@89I^,69BD&9B9P</?M/&B ML>'@[VVLC3U0=)H+IB0M)?CE8A7:_-I<.MX!Y:CC`G6<N)P[I8[S1RHN7U)Q M!@WZ.C*^K;.HH17K+Z&1W):_J(G]'>IQ@-)V*0%J]?`OLP`ZW8^`C23.)B:I MVW`U"5/0LS2&VSB9IB\U&01X:#-IV68>FHQM=9D#W@[,"J/#>;6KI!X+O\$I MX?)#.4604]^+4I7V[T6I,#J$4![\JWS<:^<!-=Y/U(]$7U>82_1237__XPH7 MDU?5?G8K\?UN7Z'"]Z/D_@7>9X([#AO;'96*B9QPI51974KW+R_%KN!\_]F^ MG.B_G><?A#8MJ%`-IKM18969`YC0PT."7*@MHS2\CK`+^!.=P&T29N8]=A;A ME:VE7&KA&$Y/QS-]G<()G`XO!KW+WW\:=#Y?0`[5NWYGT+OZ6J_#R4GU=:1Q M5D+5X2_L'<HMP*JE!'OSC8W5%9)A#^L)R8&OW!4]*&Z<%=\NT6GEY>IK_Z(. M;]JKMRX1#!U:M=KI3O:#(>.L#GD.3UKW!Y=7EQOF_2'#BWH=\6'U2DRV3"+, MCU!EZRT6\6+`[:V`866ZVGVMMID-:`-];_U6@3Y*I7#*5%;+TR:2%77M5<MC MD_+T'S!K'B`)>\_&QSM8:X-"^9=/*#^E+4YV4/[7&1>[9;9;SYWFC?T4@V0Y DS6_IP`&5.T`<UO_<\2?&GZ;+>5N;0+ET+*U_``B&%^]1$@`` ` end -- Vojtech Pavlik SuSE Labs |
From: Vojtech P. <vo...@su...> - 2002-07-25 12:03:54
|
Hi! You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also work. =================================================================== ChangeSet@1.445, 2002-07-25 14:02:02+02:00, vo...@tw... Small cleanup in evdev.c, which copies the data directly from input struct to userspace. evdev.c | 8 +------- 1 files changed, 1 insertion(+), 7 deletions(-) diff -Nru a/drivers/input/evdev.c b/drivers/input/evdev.c --- a/drivers/input/evdev.c Thu Jul 25 14:02:19 2002 +++ b/drivers/input/evdev.c Thu Jul 25 14:02:19 2002 @@ -233,7 +233,6 @@ struct evdev_list *list = file->private_data; struct evdev *evdev = list->evdev; struct input_dev *dev = evdev->handle.dev; - struct input_devinfo id; int retval, t, u; if (!evdev->exist) return -ENODEV; @@ -244,12 +243,7 @@ return put_user(EV_VERSION, (int *) arg); case EVIOCGID: - id.bustype = dev->id.bustype; - id.vendor = dev->id.vendor; - id.product = dev->id.product; - id.version = dev->id.version; - return copy_to_user((void *) arg, &id, sizeof(struct input_devinfo)); - + return copy_to_user((void *) arg, &dev->id, sizeof(struct input_devinfo)); case EVIOCGREP: if ((retval = put_user(dev->rep[0], ((int *) arg) + 0))) return retval; =================================================================== This BitKeeper patch contains the following changesets: + ## Wrapped with gzip_uu ## begin 664 bkpatch14675 M'XL(`,OH/ST``[64;6^;,!#'7^-/<5*E*5T3L!T#@2E5MW;:IDU:E*JO(]=< M`BO@"`Q1*C[\3!JU6]6T>P0+B_-QW/WO9Q_!58U5[+3ZFT&5DB/XJ&L3.V:3 MY=DJ-6ZC-JZZM?:YUM;NI;I`;^_M7=]X6;EN#+'K,VE4"BU6=>PP=WQO,=LU MQL[\_8>K+V_GA$RG<)[*<H67:&`Z)497K<R3^DR:-->E:RI9U@4:Z2I==/>N M':>4V]MGX9CZ0<<"*L).L80Q*1@FE(M)(,@^L;-'Z3^.$W*?,3_@D\YGW!?D M`I@KA`^4>S3TN`],Q)3;<=(_*1P("R<,1I2\@W];Q#E1<%G(/`>5HRR;-60E M8)M@ZZHA;-+,JJKT.L,:3(J02",AR2I4)M_"LM*%_7[7%JA-U2ACTX/&=KE> M2X4N^0RV:!&1V4,CR.@W+T*HI.3TA<*3*NMYN&/$VU?P@PC"3EU@Q0@[C"9+ M%BEQG2@IPFAY2/+G8O9=Y93Y41]3L!UK3[J_S-U?9'Z0P6<S%WPL0D8[.@D# M?\<C&_^,(XO]Z!=P#/\+CG,L=(O0E"5B@LD>K)ZE.ZF_PJC:[(9E8_:TZG\` MV04?!\#L)$((R"?N<_OF.$Z%IJG*?A-L%T8O>K@'@U9G";P^!EFMAO#*_G)T MFB5#J+-;U,O!?BOL,EK8Q:Q<ZN/C-P\GETI1W=1-,0VH"D,:C<EW>`,B?!P% "```` ` end -- Vojtech Pavlik SuSE Labs |