[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ps2 keyboard:fix can't use ps2 keyboard if typi

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] ps2 keyboard:fix can't use ps2 keyboard if typing many times After leaving grub and before finishing linux kernel ps2 driver initialization
Date: Mon, 04 May 2015 08:31:37 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 05/03/2015 10:32 AM, address@hidden wrote:

Poor subject line.  Please try to keep subjects under 65 characters in
length (see 'git shortlog -30' for good examples).  Maybe:

keyboard: handle ps2 typing buffer overrun

> Starting  a linux guest with ps2 keyboard ,if you type many times during 
> leaving grub and into linux kernel ,then you can't use keyboard after linux 
> initialization finished.

Also, wrap your commit body messages to fit with 78 columns or so.

Spacing is wrong: s/Starting  a/Staring a/; s/keyboard ,if/keyboard,
if/; s/kernel ,then/kernel, then/

> during grub,the work method of ps2 keyboard is like this:
> first ,ps2 keyboard driver send command KBD_CCMD_KBD_ENABLE,
> second,if there is a keyboard input,then  ps2 keyboard driver read data.
> third ,ps2 keyboard driver send command KBD_CCMD_KBD_ENABLE,

Again, in English, no space before comma, but space afterwards.

> ...
> this is diffrent method of linux kernel .

s/diffrent/different/; s/ ././

> After leaving  grub and before finishing linux kernel ps2 driver 
> initialization,if you type many times,the input data keep saving the ps2 
> queue in qemu .Before linux kernel initialize ps2 keyboard,linux call 
> i8042_init->i8042_controller_check,if i8042_controller_check return fail,then 
> linux kernel ps2 keyboard driver will never initialize. 

More spacing errors; no trailing space, long line.

> (linux kernel 2.6.32 i8042.c)
> static int i8042_controller_check(void)
> {
>  if (i8042_flush() == I8042_BUFFER_SIZE)
>   return -ENODEV;
>  return 0;
> }
> static int i8042_flush(void)
> {...
> while (((str = i8042_read_status()) & I8042_STR_OBF) && (i < 
> I8042_BUFFER_SIZE)) {
>   udelay(50);
>   data = i8042_read_data();
>   i++;
>   }
> return i;
> }

Indentation is weird.

> during calling i8042_flush it is full in qemu queue .
> ps_read_data:
>                        s->update_irq(s->update_arg, 0);
>                        s->update_irq(s->update_arg, q->count != 0);
> because q->count!=0, kbd_update_irq can set I8042_STR_OBF.Then i8042_flush()  
> will return I8042_BUFFER_SIZE.
> Signed-off-by: Hao Peng<address@hidden
> --- ps2.c.orig 2015-04-25 09:44:38.865777168 -0400

Missing the usual '---' separator between the commit body and the patch
proper; also missing the diffstat.  Life is easier if you use 'git
format-patch' and/or 'git send-email' to format your patch messages.

More hints at:

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]