From: Eric Blake <eblake@redhat.com>
To: penghao122@sina.com, qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-stable <qemu-stable@nongnu.org>
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 [thread overview]
Message-ID: <554782C9.9050901@redhat.com> (raw)
In-Reply-To: <20150503163241.272593D7131@webmail.sinamail.sina.com.cn>
[-- Attachment #1: Type: text/plain, Size: 2624 bytes --]
On 05/03/2015 10:32 AM, penghao122@sina.com 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<penghao122@sina.co
> --- 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:
http://wiki.qemu.org/Contribute/SubmitAPatch
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-05-04 14:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 16:32 [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 penghao122
2015-05-04 14:31 ` Eric Blake [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-26 2:26 penghao122
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=554782C9.9050901@redhat.com \
--to=eblake@redhat.com \
--cc=penghao122@sina.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).