From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH][RESEND] pcnet: Do not receive external frames in loopback mode
Date: Wed, 17 Nov 2010 11:18:49 +0100 [thread overview]
Message-ID: <4CE3AC09.1090901@siemens.com> (raw)
In-Reply-To: <4CBDB33C.60002@siemens.com>
Am 19.10.2010 17:03, Jan Kiszka wrote:
> While not explicitly stated in the spec, it was observed on real systems
> that enabling loopback testing on the pcnet controller disables
> reception of external frames. And some legacy software relies on it, so
> provide this behavior.
Ping.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> hw/pcnet.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pcnet.c b/hw/pcnet.c
> index b52935a..f970bda 100644
> --- a/hw/pcnet.c
> +++ b/hw/pcnet.c
> @@ -1048,9 +1048,10 @@ ssize_t pcnet_receive(VLANClientState *nc, const uint8_t *buf, size_t size_)
> int crc_err = 0;
> int size = size_;
>
> - if (CSR_DRX(s) || CSR_STOP(s) || CSR_SPND(s) || !size)
> + if (CSR_DRX(s) || CSR_STOP(s) || CSR_SPND(s) || !size ||
> + (CSR_LOOP(s) && !s->looptest)) {
> return -1;
> -
> + }
> #ifdef PCNET_DEBUG
> printf("pcnet_receive size=%d\n", size);
> #endif
next prev parent reply other threads:[~2010-11-17 10:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 15:03 [Qemu-devel] [PATCH][RESEND] pcnet: Do not receive external frames in loopback mode Jan Kiszka
2010-11-17 10:18 ` Jan Kiszka [this message]
2010-11-21 15:18 ` Anthony Liguori
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=4CE3AC09.1090901@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@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).