From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH][RESEND] pcnet: Do not receive external frames in loopback mode
Date: Sun, 21 Nov 2010 09:18:28 -0600 [thread overview]
Message-ID: <4CE93844.4030305@codemonkey.ws> (raw)
In-Reply-To: <4CBDB33C.60002@siemens.com>
On 10/19/2010 10:03 AM, 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.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> 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
>
prev parent reply other threads:[~2010-11-21 15:18 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 ` [Qemu-devel] " Jan Kiszka
2010-11-21 15:18 ` Anthony Liguori [this message]
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=4CE93844.4030305@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=jan.kiszka@siemens.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).